From 45a4f9c07589c9aa2e08fa342a57561eec21d137 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 5 Mar 2018 14:33:04 +0000 Subject: Add a job for testing deployment of bifrost Deploys a bifrost container using kolla-ansible bifrost-deploy. IPA and disk images are downloaded rather than built to improve reliability. Currently only minimal testing of the deployment is performed, creating and deleting an ironic node. Ideally we would perform a bare metal node deployment. The job is based on CentOS, as Ubuntu bifrost deployment is currently failing with a python-MySQLdb error. Change-Id: Ic45094594c21116b5b0d6a606f568fc7954175e3 --- tests/get_logs.sh | 10 ++++++++++ tests/run.yml | 18 ++++++++++++++++++ tests/templates/bifrost-dib-overrides.j2 | 7 +++++++ tests/templates/globals-default.j2 | 4 ++++ 4 files changed, 39 insertions(+) create mode 100644 tests/templates/bifrost-dib-overrides.j2 (limited to 'tests') diff --git a/tests/get_logs.sh b/tests/get_logs.sh index 486b54a26..5c0a7bc49 100644 --- a/tests/get_logs.sh +++ b/tests/get_logs.sh @@ -46,6 +46,16 @@ copy_logs() { docker exec ceph_mon ceph osd tree > ${LOG_DIR}/kolla/ceph/ceph_osd_tree.txt fi + # bifrost related logs + if [[ $(docker ps --filter name=bifrost_deploy --format "{{.Names}}") ]]; then + for service in dnsmasq ironic-api ironic-conductor ironic-inspector mariadb nginx rabbitmq-server; do + mkdir -p ${LOG_DIR}/kolla/$service + docker exec bifrost_deploy systemctl status $service > ${LOG_DIR}/kolla/$service/systemd-status-$service.txt + done + docker exec bifrost_deploy journalctl -u mariadb > ${LOG_DIR}/kolla/mariadb/mariadb.txt + docker exec bifrost_deploy journalctl -u rabbitmq-server > ${LOG_DIR}/kolla/rabbitmq-server/rabbitmq.txt + fi + for container in $(docker ps -a --format "{{.Names}}"); do docker logs --tail all ${container} > ${LOG_DIR}/docker_logs/${container}.txt done diff --git a/tests/run.yml b/tests/run.yml index cb9d834a9..3300329a1 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -62,6 +62,7 @@ path: "/etc/kolla/config/nova" state: "directory" mode: 0777 + when: scenario != "bifrost" become: true delegate_to: "primary" @@ -69,6 +70,23 @@ template: src: "{{ kolla_ansible_full_src_dir }}/tests/templates/nova-compute-overrides.j2" dest: /etc/kolla/config/nova/nova-compute.conf + when: scenario != "bifrost" + delegate_to: "primary" + + - name: ensure bifrost conf overrides dir exists + file: + path: "/etc/kolla/config/bifrost" + state: "directory" + mode: 0777 + when: scenario == "bifrost" + become: true + delegate_to: "primary" + + - name: generate bifrost DIB config overrides + template: + src: "{{ kolla_ansible_full_src_dir }}/tests/templates/bifrost-dib-overrides.j2" + dest: /etc/kolla/config/bifrost/dib.yml + when: scenario == "bifrost" delegate_to: "primary" - name: copy passwords.yml file diff --git a/tests/templates/bifrost-dib-overrides.j2 b/tests/templates/bifrost-dib-overrides.j2 new file mode 100644 index 000000000..0ada56a2f --- /dev/null +++ b/tests/templates/bifrost-dib-overrides.j2 @@ -0,0 +1,7 @@ +--- +# Don't build an IPA deployment image, instead download upstream images. +create_ipa_image: false +download_ipa: true + +# Don't build a disk image. It takes time and can be unreliable. +use_cirros: true diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 6478e0852..95a7f27c8 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -6,12 +6,14 @@ kolla_install_type: "{{ install_type }}" # in the CI gate. keepalived_virtual_router_id: "{{ 250 | random(1) }}" +{% if scenario != "bifrost" %} {% if hostvars|length > 2 %} kolla_internal_vip_address: "{{ api_interface_address }}" enable_haproxy: "no" {% else %} kolla_internal_vip_address: "169.254.169.10" {% endif %} +{% endif %} network_interface: "{{ api_interface_name }}" docker_restart_policy: "never" @@ -24,11 +26,13 @@ docker_registry: "{{ api_interface_address }}:4000" docker_namespace: "kolla" openstack_release: "{{ zuul.branch | basename }}" {% endif %} +{% if scenario != "bifrost" %} neutron_external_interface: "fake_interface" enable_horizon: "yes" enable_heat: "no" openstack_logging_debug: "True" openstack_service_workers: "1" +{% endif %} # This is experimental feature, disable if gate fail. glance_enable_rolling_upgrade: "yes" -- cgit v1.2.3