diff --git a/ansible/roles/zun/templates/zun.conf.j2 b/ansible/roles/zun/templates/zun.conf.j2 index 3613df0365..709dddc7a9 100644 --- a/ansible/roles/zun/templates/zun.conf.j2 +++ b/ansible/roles/zun/templates/zun.conf.j2 @@ -113,3 +113,4 @@ base_url = ws://{{ kolla_external_fqdn }}:{{ zun_wsproxy_port }} [docker] docker_remote_api_version = 1.24 +api_url = tcp://{{ api_interface_address }}:2375 diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 95a7f27c83..8acf689656 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -44,4 +44,10 @@ ceph_pool_pg_num: 8 ceph_pool_pgp_num: 8 {% endif %} +{% if scenario == "zun" %} +enable_zun: "yes" +enable_kuryr: "yes" +docker_custom_option: " -H unix:///var/run/docker.sock -H tcp://{{ api_interface_address }}:2375" +{% endif %} + keystone_token_provider: "fernet" diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index 035e7402b6..b92f3570c3 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -601,6 +601,9 @@ placement [zun-api:children] zun +[zun-wsproxy:children] +zun + [zun-compute:children] compute diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 299dd400b3..fc7a60af6e 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -44,6 +44,10 @@ EOF GATE_IMAGES+=",ceph,cinder" fi + if [[ $ACTION == "zun" ]]; then + GATE_IMAGES+=",zun,kuryr" + fi + cat <=2.4" "docker>=2.0.0" "python-openstackclient" "ara" "cmd2<0.9.0" + if [[ $ACTION == "zun" ]]; then + sudo -H pip install -U "python-zunclient" + fi detect_distro sudo mkdir /etc/ansible @@ -135,6 +142,12 @@ function sanity_check { openstack volume create --size 2 test_volume openstack server add volume kolla_boot_test test_volume --device /dev/vdb fi + if echo $ACTION | grep -q "zun"; then + openstack --debug appcontainer service list + openstack --debug appcontainer host list + # TODO(hongbin): Run a Zun container and assert the container becomes + # Running + fi } function test_openstack { diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 9b3d1ffdf8..9b7956059d 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -88,3 +88,13 @@ voting: false vars: base_distro: centos + +- job: + name: kolla-ansible-ubuntu-source-zun + parent: kolla-ansible-base + nodeset: kolla-ansible-xenial + voting: false + vars: + base_distro: ubuntu + install_type: source + scenario: zun diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 2d65193f02..bc8f261402 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -18,6 +18,8 @@ - kolla-ansible-oraclelinux-source-ceph - kolla-ansible-bifrost-centos-source: files: ^ansible\/roles\/bifrost\/.* + - kolla-ansible-ubuntu-source-zun: + files: ^ansible\/roles\/zun\/.* - openstack-tox-lower-constraints gate: jobs: