diff --git a/README.rst b/README.rst index 8c67cc7e8e..181429c07d 100644 --- a/README.rst +++ b/README.rst @@ -148,6 +148,8 @@ Kolla provides images to deploy the following infrastructure components: - `MongoDB `__ as a database back end for Ceilometer and Gnocchi. - `Open vSwitch `__ and Linuxbridge back ends for Neutron. +- `Linuxptp `__ an implementation of the Precision + Time Protocol (PTP) according to IEEE standard 1588 for Linux. - `Qdrouterd `__ as a direct messaging back end for communication between services. - `RabbitMQ `__ as a broker messaging back end for diff --git a/docker/ptp/Dockerfile.j2 b/docker/ptp/Dockerfile.j2 new file mode 100644 index 0000000000..4749151886 --- /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 0000000000..09203991d7 --- /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 56910be961..c1e1eb84ae 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 0000000000..a4794ea9ab --- /dev/null +++ b/releasenotes/notes/add-ptp-service-image-3fb4eadeeeda3aa0.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add ptp service image