summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-05-08 09:38:02 -0400
committerLusheng Ji <lji@research.att.com>2018-05-08 18:45:27 +0000
commitcb9d614fdc78480584466b8e84f3535d946424a0 (patch)
tree9c8f4efa4f9c459a25edc6c0bab8a94c914026b0
parentdda9b82dff27429d9710db5069686553e367728b (diff)
Set containers restart policy
1. set container restart policy 2. modify naming for some containers for consistency Issue-ID: DCAEGEN2-494 Change-Id: I49dc93e3e18d8b30f06bb913a7d52493e26f9e61 Signed-off-by: Lusheng Ji <lji@research.att.com>
-rw-r--r--heat/docker-compose-1.yaml6
-rw-r--r--heat/docker-compose-2.yaml20
-rw-r--r--heat/docker-compose-3.yaml7
-rw-r--r--heat/docker-compose-4.yaml18
-rwxr-xr-xheat/register.sh84
5 files changed, 112 insertions, 23 deletions
diff --git a/heat/docker-compose-1.yaml b/heat/docker-compose-1.yaml
index 82095ad..b8a04d1 100644
--- a/heat/docker-compose-1.yaml
+++ b/heat/docker-compose-1.yaml
@@ -3,6 +3,7 @@ services:
pgHolmes:
image: "postgres:9.5"
container_name: "pgHolmes"
+ restart: "always"
hostname: "phHolmes"
environment:
- "POSTGRES_USER=holmes"
@@ -18,6 +19,7 @@ services:
pgInventory:
image: "postgres:9.5"
container_name: "pgInventory"
+ restart: "always"
hostname: "pgInventory"
environment:
- "POSTGRES_USER=inventory"
@@ -32,8 +34,9 @@ services:
consul:
- image: consul:0.8.3
+ image: "consul:0.8.3"
container_name: "consul"
+ restart: "always"
hostname: "consul"
ports:
- "8500:8500"
@@ -50,6 +53,7 @@ services:
config-binding-service:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.platform.configbinding:{{ dcae_docker_cbs }}"
container_name: "config_binding_service"
+ restart: "always"
hostname: "config-binding-service"
environment:
- "CONSUL_HOST=consul"
diff --git a/heat/docker-compose-2.yaml b/heat/docker-compose-2.yaml
index 4fd9d5a..2d53b85 100644
--- a/heat/docker-compose-2.yaml
+++ b/heat/docker-compose-2.yaml
@@ -4,6 +4,7 @@ services:
mvp-dcaegen2-collectors-ves:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.collectors.ves.vescollector:{{ dcae_docker_ves }}"
container_name: "mvp-dcaegen2-collectors-ves"
+ restart: "always"
hostname: "mvp-dcaegen2-collectors-ves"
environment:
- "DMAAPHOST={{ mr_ip_addr }}"
@@ -24,6 +25,7 @@ services:
mvp-dcaegen2-analytics-tca:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.deployments.tca-cdap-container:{{ dcae_docker_tca }}"
container_name: "mvp-dcaegen2-analytics-tca"
+ restart: "always"
hostname: "mvp-dcaegen2-analytics-tca"
environment:
- "DMAAPHOST={{ mr_ip_addr }}"
@@ -50,10 +52,11 @@ services:
- "SERVICE_11011_CHECK_INTERVAL=15s"
- "SERVICE_11011_CHECK_INITIAL_STATUS=passing"
- mvp-dcae-analytics-holmes-engine-management:
+ mvp-dcaegen2-analytics-holmes-engine-management:
image: "{{ nexus_docker_repo}}/onap/holmes/engine-management:{{ holmes_docker_em }}"
- container_name: "mvp-dcae-analytics-holmes-engine-management"
- hostname: "mvp-dcae-analytics-holmes-engine-management"
+ container_name: "mvp-dcaegen2-analytics-holmes-engine-management"
+ restart: "always"
+ hostname: "mvp-dcaegen2-analytics-holmes-engine-management"
environment:
- "URL_JDBC=pgHolmes:5432"
- "JDBC_USERNAME=holmes"
@@ -62,16 +65,17 @@ services:
- "CONSUL_HOST=consul"
- "CONSUL_PORT=8500"
- "CONFIG_BINDING_SERVICE=config_binding_service"
- - "HOSTNAME=mvp-dcae-analytics-holmes-engine-management"
+ - "HOSTNAME=mvp-dcaegen2-analytics-holmes-engine-management"
ports:
- "9102:9102"
labels:
- "SERVICE_9102_IGNORE=true"
- mvp-dcae-analytics-holmes-rule-management:
+ mvp-dcaegen2-analytics-holmes-rule-management:
image: "{{ nexus_docker_repo}}/onap/holmes/rule-management:{{ holmes_docker_rm }}"
- container_name: "mvp-dcae-analytics-holmes-rule-management"
- hostname: "mvp-dcae-analytics-holmes-rule-management"
+ container_name: "mvp-dcaegen2-analytics-holmes-rule-management"
+ restart: "always"
+ hostname: "mvp-dcaegen2-analytics-holmes-rule-management"
environment:
- "URL_JDBC=pgHolmes:5432"
- "JDBC_USERNAME=holmes"
@@ -80,7 +84,7 @@ services:
- "CONSUL_HOST=consul"
- "CONSUL_PORT=8500"
- "CONFIG_BINDING_SERVICE=config_binding_service"
- - "HOSTNAME=mvp-dcae-analytics-holmes-rule-management"
+ - "HOSTNAME=mvp-dcaegen2-analytics-holmes-rule-management"
ports:
- "9101:9101"
labels:
diff --git a/heat/docker-compose-3.yaml b/heat/docker-compose-3.yaml
index f6c9212..3eef2bc 100644
--- a/heat/docker-compose-3.yaml
+++ b/heat/docker-compose-3.yaml
@@ -3,7 +3,7 @@ services:
inventory:
image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.inventory-api:{{ dcae_docker_inv }}"
- restart: always
+ restart: "always"
container_name: "inventory"
hostname: "inventory"
environment:
@@ -21,6 +21,7 @@ services:
service-change-handler:
image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.servicechange-handler:{{ dcae_docker_sch }}"
container_name: "service-change-handler"
+ restart: "always"
hostname: "service-change-handler"
ports:
- "8079:8079"
@@ -36,8 +37,8 @@ services:
deployment_handler:
image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.deployment-handler:{{ dcae_docker_dh }}"
- restart: always
container_name: "deployment-handler"
+ restart: "always"
hostname: "deployment-handler"
environment:
- "CLOUDIFY_PASSWORD=admin"
@@ -53,8 +54,8 @@ services:
policy_handler:
image: "{{ nexus_docker_repo }}/onap/org.onap.dcaegen2.platform.policy-handler:{{ dcae_docker_ph }}"
- restart: always
container_name: "policy-handler"
+ restart: "always"
hostname: "policy-handler"
ports:
- "25577:25577"
diff --git a/heat/docker-compose-4.yaml b/heat/docker-compose-4.yaml
index c8c36ca..00fac94 100644
--- a/heat/docker-compose-4.yaml
+++ b/heat/docker-compose-4.yaml
@@ -2,8 +2,9 @@ version: '2.1'
services:
heartbeat:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.platform.heartbeat:{{ dcae_docker_heartbeat }}"
- container_name: static-dcaegen2-services-heartbeat
- hostname: static-dcaegen2-services-heartbeat
+ container_name: "static-dcaegen2-services-heartbeat"
+ restart: "always"
+ hostname: "static-dcaegen2-services-heartbeat"
environment:
- "DMAAPHOST={{ mr_ip_addr }}"
- "CONSUL_HOST=consul"
@@ -22,8 +23,9 @@ services:
prh:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.services.prh.prh-app-server:{{ dcae_docker_prh }}"
- container_name: prh
- hostname: prh
+ container_name: "static-dcaegen2-services-prh"
+ restart: "always"
+ hostname: "static-dcaegen2-services-prh"
environment:
- "DMAAPHOST={{ mr_ip_addr }}"
- "CONSUL_HOST=consul"
@@ -42,8 +44,9 @@ services:
snmptrap:
image: "{{ nexus_docker_repo}}/onap/org.onap.dcaegen2.collectors.snmptrap:{{ dcae_docker_snmptrap }}"
- container_name: static-dcaegen2-collectors-snmptrap
- hostname: static-dcaegen2-collectors-snmptrap
+ container_name: "static-dcaegen2-collectors-snmptrap"
+ restart: "always"
+ hostname: "static-dcaegen2-collectors-snmptrap"
environment:
- "DMAAPHOST={{ mr_ip_addr }}"
- "CONSUL_HOST=consul"
@@ -51,8 +54,9 @@ services:
- "CONFIG_BINDING_SERVICE=config_binding_service"
- "SERVICE_NAME=static-dcaegen2-collectors-snmptrap"
- "HOSTNAME=static-dcaegen2-collectors-snmptrap"
+ - "HOSTALIASES=/etc/host.aliases"
ports:
- - "162:162/udp"
+ - "162:6162/udp"
labels:
- "SERVICE_NAME=static-dcaegen2-collectors-snmptrap"
- "SERVICE_CHECK_DOCKER_SCRIPT=/opt/app/snmptrap/bin/healthcheck.sh"
diff --git a/heat/register.sh b/heat/register.sh
index 3176e44..2501dff 100755
--- a/heat/register.sh
+++ b/heat/register.sh
@@ -33,10 +33,20 @@ HOSTNAME_MVP_VES="mvp-dcaegen2-collectors-ves"
SRVCNAME_MVP_VES="mvp-dcaegen2-collectors-ves"
HOSTNAME_MVP_TCA="mvp-dcaegen2-analytics-tca"
SRVCNAME_MVP_TCA="mvp-dcaegen2-analytics-tca"
-HOSTNAME_MVP_HR="mvp-dcae-analytics-holmes-rule-management"
-SRVCNAME_MVP_HR="mvp-dcae-analytics-holmes-rule-management"
-HOSTNAME_MVP_HE="mvp-dcae-analytics-holmes-engine-management"
-SRVCNAME_MVP_HE="mvp-dcae-analytics-holmes-engine-management"
+HOSTNAME_MVP_HR="mvp-dcaegen2-analytics-holmes-rule-management"
+SRVCNAME_MVP_HR="mvp-dcaegen2-analytics-holmes-rule-management"
+HOSTNAME_MVP_HE="mvp-dcaegen2-analytics-holmes-engine-management"
+SRVCNAME_MVP_HE="mvp-dcaegen2-analytics-holmes-engine-management"
+
+# R2 PLUS service components
+HOSTNAME_STATIC_SNMPTRAP="static-dcaegen2-collectors-snmptrap"
+SRVCNAME_STATIC_SNMPTRAP="static-dcaegen2-collectors-snmptrap"
+HOSTNAME_STATIC_MAPPER="static-dcaegen2-services-mapper"
+SRVCNAME_STATIC_MAPPER="static-dcaegen2-services-mapper"
+HOSTNAME_STATIC_HEARTBEAT="static-dcaegen2-services-heartbeat"
+SRVCNAME_STATIC_HEARTBEAT="static-dcaegen2-services-heartbeat"
+HOSTNAME_STATIC_PRH="static-dcaegen2-services-prh"
+SRVCNAME_STATIC_PRH="static-dcaegen2-services-prh"
# registering docker host
@@ -409,3 +419,69 @@ REGKV='{
curl -v -X PUT -H "Content-Type: application/json" \
--data "${REGKV}" \
"http://${HOSTNAME_CONSUL}:8500/v1/kv/mvp-dcaegen2-analytics-tca:preferences"
+
+
+
+# SNMP Trap Collector
+REGKV='{
+"snmptrap.version": "1.3.0",
+"snmptrap.title": "ONAP SNMP Trap Receiver" ,
+"protocols.transport": "udp",
+"protocols.ipv4_interface": "0.0.0.0",
+"protocols.ipv4_port": 6162,
+"protocols.ipv6_interface": "::1",
+"protocols.ipv6_port": 6162,
+"cache.dns_cache_ttl_seconds": 60,
+"publisher.http_timeout_milliseconds": 1500,
+"publisher.http_retries": 3,
+"publisher.http_milliseconds_between_retries": 750,
+"publisher.http_primary_publisher": "true",
+"publisher.http_peer_publisher": "unavailable",
+"publisher.max_traps_between_publishes": 10,
+"publisher.max_milliseconds_between_publishes": 10000,
+ "streams_publishes": {
+ "sec_fault_unsecure": {
+ "type": "message_router",
+ "aaf_password": null,
+ "dmaap_info": {
+ "location": "mtl5",
+ "client_id": null,
+ "client_role": null,
+ "topic_url": "http://{{ mr_ip_addr }}:3904/events/ONAP-COLLECTOR-SNMPTRAP"
+ },
+ "aaf_username": null
+ }
+ },
+"files.runtime_base_dir": "/opt/app/snmptrap",
+"files.log_dir": "logs",
+"files.data_dir": "data",
+"files.pid_dir": "tmp",
+"files.arriving_traps_log": "snmptrapd_arriving_traps.log",
+"files.snmptrapd_diag": "snmptrapd_prog_diag.log",
+"files.traps_stats_log": "snmptrapd_stats.csv",
+"files.perm_status_file": "snmptrapd_status.log",
+"files.eelf_base_dir": "/opt/app/snmptrap/logs",
+"files.eelf_error": "error.log",
+"files.eelf_debug": "debug.log",
+"files.eelf_audit": "audit.log",
+"files.eelf_metrics": "metrics.log",
+"files.roll_frequency": "hour",
+"files.minimum_severity_to_log": 1,
+"trap_def.1.trap_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1",
+"trap_def.1.trap_category": "ONAP-COLLECTOR-SNMPTRAP",
+"trap_def.2.trap_oid" : "*",
+"trap_def.2.trap_category": "ONAP-COLLECTOR-SNMPTRAP",
+"stormwatch.1.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1",
+"stormwatch.1.low_water_rearm_per_minute" : "5",
+"stormwatch.1.high_water_arm_per_minute" : "100",
+"stormwatch.2.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2",
+"stormwatch.2.low_water_rearm_per_minute" : "2",
+"stormwatch.2.high_water_arm_per_minute" : "200",
+"stormwatch.3.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2",
+"stormwatch.3.low_water_rearm_per_minute" : "2",
+"stormwatch.3.high_water_arm_per_minute" : "200"
+}'
+curl -v -X PUT -H "Content-Type: application/json" \
+--data "${REGKV}" \
+"http://${HOSTNAME_CONSUL}:8500/v1/kv/${SRVCNAME_STATIC_SNMPTRAP}"
+