summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Doucerain <jerome.doucerain@bell.ca>2018-03-17 14:21:42 -0400
committerJerome Doucerain <jerome.doucerain@bell.ca>2018-03-17 14:29:00 -0400
commitd18576bc9bb956b1ef8cbc042cede2e864aefc51 (patch)
treecffdb91d9506811abfdc34bdcf918c9bc059e7b4
parent7c0f04b760da0d724f365175a0046e9568541012 (diff)
Message-router parameterization
added configmap added primer for zookeeper and kafka Issue-ID: OOM-731 Change-Id: I423294a57faa28beb95578a117ee02accc67a4b3 Signed-off-by: Jerome Doucerain <jerome.doucerain@bell.ca>
-rwxr-xr-xkubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties141
-rwxr-xr-xkubernetes/message-router/resources/config/dmaap/cadi.properties21
-rwxr-xr-xkubernetes/message-router/resources/config/dmaap/mykey27
-rw-r--r--kubernetes/message-router/templates/dmaap-configmap.yaml23
-rw-r--r--kubernetes/message-router/templates/message-router-dmaap.yaml16
-rw-r--r--kubernetes/message-router/templates/message-router-kafka.yaml12
-rw-r--r--kubernetes/message-router/templates/message-router-zookeeper.yaml13
-rw-r--r--kubernetes/message-router/values.yaml2
8 files changed, 249 insertions, 6 deletions
diff --git a/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties b/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties
new file mode 100755
index 0000000000..568d0d4ce0
--- /dev/null
+++ b/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties
@@ -0,0 +1,141 @@
+###############################################################################
+##
+## Cambria API Server config
+##
+## - Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+## - 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+## Both Cambria and Kafka make use of Zookeeper.
+##
+# config.zk.servers=zookeeper.namespace-placeholder:2181
+config.zk.servers=zookeeper:2181
+#config.zk.servers=172.17.0.1:2181
+#dmaap.namespace-placeholder:2181
+#10.208.128.229:2181
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+## Items below are passed through to Kafka's producer and consumer
+## configurations (after removing "kafka.")
+## if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list=global-kafka:9092
+#kafka.metadata.broker.list=172.17.0.1:9092
+#dmaap.namespace-placeholder:9092
+#10.208.128.229:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=6000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+
+###############################################################################
+##
+## Secured Config
+##
+## Some data stored in the config system is sensitive -- API keys and secrets,
+## for example. to protect it, we use an encryption layer for this section
+## of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+## Kafka expects live connections from the consumer to the broker, which
+## obviously doesn't work over connectionless HTTP requests. The Cambria
+## server proxies HTTP requests into Kafka consumer sessions that are kept
+## around for later re-use. Not doing so is costly for setup per request,
+## which would substantially impact a high volume consumer's performance.
+##
+## This complicates Cambria server failover, because we often need server
+## A to close its connection before server B brings up the replacement.
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+#cambria.consumer.cache.touchFreqMs=120000
+
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+###############################################################################
+##
+## Metrics Reporting
+##
+## This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.openecomp.dcae.dmaap.mtnje2.mr.topic
+msgRtr.topicfactory.aaf=org.openecomp.dcae.dmaap.topicFactory|:org.openecomp.dcae.dmaap.mtnje2.mr.topic:
+enforced.topic.name.AAF=org.openecomp
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.openecomp.dmaap.mr.ueb
+##############################################################################
+#Mirror Maker Agent
+msgRtr.mirrormakeradmin.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=org.openecomp.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=org.openecomp.dmaap.mr.dev.topicFactory|:org.openecomp.dmaap.mr.dev.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=org.openecomp.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
diff --git a/kubernetes/message-router/resources/config/dmaap/cadi.properties b/kubernetes/message-router/resources/config/dmaap/cadi.properties
new file mode 100755
index 0000000000..1cb00a5cda
--- /dev/null
+++ b/kubernetes/message-router/resources/config/dmaap/cadi.properties
@@ -0,0 +1,21 @@
+basic_realm=openecomp.org
+basic_warn=TRUE
+
+cadi_loglevel=DEBUG
+#cadi_keyfile=target/swm/package/nix/dist_files/appl/${artifactId}/etc/keyfile2
+cadi_keyfile=/appl/dmaapMR1/etc/keyfile
+# Configure AAF
+aaf_url=https://DME2RESOLVE/service=org.openecomp.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE
+
+aaf_id=dgl@openecomp.org
+aaf_password=enc:f2u5br1mh29M02-
+aaf_timeout=5000
+aaf_clean_interval=1200000
+aaf_user_expires=60000
+aaf_high_count=1000000
+
+
+# The following properties are being set by the AJSC Container and should NOT need to be set here.
+AFT_LATITUDE=33.823589
+AFT_LONGITUDE=-84.366982
+AFT_ENVIRONMENT=AFTUAT
diff --git a/kubernetes/message-router/resources/config/dmaap/mykey b/kubernetes/message-router/resources/config/dmaap/mykey
new file mode 100755
index 0000000000..c2b8b8779b
--- /dev/null
+++ b/kubernetes/message-router/resources/config/dmaap/mykey
@@ -0,0 +1,27 @@
+_sNOLphPzrU7L0L3oWv0pYwgV_ddGF1XoBsQEIAp34jfP-fGJFPfFYaMpDEZ3gwH59rNw6qyMZHk
+k-4irklvVcWk36lC3twNvc0DueRCVrws1bkuhOLCXdxHJx-YG-1xM8EJfRmzh79WPlPkbAdyPmFF
+Ah44V0GjAnInPOFZA6MHP9rNx9B9qECHRfmvzU13vJCcgTsrmOr-CEiWfRsnzPjsICxpq9OaVT_D
+zn6rNaroGm1OiZNCrCgvRkCUHPOOCw3j9G1GeaImoZNYtozbz9u4sj13PU-MxIIAa64b1bMMMjpz
+Upc8lVPI4FnJKg6axMmEGn5zJ6JUq9mtOVyPj__2GEuDgpx5H4AwodXXVjFsVgR8UJwI_BvS2JVp
+JoQk0J1RqXmAXVamlsMAfzm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
+a46NLpdBN1GNcsFFcZ79GFAK0_DsyxGLX8Tq6q0Bvhs8whD8wlSxpTGxYkyqNX-vcb7SDN_0WkCE
+XSdZWkqTHXcYbOvoCOb_e6SFAztuMenuHWY0utX0gBfx_X5lPDFyoYXErxFQHiA7t27keshXNa6R
+ukQRRS8kMjre1U74sc-fRNXkXpl57rG4rgxaEX0eBeowa53KAsVvUAoSac2aC_nfzXrDvoyf9Xi3
+JpEZNhUDLpFCEycV4I7jGQ9wo9qNaosvlsr6kbLDNdb_1xrGVgjT3xEvRNJNPqslSAu-yD-UFhC3
+AmCdYUnugw_eEFqXCHTARcRkdPPvl2XsmEKY2IqEeO5tz4DyXQFaL-5hEVh6lYEU1EOWHk3UGIXe
+Vc5_Ttp82qNLmlJPbZvgmNTJzYTHDQ_27KBcp7IVVZgPDjVKdWqQvZ18KhxvfF3Idgy82LBZniFV
+IbtxllXiPRxoPQriSXMnXjh3XkvSDI2pFxXfEvLRn1tvcFOwPNCz3QfPIzYg8uYXN5bRt3ZOrR_g
+ZhIlrc7HO0VbNbeqEVPKMZ-cjkqGj4VAuDKoQc0eQ6X_wCoAGO78nPpLeIvZPx1X3z5YoqNA \ No newline at end of file
diff --git a/kubernetes/message-router/templates/dmaap-configmap.yaml b/kubernetes/message-router/templates/dmaap-configmap.yaml
new file mode 100644
index 0000000000..bd1e629b21
--- /dev/null
+++ b/kubernetes/message-router/templates/dmaap-configmap.yaml
@@ -0,0 +1,23 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mr-dmaap-cadi-prop-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mr-dmaap-msgrtrapi-prop-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mr-dmaap-mykey-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/mykey").AsConfig . | indent 2 }}
diff --git a/kubernetes/message-router/templates/message-router-dmaap.yaml b/kubernetes/message-router/templates/message-router-dmaap.yaml
index f81da769fd..a0c13802bb 100644
--- a/kubernetes/message-router/templates/message-router-dmaap.yaml
+++ b/kubernetes/message-router/templates/message-router-dmaap.yaml
@@ -63,10 +63,13 @@ spec:
name: localtime
readOnly: true
- mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+ subPath: MsgRtrApi.properties
name: appprops
- mountPath: /appl/dmaapMR1/etc/cadi.properties
+ subPath: cadi.properties
name: cadi
- mountPath: /appl/dmaapMR1/etc/keyfile
+ subPath: mykey
name: mykey
restartPolicy: Always
volumes:
@@ -74,14 +77,15 @@ spec:
hostPath:
path: /etc/localtime
- name: appprops
- hostPath:
- path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/MsgRtrApi.properties
+ configMap:
+ name: mr-dmaap-msgrtrapi-prop-configmap
- name: cadi
- hostPath:
- path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/cadi.properties
+ configMap:
+ name: mr-dmaap-cadi-prop-configmap
- name: mykey
- hostPath:
- path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/message-router/dmaap/mykey
+ configMap:
+ name: mr-dmaap-mykey-configmap
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
{{ end }}
+
diff --git a/kubernetes/message-router/templates/message-router-kafka.yaml b/kubernetes/message-router/templates/message-router-kafka.yaml
index 2607ce64b9..844de040d4 100644
--- a/kubernetes/message-router/templates/message-router-kafka.yaml
+++ b/kubernetes/message-router/templates/message-router-kafka.yaml
@@ -31,6 +31,17 @@ spec:
spec:
initContainers:
- command:
+ - bash
+ args:
+ - -c
+ - "if [ -d /var/tmp/SDC-DISTR-NOTIF-TOPIC-SDC-OPENSOURCE-ENV1-0 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/* /var/tmp/; fi"
+ image: {{ .Values.image.config }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /var/tmp
+ name: kafka-data
+ name: kafka-primer
+ - command:
- /root/ready.py
args:
- --container-name
@@ -88,3 +99,4 @@ spec:
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
+
diff --git a/kubernetes/message-router/templates/message-router-zookeeper.yaml b/kubernetes/message-router/templates/message-router-zookeeper.yaml
index d232c2eede..1b3e8f8ed9 100644
--- a/kubernetes/message-router/templates/message-router-zookeeper.yaml
+++ b/kubernetes/message-router/templates/message-router-zookeeper.yaml
@@ -29,6 +29,18 @@ spec:
app: zookeeper
name: message-router-zookeeper
spec:
+ initContainers:
+ - command:
+ - bash
+ args:
+ - -c
+ - "if [ -d /var/tmp/version-2 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-zookeeper/* /var/tmp/; fi"
+ image: {{ .Values.image.config }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /var/tmp
+ name: zookeeper-data
+ name: zookeeper-primer
containers:
- image: {{ .Values.image.zookeeper }}
imagePullPolicy: {{ .Values.pullPolicy }}
@@ -57,3 +69,4 @@ spec:
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
+
diff --git a/kubernetes/message-router/values.yaml b/kubernetes/message-router/values.yaml
index add7679f3f..68251471e6 100644
--- a/kubernetes/message-router/values.yaml
+++ b/kubernetes/message-router/values.yaml
@@ -24,3 +24,5 @@ image:
dmaap: attos/dmaap:latest
kafka: wurstmeister/kafka:latest
zookeeper: wurstmeister/zookeeper:latest
+ config: oomk8s/config-init:2.0.0-SNAPSHOT
+