Merge "Add manila-data service"

This commit is contained in:
Jenkins 2016-11-03 12:25:33 +00:00 committed by Gerrit Code Review
commit 80c4d7e401
11 changed files with 83 additions and 0 deletions

View File

@ -239,6 +239,9 @@ manila
[manila-share:children]
storage
[manila-data:children]
storage
# Swift
[swift-proxy-server:children]
swift

View File

@ -257,6 +257,9 @@ manila
[manila-share:children]
storage
[manila-data:children]
storage
# Swift
[swift-proxy-server:children]
swift

View File

@ -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

View File

@ -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

View File

@ -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']

View File

@ -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']

View File

@ -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 }}"

View File

@ -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']

View 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
}
]
}

View File

@ -271,6 +271,7 @@
- hosts:
- manila-api
- manila-data
- manila-share
- manila-scheduler
serial: '{{ serial|default("0") }}'

View 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