python-monascaclient/docker
Arseni Lipinski d02db953dc Change repository links usage in Dockerfile and build image
Used to be: git.openstack.org/openstack/monasca-persister?h=stable/pike
Now : opendev.org/openstack/monasca-persister/src/branch/stable/pike

Since the way links to specific branches changed, usage of
those links has to be changed as well.
CONSTRAINTS_BRANCH variable was removed because CONSTRAINTS_FILE
contains link to the upper-requirements file with specified branch.

Story: 2005666
Task: 31056
Depends-On: https://review.opendev.org/659073
Change-Id: Iea51da2f0d3c19ffd5b3204d495d01e4c9b31750
2019-05-23 08:52:23 +00:00
..
build_image.sh Change repository links usage in Dockerfile and build image 2019-05-23 08:52:23 +00:00
Dockerfile Change repository links usage in Dockerfile and build image 2019-05-23 08:52:23 +00:00
health_check.py Create Docker image and build in Zuul 2019-04-02 08:36:21 +00:00
README.rst Create Docker image and build in Zuul 2019-04-02 08:36:21 +00:00
start.sh Create Docker image and build in Zuul 2019-04-02 08:36:21 +00:00

Docker image for Monasca Client

The Monasca Client image is based on the monasca-base image.

Building monasca-base image

See https://github.com/openstack/monasca-common/tree/master/docker/README.rst

Building Monasca Client image

Example:

$ ./build_image.sh <repository_version> <upper_constains_branch> <common_version>

Requirements from monasca-base image

health_check.py

This file will be used for checking the status of the Monasca API application.

Scripts

start.sh

In this starting script provide all steps that lead to the proper service start. Including usage of wait scripts and templating of configuration files. You also could provide the ability to allow running container after service died for easier debugging.

build_image.sh

Please read detailed build description inside the script.

Docker Compose

When you want to use docker-compose add it as a new service and be sure that property 'tty' is set to true to avoid exiting of container after startup. Example:

  • monasca-client:
    • image: monasca/client:master
    • tty: true

Running

If you don't want to use docker-compose mechanism, you can run container manually and connect it to existing docker Monasca network. Example: docker network --network=<network-name> <container_name>

You can also use docker run option to start a container and connect it to a network immediately: Example: docker run -itd --network=<network-name> <container-name>

Inside of container it is possible to run 'monasca' shell commands, e.g. to list all metrics. Example: monasca metric-list

https://docs.openstack.org/python-monascaclient/latest/