diff options
| author | Zenghui Shi <zshi@redhat.com> | 2017-11-09 19:32:46 +0800 |
|---|---|---|
| committer | Zenghui Shi <zshi@redhat.com> | 2017-11-09 19:41:38 +0800 |
| commit | 725c14c43e6d8bd23d4d1f8fbb756ee92f9cbd75 (patch) | |
| tree | cab5a196a38b8ee8c0473236f4793652097bb507 | |
| parent | ec028fc3989562bd0ac7d0c1d2c388fd3246b8b7 (diff) | |
| download | kolla-725c14c43e6d8bd23d4d1f8fbb756ee92f9cbd75.tar.gz kolla-725c14c43e6d8bd23d4d1f8fbb756ee92f9cbd75.zip | |
Add ptp service docker image
Change-Id: I317ae1fe3bb33cda4e5b947e5418f9419373d7c5
Partial-implements: blueprint ptp-service
| -rw-r--r-- | README.rst | 2 | ||||
| -rw-r--r-- | docker/ptp/Dockerfile.j2 | 16 | ||||
| -rw-r--r-- | docker/ptp/extend_start.sh | 12 | ||||
| -rwxr-xr-x | kolla/common/config.py | 1 | ||||
| -rw-r--r-- | releasenotes/notes/add-ptp-service-image-3fb4eadeeeda3aa0.yaml | 3 |
5 files changed, 34 insertions, 0 deletions
diff --git a/README.rst b/README.rst index 8c67cc7e8..181429c07 100644 --- a/README.rst +++ b/README.rst @@ -148,6 +148,8 @@ Kolla provides images to deploy the following infrastructure components: - `MongoDB <https://www.mongodb.org/>`__ as a database back end for Ceilometer and Gnocchi. - `Open vSwitch <http://openvswitch.org/>`__ and Linuxbridge back ends for Neutron. +- `Linuxptp <http://linuxptp.sourceforge.net/>`__ an implementation of the Precision + Time Protocol (PTP) according to IEEE standard 1588 for Linux. - `Qdrouterd <https://qpid.apache.org/components/dispatch-router/index.html>`__ as a direct messaging back end for communication between services. - `RabbitMQ <https://www.rabbitmq.com/>`__ as a broker messaging back end for diff --git a/docker/ptp/Dockerfile.j2 b/docker/ptp/Dockerfile.j2 new file mode 100644 index 000000000..474915188 --- /dev/null +++ b/docker/ptp/Dockerfile.j2 @@ -0,0 +1,16 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" + +{% block ptp_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{% set ptp_packages = ['linuxptp'] %} + +{{ macros.install_packages(ptp_packages | customizable("packages")) }} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 755 /usr/local/bin/kolla_extend_start + +{% block ptp_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/docker/ptp/extend_start.sh b/docker/ptp/extend_start.sh new file mode 100644 index 000000000..09203991d --- /dev/null +++ b/docker/ptp/extend_start.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +rm -f /var/run/ptp.pid + +PTP_LOG_DIR="/var/log/kolla/ptp" +if [[ ! -d "${PTP_LOG_DIR}" ]]; then + mkdir -p ${PTP_LOG_DIR} +fi + +if [[ $(stat -c %a ${PTP_LOG_DIR}) != "755" ]]; then + chmod 755 ${PTP_LOG_DIR} +fi diff --git a/kolla/common/config.py b/kolla/common/config.py index 56910be96..c1e1eb84a 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -71,6 +71,7 @@ _PROFILE_OPTS = [ 'mongodb', 'opendaylight', 'openvswitch', + 'ptp', 'qdrouterd', 'rabbitmq', 'redis', diff --git a/releasenotes/notes/add-ptp-service-image-3fb4eadeeeda3aa0.yaml b/releasenotes/notes/add-ptp-service-image-3fb4eadeeeda3aa0.yaml new file mode 100644 index 000000000..a4794ea9a --- /dev/null +++ b/releasenotes/notes/add-ptp-service-image-3fb4eadeeeda3aa0.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add ptp service image |
