Skip to content
Snippets Groups Projects
Commit 9f5efc5e authored by Paul Bourke's avatar Paul Bourke
Browse files

Import the Murano core libary as part of setup

In order for Murano to be operational the core library package must be
imported [0]

Add Ansible tasks to do this idempotently.

[0] http://docs.openstack.org/developer/murano/install/manual.html

TrivialFix

Change-Id: I2c49e9d663595650b885267839012b543505337a
parent d8755e17
No related branches found
No related tags found
No related merge requests found
......@@ -22,3 +22,42 @@
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
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
......@@ -4,8 +4,10 @@ MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% 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'] %}
{% elif base_distro in ['ubuntu'] %}
RUN ln -s /usr/share/murano-common/io.murano.zip /io.murano.zip
{% set murano_api_packages = ['murano-api'] %}
{% endif %}
......
......@@ -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 \
&& mkdir -p /etc/murano /home/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 %}
......
......@@ -202,7 +202,8 @@ ENV DEBIAN_FRONTEND noninteractive
'postgresql',
'postgresql-devel',
'python-devel',
'sqlite-devel'
'sqlite-devel',
'zip'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set openstack_base_packages = [
......@@ -217,11 +218,13 @@ ENV DEBIAN_FRONTEND noninteractive
'libyaml-dev',
'libz-dev',
'pkg-config',
'git'
'git',
'zip'
] %}
{% endif %}
{{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \
&& mkdir -p /var/lib/kolla \
......
---
features:
- Import Murano core libary during install required
for Murano operation.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment