summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst2
-rw-r--r--docker/base/Dockerfile.j21
-rw-r--r--docker/base/crmsh.repo7
-rw-r--r--docker/hacluster/hacluster-base/Dockerfile.j212
-rw-r--r--docker/hacluster/hacluster-base/extend_start.sh8
-rw-r--r--docker/hacluster/hacluster-corosync/Dockerfile.j211
-rw-r--r--docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j211
-rw-r--r--docker/hacluster/hacluster-pacemaker/Dockerfile.j211
-rw-r--r--docker/hacluster/hacluster-pcs/Dockerfile.j211
-rwxr-xr-xkolla/common/config.py1
-rw-r--r--releasenotes/notes/add-hacluster-role-d10bc3918395ccdf.yaml9
11 files changed, 84 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index e6b69946a..12be6d014 100644
--- a/README.rst
+++ b/README.rst
@@ -131,6 +131,8 @@ Kolla provides images to deploy the following infrastructure components:
- `Collectd <https://collectd.org>`__,
`InfluxDB <https://influxdata.com/time-series-platform/influxdb/>`__, and
`Grafana <https://grafana.org>`__ for performance monitoring.
+- `Corosync <https://clusterlabs.org/corosync.html>`__ and
+ `Pacemaker <https://clusterlabs.org/pacemaker>`__ for HAcluster.
- `Elasticsearch <https://www.elastic.co/de/products/elasticsearch>`__ and
`Kibana <https://www.elastic.co/products/kibana>`__ to search, analyze,
and visualize log messages.
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 01f613bff..b3c923b3f 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -75,6 +75,7 @@ COPY yum.conf /etc/yum.conf
{% if base_arch == 'x86_64' %}
{% set base_yum_repo_files = [
+ 'crmsh.repo',
'elasticsearch.repo',
'grafana.repo',
'influxdb.repo',
diff --git a/docker/base/crmsh.repo b/docker/base/crmsh.repo
new file mode 100644
index 000000000..1c3396f75
--- /dev/null
+++ b/docker/base/crmsh.repo
@@ -0,0 +1,7 @@
+[network_ha-clustering_Stable]
+name=Stable High Availability/Clustering packages (CentOS_CentOS-7)
+type=rpm-md
+baseurl=http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-7/
+gpgcheck=1
+gpgkey=http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-7/repodata/repomd.xml.key
+enabled=1
diff --git a/docker/hacluster/hacluster-base/Dockerfile.j2 b/docker/hacluster/hacluster-base/Dockerfile.j2
new file mode 100644
index 000000000..7997e1229
--- /dev/null
+++ b/docker/hacluster/hacluster-base/Dockerfile.j2
@@ -0,0 +1,12 @@
+FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block hacluster_base_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+COPY extend_start.sh /usr/local/bin/kolla_extend_start
+
+RUN chmod 755 /usr/local/bin/kolla_extend_start
+
+{% block hacluster_base_footer %}{% endblock %}
diff --git a/docker/hacluster/hacluster-base/extend_start.sh b/docker/hacluster/hacluster-base/extend_start.sh
new file mode 100644
index 000000000..c0e9301d0
--- /dev/null
+++ b/docker/hacluster/hacluster-base/extend_start.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [[ ! -d "/var/log/kolla/hacluster" ]]; then
+ mkdir -p /var/log/kolla/hacluster
+fi
+if [[ $(stat -c %a /var/log/kolla/hacluster) != "755" ]]; then
+ chmod 755 /var/log/kolla/hacluster
+fi
diff --git a/docker/hacluster/hacluster-corosync/Dockerfile.j2 b/docker/hacluster/hacluster-corosync/Dockerfile.j2
new file mode 100644
index 000000000..08f3f678f
--- /dev/null
+++ b/docker/hacluster/hacluster-corosync/Dockerfile.j2
@@ -0,0 +1,11 @@
+FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block hacluster_corosync_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+{% set hacluster_corosync_packages = ['corosync'] %}
+{{ macros.install_packages(hacluster_corosync_packages | customizable("packages")) }}
+
+{% block hacluster_corosync_footer %}{% endblock %}
diff --git a/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2 b/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2
new file mode 100644
index 000000000..2a6570ffe
--- /dev/null
+++ b/docker/hacluster/hacluster-pacemaker-remote/Dockerfile.j2
@@ -0,0 +1,11 @@
+FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block hacluster_pacemaker_remote_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+{% set hacluster_pacemaker_remote_packages = ['pacemaker-remote'] %}
+{{ macros.install_packages(hacluster_pacemaker_remote_packages | customizable("packages")) }}
+
+{% block hacluster_pacemaker_remote_footer %}{% endblock %}
diff --git a/docker/hacluster/hacluster-pacemaker/Dockerfile.j2 b/docker/hacluster/hacluster-pacemaker/Dockerfile.j2
new file mode 100644
index 000000000..a11163a3c
--- /dev/null
+++ b/docker/hacluster/hacluster-pacemaker/Dockerfile.j2
@@ -0,0 +1,11 @@
+FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block hacluster_pacemaker_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+{% set hacluster_pacemaker_packages = ['pacemaker'] %}
+{{ macros.install_packages(hacluster_pacemaker_packages | customizable("packages")) }}
+
+{% block hacluster_pacemaker_footer %}{% endblock %}
diff --git a/docker/hacluster/hacluster-pcs/Dockerfile.j2 b/docker/hacluster/hacluster-pcs/Dockerfile.j2
new file mode 100644
index 000000000..0b760ca25
--- /dev/null
+++ b/docker/hacluster/hacluster-pcs/Dockerfile.j2
@@ -0,0 +1,11 @@
+FROM {{ namespace }}/{{ image_prefix }}hacluster-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block hacluster_pcs_header %}{% endblock %}
+
+{% import "macros.j2" as macros with context %}
+
+{% set hacluster_pcs_packages = ['pcs','crmsh'] %}
+{{ macros.install_packages(hacluster_pcs_packages | customizable("packages")) }}
+
+{% block hacluster_pcs_footer %}{% endblock %}
diff --git a/kolla/common/config.py b/kolla/common/config.py
index b3a36de3b..d537303ad 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -57,6 +57,7 @@ _PROFILE_OPTS = [
'etcd',
'fluentd',
'haproxy',
+ 'hacluster',
'keepalived',
'kibana',
'kolla-toolbox',
diff --git a/releasenotes/notes/add-hacluster-role-d10bc3918395ccdf.yaml b/releasenotes/notes/add-hacluster-role-d10bc3918395ccdf.yaml
new file mode 100644
index 000000000..2c19f852b
--- /dev/null
+++ b/releasenotes/notes/add-hacluster-role-d10bc3918395ccdf.yaml
@@ -0,0 +1,9 @@
+---
+features:
+ - |
+ Add HAcluster Docker images. These images contain High Availability
+ solution such as Corosync, Pacemaker, Pacemaker Remote and PCS.
+
+ HAcluster will not handle any OpenStack control plane resources, it
+ will be used as third party for OpenStack Masakari for example to handle
+ the instances failover if a Nova compute crash.