diff options
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbooks/configure_undercloud.yml | 14 | ||||
-rw-r--r-- | lib/ansible/playbooks/deploy_overcloud.yml | 30 | ||||
-rw-r--r-- | lib/ansible/playbooks/post_deploy_overcloud.yml | 1 | ||||
-rw-r--r-- | lib/ansible/playbooks/prepare_overcloud_containers.yml | 12 |
4 files changed, 51 insertions, 6 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index fbac6eeb..bb580590 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -47,6 +47,11 @@ - name: openstack-configs undercloud shell: openstack-config --set undercloud.conf DEFAULT {{ item }} with_items: "{{ undercloud_config }}" + - name: Add ironic packages + yum: + name: openstack-ironic-api,openstack-ironic-common, + openstack-ironic-inspector + become: yes - name: openstack-configs ironic shell: openstack-config --set /etc/ironic/ironic.conf {{ item }} become: yes @@ -98,6 +103,15 @@ with_items: - neutron-server - neutron-dhcp-agent + - name: Configure workaround for mariadb long blob (LP#1768913) + shell: openstack-config --set /etc/my.cnf.d/galera.cnf mysqld innodb_log_file_size 256M + become: yes + - name: restart mariadb service + service: + name: mariadb + state: restarted + enabled: yes + become: yes - name: configure external network vlan ifcfg template: src: external_vlan_ifcfg.yml.j2 diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml index 268a5173..18ddab48 100644 --- a/lib/ansible/playbooks/deploy_overcloud.yml +++ b/lib/ansible/playbooks/deploy_overcloud.yml @@ -41,6 +41,33 @@ state: restarted enabled: yes become: yes + - name: Workaround to downgrade pacemaker (LP#1770692) + block: + - name: Pull haproxy container + shell: docker pull {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-haproxy:current-tripleo-rdo + - name: Find container pacemaker version + shell: docker run {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-haproxy:current-tripleo-rdo /bin/rpm -q pacemaker + register: pcs_version + - name: Create centos74 repo (contains older pacemaker) + copy: + dest: /tmp/centos74.repo + content: | + [centos74-updates] + name=CentOS-74 - Updates + baseurl=http://mirror.centos.org/centos/7.4.1708/updates/$basearch/ + gpgcheck=1 + gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + enabled=1 + mode: 0644 + - name: Install container pacemaker version to overcloud image + shell: > + LIBGUESTFS_BACKEND=direct virt-customize -a /home/stack/overcloud-full.qcow2 + --upload /tmp/centos74.repo:/etc/yum.repos.d/ + --run-command "yum remove -y pacemaker-cluster-libs pacemaker-libs pacemaker pacemaker-cli" + --run-command "yum install -y {{ pcs_version.stdout }}" -v + --install "pcs" + become: yes + when: ha_enabled - name: Remove Ceph OSD from ceph storage role lineinfile: path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml @@ -81,9 +108,12 @@ - block: - name: Execute Overcloud Deployment shell: "{{ stackrc }} && bash deploy_command" + rescue: - name: Show overcloud failures shell: "{{ stackrc }} && openstack stack failures list overcloud --long" + become: yes + become_user: stack - name: Show Keystone output shell: "{{ overcloudrc }} && {{ item }}" when: debug diff --git a/lib/ansible/playbooks/post_deploy_overcloud.yml b/lib/ansible/playbooks/post_deploy_overcloud.yml index 13623f26..af743b29 100644 --- a/lib/ansible/playbooks/post_deploy_overcloud.yml +++ b/lib/ansible/playbooks/post_deploy_overcloud.yml @@ -51,6 +51,7 @@ owner: root group: tacker become: yes + when: tacker - name: Restart Controller Neutron/Nova Services (Pike Workaround) shell: "systemctl restart {{ item }}" become: yes diff --git a/lib/ansible/playbooks/prepare_overcloud_containers.yml b/lib/ansible/playbooks/prepare_overcloud_containers.yml index 88a8df1c..79629c2b 100644 --- a/lib/ansible/playbooks/prepare_overcloud_containers.yml +++ b/lib/ansible/playbooks/prepare_overcloud_containers.yml @@ -21,7 +21,7 @@ - name: Prepare generic docker registry image file shell: > {{ stackrc }} && openstack overcloud container image prepare - --namespace trunk.registry.rdoproject.org/{{ os_version }} + --namespace docker.io/tripleo{{ os_version }} --tag {{ container_tag }} --push-destination {{ undercloud_ip }}:8787 -e /usr/share/openstack-tripleo-heat-templates/environments/docker.yaml @@ -31,7 +31,7 @@ - name: Prepare SDN docker registry image file shell: > {{ stackrc }} && openstack overcloud container image prepare - --namespace trunk.registry.rdoproject.org/{{ os_version }} + --namespace docker.io/tripleo{{ os_version }} --tag {{ container_tag }} --push-destination {{ undercloud_ip }}:8787 -e {{ sdn_env_file }} @@ -56,13 +56,13 @@ - name: Patch Docker images shell: > cd /home/stack/containers/{{ item }} && docker build - -t {{ undercloud_ip }}:8787/{{ os_version }}/centos-binary-{{ item }}:apex . + -t {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex . when: - patched_docker_services|length > 0 - item in (response.json)['repositories']|join(" ") with_items: "{{ patched_docker_services }}" - name: Push patched docker images to local registry - shell: docker push {{ undercloud_ip }}:8787/{{ os_version }}/centos-binary-{{ item }}:apex + shell: docker push {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex when: - patched_docker_services|length > 0 - item in (response.json)['repositories']|join(" ") @@ -70,7 +70,7 @@ - name: Prepare deployment generic docker image file shell: > {{ stackrc }} && openstack overcloud container image prepare - --namespace {{ undercloud_ip }}:8787/{{ os_version }} + --namespace {{ undercloud_ip }}:8787/tripleo{{ os_version }} --tag {{ container_tag }} -e /usr/share/openstack-tripleo-heat-templates/environments/docker.yaml --output-env-file docker-images.yaml @@ -79,7 +79,7 @@ - name: Prepare deployment SDN docker image file shell: > {{ stackrc }} && openstack overcloud container image prepare - --namespace {{ undercloud_ip }}:8787/{{ os_version }} + --namespace {{ undercloud_ip }}:8787/tripleo{{ os_version }} --tag {{ container_tag }} -e {{ sdn_env_file }} --output-env-file sdn-images.yaml |