1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- ---
- # Generate config using openshift-installer, set Base Domain to testing.tt
- # Add bootstrap host in [bootstrap] group and set ignition_file
- # Add master host to [masters] group
- # Add worker hosts in [workers] group
- # Make sure bootstrap has <clusterid>-api.<dns base> name
- # Make sure masters have <clusterid>-etcd-<index>.<dns base> name
- # FIXME: use dnsmasq to fake DNS entries
- - import_playbook: init/main.yml
- vars:
- l_install_base_packages: True
- l_repo_hosts: "all:!all"
- # TODO: proper firewalld setup
- # 49500 on bootstrap; 2379, 6443, 10250 on masters, 10250 on workers
- - import_playbook: container-runtime/private/setup_storage.yml
- - import_playbook: container-runtime/private/config.yml
- - name: install nodes
- hosts: nodes
- tasks:
- - import_role:
- name: openshift_node40
- tasks_from: install.yml
- - name: Config bootstrap node
- hosts: bootstrap
- tasks:
- - import_role:
- name: openshift_node40
- tasks_from: config.yml
- - import_role:
- name: openshift_node40
- tasks_from: systemd.yml
- - name: Start masters
- hosts: masters
- tasks:
- # TODO Read this from master's ignition file
- - set_fact:
- openshift_bootstrap_endpoint: "https://{{ bootstrap }}:49500/config/master?etcd_index={{ index }}"
- vars:
- bootstrap: "{{ hostvars[groups['bootstrap'][0]]['ansible_host'] }}"
- index: "{{ groups['masters'].index(inventory_hostname) }}"
- - name: Wait for bootstrap endpoint to show up
- uri:
- url: "{{ openshift_bootstrap_endpoint }}"
- validate_certs: false
- delay: 10
- retries: 60
- register: result
- until:
- - "'status' in result"
- - result.status == 200
- - import_role:
- name: openshift_node40
- tasks_from: config.yml
- - name: Make sure etcd user exists
- user:
- name: etcd
- - import_role:
- name: openshift_node40
- tasks_from: systemd.yml
- - name: Start workers
- hosts: workers
- tasks:
- # TODO Read this from master's ignition file
- - set_fact:
- openshift_bootstrap_endpoint: "https://{{ bootstrap }}:49500/config/worker"
- vars:
- bootstrap: "{{ hostvars[groups['bootstrap'][0]]['ansible_host'] }}"
- - name: Wait for bootstrap endpoint to show up
- uri:
- url: "{{ openshift_bootstrap_endpoint }}"
- validate_certs: false
- delay: 10
- retries: 60
- register: result
- until:
- - "'status' in result"
- - result.status == 200
- - import_role:
- name: openshift_node40
- tasks_from: config.yml
- - import_role:
- name: openshift_node40
- tasks_from: systemd.yml
|