Skip to content

Commit

Permalink
Add HAcluster containers
Browse files Browse the repository at this point in the history
Theses images contains High Availability solution such as
Corosync, Pacemaker, Pacemaker Remote and PCS.

Change-Id: I86fd145d2998f68b08a16082414b86904971549a
Implements: blueprint pacemaker-container
  • Loading branch information
goldyfruit committed Jul 18, 2019
1 parent 5ecb910 commit 046158b
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Expand Up @@ -130,6 +130,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.
Expand Down
1 change: 1 addition & 0 deletions docker/base/Dockerfile.j2
Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions 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
12 changes: 12 additions & 0 deletions 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 %}
8 changes: 8 additions & 0 deletions 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
11 changes: 11 additions & 0 deletions 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 %}
11 changes: 11 additions & 0 deletions 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 %}
11 changes: 11 additions & 0 deletions 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 %}
11 changes: 11 additions & 0 deletions 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 %}
1 change: 1 addition & 0 deletions kolla/common/config.py
Expand Up @@ -57,6 +57,7 @@
'etcd',
'fluentd',
'haproxy',
'hacluster',
'keepalived',
'kibana',
'kolla-toolbox',
Expand Down
9 changes: 9 additions & 0 deletions 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.

0 comments on commit 046158b

Please sign in to comment.