Add Ansible support for Heat
This changes bootstrapping of the Heat container to bootstrap the Heat container with a heat domain user. This requires some work from bootstrap.yml to pass in several environment variables needed by the heat domain setup script. Co-Authored-By: Sam Yaple <sam@yaple.net> Change-Id: Iab05983754fa514835cb5ff54d775faa18773110 Partially-implements: blueprint ansible-heat
This commit is contained in:
parent
730276aaf9
commit
5e521f0550
@ -96,6 +96,10 @@ swift_object_server_port: "6000"
|
|||||||
swift_account_server_port: "6001"
|
swift_account_server_port: "6001"
|
||||||
swift_container_server_port: "6002"
|
swift_container_server_port: "6002"
|
||||||
|
|
||||||
|
heat_api_port: "8004"
|
||||||
|
heat_api_cfn_port: "8000"
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Openstack options
|
# Openstack options
|
||||||
####################
|
####################
|
||||||
@ -133,9 +137,11 @@ enable_rabbitmq: "yes"
|
|||||||
|
|
||||||
# Additional optional OpenStack services are specified here
|
# Additional optional OpenStack services are specified here
|
||||||
enable_cinder: "no"
|
enable_cinder: "no"
|
||||||
|
enable_heat: "yes"
|
||||||
enable_horizon: "yes"
|
enable_horizon: "yes"
|
||||||
enable_swift: "no"
|
enable_swift: "no"
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# RabbitMQ options
|
# RabbitMQ options
|
||||||
####################
|
####################
|
||||||
|
@ -48,6 +48,9 @@ control
|
|||||||
[swift:children]
|
[swift:children]
|
||||||
control
|
control
|
||||||
|
|
||||||
|
[heat:children]
|
||||||
|
control
|
||||||
|
|
||||||
|
|
||||||
# Additional control implemented here. These groups allow you to control which
|
# Additional control implemented here. These groups allow you to control which
|
||||||
# services run on which hosts at a per-service level.
|
# services run on which hosts at a per-service level.
|
||||||
@ -111,3 +114,13 @@ storage
|
|||||||
|
|
||||||
[swift-object-server:children]
|
[swift-object-server:children]
|
||||||
storage
|
storage
|
||||||
|
|
||||||
|
# Heat
|
||||||
|
[heat-api:children]
|
||||||
|
heat
|
||||||
|
|
||||||
|
[heat-api-cfn:children]
|
||||||
|
heat
|
||||||
|
|
||||||
|
[heat-engine:children]
|
||||||
|
heat
|
||||||
|
@ -9,6 +9,8 @@ control03 ansible_ssh_user=sam
|
|||||||
# The above can also be specified as follows:
|
# The above can also be specified as follows:
|
||||||
#control[01:03] ansible_ssh_user=sam
|
#control[01:03] ansible_ssh_user=sam
|
||||||
|
|
||||||
|
# The network nodes are where your l3-agent and loadbalancers will run
|
||||||
|
# This can be the same as a a host in the control group
|
||||||
[network]
|
[network]
|
||||||
network01
|
network01
|
||||||
|
|
||||||
@ -54,6 +56,9 @@ control
|
|||||||
[swift:children]
|
[swift:children]
|
||||||
control
|
control
|
||||||
|
|
||||||
|
[heat:children]
|
||||||
|
control
|
||||||
|
|
||||||
|
|
||||||
# Additional control implemented here. These groups allow you to control which
|
# Additional control implemented here. These groups allow you to control which
|
||||||
# services run on which hosts at a per-service level.
|
# services run on which hosts at a per-service level.
|
||||||
@ -117,3 +122,13 @@ storage
|
|||||||
|
|
||||||
[swift-object-server:children]
|
[swift-object-server:children]
|
||||||
storage
|
storage
|
||||||
|
|
||||||
|
# Heat
|
||||||
|
[heat-api:children]
|
||||||
|
heat
|
||||||
|
|
||||||
|
[heat-api-cfn:children]
|
||||||
|
heat
|
||||||
|
|
||||||
|
[heat-engine:children]
|
||||||
|
heat
|
||||||
|
@ -97,3 +97,15 @@ listen cinder_api
|
|||||||
{% for host in groups['cinder-api'] %}
|
{% for host in groups['cinder-api'] %}
|
||||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ cinder_api_port }} check inter 2000 rise 2 fall 5
|
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ cinder_api_port }} check inter 2000 rise 2 fall 5
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
listen heat_api
|
||||||
|
bind {{ kolla_internal_address }}:{{ heat_api_port }}
|
||||||
|
{% for host in groups['heat-api'] %}
|
||||||
|
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_port }} check inter 2000 rise 2 fall 5
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
listen heat_api_cfn
|
||||||
|
bind {{ kolla_internal_address }}:{{ heat_api_cfn_port }}
|
||||||
|
{% for host in groups['heat-api-cfn'] %}
|
||||||
|
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ heat_api_cfn_port }} check inter 2000 rise 2 fall 5
|
||||||
|
{% endfor %}
|
||||||
|
43
ansible/roles/heat/defaults/main.yml
Normal file
43
ansible/roles/heat/defaults/main.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
project_name: "heat"
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Database
|
||||||
|
####################
|
||||||
|
heat_database_name: "heat"
|
||||||
|
heat_database_user: "heat"
|
||||||
|
heat_database_address: "{{ kolla_internal_address }}"
|
||||||
|
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Docker
|
||||||
|
####################
|
||||||
|
heat_registry_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-registry"
|
||||||
|
heat_registry_tag: "{{ openstack_release }}"
|
||||||
|
heat_registry_image_full: "{{ heat_registry_image }}:{{ heat_registry_tag }}"
|
||||||
|
|
||||||
|
heat_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-api"
|
||||||
|
heat_api_tag: "{{ openstack_release }}"
|
||||||
|
heat_api_image_full: "{{ heat_api_image }}:{{ heat_api_tag }}"
|
||||||
|
|
||||||
|
heat_api_cfn_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-api-cfn"
|
||||||
|
heat_api_cfn_tag: "{{ openstack_release }}"
|
||||||
|
heat_api_cfn_image_full: "{{ heat_api_cfn_image }}:{{ heat_api_cfn_tag }}"
|
||||||
|
|
||||||
|
heat_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heat-engine"
|
||||||
|
heat_engine_tag: "{{ openstack_release }}"
|
||||||
|
heat_engine_image_full: "{{ heat_engine_image }}:{{ heat_engine_tag }}"
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Openstack
|
||||||
|
####################
|
||||||
|
heat_public_address: "{{ kolla_external_address }}"
|
||||||
|
heat_admin_address: "{{ kolla_internal_address }}"
|
||||||
|
heat_internal_address: "{{ kolla_internal_address }}"
|
||||||
|
|
||||||
|
heat_logging_verbose: "{{ openstack_logging_verbose }}"
|
||||||
|
heat_logging_debug: "{{ openstack_logging_debug }}"
|
||||||
|
|
||||||
|
heat_keystone_user: "heat"
|
||||||
|
|
||||||
|
openstack_heat_auth: "{'auth_url':'{{ openstack_auth_v2.auth_url }}','username':'{{ openstack_auth_v2.username }}','password':'{{ openstack_auth_v2.password }}','project_name':'{{ openstack_auth_v2.project_name }}'}"
|
68
ansible/roles/heat/tasks/bootstrap.yml
Normal file
68
ansible/roles/heat/tasks/bootstrap.yml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
- name: Creating Heat database
|
||||||
|
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||||
|
-m mysql_db
|
||||||
|
-a "login_host='{{ database_address }}'
|
||||||
|
login_user='{{ database_user }}'
|
||||||
|
login_password='{{ database_password }}'
|
||||||
|
name='{{ heat_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
|
||||||
|
|
||||||
|
- name: Creating Heat database user and setting permissions
|
||||||
|
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||||
|
-m mysql_user
|
||||||
|
-a "login_host='{{ database_address }}'
|
||||||
|
login_user='{{ database_user }}'
|
||||||
|
login_password='{{ database_password }}'
|
||||||
|
name='{{ heat_database_name }}'
|
||||||
|
password='{{ heat_database_password }}'
|
||||||
|
host='%'
|
||||||
|
priv='{{ heat_database_name }}.*:ALL'
|
||||||
|
append_privs='yes'"
|
||||||
|
register: database_user
|
||||||
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
|
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
- name: Starting Heat bootstrap container
|
||||||
|
docker:
|
||||||
|
detach: False
|
||||||
|
docker_api_version: "{{ docker_api_version }}"
|
||||||
|
net: host
|
||||||
|
pull: "{{ docker_pull_policy }}"
|
||||||
|
restart_policy: "no"
|
||||||
|
state: reloaded
|
||||||
|
registry: "{{ docker_registry }}"
|
||||||
|
username: "{{ docker_registry_username }}"
|
||||||
|
password: "{{ docker_registry_password }}"
|
||||||
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
|
name: bootstrap_heat
|
||||||
|
image: "{{ heat_api_image_full }}"
|
||||||
|
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/heat-api/:ro"
|
||||||
|
env:
|
||||||
|
KOLLA_BOOTSTRAP:
|
||||||
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
OS_AUTH_URL: "{{ openstack_auth.auth_url }}"
|
||||||
|
OS_IDENTITY_API_VERSION: "3"
|
||||||
|
OS_USERNAME: "{{ openstack_auth.username }}"
|
||||||
|
OS_PASSWORD: "{{ openstack_auth.password }}"
|
||||||
|
OS_PROJECT_NAME: "{{ openstack_auth.project_name }}"
|
||||||
|
HEAT_DOMAIN_ADMIN_PASSWORD: "{{ heat_domain_admin_password }}"
|
||||||
|
run_once: True
|
||||||
|
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
|
||||||
|
|
||||||
|
# https://github.com/ansible/ansible-modules-core/pull/1031
|
||||||
|
- name: Waiting for bootstrap container to exit
|
||||||
|
command: docker wait bootstrap_heat
|
||||||
|
run_once: True
|
||||||
|
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
|
||||||
|
|
||||||
|
- name: Cleaning up Heat boostrap container
|
||||||
|
docker:
|
||||||
|
name: bootstrap_heat
|
||||||
|
image: "{{ heat_api_image_full }}"
|
||||||
|
state: absent
|
||||||
|
when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
|
55
ansible/roles/heat/tasks/config.yml
Normal file
55
ansible/roles/heat/tasks/config.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
- include: ../../config.yml
|
||||||
|
vars:
|
||||||
|
service_name: "heat-engine"
|
||||||
|
config_source:
|
||||||
|
- "roles/heat/templates/heat.conf.j2"
|
||||||
|
- "/etc/kolla/config/global.conf"
|
||||||
|
- "/etc/kolla/config/database.conf"
|
||||||
|
- "/etc/kolla/config/heat.conf"
|
||||||
|
- "/etc/kolla/config/heat/heat-engine.conf"
|
||||||
|
config_template_dest:
|
||||||
|
- "{{ node_templates_directory }}/heat-engine/heat.conf_minimal"
|
||||||
|
- "{{ node_templates_directory }}/heat-engine/heat.conf_global"
|
||||||
|
- "{{ node_templates_directory }}/heat-engine/heat.conf_database"
|
||||||
|
- "{{ node_templates_directory }}/heat-engine/heat.conf_augment"
|
||||||
|
- "{{ node_templates_directory }}/heat-engine/heat-engine.conf_augment"
|
||||||
|
config_dest: "{{ node_config_directory }}/heat-engine/heat.conf"
|
||||||
|
|
||||||
|
- include: ../../config.yml
|
||||||
|
vars:
|
||||||
|
service_name: "heat-api"
|
||||||
|
config_source:
|
||||||
|
- "roles/heat/templates/heat.conf.j2"
|
||||||
|
- "/etc/kolla/config/global.conf"
|
||||||
|
- "/etc/kolla/config/database.conf"
|
||||||
|
- "/etc/kolla/config/messaging.conf"
|
||||||
|
- "/etc/kolla/config/heat.conf"
|
||||||
|
- "/etc/kolla/config/heat/heat-api.conf"
|
||||||
|
config_template_dest:
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat.conf_minimal"
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat.conf_global"
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat.conf_database"
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat.conf_messaging"
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat.conf_augment"
|
||||||
|
- "{{ node_templates_directory }}/heat-api/heat-api.conf_augment"
|
||||||
|
config_dest: "{{ node_config_directory }}/heat-api/heat.conf"
|
||||||
|
|
||||||
|
- include: ../../config.yml
|
||||||
|
vars:
|
||||||
|
service_name: "heat-api-cfn"
|
||||||
|
config_source:
|
||||||
|
- "roles/heat/templates/heat.conf.j2"
|
||||||
|
- "/etc/kolla/config/global.conf"
|
||||||
|
- "/etc/kolla/config/database.conf"
|
||||||
|
- "/etc/kolla/config/messaging.conf"
|
||||||
|
- "/etc/kolla/config/heat.conf"
|
||||||
|
- "/etc/kolla/config/heat/heat-api-cfn.conf"
|
||||||
|
config_template_dest:
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_minimal"
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_global"
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_database"
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_messaging"
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat.conf_augment"
|
||||||
|
- "{{ node_templates_directory }}/heat-api-cfn/heat-api-cfn.conf_augment"
|
||||||
|
config_dest: "{{ node_config_directory }}/heat-api-cfn/heat.conf"
|
8
ansible/roles/heat/tasks/main.yml
Normal file
8
ansible/roles/heat/tasks/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- include: register.yml
|
||||||
|
|
||||||
|
- include: config.yml
|
||||||
|
|
||||||
|
- include: bootstrap.yml
|
||||||
|
|
||||||
|
- include: start.yml
|
57
ansible/roles/heat/tasks/register.yml
Normal file
57
ansible/roles/heat/tasks/register.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
- name: Creating the Heat service and endpoint
|
||||||
|
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||||
|
-m kolla_keystone_service
|
||||||
|
-a "service_name=heat
|
||||||
|
service_type=orchestration
|
||||||
|
description='Openstack Orchestration'
|
||||||
|
endpoint_region={{ openstack_region_name }}
|
||||||
|
admin_url='http://{{ kolla_internal_address }}:{{ heat_api_port }}/v1/%(tenant_id)s'
|
||||||
|
internal_url='http://{{ kolla_internal_address }}:{{ heat_api_port }}/v1/%(tenant_id)s'
|
||||||
|
public_url='http://{{ kolla_external_address }}:{{ heat_api_port }}/v1/%(tenant_id)s'
|
||||||
|
region_name={{ openstack_region_name }}
|
||||||
|
auth={{ '{{ openstack_heat_auth }}' }}"
|
||||||
|
-e "{'openstack_heat_auth':{{ openstack_heat_auth }}}"
|
||||||
|
register: heat_endpoint
|
||||||
|
changed_when: "{{ heat_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (heat_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
|
until: heat_endpoint.stdout.split()[2] == 'SUCCESS'
|
||||||
|
retries: 10
|
||||||
|
delay: 5
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
- name: Creating the Heat-cfn service and endpoint
|
||||||
|
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||||
|
-m kolla_keystone_service
|
||||||
|
-a "service_name=heat-cfn
|
||||||
|
service_type=orchestration
|
||||||
|
description='Openstack Orchestration'
|
||||||
|
endpoint_region={{ openstack_region_name }}
|
||||||
|
admin_url='http://{{ kolla_internal_address }}:{{ heat_api_port }}/v1'
|
||||||
|
internal_url='http://{{ kolla_internal_address }}:{{ heat_api_cfn_port }}/v1'
|
||||||
|
public_url='http://{{ kolla_external_address }}:{{ heat_api_cfn_port }}/v1'
|
||||||
|
region_name={{ openstack_region_name }}
|
||||||
|
auth={{ '{{ openstack_heat_auth }}' }}"
|
||||||
|
-e "{'openstack_heat_auth':{{ openstack_heat_auth }}}"
|
||||||
|
register: heat_endpoint
|
||||||
|
changed_when: "{{ heat_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (heat_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
|
until: heat_endpoint.stdout.split()[2] == 'SUCCESS'
|
||||||
|
retries: 10
|
||||||
|
delay: 5
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
- name: Creating the Heat project, user, and role
|
||||||
|
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||||
|
-m kolla_keystone_user
|
||||||
|
-a "project=service
|
||||||
|
user=heat
|
||||||
|
password={{ heat_keystone_password }}
|
||||||
|
role=admin
|
||||||
|
region_name={{ openstack_region_name }}
|
||||||
|
auth={{ '{{ openstack_heat_auth }}' }}"
|
||||||
|
-e "{'openstack_heat_auth':{{ openstack_heat_auth }}}"
|
||||||
|
register: heat_user
|
||||||
|
changed_when: "{{ heat_user.stdout.find('localhost | SUCCESS => ') != -1 and (heat_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
|
until: heat_user.stdout.split()[2] == 'SUCCESS'
|
||||||
|
retries: 10
|
||||||
|
delay: 5
|
||||||
|
run_once: True
|
57
ansible/roles/heat/tasks/start.yml
Normal file
57
ansible/roles/heat/tasks/start.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
- name: Starting heat-api container
|
||||||
|
docker:
|
||||||
|
docker_api_version: "{{ docker_api_version }}"
|
||||||
|
net: host
|
||||||
|
pull: "{{ docker_pull_policy }}"
|
||||||
|
restart_policy: "{{ docker_restart_policy }}"
|
||||||
|
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
||||||
|
state: reloaded
|
||||||
|
registry: "{{ docker_registry }}"
|
||||||
|
username: "{{ docker_registry_username }}"
|
||||||
|
password: "{{ docker_registry_password }}"
|
||||||
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
|
name: heat_api
|
||||||
|
image: "{{ heat_api_image_full }}"
|
||||||
|
volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/heat-api/:ro"
|
||||||
|
env:
|
||||||
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
when: inventory_hostname in groups['heat-api']
|
||||||
|
|
||||||
|
- name: Starting heat-api-cfn container
|
||||||
|
docker:
|
||||||
|
docker_api_version: "{{ docker_api_version }}"
|
||||||
|
net: host
|
||||||
|
pull: "{{ docker_pull_policy }}"
|
||||||
|
restart_policy: "{{ docker_restart_policy }}"
|
||||||
|
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
||||||
|
state: reloaded
|
||||||
|
registry: "{{ docker_registry }}"
|
||||||
|
username: "{{ docker_registry_username }}"
|
||||||
|
password: "{{ docker_registry_password }}"
|
||||||
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
|
name: heat_api_cfn
|
||||||
|
image: "{{ heat_api_cfn_image_full }}"
|
||||||
|
volumes: "{{ node_config_directory }}/heat-api-cfn/:/opt/kolla/heat-api-cfn/:ro"
|
||||||
|
env:
|
||||||
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
when: inventory_hostname in groups['heat-api-cfn']
|
||||||
|
|
||||||
|
- name: Starting heat-engine container
|
||||||
|
docker:
|
||||||
|
docker_api_version: "{{ docker_api_version }}"
|
||||||
|
net: host
|
||||||
|
pull: "{{ docker_pull_policy }}"
|
||||||
|
restart_policy: "{{ docker_restart_policy }}"
|
||||||
|
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
||||||
|
state: reloaded
|
||||||
|
registry: "{{ docker_registry }}"
|
||||||
|
username: "{{ docker_registry_username }}"
|
||||||
|
password: "{{ docker_registry_password }}"
|
||||||
|
insecure_registry: "{{ docker_insecure_registry }}"
|
||||||
|
name: heat_engine
|
||||||
|
image: "{{ heat_engine_image_full }}"
|
||||||
|
volumes: "{{ node_config_directory }}/heat-engine/:/opt/kolla/heat-engine/:ro"
|
||||||
|
env:
|
||||||
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
|
when: inventory_hostname in groups['heat-engine']
|
45
ansible/roles/heat/templates/heat.conf.j2
Normal file
45
ansible/roles/heat/templates/heat.conf.j2
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
heat_watch_server_url = http://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
||||||
|
heat_metadata_server_url = http://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
||||||
|
heat_waitcondition_server_url = http://{{ kolla_external_address }}:{{ heat_api_cfn_port }}/v1/waitcondition
|
||||||
|
|
||||||
|
stack_domain_admin = heat_domain_admin
|
||||||
|
stack_domain_admin_password = {{ heat_domain_admin_password }}
|
||||||
|
stack_user_domain_name = heat_user_domain
|
||||||
|
|
||||||
|
rpc_backend = rabbit
|
||||||
|
notification_driver = noop
|
||||||
|
|
||||||
|
[oslo_messaging_rabbit]
|
||||||
|
rabbit_host = {{ kolla_internal_address }}
|
||||||
|
rabbit_userid = {{ rabbitmq_user }}
|
||||||
|
rabbit_password = {{ rabbitmq_password }}
|
||||||
|
rabbit_ha_queues = true
|
||||||
|
|
||||||
|
{% if service_name == 'heat-api' %}
|
||||||
|
[heat_api]
|
||||||
|
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
||||||
|
bind_port = {{ heat_api_port }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if service_name == 'heat-api-cfn' %}
|
||||||
|
[heat_api_cfn]
|
||||||
|
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
||||||
|
bind_port = {{ heat_api_cfn_port }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
[database]
|
||||||
|
connection = mysql://{{ heat_database_user }}:{{ heat_database_password }}@{{ heat_database_address }}/{{ heat_database_name }}
|
||||||
|
|
||||||
|
[keystone_authtoken]
|
||||||
|
auth_uri = http://{{ kolla_internal_address }}:{{ keystone_public_port }}
|
||||||
|
auth_url = http://{{ kolla_internal_address }}:{{ keystone_admin_port }}
|
||||||
|
auth_plugin = password
|
||||||
|
project_domain_id = default
|
||||||
|
user_domain_id = default
|
||||||
|
project_name = service
|
||||||
|
username = heat
|
||||||
|
password = {{ heat_keystone_password }}
|
||||||
|
|
||||||
|
[ec2authtoken]
|
||||||
|
auth_uri = http://{{ kolla_internal_address }}:{{ keystone_public_port }}
|
@ -35,6 +35,10 @@
|
|||||||
roles:
|
roles:
|
||||||
- { role: cinder, tags: cinder, when: enable_cinder | bool }
|
- { role: cinder, tags: cinder, when: enable_cinder | bool }
|
||||||
|
|
||||||
|
- hosts: [heat-api, heat-api-cfn, heat-engine]
|
||||||
|
roles:
|
||||||
|
- { role: heat, tags: heat, when: enable_heat | bool }
|
||||||
|
|
||||||
- hosts: horizon
|
- hosts: horizon
|
||||||
roles:
|
roles:
|
||||||
- { role: horizon, tags: horizon, when: enable_horizon | bool }
|
- { role: horizon, tags: horizon, when: enable_horizon | bool }
|
||||||
|
@ -65,6 +65,7 @@ RUN yum install -y \
|
|||||||
git \
|
git \
|
||||||
iproute \
|
iproute \
|
||||||
mariadb-libs \
|
mariadb-libs \
|
||||||
|
MySQL-python \
|
||||||
openssl \
|
openssl \
|
||||||
openstack-utils \
|
openstack-utils \
|
||||||
pyparsing \
|
pyparsing \
|
||||||
@ -108,6 +109,7 @@ RUN yum install -y \
|
|||||||
python-netifaces \
|
python-netifaces \
|
||||||
python-networkx \
|
python-networkx \
|
||||||
python-oauthlib \
|
python-oauthlib \
|
||||||
|
python-openstackclient \
|
||||||
python-oslo-config \
|
python-oslo-config \
|
||||||
python-oslo-messaging \
|
python-oslo-messaging \
|
||||||
python-oslo-rootwrap \
|
python-oslo-rootwrap \
|
||||||
@ -173,7 +175,6 @@ RUN yum update -y \
|
|||||||
libxslt-devel \
|
libxslt-devel \
|
||||||
mariadb-devel \
|
mariadb-devel \
|
||||||
mysql-devel \
|
mysql-devel \
|
||||||
MySQL-python \
|
|
||||||
openldap-devel \
|
openldap-devel \
|
||||||
openssl \
|
openssl \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
@ -210,7 +211,6 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD
|
|||||||
build-essential \
|
build-essential \
|
||||||
python-dev \
|
python-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
python-mysqldb \
|
|
||||||
libmariadbclient-dev \
|
libmariadbclient-dev \
|
||||||
libxslt1-dev \
|
libxslt1-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
@ -228,7 +228,11 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD
|
|||||||
|
|
||||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||||
&& python get-pip.py \
|
&& python get-pip.py \
|
||||||
&& rm get-pip.py
|
&& rm get-pip.py \
|
||||||
|
&& pip --no-cache-dir install \
|
||||||
|
python-openstackclient \
|
||||||
|
MySQL-python \
|
||||||
|
numpy
|
||||||
|
|
||||||
# Endif for install_type source
|
# Endif for install_type source
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -9,7 +9,6 @@ MAINTAINER Kolla Project (https://launchpad.net.kolla)
|
|||||||
# need the complete policy file because of some of the containers'
|
# need the complete policy file because of some of the containers'
|
||||||
# requiring it. Remove the package when the file is moved though.
|
# requiring it. Remove the package when the file is moved though.
|
||||||
RUN yum install -y \
|
RUN yum install -y \
|
||||||
MySQL-python \
|
|
||||||
openstack-designate-api \
|
openstack-designate-api \
|
||||||
openstack-designate-common \
|
openstack-designate-common \
|
||||||
python-tooz \
|
python-tooz \
|
||||||
|
@ -4,9 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
|||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
RUN yum -y install openstack-heat-api-cfn \
|
||||||
openstack-heat-api-cfn \
|
|
||||||
python-openstackclient \
|
|
||||||
&& yum clean all
|
&& yum clean all
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
@ -4,9 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
|||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
RUN yum -y install openstack-heat-api \
|
||||||
openstack-heat-api \
|
|
||||||
python-openstackclient \
|
|
||||||
&& yum clean all
|
&& yum clean all
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SOURCE="/opt/kolla/heat-api/heat-api.conf"
|
SOURCE="/opt/kolla/heat-api/heat.conf"
|
||||||
TARGET="/etc/heat/heat-api.conf"
|
TARGET="/etc/heat/heat.conf"
|
||||||
OWNER="heat"
|
OWNER="heat"
|
||||||
|
|
||||||
if [[ -f "$SOURCE" ]]; then
|
if [[ -f "$SOURCE" ]]; then
|
||||||
|
@ -10,4 +10,14 @@ source /opt/kolla/kolla-common.sh
|
|||||||
# Execute config strategy
|
# Execute config strategy
|
||||||
set_configs
|
set_configs
|
||||||
|
|
||||||
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
su -s /bin/sh -c "heat-manage db_sync" heat
|
||||||
|
openstack domain create heat_user_domain
|
||||||
|
openstack user create --domain heat_user_domain heat_domain_admin --password ${HEAT_DOMAIN_ADMIN_PASSWORD}
|
||||||
|
openstack role add --domain heat_user_domain --user heat_domain_admin admin
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
exec $CMD $ARGS
|
exec $CMD $ARGS
|
||||||
|
@ -6,12 +6,10 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
|||||||
|
|
||||||
# until packaging is fixed, all of this is required
|
# until packaging is fixed, all of this is required
|
||||||
# api: policy
|
# api: policy
|
||||||
# conductor:MySQL-python
|
|
||||||
RUN yum -y install \
|
RUN yum -y install \
|
||||||
python-oslo-log \
|
python-oslo-log \
|
||||||
python-oslo-concurrency \
|
python-oslo-concurrency \
|
||||||
python-oslo-policy \
|
python-oslo-policy \
|
||||||
MySQL-python \
|
|
||||||
&& yum clean all
|
&& yum clean all
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
@ -6,7 +6,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
|||||||
|
|
||||||
RUN yum -y install openstack-keystone \
|
RUN yum -y install openstack-keystone \
|
||||||
python-keystoneclient \
|
python-keystoneclient \
|
||||||
python-openstackclient \
|
|
||||||
httpd \
|
httpd \
|
||||||
mod_wsgi \
|
mod_wsgi \
|
||||||
&& yum clean all
|
&& yum clean all
|
||||||
|
@ -9,7 +9,6 @@ RUN yum -y install \
|
|||||||
libffi-devel \
|
libffi-devel \
|
||||||
libxml2-devel \
|
libxml2-devel \
|
||||||
libxslt-devel \
|
libxslt-devel \
|
||||||
MySQL-python \
|
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
python-devel \
|
python-devel \
|
||||||
openssh-clients \
|
openssh-clients \
|
||||||
@ -19,16 +18,17 @@ RUN pip install -U pip wheel
|
|||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends git
|
RUN apt-get install -y --no-install-recommends git \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
RUN pip install shade
|
RUN pip --no-cache-dir install shade
|
||||||
|
|
||||||
RUN git clone --depth 1 https://github.com/ansible/ansible.git \
|
RUN git clone --depth 1 https://github.com/ansible/ansible.git \
|
||||||
&& cd ansible \
|
&& cd ansible \
|
||||||
&& git submodule update --init --recursive \
|
&& git submodule update --init --recursive \
|
||||||
&& pip install --install-option="--install-scripts=/usr/bin" .
|
&& pip --no-cache-dir install .
|
||||||
|
|
||||||
RUN mkdir -p /etc/ansible /usr/share/ansible \
|
RUN mkdir -p /etc/ansible /usr/share/ansible \
|
||||||
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts
|
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts
|
||||||
|
0
etc/kolla/config/heat.conf
Normal file
0
etc/kolla/config/heat.conf
Normal file
0
etc/kolla/config/heat/heat-api-cfn.conf
Normal file
0
etc/kolla/config/heat/heat-api-cfn.conf
Normal file
0
etc/kolla/config/heat/heat-api.conf
Normal file
0
etc/kolla/config/heat/heat-api.conf
Normal file
0
etc/kolla/config/heat/heat-engine.conf
Normal file
0
etc/kolla/config/heat/heat-engine.conf
Normal file
@ -30,7 +30,6 @@ nova_keystone_password: "password"
|
|||||||
|
|
||||||
neutron_database_password: "password"
|
neutron_database_password: "password"
|
||||||
neutron_keystone_password: "password"
|
neutron_keystone_password: "password"
|
||||||
|
|
||||||
metadata_secret: "password"
|
metadata_secret: "password"
|
||||||
|
|
||||||
cinder_database_password: "password"
|
cinder_database_password: "password"
|
||||||
@ -40,6 +39,10 @@ swift_keystone_password: "password"
|
|||||||
swift_hash_path_suffix: "kolla"
|
swift_hash_path_suffix: "kolla"
|
||||||
swift_hash_path_prefix: "kolla"
|
swift_hash_path_prefix: "kolla"
|
||||||
|
|
||||||
|
heat_database_password: "password"
|
||||||
|
heat_keystone_password: "password"
|
||||||
|
heat_domain_admin_password: "password"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# RabbitMQ options
|
# RabbitMQ options
|
||||||
####################
|
####################
|
||||||
|
Loading…
Reference in New Issue
Block a user