aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/murano/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/murano/tasks')
-rw-r--r--ansible/roles/murano/tasks/bootstrap.yml41
-rw-r--r--ansible/roles/murano/tasks/bootstrap_service.yml20
-rw-r--r--ansible/roles/murano/tasks/config.yml48
-rw-r--r--ansible/roles/murano/tasks/deploy.yml14
-rw-r--r--ansible/roles/murano/tasks/main.yml2
-rw-r--r--ansible/roles/murano/tasks/precheck.yml1
-rw-r--r--ansible/roles/murano/tasks/pull.yml14
-rw-r--r--ansible/roles/murano/tasks/reconfigure.yml66
-rw-r--r--ansible/roles/murano/tasks/register.yml40
-rw-r--r--ansible/roles/murano/tasks/start.yml67
-rw-r--r--ansible/roles/murano/tasks/upgrade.yml8
11 files changed, 0 insertions, 321 deletions
diff --git a/ansible/roles/murano/tasks/bootstrap.yml b/ansible/roles/murano/tasks/bootstrap.yml
deleted file mode 100644
index 931636ee8..000000000
--- a/ansible/roles/murano/tasks/bootstrap.yml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- name: Creating Murano database
- command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
- -m mysql_db
- -a "login_host='{{ database_address }}'
- login_port='{{ database_port }}'
- login_user='{{ database_user }}'
- login_password='{{ database_password }}'
- name='{{ murano_database_name }}'"
- register: database
- changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and
- (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
- failed_when: database.stdout.split()[2] != 'SUCCESS'
- run_once: True
- delegate_to: "{{ groups['murano-api'][0] }}"
-
-- name: Reading json from variable
- set_fact:
- database_created: "{{ (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
-
-- name: Creating Murano database user and setting permissions
- command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
- -m mysql_user
- -a "login_host='{{ database_address }}'
- login_port='{{ database_port }}'
- login_user='{{ database_user }}'
- login_password='{{ database_password }}'
- name='{{ murano_database_name }}'
- password='{{ murano_database_password }}'
- host='%'
- priv='{{ murano_database_name }}.*:ALL'
- append_privs='yes'"
- register: database_user_create
- changed_when: "{{ database_user_create.stdout.find('localhost | SUCCESS => ') != -1 and
- (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
- failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
- run_once: True
- delegate_to: "{{ groups['murano-api'][0] }}"
-
-- include: bootstrap_service.yml
- when: database_created
diff --git a/ansible/roles/murano/tasks/bootstrap_service.yml b/ansible/roles/murano/tasks/bootstrap_service.yml
deleted file mode 100644
index 59a59a4c2..000000000
--- a/ansible/roles/murano/tasks/bootstrap_service.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: Running Murano bootstrap container
- kolla_docker:
- action: "start_container"
- common_options: "{{ docker_common_options }}"
- detach: False
- environment:
- KOLLA_BOOTSTRAP:
- KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
- image: "{{ murano_api_image_full }}"
- labels:
- BOOTSTRAP:
- name: "bootstrap_murano"
- restart_policy: "never"
- volumes:
- - "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
- - "/etc/localtime:/etc/localtime:ro"
- - "kolla_logs:/var/log/kolla/"
- run_once: True
- delegate_to: "{{ groups['murano-api'][0] }}"
diff --git a/ansible/roles/murano/tasks/config.yml b/ansible/roles/murano/tasks/config.yml
deleted file mode 100644
index 725703f72..000000000
--- a/ansible/roles/murano/tasks/config.yml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- name: Ensuring config directories exist
- file:
- path: "{{ node_config_directory }}/{{ item }}"
- state: "directory"
- recurse: yes
- with_items:
- - "murano-api"
- - "murano-engine"
-
-- name: Copying over config.json files for services
- template:
- src: "{{ item }}.json.j2"
- dest: "{{ node_config_directory }}/{{ item }}/config.json"
- with_items:
- - "murano-api"
- - "murano-engine"
-
-- name: Copying over murano.conf
- merge_configs:
- vars:
- service_name: "{{ item }}"
- sources:
- - "{{ role_path }}/templates/murano.conf.j2"
- - "{{ node_config_directory }}/config/global.conf"
- - "{{ node_config_directory }}/config/database.conf"
- - "{{ node_config_directory }}/config/messaging.conf"
- - "{{ node_config_directory }}/config/murano.conf"
- - "{{ node_config_directory }}/config/murano/{{ item }}.conf"
- - "{{ node_config_directory }}/config/murano/{{ inventory_hostname }}/murano.conf"
- dest: "{{ node_config_directory }}/{{ item }}/murano.conf"
- with_items:
- - "murano-api"
- - "murano-engine"
-
-- name: Check if policies shall be overwritten
- local_action: stat path="{{ node_custom_config }}/murano/policy.json"
- register: murano_policy
-
-- name: Copying over existing policy.json
- template:
- src: "{{ node_custom_config }}/murano/policy.json"
- dest: "{{ node_config_directory }}/{{ item }}/policy.json"
- with_items:
- - "murano-api"
- - "murano-engine"
- when:
- murano_policy.stat.exists
diff --git a/ansible/roles/murano/tasks/deploy.yml b/ansible/roles/murano/tasks/deploy.yml
deleted file mode 100644
index 13d644732..000000000
--- a/ansible/roles/murano/tasks/deploy.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- include: register.yml
- when: inventory_hostname in groups['murano-api']
-
-- include: config.yml
- when: inventory_hostname in groups['murano-api'] or
- inventory_hostname in groups['murano-engine']
-
-- include: bootstrap.yml
- when: inventory_hostname in groups['murano-api']
-
-- include: start.yml
- when: inventory_hostname in groups['murano-api'] or
- inventory_hostname in groups['murano-engine']
diff --git a/ansible/roles/murano/tasks/main.yml b/ansible/roles/murano/tasks/main.yml
deleted file mode 100644
index b017e8b4a..000000000
--- a/ansible/roles/murano/tasks/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: "{{ action }}.yml"
diff --git a/ansible/roles/murano/tasks/precheck.yml b/ansible/roles/murano/tasks/precheck.yml
deleted file mode 100644
index ed97d539c..000000000
--- a/ansible/roles/murano/tasks/precheck.yml
+++ /dev/null
@@ -1 +0,0 @@
----
diff --git a/ansible/roles/murano/tasks/pull.yml b/ansible/roles/murano/tasks/pull.yml
deleted file mode 100644
index 5f979e56a..000000000
--- a/ansible/roles/murano/tasks/pull.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: Pulling murano-api image
- kolla_docker:
- action: "pull_image"
- common_options: "{{ docker_common_options }}"
- image: "{{ murano_api_image_full }}"
- when: inventory_hostname in groups['murano-api']
-
-- name: Pulling murano-engine image
- kolla_docker:
- action: "pull_image"
- common_options: "{{ docker_common_options }}"
- image: "{{ murano_engine_image_full }}"
- when: inventory_hostname in groups['murano-engine']
diff --git a/ansible/roles/murano/tasks/reconfigure.yml b/ansible/roles/murano/tasks/reconfigure.yml
deleted file mode 100644
index d5d784aa0..000000000
--- a/ansible/roles/murano/tasks/reconfigure.yml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- name: Ensuring the containers up
- kolla_docker:
- name: "{{ item.name }}"
- action: "get_container_state"
- register: container_state
- failed_when: container_state.Running == false
- when: inventory_hostname in groups[item.group]
- with_items:
- - { name: murano_api, group: murano-api }
- - { name: murano_engine, group: murano-engine }
-
-- include: config.yml
-
-- name: Check the configs
- command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
- changed_when: false
- failed_when: false
- register: check_results
- when: inventory_hostname in groups[item.group]
- with_items:
- - { name: murano_api, group: murano-api }
- - { name: murano_engine, group: murano-engine }
-
-- name: Containers config strategy
- kolla_docker:
- name: "{{ item.name }}"
- action: "get_container_env"
- register: container_envs
- when: inventory_hostname in groups[item.group]
- with_items:
- - { name: murano_api, group: murano-api }
- - { name: murano_engine, group: murano-engine }
-
-- name: Remove the containers
- kolla_docker:
- name: "{{ item[0]['name'] }}"
- action: "remove_container"
- register: remove_containers
- when:
- - inventory_hostname in groups[item[0]['group']]
- - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
- - item[2]['rc'] == 1
- with_together:
- - [{ name: murano_api, group: murano-api },
- { name: murano_engine, group: murano-engine }]
- - "{{ container_envs.results }}"
- - "{{ check_results.results }}"
-
-- include: start.yml
- when: remove_containers.changed
-
-- name: Restart containers
- kolla_docker:
- name: "{{ item[0]['name'] }}"
- action: "restart_container"
- when:
- - inventory_hostname in groups[item[0]['group']]
- - config_strategy == 'COPY_ALWAYS'
- - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
- - item[2]['rc'] == 1
- with_together:
- - [{ name: murano_api, group: murano-api },
- { name: murano_engine, group: murano-engine }]
- - "{{ container_envs.results }}"
- - "{{ check_results.results }}"
diff --git a/ansible/roles/murano/tasks/register.yml b/ansible/roles/murano/tasks/register.yml
deleted file mode 100644
index 308afc5b0..000000000
--- a/ansible/roles/murano/tasks/register.yml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- name: Creating the Murano service and endpoint
- command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
- -m kolla_keystone_service
- -a "service_name=murano
- service_type=application-catalog
- description='Openstack Application Catalogue'
- endpoint_region={{ openstack_region_name }}
- url='{{ item.url }}'
- interface='{{ item.interface }}'
- region_name={{ openstack_region_name }}
- auth={{ '{{ openstack_murano_auth }}' }}"
- -e "{'openstack_murano_auth':{{ openstack_murano_auth }}}"
- register: murano_endpoint
- changed_when: "{{ murano_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (murano_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
- until: murano_endpoint.stdout.split()[2] == 'SUCCESS'
- retries: 10
- delay: 5
- run_once: True
- with_items:
- - {'interface': 'admin', 'url': '{{ murano_admin_endpoint }}'}
- - {'interface': 'internal', 'url': '{{ murano_internal_endpoint }}'}
- - {'interface': 'public', 'url': '{{ murano_public_endpoint }}'}
-
-- name: Creating the Murano project, user, and role
- command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
- -m kolla_keystone_user
- -a "project=service
- user=murano
- password={{ murano_keystone_password }}
- role=admin
- region_name={{ openstack_region_name }}
- auth={{ '{{ openstack_murano_auth }}' }}"
- -e "{'openstack_murano_auth':{{ openstack_murano_auth }}}"
- register: murano_user
- changed_when: "{{ murano_user.stdout.find('localhost | SUCCESS => ') != -1 and (murano_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
- until: murano_user.stdout.split()[2] == 'SUCCESS'
- retries: 10
- delay: 5
- run_once: True
diff --git a/ansible/roles/murano/tasks/start.yml b/ansible/roles/murano/tasks/start.yml
deleted file mode 100644
index a4311b105..000000000
--- a/ansible/roles/murano/tasks/start.yml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-- name: Starting murano-engine container
- kolla_docker:
- action: "start_container"
- common_options: "{{ docker_common_options }}"
- image: "{{ murano_engine_image_full }}"
- name: "murano_engine"
- volumes:
- - "{{ node_config_directory }}/murano-engine/:{{ container_config_directory }}/:ro"
- - "/etc/localtime:/etc/localtime:ro"
- - "kolla_logs:/var/log/kolla/"
- when: inventory_hostname in groups['murano-engine']
-
-- name: Starting murano-api container
- kolla_docker:
- action: "start_container"
- common_options: "{{ docker_common_options }}"
- image: "{{ murano_api_image_full }}"
- name: "murano_api"
- volumes:
- - "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
- - "/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 on first node
- wait_for:
- host: "{{ api_interface_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
- delegate_to: "{{ groups['murano-api'][0] }}"
-
-- 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 \
- --murano-url \
- {{ admin_protocol }}://{{ api_interface_address }}:{{ murano_api_port }} \
- package-list"
- register: status
- changed_when: False
- run_once: True
- delegate_to: "{{ groups['murano-api'][0] }}"
-
-- 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 \
- --murano-url \
- {{ admin_protocol }}://{{ api_interface_address }}:{{ murano_api_port }} \
- package-import --is-public /io.murano.zip"
- run_once: True
- delegate_to: "{{ groups['murano-api'][0] }}"
- when:
- - status.stdout.find("io.murano") == -1
diff --git a/ansible/roles/murano/tasks/upgrade.yml b/ansible/roles/murano/tasks/upgrade.yml
deleted file mode 100644
index 630211e23..000000000
--- a/ansible/roles/murano/tasks/upgrade.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- include: register.yml
-
-- include: config.yml
-
-- include: bootstrap_service.yml
-
-- include: start.yml