Merge "Add manila-data service"
This commit is contained in:
commit
80c4d7e401
@ -239,6 +239,9 @@ manila
|
||||
[manila-share:children]
|
||||
storage
|
||||
|
||||
[manila-data:children]
|
||||
storage
|
||||
|
||||
# Swift
|
||||
[swift-proxy-server:children]
|
||||
swift
|
||||
|
@ -257,6 +257,9 @@ manila
|
||||
[manila-share:children]
|
||||
storage
|
||||
|
||||
[manila-data:children]
|
||||
storage
|
||||
|
||||
# Swift
|
||||
[swift-proxy-server:children]
|
||||
swift
|
||||
|
@ -24,6 +24,9 @@ manila_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ dock
|
||||
manila_api_tag: "{{ openstack_release }}"
|
||||
manila_api_image_full: "{{ manila_api_image }}:{{ manila_api_tag }}"
|
||||
|
||||
manila_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-manila-data"
|
||||
manila_data_tag: "{{ openstack_release }}"
|
||||
manila_data_image_full: "{{ manila_data_image }}:{{ manila_data_tag }}"
|
||||
|
||||
#####################
|
||||
## OpenStack
|
||||
|
@ -6,6 +6,7 @@
|
||||
recurse: yes
|
||||
with_items:
|
||||
- "manila-api"
|
||||
- "manila-data"
|
||||
- "manila-scheduler"
|
||||
- "manila-share"
|
||||
|
||||
@ -15,6 +16,7 @@
|
||||
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
||||
with_items:
|
||||
- "manila-api"
|
||||
- "manila-data"
|
||||
- "manila-scheduler"
|
||||
- "manila-share"
|
||||
|
||||
@ -33,6 +35,7 @@
|
||||
dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
|
||||
with_items:
|
||||
- "manila-api"
|
||||
- "manila-data"
|
||||
- "manila-scheduler"
|
||||
|
||||
- name: Copying over manila-share.conf
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
- include: config.yml
|
||||
when: inventory_hostname in groups['manila-api'] or
|
||||
inventory_hostname in groups['manila-data'] or
|
||||
inventory_hostname in groups['manila-share'] or
|
||||
inventory_hostname in groups['manila-scheduler']
|
||||
|
||||
@ -12,5 +13,6 @@
|
||||
|
||||
- include: start.yml
|
||||
when: inventory_hostname in groups['manila-api'] or
|
||||
inventory_hostname in groups['manila-data'] or
|
||||
inventory_hostname in groups['manila-share'] or
|
||||
inventory_hostname in groups['manila-scheduler']
|
||||
|
@ -19,3 +19,10 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ manila_share_image_full }}"
|
||||
when: inventory_hostname in groups['manila-share']
|
||||
|
||||
- name: Pulling manila-data image
|
||||
kolla_docker:
|
||||
action: "pull_image"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ manila_data_image_full }}"
|
||||
when: inventory_hostname in groups['manila-data']
|
||||
|
@ -8,6 +8,7 @@
|
||||
when: inventory_hostname in groups[item.group]
|
||||
with_items:
|
||||
- { name: manila_api, group: manila-api }
|
||||
- { name: manila_data, group: manila-data }
|
||||
- { name: manila_scheduler, group: manila-scheduler }
|
||||
- { name: manila_share, group: manila-share }
|
||||
|
||||
@ -21,6 +22,7 @@
|
||||
when: inventory_hostname in groups[item.group]
|
||||
with_items:
|
||||
- { name: manila_api, group: manila-api }
|
||||
- { name: manila_data, group: manila-data }
|
||||
- { name: manila_scheduler, group: manila-scheduler }
|
||||
- { name: manila_share, group: manila-share }
|
||||
|
||||
@ -35,6 +37,7 @@
|
||||
when: inventory_hostname in groups[item.group]
|
||||
with_items:
|
||||
- { name: manila_api, group: manila-api }
|
||||
- { name: manila_data, group: manila-data }
|
||||
- { name: manila_scheduler, group: manila-scheduler }
|
||||
- { name: manila_share, group: manila-share }
|
||||
|
||||
@ -49,6 +52,7 @@
|
||||
- item[2]['rc'] == 1
|
||||
with_together:
|
||||
- [{ name: manila_api, group: manila-api },
|
||||
{ name: manila_data, group: manila-data },
|
||||
{ name: manila_scheduler, group: manila-scheduler },
|
||||
{ name: manila_share, group: manila-share }]
|
||||
- "{{ container_envs.results }}"
|
||||
@ -68,6 +72,7 @@
|
||||
- item[2]['rc'] == 1
|
||||
with_together:
|
||||
- [{ name: manila_api, group: manila-api },
|
||||
{ name: manila_data, group: manila-data },
|
||||
{ name: manila_scheduler, group: manila-scheduler },
|
||||
{ name: manila_share, group: manila-share }]
|
||||
- "{{ container_envs.results }}"
|
||||
|
@ -36,3 +36,17 @@
|
||||
- "/run/:/run/:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['manila-share']
|
||||
|
||||
- name: Starting manila-data container
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "manila_data"
|
||||
image: "{{ manila_data_image_full }}"
|
||||
privileged: True
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/manila-data/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/run/:/run/:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['manila-data']
|
||||
|
18
ansible/roles/manila/templates/manila-data.json.j2
Normal file
18
ansible/roles/manila/templates/manila-data.json.j2
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"command": "manila-data --config-file /etc/manila/manila.conf",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "{{ container_config_directory }}/manila.conf",
|
||||
"dest": "/etc/manila/manila.conf",
|
||||
"owner": "manila",
|
||||
"perm": "0600"
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
{
|
||||
"path": "/var/log/kolla/manila",
|
||||
"owner": "manila:manila",
|
||||
"recurse": true
|
||||
}
|
||||
]
|
||||
}
|
@ -271,6 +271,7 @@
|
||||
|
||||
- hosts:
|
||||
- manila-api
|
||||
- manila-data
|
||||
- manila-share
|
||||
- manila-scheduler
|
||||
serial: '{{ serial|default("0") }}'
|
||||
|
24
docker/manila/manila-data/Dockerfile.j2
Normal file
24
docker/manila/manila-data/Dockerfile.j2
Normal file
@ -0,0 +1,24 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}manila-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block manila_data_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set manila_data_packages = [
|
||||
'manila-data'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(manila_data_packages | customizable("packages")) }}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block manila_data_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER manila
|
Loading…
Reference in New Issue
Block a user