summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorPawelSzalapski <pawel.szalapski@nokia.com>2018-07-10 13:25:18 +0200
committerPawelSzalapski <pawel.szalapski@nokia.com>2018-07-13 12:31:07 +0200
commitb343343f1efd0df9196b27e9e65b783e5e954112 (patch)
treee19094ffbbd8c2a1616ed99983a95c32cac0343b /README.md
parentcd66181b35300f020f197bb411d6bdf6ad2514fb (diff)
Clean up .sh scripts
Removed .sh scripts that are not needed. Fill readme with a description of some of the things that might be not visible at first glance Refactor .sh scripts, remove not used or not needed parts Fix a bug where pidof <package> does not work. Change logging of the scripts and they way that app is run so that the logs are in one place -> collector.logs Fixed a bug where tomcat startup problems are not logged Added log rotation with logrotate tool Change-Id: I156328ab23d18a20072177ae8c5420772c3e2c7c Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com> Issue-ID: DCAEGEN2-610
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