diff --git a/README.md b/README.md index 3d52602d37..fb85c1192a 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ services: * Horizon * Zaqar * Magnum +* Gnocchi ``` $ sudo docker search kollaglue diff --git a/compose/gnocchi.yml b/compose/gnocchi.yml new file mode 100644 index 0000000000..cd3ead3302 --- /dev/null +++ b/compose/gnocchi.yml @@ -0,0 +1,15 @@ +gnocchiapi: + image: kollaglue/centos-rdo-gnocchi-api:latest + name: gnocchiapi + restart: always + env_file: + - openstack.env + net: "host" + +gnocchistatsd: + image: kollaglue/centos-rdo-gnocchi-statsd:latest + name: gnocchistatsd + restart: always + env_file: + - openstack.env + net: "host" diff --git a/docker/centos/binary/gnocchi/gnocchi-api/Dockerfile b/docker/centos/binary/gnocchi/gnocchi-api/Dockerfile new file mode 100644 index 0000000000..cd5974a22d --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-api/Dockerfile @@ -0,0 +1,10 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%gnocchi-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum install -y openstack-gnocchi-api \ + openstack-gnocchi-carbonara \ + openstack-gnocchi-indexer-sqlalchemy \ + && yum clean all + +COPY ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/centos/binary/gnocchi/gnocchi-api/build b/docker/centos/binary/gnocchi/gnocchi-api/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-api/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-api/config-external.sh b/docker/centos/binary/gnocchi/gnocchi-api/config-external.sh new file mode 120000 index 0000000000..471d03664b --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-api/config-external.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-api/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-api/config-internal.sh b/docker/centos/binary/gnocchi/gnocchi-api/config-internal.sh new file mode 120000 index 0000000000..79578ce601 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-api/config-internal.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-api/start.sh b/docker/centos/binary/gnocchi/gnocchi-api/start.sh new file mode 120000 index 0000000000..99320c6d03 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-api/start.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-api/start.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-base/Dockerfile b/docker/centos/binary/gnocchi/gnocchi-base/Dockerfile new file mode 100644 index 0000000000..e9d67da7ce --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-base/Dockerfile @@ -0,0 +1,4 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +COPY config-gnocchi.sh /opt/kolla/config-gnocchi.sh diff --git a/docker/centos/binary/gnocchi/gnocchi-base/build b/docker/centos/binary/gnocchi/gnocchi-base/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-base/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-base/config-gnocchi.sh b/docker/centos/binary/gnocchi/gnocchi-base/config-gnocchi.sh new file mode 120000 index 0000000000..75a8a5e104 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-base/config-gnocchi.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-base/config-gnocchi.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-statsd/Dockerfile b/docker/centos/binary/gnocchi/gnocchi-statsd/Dockerfile new file mode 100644 index 0000000000..7998a3621e --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-statsd/Dockerfile @@ -0,0 +1,7 @@ +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%gnocchi-base:%%KOLLA_TAG%% +MAINTAINER Kolla Project (https://launchpad.net/kolla) + +RUN yum install -y openstack-gnocchi-statsd && yum clean all + +COPY ./start.sh /start.sh +CMD ["/start.sh"] diff --git a/docker/centos/binary/gnocchi/gnocchi-statsd/build b/docker/centos/binary/gnocchi/gnocchi-statsd/build new file mode 120000 index 0000000000..ec19138031 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-statsd/build @@ -0,0 +1 @@ +../../../../../tools/build-docker-image \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-statsd/config-external.sh b/docker/centos/binary/gnocchi/gnocchi-statsd/config-external.sh new file mode 120000 index 0000000000..fe516e42ce --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-statsd/config-external.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-statsd/config-external.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-statsd/config-internal.sh b/docker/centos/binary/gnocchi/gnocchi-statsd/config-internal.sh new file mode 120000 index 0000000000..9d9ebfa7d6 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-statsd/config-internal.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-statsd/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/gnocchi/gnocchi-statsd/start.sh b/docker/centos/binary/gnocchi/gnocchi-statsd/start.sh new file mode 120000 index 0000000000..ad961553e2 --- /dev/null +++ b/docker/centos/binary/gnocchi/gnocchi-statsd/start.sh @@ -0,0 +1 @@ +../../../../common/gnocchi/gnocchi-statsd/start.sh \ No newline at end of file diff --git a/docker/common/gnocchi/gnocchi-api/config-external.sh b/docker/common/gnocchi/gnocchi-api/config-external.sh new file mode 100755 index 0000000000..59639ba637 --- /dev/null +++ b/docker/common/gnocchi/gnocchi-api/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/gnocchi-api/gnocchi-api.conf" +TARGET="/etc/gnocchi/gnocchi-api.conf" +OWNER="gnocchi" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/common/gnocchi/gnocchi-api/config-internal.sh b/docker/common/gnocchi/gnocchi-api/config-internal.sh new file mode 100755 index 0000000000..411e9ae8ae --- /dev/null +++ b/docker/common/gnocchi/gnocchi-api/config-internal.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +set -e + +. /opt/kolla/kolla-common.sh +. /opt/kolla/config-gnocchi.sh + +check_required_vars KEYSTONE_ADMIN_TOKEN \ + KEYSTONE_AUTH_PROTOCOL \ + KEYSTONE_ADMIN_SERVICE_HOST \ + KEYSTONE_ADMIN_SERVICE_PORT \ + ADMIN_TENANT_NAME \ + GNOCCHI_DB_NAME \ + GNOCCHI_DB_USER \ + GNOCCHI_DB_PASSWORD \ + GNOCCHI_SERVICE_PROTOCOL \ + GNOCCHI_SERVICE_PORT \ + GNOCCHI_ARCHIVE_POLICY \ + GNOCCHI_STORAGE_BACKEND \ + GNOCCHI_KEYSTONE_USER \ + GNOCCHI_ADMIN_PASSWORD \ + GNOCCHI_API_SERVICE_HOST + +fail_unless_os_service_running keystone +fail_unless_db + +mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql < /openrc < - Keystone DB password GLANCE_KEYSTONE_USER= - Glance Keystone User GLANCE_REGISTRY_SERVICE_HOST= Glance registry service host + GNOCCHI_ADMIN_PASSWORD= - admin password for gnocchi user + GNOCCHI_API_SERVICE_HOST= - address where gnocchi API is running + GNOCCHI_KEYSTONE_PASSWORD= - Gnocchi keystone password + GNOCCHI_KEYSTONE_USER= - Gnocchi Keystone User + GNOCCHI_SERVICE_PORT=<8041> - Port where gnocchi operates + GNOCCHI_STORAGE_BACKEND= - Storage backend for gnocchi KEYSTONE_ADMIN_PASSWORD= KEYSTONE_ADMIN_SERVICE_HOST= - IP Address of Keystone Host KEYSTONE_ADMIN_SERVICE_PORT=<35357> - Port where Keystone admin endpoint operates. diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index 0bf21ecc63..6cc13309a2 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -229,6 +229,38 @@ In order for each service to function, there is a minimum set of required variab GLANCE_DB_USER MARIADB_SERVICE_HOST +# Gnocchi-api + + ADMIN_TENANT_NAME + GNOCCHI_ADMIN_PASSWORD + GNOCCHI_API_SERVICE_HOST + GNOCCHI_ARCHIVE_POLICY + GNOCCHI_DB_NAME + GNOCCHI_DB_PASSWORD + GNOCCHI_DB_USER + GNOCCHI_KEYSTONE_USER + GNOCCHI_SERVICE_PORT + GNOCCHI_SERVICE_PROTOCOL + GNOCCHI_STORAGE_BACKEND + KEYSTONE_ADMIN_SERVICE_HOST + KEYSTONE_ADMIN_SERVICE_PORT + KEYSTONE_ADMIN_TOKEN + KEYSTONE_AUTH_PROTOCOL + +# Gnocchi-base + + GNOCCHI_DATA_DIR + GNOCCHI_SERVICE_PORT + GNOCCHI_STORAGE_BACKEND + KEYSTONE_ADMIN_SERVICE_HOST + KEYSTONE_ADMIN_SERVICE_PORT + KEYSTONE_ADMIN_TOKEN + KEYSTONE_PUBLIC_SERVICE_HOST + +# Gnocchi-statsd + + None + # Haproxy None diff --git a/tools/genenv b/tools/genenv index 84b42163c3..40d60a2f8d 100755 --- a/tools/genenv +++ b/tools/genenv @@ -118,6 +118,18 @@ GLANCE_KEYSTONE_PASSWORD=glance GLANCE_API_SERVICE_HOST=$HOST_IP GLANCE_REGISTRY_SERVICE_HOST=$HOST_IP +# Gnocchi +GNOCCHI_DB_PASSWORD=gnocchi +GNOCCHI_DB_NAME=gnocchi +GNOCCHI_DB_USER=gnocchi +GNOCCHI_SERVICE_PROTOCOL=http +GNOCCHI_SERVICE_PORT=8041 +GNOCCHI_STORAGE_BACKEND=file +GNOCCHI_KEYSTONE_USER=gnocchi +GNOCCHI_KEYSTONE_PASSWORD=gnocchi +GNOCCHI_ADMIN_PASSWORD=gnocchi +GNOCCHI_API_SERVICE_HOST=$HOST_IP + # Nova NOVA_DB_PASSWORD=nova NOVA_DB_NAME=nova diff --git a/tools/kolla b/tools/kolla index b65f7b0229..4df9ea4dbb 100755 --- a/tools/kolla +++ b/tools/kolla @@ -46,6 +46,7 @@ function process_all { process cinder-backup process cinder-volume process ceilometer + process gnocchi } function check_selinux {