Merge "Import the Murano core libary as part of setup"

This commit is contained in:
Jenkins 2016-08-31 13:27:56 +00:00 committed by Gerrit Code Review
commit 624d300dc4
5 changed files with 53 additions and 3 deletions

View File

@ -22,3 +22,42 @@
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
when: inventory_hostname in groups['murano-api'] when: inventory_hostname in groups['murano-api']
- name: Waiting for Murano API service to be ready
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ murano_api_port }}"
connect_timeout: 1
timeout: 60
run_once: True
register: check_murano_port
until: check_murano_port | success
retries: 10
delay: 6
when: inventory_hostname in groups['murano-api']
- name: Checking if Murano core library package exists
command: "docker exec murano_api murano \
--os-username admin \
--os-password {{ keystone_admin_password }} \
--os-project-name admin \
--os-auth-url \
{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}/v3 \
package-list"
register: status
changed_when: False
run_once: True
when: inventory_hostname in groups['murano-api']
- name: Importing Murano core library package
command: "docker exec murano_api murano \
--os-username admin \
--os-password {{ keystone_admin_password }} \
--os-project-name admin \
--os-auth-url \
{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}/v3 \
package-import --is-public /io.murano.zip"
run_once: True
when:
- inventory_hostname in groups['murano-api']
- status.stdout.find("io.murano") == -1

View File

@ -4,8 +4,10 @@ MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN ln -s /var/cache/murano/meta/io.murano.zip /io.murano.zip
{% set murano_api_packages = ['openstack-murano-api'] %} {% set murano_api_packages = ['openstack-murano-api'] %}
{% elif base_distro in ['ubuntu'] %} {% elif base_distro in ['ubuntu'] %}
RUN ln -s /usr/share/murano-common/io.murano.zip /io.murano.zip
{% set murano_api_packages = ['murano-api'] %} {% set murano_api_packages = ['murano-api'] %}
{% endif %} {% endif %}

View File

@ -21,7 +21,9 @@ RUN ln -s murano-base-source/* murano \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /murano \ && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /murano \
&& mkdir -p /etc/murano /home/murano \ && mkdir -p /etc/murano /home/murano \
&& cp -r /murano/etc/murano/* /etc/murano/ \ && cp -r /murano/etc/murano/* /etc/murano/ \
&& chown -R murano: /etc/murano /home/murano && chown -R murano: /etc/murano /home/murano \
&& cd murano/meta/io.murano \
&& zip -r /io.murano.zip *
{% endif %} {% endif %}

View File

@ -202,7 +202,8 @@ ENV DEBIAN_FRONTEND noninteractive
'postgresql', 'postgresql',
'postgresql-devel', 'postgresql-devel',
'python-devel', 'python-devel',
'sqlite-devel' 'sqlite-devel',
'zip'
] %} ] %}
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
{% set openstack_base_packages = [ {% set openstack_base_packages = [
@ -217,11 +218,13 @@ ENV DEBIAN_FRONTEND noninteractive
'libyaml-dev', 'libyaml-dev',
'libz-dev', 'libz-dev',
'pkg-config', 'pkg-config',
'git' 'git',
'zip'
] %} ] %}
{% endif %} {% endif %}
{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
ADD openstack-base-archive /openstack-base-source ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \ RUN ln -s openstack-base-source/* /requirements \
&& mkdir -p /var/lib/kolla \ && mkdir -p /var/lib/kolla \

View File

@ -0,0 +1,4 @@
---
features:
- Import Murano core libary during install required
for Murano operation.