aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 47 insertions, 3 deletions
diff --git a/README.md b/README.md
index 6dc31611..b7bbdb83 100644
--- a/README.md
+++ b/README.md
@@ -17,13 +17,57 @@ git clone ssh://vv770d@gerrit.onap.org:29418/dcaegen2/collectors/ves
mvn clean install
```
-### Docker Image
+### Running Locally
+Build the image (it will go into your local docker repository)
```
-git clone ssh://vv770d@gerrit.onap.org:29418/dcaegen2/collectors/ves
-mvn clean deploy
+mvn clean package
+```
+
+Run the image using docker-compose.yml
+```
+docker-compose up
```
+### Environment variables in Docker Container
+Most of the configuration of how VESCollector should be started and managed is done through environment variables.
+Some of them are set during the image build process and some of them are defined manually or by
+a particular deployment system.
+
+Variables set manually / coming from deployment system:
+- COLLECTOR_IP
+- DMAAPHOST - should contain an address to DMaaP, so that event publishing can work
+- CBSPOLLTIMER - it should be put in here if we want to automatically fetch configuration from CBS.
+- CONSUL_HOST - used with conjunction with CBSPOLLTIMER, should be a host address (without port! e.g http://my-ip-or-host) where Consul service lies
+- CONFIG_BINDING_SERVICE - used with conjunction with CBSPOLLTIMER, should be a name of CBS as it is registered in Consul
+- HOSTNAME - used with conjunction with CBSPOLLTIMER, should be a name of VESCollector application as it is registered in CBS catalog
+
+### Docker file system layout
+The main directory where all code resides in docker container
+looks like this and is located in /opt/app/VESCollector
+```
+<host>:/opt/app/VESCollector# ls
+Dockerfile bin etc lib logs specs tomcat.8080
+```
+- bin contains sh scripts (path here is denoted by env var $SCRIPTS_PATH)
+- etc contains various application configuration, most notably it reflects 'etc' directory from repository
+- lib contains all libraries that are pulled into the app during maven build
+- logs contains all application logs, especially collector.log file which is a main log file denoted by $MAIN_LOG_FILE variable
+- specs contains json schemas specs for ves-collector
+
+## Managing application in Docker container
+Scripts directory contain .sh scripts that are used to start & stop & configure the VESCollector application
+inside the docker image.
+These scripts are packaged inside the docker image by a mvn assembly & docker plugins.
+
+## How the application starts inside container
+General flow goes like this
+- Docker image is build, and it points docker-entry.sh as the entrypoint.
+- Docker-entry point, depending on the deployment type,
+configures a bunch of things and starts the application in a separate process
+and loops indefinitely to hold the docker container process.
+
+### Release images
For R1 - image/version pushed to nexus3
```
nexus3.onap.org:10003/snapshots/onap/org.onap.dcaegen2.collectors.ves.vescollector 1.1