--- # Copyright 2018, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Create a zun image hosts: zun_compute become: true tasks: - name: Pull cirros image command: docker pull cirros - name: Upload image into glance shell: | . /root/openrc docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw - name: Run zun service check hosts: zun_api[0] become: true tasks: - name: Check zun service is functional shell: | . /root/openrc /openstack/venvs/zun-untagged/bin/openstack appcontainer service list - name: Create zun container shell: | . /root/openrc /openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1