123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- ---
- # 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: setup AWS creds
- hosts: masters:bootstrap:workers
- tasks:
- - import_role:
- name: openshift_node40
- tasks_from: aws.yml
- - name: Config bootstrap node
- hosts: bootstrap
- tasks:
- - import_role:
- name: openshift_node40
- tasks_from: aws.yml
- - 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
|