Add container for nova-compute-ironic
Implements blueprint ironic-compute-container Change-Id: I110bf3aa94bdfd33038ed39d78bd40ea30b13e57
This commit is contained in:
parent
e8ad7488f6
commit
c779511511
@ -99,6 +99,9 @@ nova
|
||||
[nova-spicehtml5proxy:children]
|
||||
nova
|
||||
|
||||
[nova-compute-ironic:children]
|
||||
nova
|
||||
|
||||
# Neutron
|
||||
[neutron-server:children]
|
||||
neutron
|
||||
|
@ -23,7 +23,7 @@
|
||||
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||
-m kolla_keystone_user
|
||||
-a "project=service
|
||||
user=ironic
|
||||
user={{ ironic_keystone_user }}
|
||||
password={{ ironic_keystone_password }}
|
||||
role=admin
|
||||
region_name={{ openstack_region_name }}
|
||||
|
@ -61,6 +61,9 @@ nova_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docke
|
||||
nova_data_tag: "{{ openstack_release }}"
|
||||
nova_data_image_full: "{{ nova_data_image }}:{{ nova_data_tag }}"
|
||||
|
||||
nova_compute_ironic_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-compute-ironic"
|
||||
nova_compute_ironic_tag: "{{ openstack_release }}"
|
||||
nova_compute_ironic_image_full: "{{ nova_compute_ironic_image }}:{{ nova_compute_ironic_tag }}"
|
||||
|
||||
####################
|
||||
# Openstack
|
||||
|
@ -25,6 +25,7 @@
|
||||
with_items:
|
||||
- "nova-api"
|
||||
- "nova-compute"
|
||||
- "nova-compute-ironic"
|
||||
- "nova-conductor"
|
||||
- "nova-consoleauth"
|
||||
- "nova-libvirt"
|
||||
@ -39,6 +40,7 @@
|
||||
with_items:
|
||||
- "nova-api"
|
||||
- "nova-compute"
|
||||
- "nova-compute-ironic"
|
||||
- "nova-conductor"
|
||||
- "nova-consoleauth"
|
||||
- "nova-libvirt"
|
||||
@ -61,6 +63,7 @@
|
||||
with_items:
|
||||
- "nova-api"
|
||||
- "nova-compute"
|
||||
- "nova-compute-ironic"
|
||||
- "nova-conductor"
|
||||
- "nova-consoleauth"
|
||||
- "nova-novncproxy"
|
||||
|
@ -202,3 +202,27 @@
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['compute']
|
||||
|
||||
- name: Starting Nova-compute-ironic container
|
||||
docker:
|
||||
tty: True
|
||||
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 }}"
|
||||
privileged: True
|
||||
name: nova_compute_ironic
|
||||
image: "{{ nova_compute_ironic_image_full }}"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/nova-compute-ironic/:{{ container_config_directory }}/:ro"
|
||||
- "/var/lib/kolla/dev/log:/dev/log"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when:
|
||||
- inventory_hostname in groups['nova-compute-ironic']
|
||||
- enable_ironic | bool
|
||||
|
12
ansible/roles/nova/templates/nova-compute-ironic.json.j2
Normal file
12
ansible/roles/nova/templates/nova-compute-ironic.json.j2
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"command": "nova-compute",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "{{ container_config_directory }}/nova.conf",
|
||||
"dest": "/etc/nova/nova.conf",
|
||||
"owner": "nova",
|
||||
"perm": "0600"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -33,12 +33,14 @@ linuxnet_interface_driver = nova.network.linux_net.BridgeInterfaceDriver
|
||||
allow_resize_to_same_host = true
|
||||
|
||||
{% if enable_ironic | bool %}
|
||||
compute_driver = nova.virt.ironic.IronicDriver
|
||||
scheduler_host_manager = nova.scheduler.ironic_host_manager.IronicHostManager
|
||||
{% endif %}
|
||||
|
||||
{% if service_name == "nova-compute-ironic" %}
|
||||
compute_driver = nova.virt.ironic.IronicDriver
|
||||
vnc_enabled = False
|
||||
ram_allocation_ratio = 1.0
|
||||
reserved_host_memory_mb = 0
|
||||
compute_manager = ironic.nova.compute.manager.ClusteredComputeManager
|
||||
scheduler_use_baremetal_filters = True
|
||||
{% else %}
|
||||
compute_driver = libvirt.LibvirtDriver
|
||||
{% endif %}
|
||||
@ -72,13 +74,13 @@ html5proxy_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['i
|
||||
html5proxy_port = {{ nova_spicehtml5proxy_port }}
|
||||
{% endif %}
|
||||
|
||||
{% if enable_ironic | bool %}
|
||||
{% if service_name == "nova-compute-ironic" %}
|
||||
[ironic]
|
||||
#(TODO) remember to update this once discoverd is replaced by inspector
|
||||
admin_username = {{ ironic_keystone_user }}
|
||||
admin_password = {{ ironic_keystone_password }}
|
||||
admin_url = {{ openstack_auth.auth_url }}
|
||||
admin_tenant_name = {{ openstack_auth.project_name }}
|
||||
admin_url = {{ openstack_auth_v2.auth_url }}
|
||||
admin_tenant_name = service
|
||||
api_endpoint = http://{{ kolla_internal_address }}:{{ ironic_api_port }}/v1
|
||||
{% endif %}
|
||||
|
||||
|
16
docker/nova/nova-compute-ironic/Dockerfile.j2
Normal file
16
docker/nova/nova-compute-ironic/Dockerfile.j2
Normal file
@ -0,0 +1,16 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
RUN yum -y install \
|
||||
openstack-nova-compute \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ include_footer }}
|
||||
|
||||
USER nova
|
Loading…
Reference in New Issue
Block a user