summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-05-02 12:34:38 -0400
committerTim Rozet <trozet@redhat.com>2018-05-21 10:36:05 -0400
commitd2913d4bcc0fcd25dc3d01f6604049dfd0a9217d (patch)
tree5cf7a0d04cbf8b30488bb18ba7ee79e215f08e47 /lib/ansible/playbooks
parent22bc385f5b2e25694699a614268aaad2fdacbb12 (diff)
Migrates master to use direct upstream
We now move master to deploy from upstream. That means we do not need to build undercloud/overcloud images anymore. Changes-Include: - Remove bash build scripts as we do not need to build anything other than the python package anymore - Remove building images or iso from build.py - Remove building of images and iso from Makefile - Rename/refactor deploy settings files for nosdn and odl. The new convention is that the typical scenario names we use will deploy master. We also support n-1 OS, so in that case we use the branch name for the "feature" in the scenario name: os-odl-queens-noha. - Tacker/Congress are disabled in settings files until we fix that with upstream. Containers are now enabled by default. - Disable TLS for undercloud (was changed upstream to default enabled) - Fix environments docker directory for master THT (was changed upstream) - Includes fix for LP#1768901 - Includes workaround for LP#1770692 - Moves to docker.io for container images as it is more stable and should contain the same images - Removes the term 'common' from apex packaging for referencing the Python Apex package Change-Id: If6b433860b3ff882686c78d0f24a2f0c52b9b57a Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks')
-rw-r--r--lib/ansible/playbooks/configure_undercloud.yml14
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml30
-rw-r--r--lib/ansible/playbooks/post_deploy_overcloud.yml1
-rw-r--r--lib/ansible/playbooks/prepare_overcloud_containers.yml12
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