Merge "Add multipathing support to docker container"

This commit is contained in:
Jenkins 2016-07-12 13:30:03 +00:00 committed by Gerrit Code Review
commit a354be493e
17 changed files with 134 additions and 0 deletions

View File

@ -205,6 +205,7 @@ enable_magnum: "no"
enable_manila: "no" enable_manila: "no"
enable_mistral: "no" enable_mistral: "no"
enable_mongodb: "no" enable_mongodb: "no"
enable_multipathd: "no"
enable_murano: "no" enable_murano: "no"
enable_neutron_lbaas: "no" enable_neutron_lbaas: "no"
enable_neutron_qos: "no" enable_neutron_qos: "no"

View File

@ -244,3 +244,7 @@ ceilometer
[ceilometer-compute:children] [ceilometer-compute:children]
compute compute
# Multipathd
[multipathd:children]
compute

View File

@ -256,3 +256,7 @@ ceilometer
[ceilometer-compute:children] [ceilometer-compute:children]
compute compute
# Multipathd
[multipathd:children]
compute

View File

@ -0,0 +1,9 @@
---
project_name: "multipathd"
####################
# Docker
####################
multipathd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-multipathd"
multipathd_tag: "{{ openstack_release }}"
multipathd_image_full: "{{ multipathd_image }}:{{ multipathd_tag }}"

View File

@ -0,0 +1,24 @@
---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
when: inventory_hostname in groups['compute']
with_items:
- "multipathd"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
when: inventory_hostname in groups['compute']
with_items:
- "multipathd"
- name: Copying over multipath.conf
template:
src: "{{ role_path }}/templates/multipath.conf.j2"
dest: "{{ node_config_directory }}/{{ item }}/multipath.conf"
with_items:
- "multipathd"

View File

@ -0,0 +1,4 @@
---
- include: config.yml
- include: start.yml

View File

@ -0,0 +1,2 @@
---
- include: "{{ action }}.yml"

View File

@ -0,0 +1,7 @@
---
- name: Pulling multipathd image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ multipathd_image_full }}"
when: inventory_hostname in groups['multipathd']

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1,21 @@
---
- name: Starting multipathd container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ multipathd_image_full }}"
name: "multipathd"
ipc_mode: "host"
privileged: True
volumes:
- "{{ node_config_directory }}/multipathd/:{{ container_config_directory }}/:ro"
- "kolla_logs:/var/log/kolla/"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "/run/:/run/"
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
- "/lib/modules:/lib/modules:ro"
- "/sys/kernel/config:/configfs"
- "cinder:/var/lib/cinder"
- "iscsi_info:/etc/iscsi"
when: inventory_hostname in groups['compute']

View File

@ -0,0 +1,5 @@
---
- include: config.yml
- include: start.yml
serial: "30%"

View File

@ -0,0 +1,11 @@
defaults {
user_friendly_names no
polling_interval 30
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^sd[a]"
devnode "^hd[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
}

View File

@ -0,0 +1,11 @@
{
"command": "/sbin/multipathd -d",
"config_files": [
{
"source": "{{ container_config_directory }}/multipath.conf",
"dest": "/etc/multipath.conf",
"owner": "root",
"perm": "0600"
}
]
}

View File

@ -22,6 +22,7 @@
- mariadb - mariadb
- iscsid - iscsid
- tgtd - tgtd
- multipathd
- murano-api - murano-api
- neutron-server - neutron-server
- nova-api - nova-api
@ -60,6 +61,13 @@
tags: iscsi, tags: iscsi,
when: enable_iscsi | bool } when: enable_iscsi | bool }
- hosts:
- multipathd
roles:
- { role: multipathd,
tags: multipathd,
when: enable_multipathd | bool }
- hosts: rabbitmq - hosts: rabbitmq
roles: roles:
- { role: rabbitmq, - { role: rabbitmq,

View File

@ -0,0 +1,18 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
device-mapper-multipath \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
multipath-tools \
&& apt-get clean
{% endif %}
{{ include_footer }}

View File

@ -120,6 +120,7 @@ neutron_external_interface: "eth1"
#enable_mistral: "no" #enable_mistral: "no"
#enable_mongodb: "no" #enable_mongodb: "no"
#enable_murano: "no" #enable_murano: "no"
#enable_multipathd: "no"
#enable_neutron_lbaas: "no" #enable_neutron_lbaas: "no"
#enable_neutron_qos: "no" #enable_neutron_qos: "no"
#enable_swift: "no" #enable_swift: "no"

View File

@ -0,0 +1,3 @@
---
features:
- Add multipathing support to docker container.