diff options
282 files changed, 7040 insertions, 591 deletions
diff --git a/kubernetes/message-router/.helmignore b/kubernetes/aaf/.helmignore index f0c1319444..f0c1319444 100644 --- a/kubernetes/message-router/.helmignore +++ b/kubernetes/aaf/.helmignore diff --git a/kubernetes/message-router/charts/kafka/.helmignore b/kubernetes/aaf/charts/aaf-cm/.helmignore index f0c1319444..f0c1319444 100644 --- a/kubernetes/message-router/charts/kafka/.helmignore +++ b/kubernetes/aaf/charts/aaf-cm/.helmignore diff --git a/kubernetes/aaf/charts/aaf-cm/Chart.yaml b/kubernetes/aaf/charts/aaf-cm/Chart.yaml new file mode 100644 index 0000000000..00832d69e4 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cm/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF Certificate Manager +name: aaf-cm +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/message-router/charts/kafka/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-cm/templates/NOTES.txt index c60c745ca3..c60c745ca3 100644 --- a/kubernetes/message-router/charts/kafka/templates/NOTES.txt +++ b/kubernetes/aaf/charts/aaf-cm/templates/NOTES.txt diff --git a/kubernetes/aaf/charts/aaf-cm/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-cm/templates/deployment.yaml new file mode 100644 index 0000000000..652e2ac040 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cm/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/cm/bin/cm >> /opt/app/osaaf/logs/cm/stdout`date -I` 2>> /opt/app/osaaf/logs/cm/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/templates/service.yaml b/kubernetes/aaf/charts/aaf-cm/templates/service.yaml index 587e07a821..281aa1cc8d 100644 --- a/kubernetes/aaf/templates/service.yaml +++ b/kubernetes/aaf/charts/aaf-cm/templates/service.yaml @@ -29,11 +29,11 @@ spec: #Example internal target port if required #targetPort: {{ .Values.service.internalPort }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} {{- else -}} - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} {{- end}} selector: app: {{ include "common.name" . }} diff --git a/kubernetes/aaf/charts/aaf-cm/values.yaml b/kubernetes/aaf/charts/aaf-cm/values.yaml new file mode 100644 index 0000000000..75b1a7b564 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cm/values.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_cm:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-cm + type: ClusterIP + portName: aaf-cm + #targetPort + internalPort: 8150 + #port + externalPort: 8150 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/ecomp.cql b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/ecomp.cql deleted file mode 100644 index 6fddf65001..0000000000 --- a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/ecomp.cql +++ /dev/null @@ -1,169 +0,0 @@ -USE authz; - -// Create Root pass -INSERT INTO cred (id,ns,type,cred,expires) - VALUES ('dgl@openecomp.org','org.openecomp',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); - -INSERT INTO cred (id,ns,type,cred,expires) - VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); - -INSERT INTO cred (id,ns,type,cred,expires) - VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); - - -// Create 'com' root NS -INSERT INTO ns (name,scope,description,parent,type) - VALUES('com',1,'Root Namespace',null,1); - -INSERT INTO role(ns, name, perms, description) - VALUES('com','admin',{'com.access|*|*'},'Com Admins'); - -INSERT INTO role(ns, name, perms, description) - VALUES('com','owner',{'com.access|*|read'},'Com Owners'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('com','access','*','read',{'com.owner'},'Com Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('com','access','*','*',{'com.admin'},'Com Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.owner','2020-12-31','com','owner'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.admin','2020-12-31','com','admin'); - -// Create org root NS -INSERT INTO ns (name,scope,description,parent,type) - VALUES('org',1,'Root Namespace Org',null,1); - -INSERT INTO ns (name,scope,description,parent,type) - VALUES('org.openecomp.dcae',3,'DCAE Namespace Org','org.openecomp',3); - -INSERT INTO ns (name,scope,description,parent,type) - VALUES('org.openecomp.dmaapBC',3,'DMaaP BC Namespace Org','org.openecomp',3); - -INSERT INTO role(ns, name, perms, description) - VALUES('org','admin',{'org.access|*|*'},'Com Admins'); - -INSERT INTO role(ns, name, perms, description) - VALUES('org','owner',{'org.access|*|read'},'Com Owners'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org','access','*','read',{'org.owner'},'Com Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org','access','*','*',{'org.admin'},'Com Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','org.owner','2020-12-31','org','owner'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','org.admin','2020-12-31','org','admin'); - - -// Create com.att - -INSERT INTO ns (name,scope,description,parent,type) - VALUES('com.att',2,'AT&T Namespace','com',2); - -INSERT INTO role(ns, name, perms,description) - VALUES('com.att','admin',{'com.att.access|*|*'},'AT&T Admins'); - -INSERT INTO role(ns, name, perms,description) - VALUES('com.att','owner',{'com.att.access|*|read'},'AT&T Owners'); - -INSERT INTO perm(ns, type, instance, action, roles,description) - VALUES ('com.att','access','*','read',{'com.att.owner'},'AT&T Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles,description) - VALUES ('com.att','access','*','*',{'com.att.admin'},'AT&T Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.att.owner','2020-12-31','com.att','owner'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.att.admin','2020-12-31','com.att','admin'); - -// Create com.att.aaf - -INSERT INTO ns (name,scope,description,parent,type) - VALUES('com.att.aaf',3,'Application Authorization Framework','com.att',3); - -INSERT INTO role(ns, name, perms, description) - VALUES('com.att.aaf','admin',{'com.att.aaf.access|*|*'},'AAF Admins'); - -INSERT INTO role(ns, name, perms, description) - VALUES('com.att.aaf','owner',{'com.att.aaf.access|*|read'},'AAF Owners'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('com.att.aaf','access','*','read',{'com.att.aaf.owner'},'AAF Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('com.att.aaf','access','*','*',{'com.att.aaf.admin'},'AAF Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.att.aaf.admin','2020-12-31','com.att.aaf','admin'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','com.att.aaf.owner','2020-12-31','com.att.aaf','owner'); - - -// Create org.openecomp -INSERT INTO ns (name,scope,description,parent,type) - VALUES('org.openecomp',2,'Open EComp NS','com.att',2); - -INSERT INTO role(ns, name, perms, description) - VALUES('org.openecomp','admin',{'org.openecomp.access|*|*'},'OpenEcomp Admins'); - -INSERT INTO role(ns, name, perms, description) - VALUES('org.openecomp','owner',{'org.openecomp.access|*|read'},'OpenEcomp Owners'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org.openecomp','access','*','read',{'org.openecomp.owner'},'OpenEcomp Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org.openecomp','access','*','*',{'org.openecomp.admin'},'OpenEcomp Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','org.openecomp.admin','2020-12-31','org.openecomp','admin'); - -// Create org.openecomp.dmaapBC - -INSERT INTO ns (name,scope,description,parent,type) - VALUES('org.openecomp.dmaapBC',3,'Application Authorization Framework','org.openecomp',3); - -//INSERT INTO role(ns, name, perms, description) -// VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*'},'AAF Admins'); - -INSERT INTO role(ns, name, perms, description) -VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.topicFactory|:org.openecomp.dmaapBC.topic:org.openecomp.dmaapBC|create','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|sub','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|pub'},'AAF Admins'); - -//INSERT INTO role(ns, name, perms, description) -//VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|sub'},'AAF Admins'); - -//INSERT INTO role(ns, name, perms, description) -//VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|pub'},'AAF Admins'); - - - -INSERT INTO role(ns, name, perms, description) - VALUES('org.openecomp.dmaapBC','owner',{'org.openecomp.dmaapBC.access|*|read'},'AAF Owners'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org.openecomp.dmaapBC','access','*','read',{'org.openecomp.dmaapBC.owner'},'AAF Read Access'); - -INSERT INTO perm(ns, type, instance, action, roles, description) - VALUES ('org.openecomp.dmaapBC','access','*','*',{'org.openecomp.dmaapBC.admin'},'AAF Write Access'); - -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('dgl@openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); -INSERT INTO user_role(user,role,expires,ns,rname) - VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.dat b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.dat deleted file mode 100644 index 98bf99a3d1..0000000000 --- a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.dat +++ /dev/null @@ -1,7 +0,0 @@ -iowna|Ima D. Owner|Ima|Owner|314-123-2000|ima.d.owner@osaaf.com|e| -mmanager|Mark D. Manager|Mark|Manager|314-123-1234|mark.d.manager@osaaf.com|e|iowna -bdevl|Robert D. Developer|Bob|Developer|314-123-1235|bob.d.develper@osaaf.com|e|mmanager -mmarket|Mary D. Marketer|Mary|Marketer|314-123-1236|mary.d.marketer@osaaf.com|e|mmanager -ccontra|Clarice D. Contractor|Clarice|Contractor|314-123-1237|clarice.d.contractor@osaaf.com|c|mmanager -iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@osaaf.com|n|mmanager -osaaf|ID of AAF|||||a|bdevl diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.idx b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.idx Binary files differdeleted file mode 100644 index 78fc0a5693..0000000000 --- a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/identities.idx +++ /dev/null diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/init.cql b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/init.cql index 81700f830c..c06e5ee952 100644 --- a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/init.cql +++ b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/init.cql @@ -1,35 +1,6 @@ -// For Developer Machine single instance -// -CREATE KEYSPACE authz -WITH REPLICATION = {'class' : 'SimpleStrategy','replication_factor':1}; -// -// From Ravi, 6-17-2014. User for DEVL->TEST -// -// CREATE KEYSPACE authz WITH replication = { 'class': 'NetworkTopologyStrategy', 'HYWRCA02': '2', 'BRHMALDC': '2' }; -// -// PROD -// -// CREATE KEYSPACE authz WITH replication = {'class': 'NetworkTopologyStrategy','ALPSGACT': '2','STLSMORC': '2','BRHMALDC': '2' }; -// -// create user authz with password '<AUTHZ PASSWORD>' superuser; -// grant all on keyspace authz to authz; -// -// For TEST (aaf_test) -// CREATE KEYSPACE authz WITH replication = { 'class': 'NetworkTopologyStrategy', 'BRHMALDC': '1' }; -// -// DEVL -// CREATE KEYSPACE authz WITH replication = {'class': 'NetworkTopologyStrategy','STLSMORC': '2' }; -// -// TEST / PERF -// CREATE KEYSPACE authz WITH replication = {'class': 'NetworkTopologyStrategy','STLSMORC': '3','KGMTNC20': '3' }; -// -// IST -// CREATE KEYSPACE authz WITH replication = {'class': 'NetworkTopologyStrategy','STLSMORC':'3', -// 'DLLSTXCF':'3','KGMTNC20':'3','SFLDMIBB':'3','HYWRCA02':'3' }; -// -// with 6 localized with ccm -// CREATE KEYSPACE authz WITH replication = { 'class': 'NetworkTopologyStrategy', 'dc1': '2', 'dc2': '2' }; -// + +// Table Initialization +// First make sure the keyspace exists. USE authz; @@ -51,12 +22,6 @@ CREATE TABLE ns ( ); CREATE INDEX ns_parent on ns(parent); - -// Oct 2015, not performant. Made Owner and Attrib first class Roles, -// April, 2015. Originally, the plan was to utilize Cassandra 2.1.2, however, other team's preferences were to remain at current levels. -// Therefore, we are taking the separate table approach. (coder Jeremiah Rohwedder) -// We had dropped this by making first class objects of Responsible (Owner) and Admin. We need this again to mark namespaces -// as having certain tools, like SWM, etc. CREATE TABLE ns_attrib ( ns varchar, key varchar, @@ -125,10 +90,10 @@ CREATE INDEX cert_id ON cert(id); CREATE INDEX cert_x500 ON cert(x500); CREATE TABLE notify ( - user text, - type int, - last timestamp, - checksum int, + user text, + type int, + last timestamp, + checksum int, PRIMARY KEY (user,type) ); @@ -155,14 +120,16 @@ CREATE TABLE artifact ( sponsor text, ca text, dir text, - appName text, os_user text, + ns text, notify text, expires timestamp, - renewDays int, + renewDays int, + sans Set<text>, PRIMARY KEY (mechid,machine) ); CREATE INDEX artifact_machine ON artifact(machine); +CREATE INDEX artifact_ns ON artifact(ns); // // Non-Critical Table functions @@ -216,6 +183,7 @@ CREATE TABLE approval ( status varchar, // approval status. pending, approved, denied memo varchar, // Text for Approval to know what's going on operation varchar, // List operation to perform + last_notified timestamp, // Timestamp for the last time approver was notified PRIMARY KEY(id) ); CREATE INDEX appr_approver_idx ON approval(approver); @@ -223,6 +191,19 @@ CREATE INDEX appr_user_idx ON approval(user); CREATE INDEX appr_ticket_idx ON approval(ticket); CREATE INDEX appr_status_idx ON approval(status); +CREATE TABLE approved ( + id timeuuid, // unique Key + user varchar, // the user who needs to be approved + approver varchar, // user approving + type varchar, // approver types i.e. Supervisor, Owner + status varchar, // approval status. pending, approved, denied + memo varchar, // Text for Approval to know what's going on + operation varchar, // List operation to perform + PRIMARY KEY(id) + ); +CREATE INDEX approved_approver_idx ON approved(approver); +CREATE INDEX approved_user_idx ON approved(user); + CREATE TABLE delegate ( user varchar, delegate varchar, @@ -231,6 +212,49 @@ CREATE TABLE delegate ( ); CREATE INDEX delg_delg_idx ON delegate(delegate); +// OAuth Tokens +CREATE TABLE oauth_token ( + id text, // Reference + client_id text, // Creating Client ID + user text, // User requesting + active boolean, // Active or not + type int, // Type of Token + refresh text, // Refresh Token + expires timestamp, // Expiration time/Date (signed long) + exp_sec bigint, // Seconds from Jan 1, 1970 + content text, // Content of Token + scopes Set<text>, // Scopes + state text, // Context string (Optional) + req_ip text, // Requesting IP (for logging purpose) + PRIMARY KEY(id) +) with default_time_to_live = 21600; // 6 hours +CREATE INDEX oauth_token_user_idx ON oauth_token(user); + +CREATE TABLE locate ( + name text, // Component/Server name + hostname text, // FQDN of Service/Component + port int, // Port of Service + major int, // Version, Major + minor int, // Version, Minor + patch int, // Version, Patch + pkg int, // Version, Package (if available) + latitude float, // Latitude + longitude float, // Longitude + protocol text, // Protocol (i.e. http https) + subprotocol set<text>, // Accepted SubProtocols, ie. TLS1.1 for https + port_key uuid, // Key into locate_ports + PRIMARY KEY(name,hostname,port) +) with default_time_to_live = 1200; // 20 mins + +CREATE TABLE locate_ports ( + id uuid, // Id into locate + port int, // SubPort + name text, // Name of Other Port + protocol text, // Protocol of Other (i.e. JMX, DEBUG) + subprotocol set<text>, // Accepted sub protocols or versions + PRIMARY KEY(id, port) +) with default_time_to_live = 1200; // 20 mins; + // // Used by authz-batch processes to ensure only 1 runs at a time // diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/keyspace.cql b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/keyspace.cql new file mode 100644 index 0000000000..52dc5ea77e --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/keyspace.cql @@ -0,0 +1,11 @@ +// For Developer Machine single instance +// CREATE KEYSPACE authz +// WITH REPLICATION = {'class' : 'SimpleStrategy','replication_factor':1}; +// +// + +// Example of Network Topology, with Datacenter dc1 & dc2 +// CREATE KEYSPACE authz WITH replication = { 'class': 'NetworkTopologyStrategy', 'dc1': '2', 'dc2': '2' }; +// Out of the box Docker Cassandra comes with "datacenter1", one instance +CREATE KEYSPACE authz WITH replication = { 'class': 'NetworkTopologyStrategy', 'datacenter1': '1' }; +// diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/osaaf.cql b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/osaaf.cql new file mode 100644 index 0000000000..e7385ab69d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/osaaf.cql @@ -0,0 +1,122 @@ +USE authz; + +// Create 'org' root NS +INSERT INTO ns (name,description,parent,scope,type) + VALUES('org','Root Namespace','.',1,1); + +INSERT INTO role(ns, name, perms, description) + VALUES('org','admin',{'org.access|*|*'},'Org Admins'); + +INSERT INTO role(ns, name, perms, description) + VALUES('org','owner',{'org.access|*|read,approve'},'Org Owners'); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org','access','*','read,approve',{'org.owner'},'Org Read Access'); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org','access','*','*',{'org.admin'},'Org Write Access'); + +// Create Root pass +INSERT INTO cred (id,ns,type,cred,expires) + VALUES ('initial@osaaf.org','org.osaaf',1,0x008c5926ca861023c1d2a36653fd88e2,'2099-12-31') using TTL 14400; + +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('initial@osaaf.org','org.admin','2099-12-31','org','admin') using TTL 14400; + + +// Create org.osaaf +INSERT INTO ns (name,description,parent,scope,type) + VALUES('org.osaaf','OSAAF Namespace','org',2,2); + +INSERT INTO role(ns, name, perms,description) + VALUES('org.osaaf','admin',{'org.osaaf.access|*|*'},'OSAAF Admins'); + +INSERT INTO perm(ns, type, instance, action, roles,description) + VALUES ('org.osaaf','access','*','*',{'org.osaaf.admin'},'OSAAF Write Access'); + +INSERT INTO role(ns, name, perms,description) + VALUES('org.osaaf','owner',{'org.osaaf.access|*|read,approve'},'OSAAF Owners'); + +INSERT INTO perm(ns, type, instance, action, roles,description) + VALUES ('org.osaaf','access','*','read,appove',{'org.osaaf.owner'},'OSAAF Read Access'); + +// Create org.osaaf.aaf +INSERT INTO ns (name,description,parent,scope,type) + VALUES('org.osaaf.aaf','Application Authorization Framework','org.osaaf',3,3); + +INSERT INTO role(ns, name, perms, description) + VALUES('org.osaaf.aaf','admin',{'org.osaaf.aaf.access|*|*'},'AAF Admins'); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org.osaaf.aaf','access','*','*',{'org.osaaf.aaf.admin'},'AAF Write Access'); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org.osaaf.aaf','access','*','read,approve',{'org.osaaf.aaf.owner'},'AAF Read Access'); + +INSERT INTO role(ns, name, perms, description) + VALUES('org.osaaf.aaf','owner',{'org.osaaf.aaf.access|*|read,approve'},'AAF Owners'); + +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('initial@osaaf.org','org.osaaf.aaf.admin','2099-12-31','org.osaaf.aaf','admin') using TTL 14400; + + +// ONAP Specific Entities +// ONAP initial env Namespace +INSERT INTO ns (name,description,parent,scope,type) + VALUES('org.onap','ONAP','org',2,2); + +INSERT INTO ns (name,description,parent,scope,type) + VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org.onap.portal','access','*','read',{ + 'org.onap.portal.owner','org.onap.portal.designer','org.onap.portal.tester','org.onap.portal.ops','org.onap.portal.governor' + },'Portal Read Access'); + +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner'); + +INSERT INTO perm(ns, type, instance, action, roles, description) + VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access'); + +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins'); + +// DEMO ID (OPS) +insert into cred (id,type,expires,cred,notes,ns,other) values('demo@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin'); + +// ADMIN +insert into cred (id,type,expires,cred,notes,ns,other) values('jh0003@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin'); + +// DESIGNER +INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('cs0008@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer'); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer'); + +// TESTER +INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('jm0007@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester'); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester'); + +// OPS +INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('op0001@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations'); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops'); + +// GOVERNOR +INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('gv0001@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344); +INSERT INTO role(ns, name, perms, description) + VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor'); +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor'); + diff --git a/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/temp_identity.cql b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/temp_identity.cql new file mode 100644 index 0000000000..5e7cfe1741 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-cs/resources/config/aaf-cs-data/temp_identity.cql @@ -0,0 +1,8 @@ +USE authz; + +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('demo@people.osaaf.org','org.admin','2099-12-31','org','admin') ; + +INSERT INTO user_role(user,role,expires,ns,rname) + VALUES ('demo@people.osaaf.org','org.osaaf.aaf.admin','2099-12-31','org.osaaf.aaf','admin') ; + diff --git a/kubernetes/message-router/charts/zookeeper/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-cs/templates/NOTES.txt index c60c745ca3..c60c745ca3 100644 --- a/kubernetes/message-router/charts/zookeeper/templates/NOTES.txt +++ b/kubernetes/aaf/charts/aaf-cs/templates/NOTES.txt diff --git a/kubernetes/aaf/charts/aaf-cs/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-cs/templates/deployment.yaml index 15e574f511..4253d2fb71 100644 --- a/kubernetes/aaf/charts/aaf-cs/templates/deployment.yaml +++ b/kubernetes/aaf/charts/aaf-cs/templates/deployment.yaml @@ -24,14 +24,11 @@ metadata: heritage: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ include "common.name" . }} template: metadata: labels: app: {{ include "common.name" . }} - name: {{ .Release.Name }} + release: {{ .Release.Name }} spec: hostname: {{ include "common.name" . }} containers: @@ -39,24 +36,45 @@ spec: image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }} + ports: + - containerPort: {{ .Values.service.externalPort }} + - containerPort: {{ .Values.service.externalPort2 }} + - containerPort: {{ .Values.service.externalPort3 }} + - containerPort: {{ .Values.service.externalPort4 }} volumeMounts: - mountPath: /data name: aaf-cs-data + - mountPath: /etc/localtime + name: localtime + readOnly: true # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.internalPort3 }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.internalPort3 }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} - resources: + lifecycle: + postStart: + exec: + command: + - /bin/sh + - -c + - > + /bin/sleep 30; + cd /data/; + cqlsh -u root -p root -f keyspace.cql ; + cqlsh -u root -p root -f init.cql ; + cqlsh -u root -p root -f osaaf.cql ; + cqlsh -u root -p root -f temp_identity.cql + resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: @@ -66,8 +84,10 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} - volumes: + - name: localtime + hostPath: + path: /etc/localtime - name: aaf-cs-data secret: secretName: {{ include "common.fullname" . }} diff --git a/kubernetes/aaf/charts/aaf-cs/templates/service.yaml b/kubernetes/aaf/charts/aaf-cs/templates/service.yaml index 2e4a619a20..b1716e4936 100644 --- a/kubernetes/aaf/charts/aaf-cs/templates/service.yaml +++ b/kubernetes/aaf/charts/aaf-cs/templates/service.yaml @@ -22,6 +22,8 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} +# annotations: +# service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" spec: type: {{ .Values.service.type }} ports: @@ -30,29 +32,29 @@ spec: #Example internal target port if required #targetPort: {{ .Values.service.internalPort }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} - port: {{ .Values.service.externalPort2 }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} - name: {{ .Values.service.name }}2 + name: {{ .Values.service.portName }}2 - port: {{ .Values.service.externalPort3 }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} - name: {{ .Values.service.name }}3 + name: {{ .Values.service.portName }}3 - port: {{ .Values.service.externalPort4 }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} - name: {{ .Values.service.name }}4 + name: {{ .Values.service.portName }}4 {{- else -}} - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} - port: {{ .Values.service.externalPort2 }} targetPort: {{ .Values.service.internalPort2 }} - name: {{ .Values.service.name }}2 + name: {{ .Values.service.portName }}2 - port: {{ .Values.service.externalPort3 }} targetPort: {{ .Values.service.internalPort3 }} - name: {{ .Values.service.name }}3 + name: {{ .Values.service.portName }}3 - port: {{ .Values.service.externalPort4 }} targetPort: {{ .Values.service.internalPort4 }} - name: {{ .Values.service.name }}4 + name: {{ .Values.service.portName }}4 {{- end}} selector: app: {{ include "common.name" . }} diff --git a/kubernetes/aaf/charts/aaf-cs/values.yaml b/kubernetes/aaf/charts/aaf-cs/values.yaml index 89b83cd169..83bc972fd8 100644 --- a/kubernetes/aaf/charts/aaf-cs/values.yaml +++ b/kubernetes/aaf/charts/aaf-cs/values.yaml @@ -25,7 +25,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: library/cassandra:2.1.17 +image: library/cassandra:3.11 pullPolicy: Always # flag to enable debugging - application support required @@ -54,8 +54,9 @@ readiness: periodSeconds: 10 service: + name: aaf-cass type: ClusterIP - name: aaf-cs + portName: aaf-cs #targetPort internalPort: 7000 #port diff --git a/kubernetes/message-router/charts/zookeeper/.helmignore b/kubernetes/aaf/charts/aaf-fs/.helmignore index f0c1319444..f0c1319444 100644 --- a/kubernetes/message-router/charts/zookeeper/.helmignore +++ b/kubernetes/aaf/charts/aaf-fs/.helmignore diff --git a/kubernetes/aaf/charts/aaf-fs/Chart.yaml b/kubernetes/aaf/charts/aaf-fs/Chart.yaml new file mode 100644 index 0000000000..6b0fdcb6fd --- /dev/null +++ b/kubernetes/aaf/charts/aaf-fs/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF File Server +name: aaf-fs +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/message-router/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-fs/templates/NOTES.txt index c60c745ca3..c60c745ca3 100644 --- a/kubernetes/message-router/templates/NOTES.txt +++ b/kubernetes/aaf/charts/aaf-fs/templates/NOTES.txt diff --git a/kubernetes/aaf/charts/aaf-fs/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-fs/templates/deployment.yaml new file mode 100644 index 0000000000..0bbd6a5a36 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-fs/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c","echo hello >> /opt/app/osaaf/logs/fs/stdout`date -I`;ln -s /opt/app/osaaf/data /data;/opt/app/aaf/fs/bin/fs >> /opt/app/osaaf/logs/fs/stdout`date -I` 2>> /opt/app/osaaf/logs/fs/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-fs/templates/service.yaml b/kubernetes/aaf/charts/aaf-fs/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-fs/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-fs/values.yaml b/kubernetes/aaf/charts/aaf-fs/values.yaml new file mode 100644 index 0000000000..be0f53d566 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-fs/values.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_fs:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-fs + type: ClusterIP + portName: aaf-fs + #targetPort + internalPort: 8096 + #port + externalPort: 8096 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-gui/.helmignore b/kubernetes/aaf/charts/aaf-gui/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/aaf/charts/aaf-gui/Chart.yaml b/kubernetes/aaf/charts/aaf-gui/Chart.yaml new file mode 100644 index 0000000000..d0aea0b0e0 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF GUI +name: aaf-gui +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/aaf/charts/aaf-gui/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-gui/templates/NOTES.txt new file mode 100644 index 0000000000..c60c745ca3 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/aaf/charts/aaf-gui/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-gui/templates/deployment.yaml new file mode 100644 index 0000000000..ee503caceb --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/gui/bin/gui >> /opt/app/osaaf/logs/gui/stdout`date -I` 2>> /opt/app/osaaf/logs/gui/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-gui/templates/service.yaml b/kubernetes/aaf/charts/aaf-gui/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-gui/values.yaml b/kubernetes/aaf/charts/aaf-gui/values.yaml new file mode 100644 index 0000000000..02c572fe88 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-gui/values.yaml @@ -0,0 +1,87 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_gui:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-gui + type: NodePort + portName: aaf-gui + #targetPort + internalPort: 8200 + #port + externalPort: 8200 + nodePort: 51 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-hello/.helmignore b/kubernetes/aaf/charts/aaf-hello/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/aaf/charts/aaf-hello/Chart.yaml b/kubernetes/aaf/charts/aaf-hello/Chart.yaml new file mode 100644 index 0000000000..c4029ba80f --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF Hello +name: aaf-hello +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/aaf/charts/aaf-hello/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-hello/templates/NOTES.txt new file mode 100644 index 0000000000..c60c745ca3 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml new file mode 100644 index 0000000000..b47d878f25 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/hello/bin/hello >> /opt/app/osaaf/logs/hello/stdout`date -I` 2>> /opt/app/osaaf/logs/hello/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-hello/templates/service.yaml b/kubernetes/aaf/charts/aaf-hello/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-hello/values.yaml b/kubernetes/aaf/charts/aaf-hello/values.yaml new file mode 100644 index 0000000000..ad95b071c1 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-hello/values.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_hello:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-hello + type: ClusterIP + portName: aaf-hello + #targetPort + internalPort: 8130 + #port + externalPort: 8130 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-locate/.helmignore b/kubernetes/aaf/charts/aaf-locate/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-locate/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/aaf/charts/aaf-locate/Chart.yaml b/kubernetes/aaf/charts/aaf-locate/Chart.yaml new file mode 100644 index 0000000000..db50ec392a --- /dev/null +++ b/kubernetes/aaf/charts/aaf-locate/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF Locate +name: aaf-locate +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/aaf/charts/aaf-locate/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-locate/templates/NOTES.txt new file mode 100644 index 0000000000..c60c745ca3 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-locate/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/aaf/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-locate/templates/deployment.yaml index 2a4e7d2348..de5a46ec5b 100644 --- a/kubernetes/aaf/templates/deployment.yaml +++ b/kubernetes/aaf/charts/aaf-locate/templates/deployment.yaml @@ -24,17 +24,28 @@ metadata: namespace: {{ include "common.namespace" . }} spec: replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ include "common.name" . }} template: metadata: labels: app: {{ include "common.name" . }} - name: {{ include "common.fullname" . }} + release: {{ .Release.Name }} spec: initContainers: - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: - /root/ready.py args: - --container-name @@ -52,12 +63,16 @@ spec: - env: - name: CASSANDRA_CLUSTER value: cassandra_container + name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/locate/bin/locate >> /opt/app/osaaf/logs/locate/stdout`date -I` 2>> /opt/app/osaaf/logs/locate/stderr`date -I`"] volumeMounts: - - mountPath: /data - name: aaf-data - name: {{ include "common.name" . }} + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container {{- if eq .Values.liveness.enabled true }} @@ -82,10 +97,16 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} - volumes: - - name: aaf-data - configMap: - name: {{ include "common.fullname" . }} + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-locate/templates/service.yaml b/kubernetes/aaf/charts/aaf-locate/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-locate/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-locate/values.yaml b/kubernetes/aaf/charts/aaf-locate/values.yaml new file mode 100644 index 0000000000..fbed947ca0 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-locate/values.yaml @@ -0,0 +1,90 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +# If mountPath is over NFS (e.g. /dockerdata-nfs is NFS mounted between the nodes), uncomment following lines. +# persistence: +# mountPath: /dockerdata + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_locate:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-locate + type: ClusterIP + portName: aaf-locate + #targetPort + internalPort: 8095 + #port + externalPort: 8095 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-oauth/.helmignore b/kubernetes/aaf/charts/aaf-oauth/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/aaf/charts/aaf-oauth/Chart.yaml b/kubernetes/aaf/charts/aaf-oauth/Chart.yaml new file mode 100644 index 0000000000..bcb135b1e0 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP AAF OAuth +name: aaf-oauth +version: 2.0.0
\ No newline at end of file diff --git a/kubernetes/aaf/charts/aaf-oauth/templates/NOTES.txt b/kubernetes/aaf/charts/aaf-oauth/templates/NOTES.txt new file mode 100644 index 0000000000..c60c745ca3 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/aaf/charts/aaf-oauth/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-oauth/templates/deployment.yaml new file mode 100644 index 0000000000..00d6ee0e59 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/oauth/bin/oauth >> /opt/app/osaaf/logs/oauth/stdout`date -I` 2>> /opt/app/osaaf/logs/oauth/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-oauth/templates/service.yaml b/kubernetes/aaf/charts/aaf-oauth/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-oauth/values.yaml b/kubernetes/aaf/charts/aaf-oauth/values.yaml new file mode 100644 index 0000000000..43116965be --- /dev/null +++ b/kubernetes/aaf/charts/aaf-oauth/values.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_oauth:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-oauth + type: ClusterIP + portName: aaf-oauth + #targetPort + internalPort: 8140 + #port + externalPort: 8140 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/message-router/charts/kafka/Chart.yaml b/kubernetes/aaf/charts/aaf-service/Chart.yaml index b26f91a04e..3461f1add1 100644 --- a/kubernetes/message-router/charts/kafka/Chart.yaml +++ b/kubernetes/aaf/charts/aaf-service/Chart.yaml @@ -13,7 +13,6 @@ # limitations under the License. apiVersion: v1 -description: ONAP Global Kafka Service -name: kafka +description: ONAP AAF Service +name: aaf-service version: 2.0.0 - diff --git a/kubernetes/aaf/charts/aaf-service/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-service/templates/deployment.yaml new file mode 100644 index 0000000000..9fd6eba534 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-service/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/job_complete.py + args: + - -j + - {{ .Release.Name }}-aaf-create-config + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-job-complete + - command: + - /root/ready.py + args: + - --container-name + - aaf-cs + - --container-name + - aaf-locate + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - env: + - name: CASSANDRA_CLUSTER + value: cassandra_container + name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/bin/bash","-c"," ln -s /opt/app/osaaf/data /data;/opt/app/aaf/service/bin/service >> /opt/app/osaaf/logs/service/stdout`date -I` 2>> /opt/app/osaaf/logs/service/stderr`date -I`"] + volumeMounts: + - mountPath: /opt/app/osaaf + name: aaf-persistent-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-persistent-vol + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/charts/aaf-service/templates/service.yaml b/kubernetes/aaf/charts/aaf-service/templates/service.yaml new file mode 100644 index 0000000000..281aa1cc8d --- /dev/null +++ b/kubernetes/aaf/charts/aaf-service/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + type: {{ .Values.service.type }} diff --git a/kubernetes/aaf/charts/aaf-service/values.yaml b/kubernetes/aaf/charts/aaf-service/values.yaml new file mode 100644 index 0000000000..b53e7a2963 --- /dev/null +++ b/kubernetes/aaf/charts/aaf-service/values.yaml @@ -0,0 +1,87 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:2.0.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/aaf/aaf_service:2.1.0-SNAPSHOT +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: {} + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + name: aaf-service + type: NodePort + portName: aaf-service + #targetPort + internalPort: 8100 + #port + externalPort: 8100 + nodePort: 47 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml index 26f03044ac..ddfc7c61d0 100644 --- a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml +++ b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml @@ -75,4 +75,5 @@ spec: - name: localtime hostPath: path: /etc/localtime - + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file diff --git a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/values.yaml b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/values.yaml index 07b8c33226..53e7286583 100644 --- a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/values.yaml +++ b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-vault/values.yaml @@ -21,10 +21,10 @@ global: persistence: {} # application image -repository: docker.io +repository: nexus3.onap.org:10001 image: - consul: consul:1.0.6 - vault: vault:0.10.0 + consul: library/consul:1.0.6 + vault: library/vault:0.10.0 pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/aaf/requirements.yaml b/kubernetes/aaf/requirements.yaml index fb4321ded6..1e8f788318 100644 --- a/kubernetes/aaf/requirements.yaml +++ b/kubernetes/aaf/requirements.yaml @@ -1,7 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + dependencies: - name: common version: ~2.0.0 - # local reference to common chart, as it is - # a part of this chart's package and will not - # be published independently to a repo (at this point) - repository: '@local' + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/aaf/resources/config/aaf-data/identities.dat b/kubernetes/aaf/resources/config/aaf-data/identities.dat deleted file mode 100644 index 95eb51d1be..0000000000 --- a/kubernetes/aaf/resources/config/aaf-data/identities.dat +++ /dev/null @@ -1,9 +0,0 @@ -iowna|Ima D. Owner|Ima|Owner|314-123-2000|ima.d.owner@osaaf.com|e| -mmanager|Mark D. Manager|Mark|Manager|314-123-1234|mark.d.manager@osaaf.com|e|iowna -bdevl|Robert D. Developer|Bob|Developer|314-123-1235|bob.d.develper@osaaf.com|e|mmanager -mmarket|Mary D. Marketer|Mary|Marketer|314-123-1236|mary.d.marketer@osaaf.com|e|mmanager -ccontra|Clarice D. Contractor|Clarice|Contractor|314-123-1237|clarice.d.contractor@osaaf.com|c|mmanager -iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@osaaf.com|n|mmanager -osaaf|ID of AAF|||||a|bdevl -m99751|ID of AAF|||||a|bdevl -m99501|ID of AAF|||||a|bdevl diff --git a/kubernetes/aaf/resources/config/backup/backup.sh b/kubernetes/aaf/resources/config/backup/backup.sh new file mode 100644 index 0000000000..1359d3de83 --- /dev/null +++ b/kubernetes/aaf/resources/config/backup/backup.sh @@ -0,0 +1,32 @@ +# BEGIN Store prev +BD=/opt/app/osaaf/backup +if [ -e "$BD/6day" ]; then + rm -Rf $BD/6day +fi + +PREV=$BD/6day +for D in $BD/5day $BD/4day $BD/3day $BD/2day $BD/yesterday; do + if [ -e "$D" ]; then + mv "$D" "$PREV" + fi + PREV="$D" +done + +if [ -e "$BD/today" ]; then + if [ -e "$BD/backup.log" ]; then + mv $BD/backup.log $BD/today + fi + gzip $BD/today/* + mv $BD/today $BD/yesterday +fi + +mkdir $BD/today + +# END Store prev +date +docker exec -t aaf_cass bash -c "mkdir -p /opt/app/cass_backup" +docker container cp $BD/cbackup.sh aaf_cass:/opt/app/cass_backup/backup.sh +# echo "login as Root, then run \nbash /opt/app/cass_backup/backup.sh" +docker exec -t aaf_cass bash /opt/app/cass_backup/backup.sh +docker container cp aaf_cass:/opt/app/cass_backup/. $BD/today +date diff --git a/kubernetes/aaf/resources/config/backup/cbackup.sh b/kubernetes/aaf/resources/config/backup/cbackup.sh new file mode 100644 index 0000000000..9c91d0c670 --- /dev/null +++ b/kubernetes/aaf/resources/config/backup/cbackup.sh @@ -0,0 +1,8 @@ +cd /opt/app/cass_backup +DATA="ns role perm ns_attrib user_role cred cert x509 delegate approval approved future notify artifact health history" +PWD=cassandra +CQLSH="cqlsh -u cassandra -k authz -p $PWD" +for T in $DATA ; do + echo "Creating $T.dat" + $CQLSH -e "COPY authz.$T TO '$T.dat' WITH DELIMITER='|'" +done diff --git a/kubernetes/aaf/resources/config/data/identities.dat b/kubernetes/aaf/resources/config/data/identities.dat new file mode 100644 index 0000000000..39d18a12b9 --- /dev/null +++ b/kubernetes/aaf/resources/config/data/identities.dat @@ -0,0 +1,27 @@ +# +# Sample Identities.dat +# This file is for use with the "Default Organization". It is a simple mechanism to have a basic ILM structure to use with +# out-of-the-box tire-kicking, or even for Small companies +# +# For Larger Companies, you will want to create a new class implementing the "Organization" interface, making calls to your ILM, or utilizing +# batch feeds, as is appropriate for your company. +# +# Example Field Layout. note, in this example, Application IDs and People IDs are mixed. You may want to split +# out AppIDs, choose your own status indicators, or whatever you use. +# 0 - unique ID +# 1 - full name +# 2 - first name +# 3 - last name +# 4 - phone +# 5 - official email +# 6 - employment status e=employee, c=contractor, a=application, n=no longer with company +# 7 - responsible to (i.e Supervisor for People, or AppOwner, if it's an App ID) +# + +iowna|Ima D. Owner|Ima|Owner|314-123-2000|ima.d.owner@osaaf.com|e| +mmanager|Mark D. Manager|Mark|Manager|314-123-1234|mark.d.manager@osaaf.com|e|iowna +bdevl|Robert D. Developer|Bob|Developer|314-123-1235|bob.d.develper@osaaf.com|e|mmanager +mmarket|Mary D. Marketer|Mary|Marketer|314-123-1236|mary.d.marketer@osaaf.com|e|mmanager +ccontra|Clarice D. Contractor|Clarice|Contractor|314-123-1237|clarice.d.contractor@osaaf.com|c|mmanager +iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@osaaf.com|n|mmanager +osaaf|ID of AAF|||||a|bdevl diff --git a/kubernetes/aaf/resources/config/data/sample.identities.dat b/kubernetes/aaf/resources/config/data/sample.identities.dat new file mode 100644 index 0000000000..39d18a12b9 --- /dev/null +++ b/kubernetes/aaf/resources/config/data/sample.identities.dat @@ -0,0 +1,27 @@ +# +# Sample Identities.dat +# This file is for use with the "Default Organization". It is a simple mechanism to have a basic ILM structure to use with +# out-of-the-box tire-kicking, or even for Small companies +# +# For Larger Companies, you will want to create a new class implementing the "Organization" interface, making calls to your ILM, or utilizing +# batch feeds, as is appropriate for your company. +# +# Example Field Layout. note, in this example, Application IDs and People IDs are mixed. You may want to split +# out AppIDs, choose your own status indicators, or whatever you use. +# 0 - unique ID +# 1 - full name +# 2 - first name +# 3 - last name +# 4 - phone +# 5 - official email +# 6 - employment status e=employee, c=contractor, a=application, n=no longer with company +# 7 - responsible to (i.e Supervisor for People, or AppOwner, if it's an App ID) +# + +iowna|Ima D. Owner|Ima|Owner|314-123-2000|ima.d.owner@osaaf.com|e| +mmanager|Mark D. Manager|Mark|Manager|314-123-1234|mark.d.manager@osaaf.com|e|iowna +bdevl|Robert D. Developer|Bob|Developer|314-123-1235|bob.d.develper@osaaf.com|e|mmanager +mmarket|Mary D. Marketer|Mary|Marketer|314-123-1236|mary.d.marketer@osaaf.com|e|mmanager +ccontra|Clarice D. Contractor|Clarice|Contractor|314-123-1237|clarice.d.contractor@osaaf.com|c|mmanager +iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@osaaf.com|n|mmanager +osaaf|ID of AAF|||||a|bdevl diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.cm.props b/kubernetes/aaf/resources/config/etc/org.osaaf.cm.props new file mode 100644 index 0000000000..d634cfeb37 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.cm.props @@ -0,0 +1,14 @@ +## +## org.osaaf.cm.props +## AAF Certificate Manager properties +## Note: Link to CA Properties in "local" dir +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props:/opt/app/osaaf/local/org.osaaf.cassandra.props:/opt/app/osaaf/local/org.osaaf.cm.ca.props +aaf_component=AAF_NS.cm:2.1.0.0 +port=8150 +cadi_registration_hostname={{.Values.config.cmServiceName}} +#Certman +cm_public_dir=/opt/app/osaaf/public +cm_trust_cas=AAF_RootCA.cer + + diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.common.props b/kubernetes/aaf/resources/config/etc/org.osaaf.common.props new file mode 100644 index 0000000000..8b75e709d4 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.common.props @@ -0,0 +1,29 @@ +############################################################ +# Common properties for all AAF Components +# on 2018-03-02 06:59.628-0500 +############################################################ +# Pull in Global Coordinates and Certificate Information +aaf_root_ns=org.osaaf.aaf +aaf_trust_perm=org.osaaf.aaf|org.onap|trust + +cadi_prop_files=/opt/app/osaaf/local/org.osaaf.location.props:/opt/app/osaaf/local/org.osaaf.aaf.props +cadi_protocols=TLSv1.1,TLSv1.2 + +aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.0 +cadi_loginpage_url=https://AAF_LOCATE_URL/AAF_NS.gui:2.0/login + +# Standard for this App/Machine +aaf_env=DEV +aaf_data_dir=/opt/app/osaaf/data +cadi_loglevel=DEBUG + +# Domain Support (which will accept) +aaf_domain_support=.com:.org + +# Basic Auth +aaf_default_realm=people.osaaf.org + +# OAuth2 +aaf_oauth2_token_url=https://AAF_LOCATE_URL/AAF_NS.token:2.0/token +aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/AAF_NS.introspect:2.0/introspect + diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.fs.props b/kubernetes/aaf/resources/config/etc/org.osaaf.fs.props new file mode 100644 index 0000000000..d499f97f56 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.fs.props @@ -0,0 +1,10 @@ +## +## org.osaaf.locator +## AAF Locator Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props +aaf_component=AAF_NS.fs:2.1.0.0 +port=8096 +cadi_registration_hostname={{.Values.config.fsServiceName}} + +aaf_public_dir=/opt/app/osaaf/public diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.gui.props b/kubernetes/aaf/resources/config/etc/org.osaaf.gui.props new file mode 100644 index 0000000000..86b3aa6467 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.gui.props @@ -0,0 +1,31 @@ +## +## org.osaaf.locator +## AAF Locator Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props:/opt/app/osaaf/etc/org.osaaf.orgs.props +aaf_component=AAF_NS.gui:2.1.0.0 +port=8200 +cadi_registration_hostname={{.Values.config.guiServiceName}} + +aaf_gui_title=AAF +aaf_gui_copyright=(c) 2018 AT&T Intellectual Property. All rights reserved. +aaf_gui_theme=theme/onap +cadi_loginpage_url=https://AAF_LOCATE_URL/com.att.aaf.gui:2.0/login + +# GUI URLS and Help URLS +cm_url=https://{{.Values.config.cmServiceName}}:8150 +gw_url=https://{{.Values.config.locateServiceName}}:8095 +fs_url=http://{{.Values.config.fsServiceName}}:8096 + +aaf_url.gui_onboard=https://wiki.web.att.com/display/aaf/OnBoarding +aaf_url.cuigui=https://wiki.web.att.com/display/aaf/Using+the+Command+Prompt + +aaf_url.aaf_help=https://wiki.onap.org/display/DW/Application+Authorization+Framework+Documentation +aaf_url.aaf_help.sub=Bootstrapping+AAF,Installation+Guide +aaf_url.aaf_help.sub.Bootstrapping+AAF=https://wiki.onap.org/display/DW/Bootstrapping+AAF +aaf_url.aaf_help.sub.Installation+Guide=https://wiki.onap.org/display/DW/AAF+Installation+Guide +#aaf_url.cadi_help= +aaf_url.tools=AAF+Projects,AAF+Jira,AAF+Calendar +aaf_url.tool=AAF+Jira=https://jira.onap.org/secure/RapidBoard.jspa?rapidView=69&projectKey=AAF&view=detail&selectedIssue=AAF-134 +aaf_url.tool.AAF+Projects=https://gerrit.onap.org/r/#/admin/projects/?filter=aaf%2F +aaf_url.tool.AAF+Calendar=https://wiki.onap.org/pages/viewpage.action?pageId=6587439 diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.hello.props b/kubernetes/aaf/resources/config/etc/org.osaaf.hello.props new file mode 100644 index 0000000000..d832aaf7e0 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.hello.props @@ -0,0 +1,8 @@ +## +## org.osaaf.locator +## AAF Locator Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props +aaf_component=AAF_NS.hello:2.1.0.0 +port=8130 +cadi_registration_hostname={{.Values.config.helloServiceName}} diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.locate.props b/kubernetes/aaf/resources/config/etc/org.osaaf.locate.props new file mode 100644 index 0000000000..47a174ed44 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.locate.props @@ -0,0 +1,8 @@ +## +## org.osaaf.locator +## AAF Locator Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props:/opt/app/osaaf/local/org.osaaf.cassandra.props +aaf_component=AAF_NS.locator:2.1.0.0 +port=8095 +cadi_registration_hostname={{.Values.config.locateServiceName}} diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.log4j.props b/kubernetes/aaf/resources/config/etc/org.osaaf.log4j.props new file mode 100644 index 0000000000..9f10802821 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.log4j.props @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +log4j.appender.INIT=org.apache.log4j.DailyRollingFileAppender +log4j.appender.INIT.File=${LOG4J_FILENAME_init} +log4j.appender.INIT.DatePattern='.'yyyy-MM-dd +log4j.appender.INIT.layout=org.apache.log4j.PatternLayout +log4j.appender.INIT.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %m %n + +log4j.appender.SRVR=org.apache.log4j.DailyRollingFileAppender +log4j.appender.SRVR.File=${LOG4J_FILENAME_service} +log4j.appender.SRVR.DatePattern='.'yyyy-MM-dd +log4j.appender.SRVR.layout=org.apache.log4j.PatternLayout +log4j.appender.SRVR.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %p [%c] %m %n + +log4j.appender.AUDIT=org.apache.log4j.DailyRollingFileAppender +log4j.appender.AUDIT.File=${LOG4J_FILENAME_audit} +log4j.appender.AUDIT.DatePattern='.'yyyy-MM-dd +log4j.appender.AUDIT.layout=org.apache.log4j.PatternLayout +log4j.appender.AUDIT.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %m %n + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] %m %n + +# General Apache libraries +log4j.rootLogger=WARN.SRVR +log4j.logger.org.apache=WARN,SRVR +log4j.logger.com.datastax=WARN,SRVR +log4j.logger.init=INFO,INIT +log4j.logger.service=${LOGGING_LEVEL},SRVR +log4j.logger.audit=INFO,AUDIT +# Additional configs, not cauth with Root Logger +log4j.logger.io.netty=INFO,SRVR +log4j.logger.org.eclipse=INFO,SRVR + + diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.oauth.props b/kubernetes/aaf/resources/config/etc/org.osaaf.oauth.props new file mode 100644 index 0000000000..82e80c716a --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.oauth.props @@ -0,0 +1,8 @@ +## +## org.osaaf.locator +## AAF Locator Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props:/opt/app/osaaf/local/org.osaaf.cassandra.props +aaf_component=AAF_NS.oauth:2.1.0.0 +port=8140 +cadi_registration_hostname={{.Values.config.oauthServiceName}} diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.orgs.props b/kubernetes/aaf/resources/config/etc/org.osaaf.orgs.props new file mode 100644 index 0000000000..66bfd2fad3 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.orgs.props @@ -0,0 +1,11 @@ +# +# Define Organizations for use in some of the components. Not all use them +# +Organization.org.osaaf=org.onap.aaf.org.DefaultOrg +org.osaaf.mailHost=smtp.mail.att.com +org.osaaf.mailFrom=DL-aaf-support@aaf.att.com +org.osaaf.default=true +org.osaaf.also_supports=org.osaaf.people + + + diff --git a/kubernetes/aaf/resources/config/etc/org.osaaf.service.props b/kubernetes/aaf/resources/config/etc/org.osaaf.service.props new file mode 100644 index 0000000000..ff3e0b5c33 --- /dev/null +++ b/kubernetes/aaf/resources/config/etc/org.osaaf.service.props @@ -0,0 +1,8 @@ +## +## org.osaaf.service +## AAF Service Properties +## +cadi_prop_files=/opt/app/osaaf/etc/org.osaaf.common.props:/opt/app/osaaf/local/org.osaaf.cassandra.props:/opt/app/osaaf/etc/org.osaaf.orgs.props +aaf_component=AAF_NS.service:2.1.0.0 +port=8100 +cadi_registration_hostname={{.Values.config.serviceServiceName}} diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf.cm.p12 b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.cm.p12 Binary files differnew file mode 100644 index 0000000000..63aedd2560 --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.cm.p12 diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf.keyfile b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.keyfile new file mode 100644 index 0000000000..7206ad9325 --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.keyfile @@ -0,0 +1,27 @@ +rmaOaytuFLnhz07oilUO0nO_mZ18XInIi56OoezdUTR5f1GR45lp_nX7marcYv7j2ZS-dpWOSur0 +sK5M-ByrgxfUPyk749Ex4nGSMLnAq-nFMaREpGZPmNP-ul_vCxCmaHUnWKPJB4jx_K_osKPb0-ng +tqX0hnpbmcq4okV94MUdUs084ymM5LU-qVU_oYbLUM4dXatobe1go8eX2umrutZbQTjz75i4UEcF +Dv9nDwVqHRGUFMU0NeJlrSlRSO-eiDgVtoSCBGtIkDdKPBTUT3wachHmUBiSBJ3GF05yQP1CwWzz +AQRSwphP11xKI7tSViT5RoxjxfQZiVEbeyg9g9BROe_pLyIDskoW_ujdnPOWRcSIx6Q4J0eew3kb +yqcWUPf1K2nSyBSshlsQ6A9NSOLz_KhyIvP_1OG82m1gir3I77Usl7QqMF8IBXCjJ-H_qqR1u-By +qm_AFjagYA2TgF2YQN-fcneom_5_cA74_xwJ41juhOP72ZWGkX1bAdbiKf85uYo2H3g5HeNWijQL +y4wJ4qFrSptQRyV2Ntf9OLgpOsKsPPiLlNBugmCjHBMaPMbQAYRbsyCH2nKdjjTG3c6iF5Cj9Jco +6McvcrYYuq3ynH-2HoL-T-Zgl2AXLxqK4_dl_H243H-GutoJsmIkELLGS_pCpSt4t7xaDvzqxrTj +4qZ1OjozcpnsqM8HebS28IgoqFaOmrCMqO1MLM_CjAyliTy31P28XEbcYvjEY-FWmnJRSpMLc1Pz +-KOH-2V8uTqn5YlUsFt2TNnc8lEwMH6GSV1vkgxwPQaMUgWV2svc0FfBmTLZI4zNmpMu4cGjaG-f +Z8r_hX7pDPANBTaqFxTp999dnaS3lLdZMNbJNEKFF0xxdRuBzsPKDiLa7ItixInZlUcEnwJVWOhC +kcI2J0cEFGxHxWYmYdqyJIvQzjebk6iDqB-mLi0ai-_XYm1niCxZizT_XJADo9LQtTzq1V6pMgYR +PPfbDKoiYRK6D8nbWsGNOh6xOS7zs8qrnTPxwu5CuZX_EFoejmooHTrXEqw2RzRFw9XqXM8p50C3 +YrwI2lA6kTQItGm0yftAxqfbhbjJp_K1P91ckOYL3ZSYze_hXRmguwYuT5NWlKhBtm5aawuDjXEg +yn7PnRTT0smW40hbYbks5L-2VVxTd3tith6Ltqh95miL6vpG5ByDDQlZCWwkq7XH7iScejDvT6UN +jF1K86mNa8CLXuuSzGl1li1CMxoVzW55G3s0-ICDHqjytiUkiUen2V9VzGT9h4BgDfzbShf31M4_ +biO4NL-mkqlDBbh-KcrYjvNj5qQwHSiLSLuQQBoBtJ3hG9jCu4YBYVWJYctV8r3Js_sGDH4rl5w1 +ujEF6QHWZIF73-u53G_LtvoXBnQcrBW8oLpqP-1Pz5d1bio--bRsNa5qAAilNbYmttiKYOYJn4My +c6QvzF81SqTRZy0Fd0NK_hMCglPkH7sd32UX-LBquvQ_yDqB_ml_pADJhWcfuD4iPAQjR2Vgclxf +GPCDva6YpJDzjjnaExDYmGFVFpbIPLfvGUCit_9zAycx0nW1J_cVT1BWFHijjAh_gnIpa6MtY3BE +G3d8ee6_LAQvvVdBwZ955UwyRd-C7Buc7Xcccw-8hcNBKqOCDlE9j4tie2SdO9m53vZRzcLY6Aiw +BiulIAllqHZQYs0OBcaYgbNgJU-gn9ZMWgS9i3ijPvTTBSNX7y7k4L1a4QOceyuOtt7nkv024YUS +acTRmaGotRBuVfI-C0L4Q9NL56_nUATB5ca2GqgLEKnWKsiN3T9cBg4Ji88E8OdiVcoO8segB-0d +QwWCqCZ8_z_R7zBMlDqpfu5wbvoVx0w9JhLgO9f7eoRozqA3qGLv94i1pN6LuU-Q7YPz4jVxmbb_ +2CHyP1n-o1ZWHfWdz6aByXEzrAZdvjfEWwwMYV5l5jFilTXaCNOCjr9S4YjNn0HITdl7E64C06Im +3QWOsnDv9z1APjnFo12KH_1yWscU0t9gx7FG210Ug6C-G3Bko_tm_YOp0Lkum4qrnxgHMf_a
\ No newline at end of file diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf.p12 b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.p12 Binary files differnew file mode 100644 index 0000000000..f40a7556da --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.p12 diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf.props b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.props new file mode 100644 index 0000000000..37a9d62711 --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.props @@ -0,0 +1,17 @@ +############################################################ +# Properties Generated by AT&T Certificate Manager +# by jg1555 +# on 2018-02-21T10:28:08.909-0600 +# @copyright 2016, AT&T +############################################################ +cm_url=https://{{.Values.config.cmServiceName}}:8150 +#hostname=aaf.osaaf.org +aaf_env=DEV +cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US +cadi_keyfile=/opt/app/osaaf/local/org.osaaf.aaf.keyfile +cadi_keystore=/opt/app/osaaf/local/org.osaaf.aaf.p12 +cadi_keystore_password=enc:fDY3WPPqHCMQaZdox2UfpRoEq6b9wUqS-aepo0NiqEFa2t7uYHBdxfQAuEwj9Lwb +#cadi_key_password=enc:<KEY PASSWORD (optional if the same as KEYSTORE PASSWORD)> +cadi_alias=aaf-authz@aaf.osaaf.org +cadi_truststore=/opt/app/osaaf/local/org.osaaf.aaf.trust.p12 +cadi_truststore_password=enc:5nzj6v3Rb0oZPV1zCxg8EJFfkFvWFGJflLB0i_FN0Np diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf.trust.p12 b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.trust.p12 Binary files differnew file mode 100644 index 0000000000..d01e8569ab --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf.trust.p12 diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.aaf_new-24e41f2f436018568cbdecdc1edbd605.p12 b/kubernetes/aaf/resources/config/local/org.osaaf.aaf_new-24e41f2f436018568cbdecdc1edbd605.p12 Binary files differnew file mode 100644 index 0000000000..f40a7556da --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.aaf_new-24e41f2f436018568cbdecdc1edbd605.p12 diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.cassandra.props b/kubernetes/aaf/resources/config/local/org.osaaf.cassandra.props new file mode 100644 index 0000000000..17f238b851 --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.cassandra.props @@ -0,0 +1,29 @@ +############################################################ +# Cassandra properties for AAF Components needing +# on 2018-03-02 06:59.628-0500 +############################################################ +# LOCAL Cassandra +cassandra.clusters={{.Values.config.csServiceName}} +cassandra.clusters.port=9042 +#need this to be fully qualified name when REAL AAF integration +cassandra.clusters.user=cassandra +cassandra.clusters.password=enc:gF_I93pTRMIvj3rof-dx-yK84XYT1UKGf98s1LAJyWV + +# Name for exception that has happened in the past +cassandra.reset.exceptions=com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed" + +# Example Consistency Settings for Clusters with at least instances +#cassandra.writeConsistency.ns=LOCAL_QUORUM +#cassandra.writeConsistency.perm=LOCAL_QUORUM +#cassandra.writeConsistency.role=LOCAL_QUORUM +#cassandra.writeConsistency.user_role=LOCAL_QUORUM +#cassandra.writeConsistency.cred=LOCAL_QUORUM +#cassandra.writeConsistency.ns_attrib=LOCAL_QUORUM + +# Consistency Settings when Single Instance +cassandra.writeConsistency.ns=ONE +cassandra.writeConsistency.perm=ONE +cassandra.writeConsistency.role=ONE +cassandra.writeConsistency.user_role=ONE +cassandra.writeConsistency.cred=ONE +cassandra.writeConsistency.ns_attrib=ONE diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.cm.ca.props b/kubernetes/aaf/resources/config/local/org.osaaf.cm.ca.props new file mode 100644 index 0000000000..8843705cbb --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.cm.ca.props @@ -0,0 +1,11 @@ +## +## org.osaaf.cm.ca.props +## Properties to access Certifiate Authority +## + +#Certman +cm_ca.local=org.onap.aaf.auth.cm.ca.LocalCA,/opt/app/osaaf/local/org.osaaf.aaf.cm.p12;aaf_cm_ca;enc:asFEWMNqjH7GktBLb9EGl6L1zfS2qMH5ZS5Zd90KVT5B9ZyRsqx7Gb73YllO8Hyw +cm_ca.local.idDomains=org.osaaf +cm_ca.local.baseSubject=/OU=OSAAF/O=ONAP/C=US +cm_ca.local.perm_type=org.osaaf.aaf.ca + diff --git a/kubernetes/aaf/resources/config/local/org.osaaf.location.props b/kubernetes/aaf/resources/config/local/org.osaaf.location.props new file mode 100644 index 0000000000..fd52d6db11 --- /dev/null +++ b/kubernetes/aaf/resources/config/local/org.osaaf.location.props @@ -0,0 +1,12 @@ +## +## org.osaaf.location.props +## +## Localized Machine Information +## +# Almeda California +cadi_latitude=37.78187 +cadi_longitude=-122.26147 + +#cadi_registration_hostname=aaf-onap-beijing-test.osaaf.org +cadi_trust_masks=10.12.6/24 +aaf_locate_url=https://{{.Values.config.locateServiceName}}:8095 diff --git a/kubernetes/aaf/resources/config/public/AAF_RootCA.cer b/kubernetes/aaf/resources/config/public/AAF_RootCA.cer new file mode 100644 index 0000000000..e9a50d7ea0 --- /dev/null +++ b/kubernetes/aaf/resources/config/public/AAF_RootCA.cer @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV +BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx +NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK +DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7 +XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn +H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM +pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7 +NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBkv8PZbXg +2VDWsYsgp8NAvMxK+iV8cO+Ck3lBI2GOPZbCEqpPVTYbLUz6sczAlCXwQoPzDIZY +wYa3eR/gYLY1gP2iEVHORag3bLPap9ZX5E8DZkzTNTjovvLk8KaCmfcaUMJsBtDd +ApcUitz10cnRyZc1sX3gE1f3DpzQM6t9C5sOVyRhDcSrKqqwb9m0Ss04XAS9FsqM +P3UWYQyqDXSxlUAYaX892u8mV1hxnt2gjb22RloXMM6TovM3sSrJS0wH+l1nznd6 +aFXftS/G4ZVIVZ/LfT1is4StoyPWZCwwwly1z8qJQ/zhip5NgZTxQw4mi7ww35DY +PdAQOCoajfSvFjqslQ/cPRi/MRCu079heVb5fQnnzVtnpFQRAgMBAAGjYzBhMB0G +A1UdDgQWBBRTVTPyS+vQUbHBeJrBKDF77+rtSTAfBgNVHSMEGDAWgBRTVTPyS+vQ +UbHBeJrBKDF77+rtSTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN +BgkqhkiG9w0BAQsFAAOCAgEAPx/IaK94n02wPxpnYTy+LVLIxwdq/kawNd6IbiMz +L87zmNMDmHcGbfoRCj8OkhuggX9Lx1/CkhpXimuYsZOFQi5blr/u+v4mIbsgbmi9 +7j+cUHDP0zLycvSvxKHty51LwmaX9a4wkJl5zBU4O1sd/H9tWcEmwJ39ltKoBKBx +c94Zc3iMm5ytRWGj+0rKzLDAXEWpoZ5bE5PLJauA6UDCxDLfs3FwhbS7uDggxYvf +jySF5FCNET94oJ+m8s7VeHvoa8iPGKvXrIqdd7XDHnqJJlVKr7m9S0fMbyEB8ci2 +RtOXDt93ifY1uhoEtEykn4dqBSp8ezvNMnwoXdYPDvTd9uCAFeWFLVreBAWxd25h +PsBTkZA5hpa/rA+mKv6Af4VBViYr8cz4dZCsFChuioVebe9ighrfjB//qKepFjPF +CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+ +Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A +cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR +ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX +dYY= +-----END CERTIFICATE----- diff --git a/kubernetes/aaf/resources/config/public/aaf_2_0.xsd b/kubernetes/aaf/resources/config/public/aaf_2_0.xsd new file mode 100644 index 0000000000..59d4331b22 --- /dev/null +++ b/kubernetes/aaf/resources/config/public/aaf_2_0.xsd @@ -0,0 +1,527 @@ +<!-- Used by AAF (ATT inc 2013) --> +<xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:aaf="urn:aaf:v2_0" + targetNamespace="urn:aaf:v2_0" + elementFormDefault="qualified"> + +<!-- + June 2, 2017, adding Roles, Perms, etc to NSRequest for Onboarding purposes. + + Note: jan 22, 2015. Deprecating the "force" element in the "Request" Structure. Do that + with Query Params. + + Eliminate in 3.0 + --> +<!-- + Errors + Note: This Error Structure has been made to conform to the AT&T TSS Policies + --> + <xs:element name="error"> + <xs:complexType> + <xs:sequence> + <!-- + Unique message identifier of the format ‘ABCnnnn’ where ‘ABC’ is + either ‘SVC’ for Service Exceptions or ‘POL’ for Policy Exception. + Exception numbers may be in the range of 0001 to 9999 where : + * 0001 to 0199 are reserved for common exception messages + * 0200 to 0999 are reserved for Parlay Web Services specification use + * 1000-9999 are available for exceptions + --> + <xs:element name="messageId" type="xs:string" minOccurs="1" maxOccurs="1"/> + + <!-- + Message text, with replacement + variables marked with %n, where n is + an index into the list of <variables> + elements, starting at 1 + --> + <xs:element name="text" type="xs:string" minOccurs="1" maxOccurs="1"/> + + <!-- + List of zero or more strings that + represent the contents of the variables + used by the message text. --> + <xs:element name="variables" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Requests + --> + <xs:complexType name="Request"> + <xs:sequence> + <xs:element name="start" type="xs:dateTime" minOccurs="1" maxOccurs="1" /> + <xs:element name="end" type="xs:dateTime" minOccurs="1" maxOccurs="1"/> + <!-- Deprecated. Use Query Command + <xs:element name="force" type="xs:string" minOccurs="1" maxOccurs="1" default="false"/> + --> + </xs:sequence> + </xs:complexType> + +<!-- + Keys + --> + <xs:element name="keys"> + <xs:complexType> + <xs:sequence> + <xs:element name="key" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + +<!-- + Permissions +--> + <xs:complexType name = "pkey"> + <xs:sequence> + <xs:element name="type" type="xs:string"/> + <xs:element name="instance" type="xs:string"/> + <xs:element name="action" type="xs:string"/> + </xs:sequence> + </xs:complexType> + + <xs:element name="permKey"> + <xs:complexType > + <xs:complexContent> + <xs:extension base="aaf:pkey" /> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="perm"> + <xs:complexType > + <xs:complexContent> + <xs:extension base="aaf:pkey"> + <xs:sequence> + <xs:element name="roles" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + <!-- This data not filled in unless Requested --> + <xs:element name="ns" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="perms"> + <xs:complexType> + <xs:sequence> + <xs:element ref="aaf:perm" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="permRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="type" type="xs:string"/> + <xs:element name="instance" type="xs:string"/> + <xs:element name="action" type="xs:string"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + +<!-- + Roles +--> + <xs:complexType name="rkey"> + <xs:sequence> + <xs:element name="name" type="xs:string"/> + </xs:sequence> + </xs:complexType> + + <xs:element name="roleKey"> + <xs:complexType > + <xs:complexContent> + <xs:extension base="aaf:rkey" /> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="role"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:rkey"> + <xs:sequence> + <xs:element name="perms" type="aaf:pkey" minOccurs="0" maxOccurs="unbounded"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + <!-- This data not filled in unless Requested --> + <xs:element name="ns" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="roles"> + <xs:complexType> + <xs:sequence> + <xs:element ref="aaf:role" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="roleRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <!-- Added userRole return types jg1555 9/16/2015 --> + <xs:element name="userRole"> + <xs:complexType> + <xs:sequence> + <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="role" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="expires" type="xs:date" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + + <!-- Added userRoles return types jg1555 9/16/2015 --> + <xs:element name="userRoles"> + <xs:complexType> + <xs:sequence> + <xs:element ref="aaf:userRole" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="userRoleRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="role" type="xs:string" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="rolePermRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="perm" type="aaf:pkey" minOccurs="1" maxOccurs="1"/> + <xs:element name="role" type="xs:string" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="nsRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="admin" type="xs:string" minOccurs="1" maxOccurs="unbounded"/> + <xs:element name="responsible" type="xs:string" minOccurs="1" maxOccurs="unbounded"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> + <!-- Note: dec 11, 2015. Request-able NS Type JG --> + <xs:element name="type" type="xs:string" minOccurs="0" maxOccurs="1"/> + + <!-- "scope" is deprecated and unused as of AAF 2.0.11. It will be removed in future versions + <xs:element name="scope" type="xs:int" minOccurs="0" maxOccurs="1"/> + + + <xs:element ref="aaf:roleRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:permRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="aaf_id" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element ref="aaf:userRoleRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name = "attrib" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name = "key" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name = "value" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + + --> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="nsAttribRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="ns" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name = "attrib" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name = "key" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name = "value" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name = "nss"> + <xs:complexType> + <xs:sequence> + <xs:element name = "ns" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name = "name" type = "xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name = "responsible" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name = "admin" type = "xs:string" minOccurs="0" maxOccurs="unbounded"/> + <!-- Note: feb 23, 2015. Added description field. Verify backward compatibility. JR --> + <xs:element name = "description" type = "xs:string" minOccurs="0" maxOccurs="1"/> + <!-- Note: Dec 16, 2015. Added description field. Verify backward compatibility. JG --> + <xs:element name = "attrib" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name = "key" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name = "value" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Users +--> + <xs:element name="users"> + <xs:complexType> + <xs:sequence> + <xs:element name="user" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1" /> + <!-- Changed type to dateTime, because of importance of Certs --> + <xs:element name="expires" type="xs:dateTime" minOccurs="1" maxOccurs="1" /> + <!-- need to differentiate User Cred Types, jg1555 5/20/2015 + This Return Object is shared by multiple functions: + Type is not returned for "UserRole", but only "Cred" + --> + <xs:element name="type" type="xs:int" minOccurs="0" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Certs + Added jg1555 5/20/2015 to support identifying Certificate based Services + --> + <xs:element name="certs"> + <xs:complexType> + <xs:sequence> + <xs:element name="cert" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1" /> + <xs:element name="x500" type="xs:string" minOccurs="1" maxOccurs="1" /> + <xs:element name="expires" type="xs:dateTime" minOccurs="1" maxOccurs="1" /> + <xs:element name="fingerprint" type="xs:hexBinary" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Credentials +--> + <xs:element name="credRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="id" type="xs:string"/> + <xs:element name="type" type="xs:int" minOccurs="0" maxOccurs="1"/> + <xs:choice > + <xs:element name="password" type="xs:string" /> + <xs:element name="entry" type="xs:string" /> + </xs:choice> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + +<!-- + Multi Request + --> + + <xs:element name="multiRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element ref="aaf:nsRequest" minOccurs="0" maxOccurs="1"/> + <xs:element ref="aaf:nsAttribRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:roleRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:permRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:credRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:userRoleRequest" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="aaf:rolePermRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + +<!-- + History + --> + <xs:element name="history"> + <xs:complexType> + <xs:sequence> + <xs:element name="item" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="YYYYMM" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="timestamp" type="xs:dateTime" minOccurs="1" maxOccurs="1"/> + <xs:element name="subject" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="target" type = "xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="action" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="memo" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Approvals + --> + <xs:complexType name="approval"> + <xs:sequence> + <!-- Note, id is set by system --> + <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="ticket" type="xs:string"/> + <xs:element name="user" type="xs:string"/> + <xs:element name="approver" type="xs:string"/> + <xs:element name="type" type="xs:string"/> + <xs:element name="memo" type="xs:string"/> + <xs:element name="updated" type="xs:dateTime"/> + <xs:element name="status"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="approve"/> + <xs:enumeration value="reject"/> + <xs:enumeration value="pending"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="operation"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="C"/> + <xs:enumeration value="U"/> + <xs:enumeration value="D"/> + <xs:enumeration value="G"/> + <xs:enumeration value="UG"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:element name="approvals"> + <xs:complexType> + <xs:sequence> + <xs:element name="approvals" type="aaf:approval" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + +<!-- + Delegates +--> + <xs:complexType name="delg"> + <xs:sequence> + <xs:element name="user" type="xs:string"/> + <xs:element name="delegate" type="xs:string"/> + <xs:element name="expires" type="xs:date"/> + </xs:sequence> + </xs:complexType> + + <xs:element name="delgRequest"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aaf:Request"> + <xs:sequence> + <xs:element name="user" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="delegate" type="xs:string" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="delgs"> + <xs:complexType> + <xs:sequence> + <xs:element name="delgs" type="aaf:delg" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <!-- jg 3/11/2015 New for 2.0.8 --> + <xs:element name="api"> + <xs:complexType> + <xs:sequence> + <xs:element name="route" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="meth" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="path" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="desc" type="xs:string" minOccurs="1" maxOccurs="1"/> + <xs:element name="comments" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="expected" type="xs:int" minOccurs="1" maxOccurs="1"/> + <xs:element name="explicitErr" type="xs:int" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema>
\ No newline at end of file diff --git a/kubernetes/aaf/resources/config/public/iframe_denied_test.html b/kubernetes/aaf/resources/config/public/iframe_denied_test.html new file mode 100644 index 0000000000..613e9c70c1 --- /dev/null +++ b/kubernetes/aaf/resources/config/public/iframe_denied_test.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<body> + +<iframe src="https://mithrilcsp.sbc.com:8095/gui/home"> + <p>Your browser does not support iframes.</p> +</iframe> + +</body> +</html> diff --git a/kubernetes/aaf/resources/config/public/truststoreONAP.p12 b/kubernetes/aaf/resources/config/public/truststoreONAP.p12 Binary files differnew file mode 100644 index 0000000000..d01e8569ab --- /dev/null +++ b/kubernetes/aaf/resources/config/public/truststoreONAP.p12 diff --git a/kubernetes/aaf/resources/config/public/truststoreONAPall.jks b/kubernetes/aaf/resources/config/public/truststoreONAPall.jks Binary files differnew file mode 100644 index 0000000000..ff844b109d --- /dev/null +++ b/kubernetes/aaf/resources/config/public/truststoreONAPall.jks diff --git a/kubernetes/aaf/templates/configmap.yaml b/kubernetes/aaf/templates/configmap.yaml index c7cf9ae6c4..cfa57f7d99 100644 --- a/kubernetes/aaf/templates/configmap.yaml +++ b/kubernetes/aaf/templates/configmap.yaml @@ -15,7 +15,42 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }} + name: {{ .Release.Name }}-aaf-backup namespace: {{ include "common.namespace" . }} data: -{{ (.Files.Glob "resources/config/aaf-data/*").AsConfig | indent 2 }} +{{ tpl (.Files.Glob "resources/config/backup/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-aaf-public + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/public/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-aaf-local + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/local/org.osaaf.location.props").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/local/org.osaaf.cm.ca.props").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/local/org.osaaf.cassandra.props").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/local/org.osaaf.aaf.props").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-aaf-etc + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/etc/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-aaf-data + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/data/*").AsConfig . | indent 2 }} diff --git a/kubernetes/aaf/templates/job.yaml b/kubernetes/aaf/templates/job.yaml new file mode 100644 index 0000000000..7ce871e54a --- /dev/null +++ b/kubernetes/aaf/templates/job.yaml @@ -0,0 +1,132 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-create-config + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + template: + metadata: + labels: + app: aaf-init-job + release: {{ .Release.Name }} + spec: + containers: + - command: ["/bin/bash","-c","if [ ! -d /data/backup ]; then mkdir /data/data && cp -Ra /data1/data/..data/* /data/data/ && mkdir /data/etc && cp -Ra /data1/etc/..data/* data/etc/ && mkdir /data/backup && cp -Ra /data1/backup/..data/* /data/backup/ && cp -Ra /data1/public /data/ && cp -Ra /data1/local /data && mkdir -p /data/logs/oauth && mkdir -p /data/logs/hello && mkdir -p /data/logs/fs && mkdir -p /data/logs/gui && mkdir -p /data/logs/locate && mkdir -p /data/logs/cm && mkdir -p /data/logs/service; fi; exit 0"] + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: aaf-init-job + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /data + name: aaf-persistent-data + - mountPath: /data1/etc + name: aaf-etc + - mountPath: /data1/data + name: aaf-data + - mountPath: /data1/public/iframe_denied_test.html + name: aaf-public + subPath: iframe_denied_test.html + - mountPath: /data1/public/aaf_2_0.xsd + name: aaf-public + subPath: aaf_2_0.xsd + - mountPath: /data1/public/truststoreONAP.p12 + name: aaf-public-secret + subPath: truststoreONAP.p12 + - mountPath: /data1/public/AAF_RootCA.cer + name: aaf-public-secret + subPath: AAF_RootCA.cer + - mountPath: /data1/public/truststoreONAPall.jks + name: aaf-public-secret + subPath: truststoreONAPall.jks + - mountPath: /data1/local/org.osaaf.location.props + name: aaf-local + subPath: org.osaaf.location.props + - mountPath: /data1/local/org.osaaf.cm.ca.props + name: aaf-local + subPath: org.osaaf.cm.ca.props + - mountPath: /data1/local/org.osaaf.cassandra.props + name: aaf-local + subPath: org.osaaf.cassandra.props + - mountPath: /data1/local/org.osaaf.aaf.props + name: aaf-local + subPath: org.osaaf.aaf.props + - mountPath: /data1/local/org.osaaf.aaf.trust.p12 + name: aaf-local-secret + subPath: org.osaaf.aaf.trust.p12 + - mountPath: /data1/local/org.osaaf.aaf.p12 + name: aaf-local-secret + subPath: org.osaaf.aaf.p12 + - mountPath: /data1/local/org.osaaf.aaf.keyfile + name: aaf-local-secret + subPath: org.osaaf.aaf.keyfile + - mountPath: /data1/local/org.osaaf.aaf.cm.p12 + name: aaf-local-secret + subPath: org.osaaf.aaf.cm.p12 + - mountPath: /data1/backup + name: aaf-backup + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aaf-local-secret + secret: + secretName: {{ .Release.Name }}-aaf-local-secret + - name: aaf-public-secret + secret: + secretName: {{ .Release.Name }}-aaf-public-secret + - name: aaf-etc + configMap: + name: {{ .Release.Name }}-aaf-etc + - name: aaf-local + configMap: + name: {{ .Release.Name }}-aaf-local + - name: aaf-backup + configMap: + name: {{ .Release.Name }}-aaf-backup + - name: aaf-public + configMap: + name: {{ .Release.Name }}-aaf-public + - name: aaf-data + configMap: + name: {{ .Release.Name }}-aaf-data + - name: aaf-persistent-data + {{- if .Values.global.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-pvc + {{- else }} + emptyDir: {} + {{- end }} + restartPolicy: OnFailure + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aaf/templates/pv.yaml b/kubernetes/aaf/templates/pv.yaml new file mode 100644 index 0000000000..d9b58f62ad --- /dev/null +++ b/kubernetes/aaf/templates/pv.yaml @@ -0,0 +1,37 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- end -}} diff --git a/kubernetes/aaf/templates/pvc.yaml b/kubernetes/aaf/templates/pvc.yaml new file mode 100644 index 0000000000..255c27751c --- /dev/null +++ b/kubernetes/aaf/templates/pvc.yaml @@ -0,0 +1,48 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-aaf-pvc + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + name: {{ include "common.fullname" . }} + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/kubernetes/aaf/templates/secrets.yaml b/kubernetes/aaf/templates/secrets.yaml new file mode 100644 index 0000000000..d67601ca65 --- /dev/null +++ b/kubernetes/aaf/templates/secrets.yaml @@ -0,0 +1,47 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name}}-aaf-local-secret + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ (.Files.Glob "resources/config/local/org.osaaf.aaf.trust.p12").AsSecrets | indent 2 }} +{{ (.Files.Glob "resources/config/local/org.osaaf.aaf.p12").AsSecrets | indent 2 }} +{{ (.Files.Glob "resources/config/local/org.osaaf.aaf.keyfile").AsSecrets | indent 2 }} +{{ (.Files.Glob "resources/config/local/org.osaaf.aaf.cm.p12").AsSecrets | indent 2 }} +type: Opaque +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name}}-aaf-public-secret + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ (.Files.Glob "resources/config/public/truststoreONAP.p12").AsSecrets | indent 2 }} +{{ (.Files.Glob "resources/config/public/AAF_RootCA.cer").AsSecrets | indent 2 }} +{{ (.Files.Glob "resources/config/public/truststoreONAPall.jks").AsSecrets | indent 2 }} +type: Opaque + diff --git a/kubernetes/aaf/values.yaml b/kubernetes/aaf/values.yaml index 5f231003b1..805d3d1e6e 100644 --- a/kubernetes/aaf/values.yaml +++ b/kubernetes/aaf/values.yaml @@ -20,24 +20,21 @@ global: repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 - -# If mountPath is over NFS (e.g. /dockerdata-nfs is NFS mounted between the nodes), uncomment following lines. -# persistence: -# mountPath: /dockerdata + persistence: + enabled: true ################################################################# # Application configuration defaults. ################################################################# -# application image -repository: nexus3.onap.org:10001 -image: onap/aaf/authz-service:latest -pullPolicy: Always - -# flag to enable debugging - application support required -debugEnabled: false - -# application configuration -config: {} +config: + serviceServiceName: aaf-service + locateServiceName: aaf-locate + cmServiceName: aaf-cm + fsServiceName: aaf-fs + guiServiceName: aaf-gui + helloServiceName: aaf-hello + oauthServiceName: aaf-oauth + csServiceName: aaf-cass # default number of instances replicaCount: 1 @@ -58,18 +55,30 @@ readiness: initialDelaySeconds: 10 periodSeconds: 10 -service: - type: NodePort - name: aaf-authz - #targetPort - internalPort: 8101 - #port - externalPort: 8101 - nodePort: 99 - ingress: enabled: false +## Persist data to a persitent volume +persistence: + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + volumeReclaimPolicy: Retain + + ## database data Persistent Volume Storage Class + ## If defined, storageClassName: <storageClass> + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + accessMode: ReadWriteMany + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: aaf/data + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little diff --git a/kubernetes/aai/charts/aai-babel/templates/deployment.yaml b/kubernetes/aai/charts/aai-babel/templates/deployment.yaml index 15cd163edb..af25b47624 100644 --- a/kubernetes/aai/charts/aai-babel/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-babel/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml b/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml index 0e1a3dfc26..f45a4504b3 100644 --- a/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml +++ b/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml @@ -5,7 +5,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: {{ $root.Values.service.name }}-{{ $i }} + name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }} namespace: {{ $root.Release.Namespace }} labels: type: {{ $root.Values.persistence.storageType }} @@ -22,4 +22,4 @@ spec: path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }} persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }} {{ end }} -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml index 9a5d0ee2aa..d7fde324ae 100644 --- a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml @@ -49,7 +49,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml b/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml index ceb9884a8c..2d45a0b097 100644 --- a/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml @@ -58,7 +58,7 @@ spec: mountPath: /logroot/ containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: SERVICE_BEANS @@ -124,7 +124,7 @@ spec: name: {{ include "common.fullname" . }}-dynamic - name: {{ include "common.fullname" . }}-logs hostPath: - path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml b/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml index 6792d4cd54..0417536625 100644 --- a/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-elasticsearch/templates/deployment.yaml @@ -91,6 +91,6 @@ spec: name: {{ include "common.fullname" . }} - name: elasticsearch-data hostPath: - path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml b/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml index 80b5390d08..7b0a57791c 100644 --- a/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-gizmo/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ .Chart.Name }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml b/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml index 4c92dfd4a8..5308fa0362 100644 --- a/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-hbase/templates/deployment.yaml @@ -64,7 +64,7 @@ spec: volumes: - name: hbase-data hostPath: - path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} - name: localtime hostPath: path: /etc/localtime diff --git a/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml b/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml index 4bfa67de41..f93a0d349d 100644 --- a/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml @@ -36,7 +36,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: CONFIG_HOME diff --git a/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore b/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore Binary files differdeleted file mode 100644 index 1ddef0c9bd..0000000000 --- a/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore +++ /dev/null diff --git a/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties b/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties index 0258fc2066..41676cf869 100644 --- a/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties +++ b/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties @@ -103,6 +103,8 @@ aai.transaction.logging=true aai.transaction.logging.get=false aai.transaction.logging.post=false +aai.realtime.clients=SDNC,MSO,SO + #timeout for crud enabled flag aai.crud.timeoutenabled=true diff --git a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml index 5e371ea5bf..373819e39e 100644 --- a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml +++ b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml @@ -53,12 +53,3 @@ metadata: namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.fullname" . }}-auth-secret - namespace: {{ include "common.namespace" . }} -type: Opaque -data: -{{ tpl (.Files.Glob "resources/config/aai_keystore").AsSecrets . | indent 2 }} diff --git a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml index 6c65bce4cc..c6bb14c4a2 100644 --- a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml @@ -34,6 +34,7 @@ spec: release: {{ .Release.Name }} name: {{ include "common.name" . }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} msb.onap.org/service-info: '[ { "serviceName": "_aai-cloudInfrastructure", @@ -433,7 +434,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: LOCAL_USER_ID @@ -453,7 +454,7 @@ spec: - mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties name: {{ include "common.fullname" . }}-aaiconfig-conf subPath: aaiconfig.properties - - mountPath: /var/log/onap + - mountPath: /opt/aai/logroot/AAI-RES name: {{ include "common.fullname" . }}-logs - mountPath: /opt/app/aai-resources/resources/logback.xml name: {{ include "common.fullname" . }}-log-conf @@ -542,7 +543,7 @@ spec: name: {{ include "common.fullname" . }}-realm-configmap - name: {{ include "common.fullname" . }}-auth-sec secret: - secretName: {{ include "common.fullname" . }}-auth-secret + secretName: aai-auth-secret restartPolicy: {{ .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml b/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml index beaee7d374..c841c383e9 100644 --- a/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml @@ -36,7 +36,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: CONFIG_HOME diff --git a/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml b/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml index 424cf1155d..c1b2c3ccae 100644 --- a/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-sparky-be/templates/deployment.yaml @@ -36,7 +36,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: CONFIG_HOME diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore b/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore Binary files differdeleted file mode 100644 index 1ddef0c9bd..0000000000 --- a/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore +++ /dev/null diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties b/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties index 2452a1e85b..b095c4cebb 100644 --- a/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties +++ b/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties @@ -103,6 +103,8 @@ aai.transaction.logging=true aai.transaction.logging.get=false aai.transaction.logging.post=false +aai.realtime.clients=SDNC,MSO,SO + #timeout for traversal enabled flag aai.traversal.timeoutenabled=true diff --git a/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml b/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml index cc88444ae2..373819e39e 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml @@ -53,12 +53,3 @@ metadata: namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.fullname" . }}-auth-secret - namespace: {{ include "common.namespace" . }} -type: Opaque -data: -{{ tpl (.Files.Glob "resources/config/aai_keystore").AsSecrets . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml b/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml index bda80a0483..25cd3a9537 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml @@ -34,6 +34,7 @@ spec: release: {{ .Release.Name }} name: {{ include "common.name" . }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} msb.onap.org/service-info: '[ { "serviceName": "_aai-generic-query", @@ -265,7 +266,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: DISABLE_UPDATE_QUERY @@ -287,7 +288,7 @@ spec: - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties name: {{ include "common.fullname" . }}-aaiconfig-conf subPath: aaiconfig.properties - - mountPath: /var/log/onap + - mountPath: /opt/aai/logroot/AAI-GQ name: {{ include "common.fullname" . }}-logs - mountPath: /opt/app/aai-traversal/resources/logback.xml name: {{ include "common.fullname" . }}-log-conf @@ -375,7 +376,7 @@ spec: name: {{ include "common.fullname" . }}-realm-configmap - name: {{ include "common.fullname" . }}-auth-sec secret: - secretName: {{ include "common.fullname" . }}-auth-secret + secretName: aai-auth-secret restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-traversal/templates/job.yaml b/kubernetes/aai/charts/aai-traversal/templates/job.yaml index b9b2501304..46af0047f7 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/job.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/job.yaml @@ -47,7 +47,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }}-job - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - bash @@ -99,7 +99,7 @@ spec: name: aai-filebeat - name: {{ include "common.fullname" . }}-logs hostPath: - path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}-update-query + path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}-update-query - name: {{ include "common.fullname" . }}-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-log-conf @@ -125,7 +125,7 @@ spec: name: {{ include "common.fullname" . }}-realm-configmap - name: {{ include "common.fullname" . }}-auth-sec secret: - secretName: {{ include "common.fullname" . }}-auth-secret + secretName: aai-auth-secret restartPolicy: OnFailure imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/resources/config/aai/aai_keystore b/kubernetes/aai/resources/config/aai/aai_keystore Binary files differnew file mode 100644 index 0000000000..16d93a7e9f --- /dev/null +++ b/kubernetes/aai/resources/config/aai/aai_keystore diff --git a/kubernetes/aai/templates/configmap.yaml b/kubernetes/aai/templates/configmap.yaml index 592e4129d1..00d2a80d9c 100644 --- a/kubernetes/aai/templates/configmap.yaml +++ b/kubernetes/aai/templates/configmap.yaml @@ -13,6 +13,25 @@ metadata: name: aai-deployment-configmap namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/haproxy/haproxy.cfg").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-haproxy-secret + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/haproxy/aai.pem").AsSecrets . | indent 2 }} +# This is a shared key for both resources and traversal +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-auth-secret + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/aai/aai_keystore").AsSecrets . | indent 2 }} diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml index e8798186ed..b29f8a2b13 100644 --- a/kubernetes/aai/values.yaml +++ b/kubernetes/aai/values.yaml @@ -57,7 +57,7 @@ global: # global defaults # application image dockerhubRepository: registry.hub.docker.com -image: aaionap/haproxy:1.1.0 +image: aaionap/haproxy:1.2.1 pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml b/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml index a250699474..2226b75bbf 100644 --- a/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml +++ b/kubernetes/appc/charts/appc-cdt/templates/deployment.yaml @@ -19,7 +19,7 @@ spec: initContainers: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties index bf41d5b2ed..007d0e15fe 100644 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties @@ -41,13 +41,13 @@ appc.topology.dg.method=topology-operation-all appc.topology.dg.version=2.0.0 # TEMP - Properties that might be needed to make the AAI-APPC connection -org.openecomp.appc.db.url.appcctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/appcctl -org.openecomp.appc.db.user.appcctl=appcctl -org.openecomp.appc.db.pass.appcctl=appcctl +org.onap.appc.db.url.appcctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/appcctl +org.onap.appc.db.user.appcctl=appcctl +org.onap.appc.db.pass.appcctl=appcctl -org.openecomp.appc.db.url.sdnctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl -org.openecomp.appc.db.user.sdnctl=sdnctl -org.openecomp.appc.db.pass.sdnctl=gamma +org.onap.appc.db.url.sdnctl=jdbc:mysql://{{.Values.mysql.service.name}}.{{.Release.Namespace}}:3306/sdnctl +org.onap.appc.db.user.sdnctl=sdnctl +org.onap.appc.db.pass.sdnctl=gamma ### ### @@ -99,7 +99,7 @@ test.vmid=test # Port 8774 below is default port for OpenStack's Nova API Service test.url=http://api.appc.local/vm/9999999/test/99999999-9999-9999-9999-999999999999 #skips hypervisor check which usually occurs during iaas-adapter-bundle startup -org.openecomp.appc.iaas.skiphypervisorcheck=true +org.onap.appc.iaas.skiphypervisorcheck=true # Properties from default.properties in the src/test and src/main paths of appc-asdc-listener-bundle appc.sdc.host=sdc-be.{{.Release.Namespace}}:8443 diff --git a/kubernetes/appc/templates/statefulset.yaml b/kubernetes/appc/templates/statefulset.yaml index e81c50d27f..d2da2ec756 100644 --- a/kubernetes/appc/templates/statefulset.yaml +++ b/kubernetes/appc/templates/statefulset.yaml @@ -37,7 +37,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /opt/appc/bin/startODL.sh diff --git a/kubernetes/clamp/charts/mariadb/templates/deployment.yaml b/kubernetes/clamp/charts/mariadb/templates/deployment.yaml index e1db655f41..07dcc3607c 100644 --- a/kubernetes/clamp/charts/mariadb/templates/deployment.yaml +++ b/kubernetes/clamp/charts/mariadb/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/clamp/templates/deployment.yaml b/kubernetes/clamp/templates/deployment.yaml index 20beabfb0c..4a3a0f9e4f 100644 --- a/kubernetes/clamp/templates/deployment.yaml +++ b/kubernetes/clamp/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/cli/templates/deployment.yaml b/kubernetes/cli/templates/deployment.yaml index f4e2f360fb..09e0e7f167 100644 --- a/kubernetes/cli/templates/deployment.yaml +++ b/kubernetes/cli/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} @@ -52,7 +52,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} env: - - name: CLI_MODE + - name: OPEN_CLI_MODE value: "{{ .Values.config.climode }}" resources: {{ toYaml .Values.resources | indent 12 }} diff --git a/kubernetes/cli/values.yaml b/kubernetes/cli/values.yaml index 4c95b9f96b..4204ee0f47 100644 --- a/kubernetes/cli/values.yaml +++ b/kubernetes/cli/values.yaml @@ -26,7 +26,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/cli:v1.1.0 +image: onap/cli:2.0-STAGING-latest pullPolicy: Always # application configuration diff --git a/kubernetes/common/dgbuilder/templates/deployment.yaml b/kubernetes/common/dgbuilder/templates/deployment.yaml index a1e95682ee..b9c90f2681 100644 --- a/kubernetes/common/dgbuilder/templates/deployment.yaml +++ b/kubernetes/common/dgbuilder/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/bin/bash"] args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"] diff --git a/kubernetes/common/dgbuilder/values.yaml b/kubernetes/common/dgbuilder/values.yaml index 76cbf45050..c200c557d0 100644 --- a/kubernetes/common/dgbuilder/values.yaml +++ b/kubernetes/common/dgbuilder/values.yaml @@ -34,7 +34,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/ccsdk-dgbuilder-image:0.2.1-SNAPSHOT +image: onap/ccsdk-dgbuilder-image:0.2-STAGING-latest pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml index b8ba75e52c..ed7e1fc578 100644 --- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml +++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml @@ -35,7 +35,7 @@ spec: - name: {{ include "common.namespace" . }}-docker-registry-key containers: - name: {{ include "common.fullname" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}} env: - name: POD_NAMESPACE @@ -96,7 +96,7 @@ spec: subPath: data initContainers: - name: mariadb-galera-prepare - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.imageInit }} + image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}" command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"] volumeMounts: - name: {{ include "common.fullname" . }}-data @@ -116,4 +116,4 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} -{{- end }}
\ No newline at end of file +{{- end }} diff --git a/kubernetes/common/mysql/templates/configmap.yaml b/kubernetes/common/mysql/templates/configmap.yaml index ff127e48cd..d8c29fb551 100644 --- a/kubernetes/common/mysql/templates/configmap.yaml +++ b/kubernetes/common/mysql/templates/configmap.yaml @@ -23,12 +23,14 @@ data: master.cnf: | # Apply this config only on the master. [mysqld] + sql_mode = "NO_ENGINE_SUBSTITUTION" log-bin [localpathprefix] master slave.cnf: | # Apply this config only on slaves. [mysqld] + sql_mode = "NO_ENGINE_SUBSTITUTION" super-read-only [localpathprefix] slave diff --git a/kubernetes/common/mysql/templates/nfs-provisoner.yaml b/kubernetes/common/mysql/templates/nfs-provisoner.yaml index d6c6e8ccbd..355ad38235 100644 --- a/kubernetes/common/mysql/templates/nfs-provisoner.yaml +++ b/kubernetes/common/mysql/templates/nfs-provisoner.yaml @@ -74,5 +74,5 @@ spec: volumes: - name: export-volume hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{ end }} diff --git a/kubernetes/common/mysql/templates/pv.yaml b/kubernetes/common/mysql/templates/pv.yaml index 1cc92ace44..824dcbb87b 100644 --- a/kubernetes/common/mysql/templates/pv.yaml +++ b/kubernetes/common/mysql/templates/pv.yaml @@ -34,5 +34,5 @@ spec: storageClassName: "{{ include "common.fullname" . }}-data" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/common/postgres/templates/pv.yaml b/kubernetes/common/postgres/templates/pv.yaml index e08c934a6c..144a3f793b 100644 --- a/kubernetes/common/postgres/templates/pv.yaml +++ b/kubernetes/common/postgres/templates/pv.yaml @@ -33,7 +33,7 @@ spec: storageClassName: "{{ include "common.fullname" . }}-data" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}0 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0 --- kind: PersistentVolume apiVersion: v1 @@ -54,5 +54,5 @@ spec: storageClassName: "{{ include "common.fullname" . }}-data" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}1 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1 {{- end -}} diff --git a/kubernetes/common/postgres/templates/statefulset.yaml b/kubernetes/common/postgres/templates/statefulset.yaml index e42e9eb924..c3f86748cb 100644 --- a/kubernetes/common/postgres/templates/statefulset.yaml +++ b/kubernetes/common/postgres/templates/statefulset.yaml @@ -126,7 +126,7 @@ spec: path: /etc/localtime - name: {{ include "common.fullname" . }}-init hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountInitPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountInitPath }} - name: {{ include "common.fullname" . }}-backup emptyDir: {} #{{ if not .Values.persistence.enabled }} diff --git a/kubernetes/consul/resources/config/consul-agent-config/cli-health-check.json b/kubernetes/consul/resources/config/consul-agent-config/cli-health-check.json new file mode 100644 index 0000000000..81e55cb871 --- /dev/null +++ b/kubernetes/consul/resources/config/consul-agent-config/cli-health-check.json @@ -0,0 +1,15 @@ +{ + "service": { + "name": "Health Check: ONAP CLI", + "checks": [ + { + "id": "cli", + "name": "CLI Health Check", + "http": "http://cli.{{include "common.namespace" .}}:8080", + "method": "GET", + "interval": "3600s", + "timeout": "1s" + } + ] + } +} diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/templates/job.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/templates/job.yaml index 6229af4228..02909f79b7 100644 --- a/kubernetes/dcaegen2/charts/dcae-bootstrap/templates/job.yaml +++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/templates/job.yaml @@ -61,7 +61,7 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: /inputs diff --git a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml index 76c83af56b..acda520192 100644 --- a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml +++ b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml @@ -36,7 +36,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml index 2166ca9b54..463504cf40 100644 --- a/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml +++ b/kubernetes/dcaegen2/charts/dcae-healthcheck/templates/deployment.yaml @@ -36,7 +36,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/dcaegen2/charts/dcae-redis/templates/pv.yaml b/kubernetes/dcaegen2/charts/dcae-redis/templates/pv.yaml index 2d7e25dd2c..5573179d87 100644 --- a/kubernetes/dcaegen2/charts/dcae-redis/templates/pv.yaml +++ b/kubernetes/dcaegen2/charts/dcae-redis/templates/pv.yaml @@ -33,7 +33,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}0 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0 --- kind: PersistentVolume apiVersion: v1 @@ -54,7 +54,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}1 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1 --- kind: PersistentVolume apiVersion: v1 @@ -75,7 +75,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}2 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}2 --- kind: PersistentVolume apiVersion: v1 @@ -96,7 +96,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}3 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}3 --- kind: PersistentVolume apiVersion: v1 @@ -117,7 +117,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}4 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}4 --- kind: PersistentVolume apiVersion: v1 @@ -138,7 +138,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}5 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}5 --- kind: PersistentVolume apiVersion: v1 @@ -159,7 +159,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}6 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}6 --- kind: PersistentVolume apiVersion: v1 @@ -180,7 +180,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}7 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}7 --- kind: PersistentVolume apiVersion: v1 @@ -201,7 +201,7 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}8 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}8 --- kind: PersistentVolume apiVersion: v1 @@ -222,6 +222,6 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}9 + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}9 {{- end -}} diff --git a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml index 63d921aa8b..f72e540f1e 100644 --- a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml +++ b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml @@ -35,7 +35,7 @@ spec: initContainers: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /bin/sh diff --git a/kubernetes/dmaap/Chart.yaml b/kubernetes/dmaap/Chart.yaml index a83b50b2d3..b18e59d785 100644 --- a/kubernetes/dmaap/Chart.yaml +++ b/kubernetes/dmaap/Chart.yaml @@ -13,6 +13,6 @@ # limitations under the License. apiVersion: v1 -description: a Helm chart to deploy ONAP DMaaP componetns in Kubernetes +description: ONAP DMaaP components name: dmaap version: 2.0.0 diff --git a/kubernetes/dmaap/Makefile b/kubernetes/dmaap/Makefile index 36ca4f5a9f..d80a9213d0 100644 --- a/kubernetes/dmaap/Makefile +++ b/kubernetes/dmaap/Makefile @@ -12,5 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -make-dmaap: - cd charts && helm dep up dmaap-bus-controller +make-dmaap: make-bus-controller make-message-router + +make-bus-controller: + cd charts && helm dep up dmaap-bus-controller && helm lint dmaap-bus-controller + +make-message-router: + cd charts && helm dep up message-router && helm lint message-router + +clean: + @find . -type f -name '*.tgz' -delete diff --git a/kubernetes/dmaap/README.md b/kubernetes/dmaap/README.md index e185fdc6a7..ad81b2f6e6 100644 --- a/kubernetes/dmaap/README.md +++ b/kubernetes/dmaap/README.md @@ -1,11 +1,25 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Helm Chart for ONAP DMaaP Applications ONAP includes the following Kubernetes services: 1) message-router - a message bus for applications -2) dmaap-prov - an API to provision DMaaP resources +2) dbc-api - an API to provision DMaaP resources # Service Dependencies message-router depends on AAF -dmaap-prov depends on AAF and Postgresql. NOTE: until Postgresql is available as a common service in ONAP, this chart deploys a private instance based on kubernetes/stable chart +dbc-api depends on AAF and Postgresql.
\ No newline at end of file diff --git a/kubernetes/dmaap/charts/dmaap-bus-controller/templates/NOTES.txt b/kubernetes/dmaap/charts/dmaap-bus-controller/templates/NOTES.txt index fbab5a3758..254c6bf2a2 100644 --- a/kubernetes/dmaap/charts/dmaap-bus-controller/templates/NOTES.txt +++ b/kubernetes/dmaap/charts/dmaap-bus-controller/templates/NOTES.txt @@ -1,3 +1,17 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} {{- range .Values.ingress.hosts }} diff --git a/kubernetes/dmaap/charts/dmaap-bus-controller/templates/deployment.yaml b/kubernetes/dmaap/charts/dmaap-bus-controller/templates/deployment.yaml index 2c38792c87..32d6fe0612 100644 --- a/kubernetes/dmaap/charts/dmaap-bus-controller/templates/deployment.yaml +++ b/kubernetes/dmaap/charts/dmaap-bus-controller/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image.buscontrollerImage }}:{{ .Values.image.buscontrollerVersion }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/dmaap/charts/dmaap-bus-controller/values.yaml b/kubernetes/dmaap/charts/dmaap-bus-controller/values.yaml index 3acb490e57..2b4067d886 100644 --- a/kubernetes/dmaap/charts/dmaap-bus-controller/values.yaml +++ b/kubernetes/dmaap/charts/dmaap-bus-controller/values.yaml @@ -32,14 +32,12 @@ pullPolicy: Always # application images repository: nexus3.onap.org:10001 -image: - buscontrollerImage: onap/dmaap/buscontroller - buscontrollerVersion: 1.0.8 +image: onap/dmaap/buscontroller:1.0.8 # application configuration -dmaapMessageRouterService: dmaap -aafURL: https://onap-aaf:8905/proxy/ +dmaapMessageRouterService: message-router +aafURL: https://aaf-authz/ topicMgrUser: m23456@dmaapbc.onap.org topicMgrPwd: onapdemo adminUser: m12345@dmaapbc.onap.org @@ -63,32 +61,38 @@ readiness: service: - type: ClusterIP + type: NodePort name: dmaap-bc + portName: dmaap-bc + portName2: dmaap-bc externalPort: 8080 internalPort: 8080 externalPort2: 8443 internalPort2: 8443 + nodePort: 41 + nodePort2: 42 # application configuration override for postgres postgres: - nameOverride: dbcl-db + nameOverride: dbc-pg service: - name: dbcl-postgres - name2: dbcl-pg-primary - name3: dbcl-pg-replica + name: dbc-postgres + name2: dbc-pg-primary + name3: dbc-pg-replica container: name: - primary: dbcl-pg-primary - replica: dbcl-pg-replica + primary: dbc-pg-primary + replica: dbc-pg-replica config: pgUserName: dmaap_admin pgDatabase: dmaap pgPrimaryPassword: onapdemodb pgUserPassword: onapdemodb pgRootPassword: onapdemodb - + persistence: + mountSubPath: dbc/data + mountInitPath: dbc ingress: enabled: false diff --git a/kubernetes/dmaap/charts/message-router/.helmignore b/kubernetes/dmaap/charts/message-router/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/message-router/Chart.yaml b/kubernetes/dmaap/charts/message-router/Chart.yaml index b3a7491d78..dd7371cde4 100644 --- a/kubernetes/message-router/Chart.yaml +++ b/kubernetes/dmaap/charts/message-router/Chart.yaml @@ -13,7 +13,6 @@ # limitations under the License. apiVersion: v1 -appVersion: "1.0" description: ONAP Message Router name: message-router version: 2.0.0 diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/.helmignore b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/Chart.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/Chart.yaml new file mode 100644 index 0000000000..1457fa89b4 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/Chart.yaml @@ -0,0 +1,19 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Message Router Kafka Service +name: message-router-kafka +version: 2.0.0 + diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/NOTES.txt b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/NOTES.txt new file mode 100644 index 0000000000..f6e6e930b3 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/message-router/charts/kafka/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml index a4e13cdab6..25ab2101cf 100644 --- a/kubernetes/message-router/charts/kafka/templates/deployment.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml @@ -46,7 +46,7 @@ spec: - /root/ready.py args: - --container-name - - {{ .Values.zookeeper.nameOverride }} + - {{ .Values.zookeeper.name }} env: - name: NAMESPACE valueFrom: @@ -78,7 +78,7 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} env: - name: KAFKA_ZOOKEEPER_CONNECT - value: "{{.Values.zookeeper.nameOverride}}:{{.Values.config.zookeeperPort}}" + value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}" - name: KAFKA_ADVERTISED_HOST_NAME value: "{{ include "common.servicename" . }}" - name: KAFKA_BROKER_ID diff --git a/kubernetes/message-router/charts/kafka/templates/pv.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/pv.yaml index 8be3d4c9cb..da117f4919 100644 --- a/kubernetes/message-router/charts/kafka/templates/pv.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/pv.yaml @@ -33,5 +33,5 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/message-router/charts/kafka/templates/pvc.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/pvc.yaml index e27c3311e9..e27c3311e9 100644 --- a/kubernetes/message-router/charts/kafka/templates/pvc.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/pvc.yaml diff --git a/kubernetes/message-router/charts/kafka/templates/service.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/service.yaml index c57d190bb9..117a8a9714 100644 --- a/kubernetes/message-router/charts/kafka/templates/service.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/service.yaml @@ -26,7 +26,7 @@ spec: ports: - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.name }} + name: {{ .Values.service.portName }} selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} diff --git a/kubernetes/message-router/charts/kafka/values.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml index 7675ee80b7..0e7c2b72f7 100644 --- a/kubernetes/message-router/charts/kafka/values.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml @@ -31,18 +31,18 @@ global: ################################################################# # application image repository: docker.io -image: wurstmeister/kafka:latest +image: wurstmeister/kafka:1.1.0 pullPolicy: Always zookeeper: - nameOverride: zookeeper + name: message-router-zookeeper + port: 2181 # flag to enable debugging - application support required debugEnabled: false # application configuration -config: - zookeeperPort: 2181 +config: {} # default number of instances replicaCount: 1 @@ -88,7 +88,8 @@ persistence: service: type: NodePort - name: global-kafka + name: message-router-kafka + portName: message-router-kafka internalPort: 9092 externalPort: 9092 diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/.helmignore b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/Chart.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/Chart.yaml new file mode 100644 index 0000000000..49ac35beff --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/Chart.yaml @@ -0,0 +1,19 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Dmaap Message Router Zookeeper Service +name: message-router-zookeeper +version: 2.0.0 + diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/NOTES.txt b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/NOTES.txt new file mode 100644 index 0000000000..f6e6e930b3 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/message-router/charts/zookeeper/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml index 678b83e3bd..678b83e3bd 100644 --- a/kubernetes/message-router/charts/zookeeper/templates/deployment.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml diff --git a/kubernetes/message-router/charts/zookeeper/templates/pv.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/pv.yaml index 8be3d4c9cb..da117f4919 100644 --- a/kubernetes/message-router/charts/zookeeper/templates/pv.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/pv.yaml @@ -33,5 +33,5 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/message-router/charts/zookeeper/templates/pvc.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/pvc.yaml index e27c3311e9..e27c3311e9 100644 --- a/kubernetes/message-router/charts/zookeeper/templates/pvc.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/pvc.yaml diff --git a/kubernetes/message-router/charts/zookeeper/templates/service.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/service.yaml index 2386125587..2386125587 100644 --- a/kubernetes/message-router/charts/zookeeper/templates/service.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/service.yaml diff --git a/kubernetes/message-router/charts/zookeeper/values.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml index 8a419704c8..517a7c993d 100644 --- a/kubernetes/message-router/charts/zookeeper/values.yaml +++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml @@ -84,7 +84,8 @@ persistence: service: type: NodePort - name: zookeeper + name: message-router-zookeeper + portName: message-router-zookeeper internalPort: 2181 ingress: diff --git a/kubernetes/message-router/requirements.yaml b/kubernetes/dmaap/charts/message-router/requirements.yaml index 7beecb385c..7beecb385c 100644 --- a/kubernetes/message-router/requirements.yaml +++ b/kubernetes/dmaap/charts/message-router/requirements.yaml diff --git a/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties index ed3999d36e..4015e941a6 100755 --- a/kubernetes/message-router/resources/config/dmaap/MsgRtrApi.properties +++ b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/MsgRtrApi.properties @@ -29,11 +29,7 @@ ## ## Both Cambria and Kafka make use of Zookeeper. ## -config.zk.servers={{.Values.zookeeper.nameOverride}}:{{.Values.config.zookeeperPort}} -#config.zk.servers=172.17.0.1:2181 -#dmaap.onap-message-router:2181 -#10.208.128.229:2181 -#config.zk.root=/fe3c/cambria/config +config.zk.servers={{.Values.zookeeper.name}}:{{.Values.zookeeper.port}} ############################################################################### @@ -43,11 +39,7 @@ config.zk.servers={{.Values.zookeeper.nameOverride}}:{{.Values.config.zookeeperP ## 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={{.Values.kafka.nameOverride}}:{{.Values.config.kafkaPort}} -#kafka.metadata.broker.list=172.17.0.1:9092 -#dmaap.onap-message-router:9092 -#10.208.128.229:9092 +kafka.metadata.broker.list={{.Values.kafka.name}}:{{.Values.kafka.port}} ##kafka.request.required.acks=-1 #kafka.client.zookeeper=${config.zk.servers} consumer.timeout.ms=100 diff --git a/kubernetes/message-router/resources/config/dmaap/cadi.properties b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties index 9079794517..9079794517 100755 --- a/kubernetes/message-router/resources/config/dmaap/cadi.properties +++ b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/cadi.properties diff --git a/kubernetes/message-router/resources/config/dmaap/mykey b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/mykey index c2b8b8779b..c2b8b8779b 100755 --- a/kubernetes/message-router/resources/config/dmaap/mykey +++ b/kubernetes/dmaap/charts/message-router/resources/config/dmaap/mykey diff --git a/kubernetes/dmaap/charts/message-router/templates/NOTES.txt b/kubernetes/dmaap/charts/message-router/templates/NOTES.txt new file mode 100644 index 0000000000..f6e6e930b3 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2018 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/dmaap/charts/message-router/templates/configmap.yaml b/kubernetes/dmaap/charts/message-router/templates/configmap.yaml new file mode 100644 index 0000000000..9816bd9ca6 --- /dev/null +++ b/kubernetes/dmaap/charts/message-router/templates/configmap.yaml @@ -0,0 +1,29 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-cadi-prop-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }} diff --git a/kubernetes/message-router/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/templates/deployment.yaml index ed3c4ebb7a..379fc24594 100644 --- a/kubernetes/message-router/templates/deployment.yaml +++ b/kubernetes/dmaap/charts/message-router/templates/deployment.yaml @@ -34,9 +34,9 @@ spec: - /root/ready.py args: - --container-name - - {{ .Values.kafka.nameOverride }} + - {{ .Values.kafka.name }} - --container-name - - {{ .Values.zookeeper.nameOverride }} + - {{ .Values.zookeeper.name }} env: - name: NAMESPACE valueFrom: diff --git a/kubernetes/message-router/templates/secrets.yaml b/kubernetes/dmaap/charts/message-router/templates/secrets.yaml index a7f6e18b39..a7f6e18b39 100644 --- a/kubernetes/message-router/templates/secrets.yaml +++ b/kubernetes/dmaap/charts/message-router/templates/secrets.yaml diff --git a/kubernetes/message-router/templates/service.yaml b/kubernetes/dmaap/charts/message-router/templates/service.yaml index 45c2616ec9..45c2616ec9 100644 --- a/kubernetes/message-router/templates/service.yaml +++ b/kubernetes/dmaap/charts/message-router/templates/service.yaml diff --git a/kubernetes/message-router/values.yaml b/kubernetes/dmaap/charts/message-router/values.yaml index 181368d885..c69fe53cb2 100644 --- a/kubernetes/message-router/values.yaml +++ b/kubernetes/dmaap/charts/message-router/values.yaml @@ -31,20 +31,18 @@ repository: nexus3.onap.org:10001 image: onap/dmaap/dmaap-mr:1.1.4 pullPolicy: Always -nameOverride: dmaap - kafka: - nameOverride: global-kafka + name: message-router-kafka + port: 9092 zookeeper: - nameOverride: zookeeper + name: message-router-zookeeper + port: 2181 # flag to enable debugging - application support required debugEnabled: false # application configuration -config: - zookeeperPort: 2181 - kafkaPort: 9092 +config: {} # default number of instances replicaCount: 1 diff --git a/kubernetes/dmaap/values.yaml b/kubernetes/dmaap/values.yaml index 76f0383f2e..6cf26ff10c 100644 --- a/kubernetes/dmaap/values.yaml +++ b/kubernetes/dmaap/values.yaml @@ -22,6 +22,3 @@ global: readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 - postgresDatabase: dmaap - postgresUser: dmaap_admin - postgresPassword: onapdemodb
\ No newline at end of file diff --git a/kubernetes/esr/charts/esr-gui/templates/deployment.yaml b/kubernetes/esr/charts/esr-gui/templates/deployment.yaml index 747df228c3..e1b27bb422 100644 --- a/kubernetes/esr/charts/esr-gui/templates/deployment.yaml +++ b/kubernetes/esr/charts/esr-gui/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/esr/charts/esr-gui/templates/service.yaml b/kubernetes/esr/charts/esr-gui/templates/service.yaml index 6a274b50d4..678db1a059 100644 --- a/kubernetes/esr/charts/esr-gui/templates/service.yaml +++ b/kubernetes/esr/charts/esr-gui/templates/service.yaml @@ -30,7 +30,8 @@ metadata: "url": "/esr-gui", "protocol": "UI", "port": "{{ .Values.service.internalPort }}", - "visualRange":"1" + "visualRange":"1", + "path":"/iui/aai-esr-gui" } ]' spec: diff --git a/kubernetes/esr/templates/deployment.yaml b/kubernetes/esr/templates/deployment.yaml index c2322d31ee..3f15df80f0 100644 --- a/kubernetes/esr/templates/deployment.yaml +++ b/kubernetes/esr/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ .Chart.Name }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml b/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml index fdfc6140fd..c4491b914d 100644 --- a/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml +++ b/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml @@ -112,6 +112,6 @@ spec: claimName: {{ include "common.fullname" . }} - name: {{ include "common.fullname" . }}-logs hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPathLogs }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPathLogs }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml b/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml index dba12d4125..31230a9ed7 100644 --- a/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml +++ b/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml @@ -17,5 +17,5 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/message-router/templates/configmap.yaml b/kubernetes/message-router/templates/configmap.yaml deleted file mode 100644 index 911d2e9c0e..0000000000 --- a/kubernetes/message-router/templates/configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-cadi-prop-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }} diff --git a/kubernetes/msb/charts/kube2msb/templates/deployment.yaml b/kubernetes/msb/charts/kube2msb/templates/deployment.yaml index ad38750a8d..431387158d 100644 --- a/kubernetes/msb/charts/kube2msb/templates/deployment.yaml +++ b/kubernetes/msb/charts/kube2msb/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: KUBE_MASTER_URL diff --git a/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml b/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml index b2660052dd..aec03b0b3f 100644 --- a/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml +++ b/kubernetes/msb/charts/msb-discovery/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/msb/charts/msb-eag/templates/deployment.yaml b/kubernetes/msb/charts/msb-eag/templates/deployment.yaml index 7ca8a8e203..26ee3889c1 100644 --- a/kubernetes/msb/charts/msb-eag/templates/deployment.yaml +++ b/kubernetes/msb/charts/msb-eag/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml index 7ca8a8e203..26ee3889c1 100644 --- a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml +++ b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/multicloud/charts/multicloud-ocata/templates/deployment.yaml b/kubernetes/multicloud/charts/multicloud-ocata/templates/deployment.yaml index db8bcdcd57..0106a79973 100644 --- a/kubernetes/multicloud/charts/multicloud-ocata/templates/deployment.yaml +++ b/kubernetes/multicloud/charts/multicloud-ocata/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: - mountPath: /opt/ocata/ocata/pub/config/log.yml name: ocata-logconfig subPath: log.yml - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/multicloud/charts/multicloud-vio/templates/deployment.yaml b/kubernetes/multicloud/charts/multicloud-vio/templates/deployment.yaml index 903963b34b..fa9646657b 100644 --- a/kubernetes/multicloud/charts/multicloud-vio/templates/deployment.yaml +++ b/kubernetes/multicloud/charts/multicloud-vio/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: - mountPath: /opt/vio/vio/pub/config/log.yml name: vio-logconfig subPath: log.yml - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml b/kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml index 02a78bbd16..75969ba0fa 100644 --- a/kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml +++ b/kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml @@ -59,7 +59,7 @@ spec: - mountPath: /opt/windriver/titanium_cloud/pub/config/log.yml name: windriver-logconfig subPath: log.yml - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/multicloud/templates/deployment.yaml b/kubernetes/multicloud/templates/deployment.yaml index 3a0671c911..5ae5fd9da5 100644 --- a/kubernetes/multicloud/templates/deployment.yaml +++ b/kubernetes/multicloud/templates/deployment.yaml @@ -52,7 +52,7 @@ spec: value: "{{ .Values.config.aai.username }}" - name: AAI_PASSWORD value: "{{ .Values.config.aai.password }}" - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }} volumeMounts: diff --git a/kubernetes/onap/requirements.yaml b/kubernetes/onap/requirements.yaml index 8c9c12845b..03ee94db6e 100644 --- a/kubernetes/onap/requirements.yaml +++ b/kubernetes/onap/requirements.yaml @@ -60,10 +60,6 @@ dependencies: version: ~2.0.0 repository: '@local' condition: log.enabled - - name: message-router - version: ~2.0.0 - repository: '@local' - condition: message-router.enabled - name: mock version: ~0.1.0 repository: '@local' @@ -84,6 +80,10 @@ dependencies: version: ~2.0.0 repository: '@local' condition: portal.enabled + - name: oof + version: ~2.0.0 + repository: '@local' + condition: oof.enabled - name: robot version: ~2.0.0 repository: '@local' diff --git a/kubernetes/onap/resources/environments/dev.yaml b/kubernetes/onap/resources/environments/dev.yaml index 651cb9160e..4379f64d55 100644 --- a/kubernetes/onap/resources/environments/dev.yaml +++ b/kubernetes/onap/resources/environments/dev.yaml @@ -65,14 +65,16 @@ consul: enabled: false dcaegen2: enabled: false +dmaap: + enabled: false esr: enabled: false log: enabled: false -message-router: - enabled: false mock: enabled: false +oof: + enabled: false msb: enabled: false multicloud: @@ -128,4 +130,4 @@ vfc: vid: enabled: false vnfsdk: - enabled: false
\ No newline at end of file + enabled: false diff --git a/kubernetes/onap/resources/environments/disable-allcharts.yaml b/kubernetes/onap/resources/environments/disable-allcharts.yaml index 7e27a316cb..819cc7a2ab 100644 --- a/kubernetes/onap/resources/environments/disable-allcharts.yaml +++ b/kubernetes/onap/resources/environments/disable-allcharts.yaml @@ -39,18 +39,20 @@ consul: enabled: false dcaegen2: enabled: false +dmaap: + enabled: false esr: enabled: false log: enabled: false -message-router: - enabled: false mock: enabled: false msb: enabled: false multicloud: enabled: false +oof: + enabled: false policy: enabled: false portal: @@ -70,4 +72,4 @@ vfc: vid: enabled: false vnfsdk: - enabled: false
\ No newline at end of file + enabled: false diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml index 6107f3d44e..28b33fcc6d 100644 --- a/kubernetes/onap/values.yaml +++ b/kubernetes/onap/values.yaml @@ -74,6 +74,8 @@ consul: enabled: true dcaegen2: enabled: true +dmaap: + enabled: true esr: enabled: true log: @@ -82,6 +84,8 @@ message-router: enabled: true mock: enabled: true +oof: + enabled: true msb: enabled: true multicloud: diff --git a/kubernetes/message-router/charts/zookeeper/Chart.yaml b/kubernetes/oof/Chart.yaml index dd999e5314..36d31253c4 100644..100755 --- a/kubernetes/message-router/charts/zookeeper/Chart.yaml +++ b/kubernetes/oof/Chart.yaml @@ -13,7 +13,6 @@ # limitations under the License. apiVersion: v1 -description: ONAP Dmaap Zookeeper Service -name: zookeeper +description: ONAP Optimization Framework +name: oof version: 2.0.0 - diff --git a/kubernetes/oof/Makefile b/kubernetes/oof/Makefile new file mode 100644 index 0000000000..72f97ef44c --- /dev/null +++ b/kubernetes/oof/Makefile @@ -0,0 +1,16 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +make-has: + cd charts && helm dep up oof-has diff --git a/kubernetes/oof/charts/oof-has/Chart.yaml b/kubernetes/oof/charts/oof-has/Chart.yaml new file mode 100755 index 0000000000..a1ec5ac516 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Service +name: oof-has +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-api/Chart.yaml new file mode 100755 index 0000000000..01d4eec0e3 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Servicei - API +name: oof-has-api +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/NOTES.txt b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/NOTES.txt new file mode 100755 index 0000000000..b3622e396a --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.fullname" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml new file mode 100755 index 0000000000..2709371cb4 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml @@ -0,0 +1,109 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - oof-has-music + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - python + args: + - /usr/local/bin/conductor-api + - --port={{ .Values.service.internalPort }} + - -- + - --config-file=/usr/local/bin/conductor.conf + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/bin/conductor.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: conductor.conf + - mountPath: /usr/local/bin/log.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: log.conf + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ .Values.global.commonConfigPrefix }}-config + configMap: + name: {{ .Values.global.commonConfigPrefix }}-configmap + items: + - key: conductor.conf + path: conductor.conf + - key: log.conf + path: log.conf + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/service.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/service.yaml new file mode 100755 index 0000000000..58d1ab68b4 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/service.yaml @@ -0,0 +1,40 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-api/values.yaml new file mode 100755 index 0000000000..6114de329e --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/values.yaml @@ -0,0 +1,37 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +service: + type: NodePort + name: oof-has-api + externalPort: 8091 + internalPort: 8091 + nodePort: 75 + portName: oof-has-api +ingress: + enabled: false +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/.helmignore b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/Chart.yaml new file mode 100644 index 0000000000..501bd99dbb --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: OOF-HAS Cassandra +name: oof-has-cassandra +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/resources/config/cassandra/docker-entrypoint-initdb.d/zzz_conductor.cql b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/resources/config/cassandra/docker-entrypoint-initdb.d/zzz_conductor.cql new file mode 100644 index 0000000000..c2593eb1dc --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/resources/config/cassandra/docker-entrypoint-initdb.d/zzz_conductor.cql @@ -0,0 +1,90 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +CREATE KEYSPACE conductor WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; + +CREATE TABLE conductor.plans ( + id text PRIMARY KEY, + created bigint, + message text, + name text, + recommend_max int, + reservation_counter int, + reservation_owner text, + solution text, + solver_counter int, + solver_owner text, + status text, + template text, + timeout int, + translation text, + translation_counter int, + translation_owner text, + updated bigint, + vector_ts text +); + +CREATE INDEX conductor_plans_index ON conductor.plans(status); + +CREATE KEYSPACE conductor_rpc WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; + +CREATE TABLE conductor_rpc.controller ( + id text PRIMARY KEY, + action text, + args text, + created bigint, + ctxt text, + failure text, + method text, + owner text, + response text, + status text, + updated bigint, + vector_ts text +); + +CREATE TABLE conductor_rpc.data ( + id text PRIMARY KEY, + action text, + args text, + created bigint, + ctxt text, + failure text, + method text, + owner text, + response text, + status text, + updated bigint, + vector_ts text +); + +INSERT INTO admin.keyspace_master ( +uuid, application_name, is_aaf, is_api, keyspace_name, password,username) +VALUES ( now(), 'conductor', False, True, 'conductor', 'c0nduct0r', 'conductor'); + +INSERT INTO admin.keyspace_master ( +uuid, application_name, is_aaf, is_api, keyspace_name, password, username) +VALUES( now(), 'conductor', False, True, 'conductor_rpc', 'c0nduct0r', 'conductor'); + +CREATE ROLE IF NOT EXISTS conductor WITH PASSWORD = 'c0nduct0r' AND LOGIN = true; + +GRANT ALL PERMISSIONS on KEYSPACE conductor to 'conductor'; + +GRANT ALL PERMISSIONS on KEYSPACE conductor_rpc to 'conductor'; + +INSERT INTO conductor.plans (id, created, message, name, recommend_max, solution, status, template,timeout, translation,updated) VALUES('healthcheck',1479482603641,'','foo',1,'{"healthcheck": " healthcheck"}','solved','{"healthcheck": "healthcheck"}',3600,'{"healthcheck": "healthcheck"}',1484324150629); + + + diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/NOTES.txt b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/NOTES.txt new file mode 100644 index 0000000000..8f907c046c --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/configmap.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/configmap.yaml new file mode 100644 index 0000000000..e0fec186bb --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/configmap.yaml @@ -0,0 +1,22 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-docker-entry-initd + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/cassandra/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }} + diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/deployment.yaml new file mode 100644 index 0000000000..63f85c6640 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/deployment.yaml @@ -0,0 +1,104 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ include "common.name" . }} + image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + - containerPort: {{ .Values.service.internalPort3 }} + - containerPort: {{ .Values.service.internalPort4 }} + - containerPort: {{ .Values.service.internalPort5 }} + {{ if eq .Values.liveness.enabled true }} + livenessProbe: + exec: + command: + - /bin/bash + - -c + - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }' + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + exec: + command: + - /bin/bash + - -c + - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }' + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: CASSUSER + value: "{{ .Values.config.cassandraUsername }}" + - name: CASSPASS + value: "{{ .Values.config.cassandraPassword }}" + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - name: cassandra-docker-entrypoint-initdb + mountPath: /docker-entrypoint-initdb.d/zzz_conductor.cql + subPath: zzz_conductor.cql + - name: {{ include "common.fullname" . }}-data + mountPath: /var/lib/cassandra/data + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: cassandra-docker-entrypoint-initdb + configMap: + name: {{ include "common.fullname" . }}-docker-entry-initd + {{- if .Values.persistence.enabled }} + - name: {{ include "common.fullname" . }}-data + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pv.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pv.yaml new file mode 100644 index 0000000000..184728f8ad --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pv.yaml @@ -0,0 +1,37 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- end -}} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pvc.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pvc.yaml new file mode 100644 index 0000000000..e27c3311e9 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/pvc.yaml @@ -0,0 +1,48 @@ +{{/* +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + name: {{ include "common.fullname" . }} + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/service.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/service.yaml new file mode 100644 index 0000000000..12174314d5 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/templates/service.yaml @@ -0,0 +1,69 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + - port: {{ .Values.service.externalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.portName }}2 + - port: {{ .Values.service.externalPort3 }} + targetPort: {{ .Values.service.internalPort3 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} + name: {{ .Values.service.portName }}3 + - port: {{ .Values.service.externalPort4 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} + name: {{ .Values.service.portName }}4 + - port: {{ .Values.service.externalPort5 }} + targetPort: {{ .Values.service.internalPort5 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort5 }} + name: {{ .Values.service.portName }}5 + + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + - port: {{ .Values.service.externalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + name: {{ .Values.service.portName }}2 + - port: {{ .Values.service.externalPort3 }} + targetPort: {{ .Values.service.internalPort3 }} + name: {{ .Values.service.portName }}3 + - port: {{ .Values.service.externalPort4 }} + targetPort: {{ .Values.service.internalPort4 }} + name: {{ .Values.service.portName }}4 + - port: {{ .Values.service.externalPort5 }} + targetPort: {{ .Values.service.internalPort5 }} + name: {{ .Values.service.portName }}5 + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/values.yaml new file mode 100644 index 0000000000..9bb5af376f --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-cassandra/values.yaml @@ -0,0 +1,93 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Default values for mariadb. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + persistence: {} + + +# application image +repository: nexus3.onap.org:10001 +image: onap/music/cassandra_music:3.0.0 +pullPolicy: Always + +# application configuration +config: + cassandraUsername: root + cassandraPassword: Aa123456 + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +## Persist data to a persitent volume +persistence: + enabled: true + + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + volumeReclaimPolicy: Retain + + ## database data Persistent Volume Storage Class + ## If defined, storageClassName: <storageClass> + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + accessMode: ReadWriteMany + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: oof/cassandra/data +service: + type: ClusterIP + name: oof-has-cassandra + portName: oof-has-cassandra + externalPort: 9160 + internalPort: 9160 + externalPort2: 7000 + internalPort2: 7000 + externalPort3: 7001 + internalPort3: 7001 + externalPort4: 7199 + internalPort4: 7199 + externalPort5: 9042 + internalPort5: 9042 + +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-controller/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/Chart.yaml new file mode 100755 index 0000000000..d0e124e2ca --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Sservice - Controller +name: oof-has-controller +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml new file mode 100755 index 0000000000..5535f90631 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - oof-has-music + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - python + args: + - /usr/local/bin/conductor-controller + - --config-file=/usr/local/bin/conductor.conf + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/bin/conductor.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: conductor.conf + - mountPath: /usr/local/bin/log.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: log.conf + - mountPath: /usr/local/bin/healthy.sh + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: healthy.sh + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ .Values.global.commonConfigPrefix }}-config + configMap: + name: {{ .Values.global.commonConfigPrefix }}-configmap + items: + - key: conductor.conf + path: conductor.conf + - key: log.conf + path: log.conf + - key: healthy.sh + path: healthy.sh + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-controller/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/values.yaml new file mode 100755 index 0000000000..57c56d5e44 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/values.yaml @@ -0,0 +1,30 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ingress: + enabled: false +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-data/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-data/Chart.yaml new file mode 100755 index 0000000000..37d9f0dd8c --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-data/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Service - Data Component +name: oof-has-data +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-data/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-data/templates/deployment.yaml new file mode 100755 index 0000000000..4effba825e --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-data/templates/deployment.yaml @@ -0,0 +1,129 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - oof-has-music + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - python + args: + - /usr/local/bin/conductor-data + - --config-file=/usr/local/bin/conductor.conf + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/bin/conductor.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: conductor.conf + - mountPath: /usr/local/bin/log.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: log.conf + - mountPath: /usr/local/bin/healthy.sh + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: healthy.sh + - mountPath: /usr/local/bin/aai_cert.cer + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: aai_cert.cer + - mountPath: /usr/local/bin/aai_key.key + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: aai_key.key + - mountPath: /usr/local/bin/bundle.pem + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: bundle.pem + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ .Values.global.commonConfigPrefix }}-config + configMap: + name: {{ .Values.global.commonConfigPrefix }}-configmap + items: + - key: conductor.conf + path: conductor.conf + - key: log.conf + path: log.conf + - key: healthy.sh + path: healthy.sh + - key: aai_cert.cer + path: aai_cert.cer + - key: aai_key.key + path: aai_key.key + - key: bundle.pem + path: bundle.pem + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-data/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-data/values.yaml new file mode 100755 index 0000000000..57c56d5e44 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-data/values.yaml @@ -0,0 +1,30 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ingress: + enabled: false +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/Chart.yaml new file mode 100644 index 0000000000..a6653e4781 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP OOF-MUSIC Container +name: oof-has-music +version: 2.5.3 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/requirements.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/requirements.yaml new file mode 100644 index 0000000000..1e8f788318 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/music.properties b/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/music.properties new file mode 100644 index 0000000000..fe338a7e87 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/music.properties @@ -0,0 +1,27 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +my.public.ip=localhost +all.public.ips=localhost +my.id=0 +all.ids=0 +####################################### +# Optional current values are defaults +####################################### +zookeeper.host=oof-has-zk +cassandra.host=oof-has-cassandra +cassandra.user=root +cassandra.password=Aa123456 +# AAF Endpoint if using AAF +aaf.endpoint.url=https://aaf.api.simpledemo.onap.org diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/startup.sh b/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/startup.sh new file mode 100755 index 0000000000..1648f9a1b0 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/resources/config/startup.sh @@ -0,0 +1,35 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +OUT=$(curl -o /dev/null -s -w "%{http_code}\n" \ + http://localhost:8080/MUSIC/rest/v2/admin/onboardAppWithMusic \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -H 'Postman-Token: 705d4a9d-aaf2-40b4-914a-e0ce1a79534c' \ + -d '{ + "appname": "conductor", + "userId" : "conductor", + "isAAF" : false, + "password" : "c0nduct0r" +} +') + +if [ ${OUT} = "200" ]; then + echo "Success" + echo 1 > /tmp/onboarded + exit 0; +else + echo "Failure" + exit 1; +fi diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/NOTES.txt b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/NOTES.txt new file mode 100644 index 0000000000..70f97db28e --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/configmap.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/configmap.yaml new file mode 100644 index 0000000000..4ccc7cc526 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/configmap.yaml @@ -0,0 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/deployment.yaml new file mode 100644 index 0000000000..17114d6480 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/deployment.yaml @@ -0,0 +1,86 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: +# War Container + - name: "{{ include "common.name" . }}-war" + image: "{{ include "common.repository" . }}/{{ .Values.warImage }}" #" + command: ["cp","/app/MUSIC.war","/webapps"] + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + volumeMounts: + - mountPath: /webapps + name: shared-data + containers: + # Tomcat Container + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" #" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/tomcat/webapps + name: shared-data + - name: properties-music + mountPath: /opt/app/music/etc/music.properties + subPath: music.properties + - name: properties-music + mountPath: /opt/app/music/startup.sh + subPath: startup.sh + volumes: + - name: shared-data + emptyDir: {} + - name: localtime + hostPath: + path: /etc/localtime + - name: properties-music + configMap: + name: {{ include "common.fullname" . }}-configmap + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/service.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/service.yaml new file mode 100644 index 0000000000..58d1ab68b4 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/templates/service.yaml @@ -0,0 +1,40 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-music/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-music/values.yaml new file mode 100644 index 0000000000..c804cae92f --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-music/values.yaml @@ -0,0 +1,73 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repository: nexus3.onap.org:10001 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: library/tomcat:8.5 +pullPolicy: Always +warImage: onap/music/music:2.5.3 + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + usernameCassandra: cassandra1 + passwordCassandra: cassandra1 + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + name: oof-has-music + externalPort: 8080 + internalPort: 8080 + nodePort: 76 + portName: oof-has-music +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/Chart.yaml new file mode 100755 index 0000000000..e74c556dce --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Sevice - Reservation Component +name: oof-has-reservation +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/templates/deployment.yaml new file mode 100755 index 0000000000..8b610219b0 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - oof-has-music + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - python + args: + - /usr/local/bin/conductor-reservation + - --config-file=/usr/local/bin/conductor.conf + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + readinessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + {{ end -}} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/bin/conductor.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: conductor.conf + - mountPath: /usr/local/bin/log.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: log.conf + - mountPath: /usr/local/bin/healthy.sh + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: healthy.sh + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ .Values.global.commonConfigPrefix }}-config + configMap: + name: {{ .Values.global.commonConfigPrefix }}-configmap + items: + - key: conductor.conf + path: conductor.conf + - key: log.conf + path: log.conf + - key: healthy.sh + path: healthy.sh + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/values.yaml new file mode 100755 index 0000000000..57c56d5e44 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-reservation/values.yaml @@ -0,0 +1,30 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ingress: + enabled: false +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-solver/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/Chart.yaml new file mode 100755 index 0000000000..ebad46b7a7 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP Homing and Allocation Service - Solver Component +name: oof-has-solver +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml new file mode 100755 index 0000000000..9f9b4dbae5 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml @@ -0,0 +1,114 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - oof-has-music + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - python + args: + - /usr/local/bin/conductor-solver + - --config-file=/usr/local/bin/conductor.conf + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + exec: + command: + - cat + - /usr/local/bin/healthy.sh + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /usr/local/bin/conductor.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: conductor.conf + - mountPath: /usr/local/bin/log.conf + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: log.conf + - mountPath: /usr/local/bin/healthy.sh + name: {{ .Values.global.commonConfigPrefix }}-config + subPath: healthy.sh + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ .Values.global.commonConfigPrefix }}-config + configMap: + name: {{ .Values.global.commonConfigPrefix }}-configmap + items: + - key: conductor.conf + path: conductor.conf + - key: log.conf + path: log.conf + - key: healthy.sh + path: healthy.sh + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-solver/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/values.yaml new file mode 100755 index 0000000000..57c56d5e44 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/values.yaml @@ -0,0 +1,30 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ingress: + enabled: false +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +resources: {} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/Chart.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/Chart.yaml new file mode 100644 index 0000000000..95033bb35d --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: ONAP OOF Zookeeper +name: oof-has-zookeeper +version: 2.0.0 diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/NOTES.txt b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/NOTES.txt new file mode 100644 index 0000000000..8f907c046c --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/deployment.yaml new file mode 100644 index 0000000000..c161f73231 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/deployment.yaml @@ -0,0 +1,70 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ include "common.name" . }} + image: {{ include "common.repository" . }}/{{ .Values.image }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + {{- if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/service.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/service.yaml new file mode 100644 index 0000000000..4e4c1c8358 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/templates/service.yaml @@ -0,0 +1,38 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.externalPort }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + {{- end}} + name: {{ .Values.service.portName }} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }}
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/values.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/values.yaml new file mode 100644 index 0000000000..7a069c6685 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-zookeeper/values.yaml @@ -0,0 +1,51 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Default values for mariadb. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + persistence: {} + + +# application image +repository: nexus3.onap.org:10001 +image: zookeeper:3.4 +pullPolicy: Always + +# default number of instances +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +service: + type: ClusterIP + name: oof-has-zk + externalPort: 2181 + internalPort: 2181 + portName: oof-has-zookeeper +ingress: + enabled: false +resources: {} diff --git a/kubernetes/oof/charts/oof-has/requirements.yaml b/kubernetes/oof/charts/oof-has/requirements.yaml new file mode 100755 index 0000000000..ce82a2f838 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local' diff --git a/kubernetes/oof/charts/oof-has/resources/config/aai_cert.cer b/kubernetes/oof/charts/oof-has/resources/config/aai_cert.cer new file mode 100755 index 0000000000..4c6eb916e6 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/aai_cert.cer @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIBHjANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJVUzEN
+MAsGA1UECgwET05BUDEOMAwGA1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVk
+aWF0ZUNBXzEwHhcNMTgwNDI1MTIxMzAxWhcNMTkwNDIwMTIxMzAxWjBtMQswCQYD
+VQQGEwJVUzENMAsGA1UECgwET05BUDEZMBcGA1UECwwQb29mQG9vZi5vbmFwLm9y
+ZzEOMAwGA1UECwwFT1NBQUYxJDAiBgNVBAMMG29vZi5hcGkuc2ltcGxlZGVtby5v
+bmFwLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANGpQUtgLXG3
+dVikd/QC2Q24wzeTOeZzbx3PnidNYZT5K0sJ/TdnZF6O/4+9gXQ6AQS2Q8wfQ009
+MQAA5vhUaq5yZ2K+XAtEFGln1TxTFpGu3WDOwQ800Vw18Dk8WidrkzDJv489Bn1f
+SSaPC0IaRB0K1d8BD63ZHgsuEY8lt31DX2wFWJcfN9mxNDzuLTZoLxtxKsedoZKH
+rsOOILwXOhwuunfx40i6RQN/pFX6C2i8dtOA5OwUm9Q1RrZ2Tv1Uf4IURriH6bfZ
+5n50yxTuL22TMYXsF/ohrdgwacuC0aV9ZSGhIZUJPyHVg7+QTBioHmoUJInVKuIx
+kkC4lENbLYUCAwEAAaOB+jCB9zAJBgNVHRMEAjAAMBEGCWCGSAGG+EIBAQQEAwIG
+wDAzBglghkgBhvhCAQ0EJhYkT3BlblNTTCBHZW5lcmF0ZWQgU2VydmVyIENlcnRp
+ZmljYXRlMB0GA1UdDgQWBBQwbU5oHU2iYHCoVz4hFCvBW59cdTBUBgNVHSMETTBL
+gBQd5lldG54KOKRipsGF8/PP1vGX6qEwpC4wLDEOMAwGA1UECwwFT1NBQUYxDTAL
+BgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEBMA4GA1UdDwEB/wQEAwIF4DAdBgNV
+HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADEa
+0VuxoFIygeQTqlizpHNwfApPmlAVSKDTWuEu4rhJs8GT61EuWZQPygXEUHCYmGvJ
+GMwEGGIDGiQqxMqlqng46gksNJbi1ktXr6Du18qW7gziUd84ve8KcecjZru1Sk1e
+UJ/6WEQVE17CHKcnzQZsMDakgP+61VgKbk5NlkeF/Qh4L6/3jY7g+xoXqaId5RT9
+BetmH/cMsj33lxQTs0fcXTbAQd6BX5ug854OJ1mU4ngJnNBdmn9Ow1bB71ohf5Xv
+OEYX8+khjgjlmM0u1hBRL4qViv3y2Gzhpm1M8cETMDj4g0zIJytzIYMxO8XvDPCF
+YmVZHXJDLsCogSOmmh0=
+-----END CERTIFICATE-----
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/resources/config/aai_key.key b/kubernetes/oof/charts/oof-has/resources/config/aai_key.key new file mode 100755 index 0000000000..246ff6d8cb --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/aai_key.key @@ -0,0 +1,30 @@ +-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIvxjZPeQVkRACAggA
+MBQGCCqGSIb3DQMHBAhWqwQCjZFCrASCBMjWG5wsC1WFJISJ5odMHzYOWOKLpaDP
+7a/dxnBrV6gId/DTmzoqtiBCmQRqhnUuYok98DNUFGjR9JqztNNOf5eslzqCugsh
+zVwCvsJYKvxxJ4Q8tow3DKx28I6EmOvwudMsL9c30OxpEWdlWmyFimu5JDdDvWUH
+S0fWKebQETZ7lptiRX2IXhC3Ye6Wu/DowDYc5L4Z/Q8nwncMB3n2ntMX10pBrura
+15/R18AvG5cDwcasTXz5WKIB/K2onvJfW0so2M8jApu2DF4MpEIN9Z973uTNFXcL
+dgHKWtIl2WO38coedaXUILgsxLSSU27TG4F+7QMGjiKXUSWjN9+TD+8zWye/9OIW
+qfVtoh+n7lWtzC3Axo1OmPInCkFb+I7QaDsJgsUn+ZWap7FVJFrYiz20UTzYYgAK
+OukCgKiJTHOhTT1k0km34ROPmqOk6mH7IkioUSTmoP362RpIVTbKv2e5GKzhYfkk
+27W3RRG/qoZLUTU2AaAyoGZlzXDkBFw2g4vxnhcfHeXX6jyJyQWOOOeRJ5B6uc+Y
+4XmKKJvq5pFlxUDmVCZLRzjwpvYPTQwTQQ9t7kEZFI8B7TMkDqv62YlXyoWNDwPq
+yLvDwPDicx33AZor8N/eDgIOE+TXQ0vEyphf0c9OcgneeJmEtn7IskEahv32ruMQ
+uFAAuIUmQfXPNMXu3MYIUItvZDm3RUk3YJDj9c8YtvxDlzLytHu5QYJ3v7rvo+mG
+XKwmnZouaNRLw5Y7Mff07BuTPuttyNadacuJtUjvv8qVOIeuxQ7nku6yqKKLTeJr
+8E4/tYyZ15FIo3hWi16h3zyZ9LiHhhe7d2XYSVMuzuD4jkIdHbdgiKsCJn9mI5PF
+VpDF34w1Fjwv7Gu32MRMpJijAW10ENaP1O2izr9l8jwo+CLgi5qa6a2YTYAZooqt
+UjTLfEIQKbwFbq5L9Eb1uRw1lRR9SxcxdNQdY+mtx0x2BSmXVUEcyi6OG/8Lzf/1
+9VoE5UPfhSE7ogfbL8eraFlQmKL8f3h3Jx/XDvvKC8YXxgooEhV0BsofXmLdF0BK
+bhXR1/JptLz8CJjtlBWQkmqj+ONOHFA9/4YHMNn5T1PBLNzQCZSjQXrDKxowLDsI
+ozUyZ080c2LrJCf6zj6+fB3LDvHYfJ6LnYASCHJlNS0NVmRPiYB/dmoqF/iyAEjp
+cKUUrbhs6U95aPMo0pPSCuhLKiibCo3Vz/9dvGb7pr6aj/ehOjrtKtGlYukBqNkS
+RQK2kkL8IO+iPWs3aCnEhfeS+wNBMAtI/TEw6As2zseyb3/SylHjek4s1gs9MPdw
+c3o2ArwMzmP0sfFIjYz+AyQm+5i/LSnkNjG0OU9ekGXy7Z4HAcko2Dv8/SmOVapP
+cf8c55RUDlYJh9Ltn0W5fuNA6dykV7f9s8BIrZcnzTN+lifNhNlEYYcmyZwlCcX4
+NBLoH+ENW+Q7+nuhGcf52j/XgTaPZ0Eec8ZJdK7FzVDN4DWKM4KHD7DgpkOR7TZl
+IKGNtdvb3SaGG83YlJhRkkr0C2KvB0Mz2dkAhOKX3NkBr5fY62IvuMdqD7VDjGAw
+h/GBn0k5+gpVP0Uh6yWEla3CjM9GnUuMVcwIUAYSeW2rFu4iapK0gBwguR91cM1N
+MA8=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/kubernetes/oof/charts/oof-has/resources/config/bundle.pem b/kubernetes/oof/charts/oof-has/resources/config/bundle.pem new file mode 100755 index 0000000000..60121e751b --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/bundle.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE-----
+MIIEVDCCAjygAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
+RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwNDA1MTQxNTQwWhcN
+MTgwNjA0MTQxNTQwWjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
+A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzEwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCY3YPA/YQdz4kaZQzdRzWNjmn33WYAWZ8+
+EIz3PhkEzk7M1q9N7Icx2LvozMj4VH0yGz/HYlliHhw26ZRsjYMSR8zATsXl4oW9
+w9BrjuyvM3w8Ptxe8WbUFF9LJDGyXPeVvcXVo0iyh3QYPWC/AWmomN19MvBFN5vH
+AvEG/7qtonViNfISW9Gr9LpXB0foCmUDBu/lV+SwRGajoCPqdZhZ6/L6/yqDvha2
+wsML/UZXlGhXAedt/xOKmT/dSXx/I0vWBVp6Tq4zu87yCvd+I6Tpa5HjttA2I5EV
+zdHX+JYBPBBcVCyO9YQOYjJuoVDE4D5etY6dEipKG/KZF/rqAoqZAgMBAAGjZjBk
+MB0GA1UdDgQWBBQd5lldG54KOKRipsGF8/PP1vGX6jAfBgNVHSMEGDAWgBRTVTPy
+S+vQUbHBeJrBKDF77+rtSTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAmgeiitBDi/YEqFh2Cqp0VIEqw8hiuV87
+rADQWMK4hv5WXl3KJTjFAnWsYFUKrm6s1jNH16FyGExUQgwggob0Vt+MHiUs36jU
+kyret/uE5qrjz+/J+i2XG6s1oKcDRVD/jU4qBygZWFBMuwl7sz8IEvaYXGM43s96
+Du3UF9E+V3aMppqkGWz6MnrTmANnWAlDAMeifcoexjrpxiKbp8f49HX1UzwFoeEg
+RnVwNqgDWT66yGV6mbNl6FpE/U81RpCRY1ZJDeVTxbqIaG/UPV4hpQ+BEVBDF+cb
+rGsvsNYYpWx5srIQ7WtGKIlaDFbfWPwnHDHegzr8ypAS3KNWULE+QXCbHWtB+b0Y
+WhP/2F6Jjb+ByvJqQoE+nHEYBeUOZUUZC4IuQFNJ5Wy5P0CNXdheiWhdrBmG02Gy
+KMi0FJx6BEoWM2xcdl6bn5j9mhF4TX7zgepNWlgTra4Z8Oz8iqbQk33/s2OKM4ic
+6ZezUYhNp+MuUt4Se+ufNcGV65jnUKeROtWzNLwP+xwglEFlG8aNiAORthd7QJuT
+Ey2cX7H7f38ENQ5YCriUk1nVLO9F66l/rNRzYZgQzRI3IvDW8vyM2TLW2mcZNsaf
+qjFMcCDweV2FRb8eTbmWzzB2/xTVpGzVJqzwgE+U7UtJx5CZS3wPkvXuEgvcg1tY
+m1r4NGYFvLM=
+-----END CERTIFICATE-----
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/resources/config/conductor.conf b/kubernetes/oof/charts/oof-has/resources/config/conductor.conf new file mode 100755 index 0000000000..4d32deea33 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/conductor.conf @@ -0,0 +1,357 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[DEFAULT] + +# +# From conductor +# + +# Configuration file for WSGI definition of API. (string value) +#api_paste_config = api_paste.ini + +# Music keyspace for content (string value) +keyspace = conductor + +# +# From oslo.log +# + +# If set to true, the logging level will be set to DEBUG instead of the default +# INFO level. (boolean value) +# Note: This option can be changed without restarting. +debug = true + +# DEPRECATED: If set to false, the logging level will be set to WARNING instead +# of the default INFO level. (boolean value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +#verbose = true + +# The name of a logging configuration file. This file is appended to any +# existing logging configuration files. For details about logging configuration +# files, see the Python logging module documentation. Note that when logging +# configuration files are used then all logging configuration is set in the +# configuration file and other logging configuration options are ignored (for +# example, logging_context_format_string). (string value) +# Note: This option can be changed without restarting. +# Deprecated group/name - [DEFAULT]/log_config +# log_config_append = /usr/local/bin/log.conf + +# Defines the format string for %%(asctime)s in log records. Default: +# %(default)s . This option is ignored if log_config_append is set. (string +# value) +#log_date_format = %Y-%m-%d %H:%M:%S + +# (Optional) Name of log file to send logging output to. If no default is set, +# logging will go to stderr as defined by use_stderr. This option is ignored if +# log_config_append is set. (string value) +# Deprecated group/name - [DEFAULT]/logfile +#log_file = <None> + +# (Optional) The base directory used for relative log_file paths. This option +# is ignored if log_config_append is set. (string value) +# Deprecated group/name - [DEFAULT]/logdir +#log_dir = <None> + +# Uses logging handler designed to watch file system. When log file is moved or +# removed this handler will open a new log file with specified path +# instantaneously. It makes sense only if log_file option is specified and +# Linux platform is used. This option is ignored if log_config_append is set. +# (boolean value) +#watch_log_file = false + +# Use syslog for logging. Existing syslog format is DEPRECATED and will be +# changed later to honor RFC5424. This option is ignored if log_config_append +# is set. (boolean value) +#use_syslog = false + +# Syslog facility to receive log lines. This option is ignored if +# log_config_append is set. (string value) +#syslog_log_facility = LOG_USER + +# Log output to standard error. This option is ignored if log_config_append is +# set. (boolean value) +#use_stderr = false + +# Format string to use for log messages with context. (string value) +#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s + +# Format string to use for log messages when context is undefined. (string +# value) +#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s + +# Additional data to append to log message when logging level for the message +# is DEBUG. (string value) +#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d + +# Prefix each line of exception output with this format. (string value) +#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s + +# Defines the format string for %(user_identity)s that is used in +# logging_context_format_string. (string value) +#logging_user_identity_format = %(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s + +# List of package logging levels in logger=LEVEL pairs. This option is ignored +# if log_config_append is set. (list value) +#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO + +# Enables or disables publication of error events. (boolean value) +#publish_errors = false + +# The format for an instance that is passed with the log message. (string +# value) +#instance_format = "[instance: %(uuid)s] " + +# The format for an instance UUID that is passed with the log message. (string +# value) +#instance_uuid_format = "[instance: %(uuid)s] " + +# Interval, number of seconds, of log rate limiting. (integer value) +#rate_limit_interval = 0 + +# Maximum number of logged messages per rate_limit_interval. (integer value) +#rate_limit_burst = 0 + +# Log level name used by rate limiting: CRITICAL, ERROR, INFO, WARNING, DEBUG +# or empty string. Logs with level greater or equal to rate_limit_except_level +# are not filtered. An empty string means that all levels are filtered. (string +# value) +#rate_limit_except_level = CRITICAL + +# Enables or disables fatal status of deprecations. (boolean value) +#fatal_deprecations = false + + +[aai] + +# +# From conductor +# + +# Interval with which to refresh the local cache, in minutes. (integer value) +cache_refresh_interval = 1 +complex_cache_refresh_interval = 60 + +# Data Store table prefix. (string value) +#table_prefix = aai + +# Base URL for A&AI, up to and not including the version, and without a +# trailing slash. (string value) +server_url = https://oof.api.simpledemo.onap.org:8443/aai + +# The version of A&AI in v# format. (string value) +server_url_version = v11 + +# SSL/TLS certificate file in pem format. This certificate must be registered +# with the A&AI endpoint. (string value) +certificate_file = /usr/local/bin/aai_cert.cer + +# Private Certificate Key file in pem format. (string value) +certificate_key_file = /usr/local/bin/aai_key.key + +# Certificate Authority Bundle file in pem format. Must contain the appropriate +# trust chain for the Certificate file. (string value) +#certificate_authority_bundle_file = /opt/app/conductor/etc/certs/ca_bundle.pem +certificate_authority_bundle_file =/usr/local/bin/bundle.pem + +[api] + +# +# From conductor +# + +# Toggle Pecan Debug Middleware. (boolean value) +#pecan_debug = false + +# Default maximum number of items returned by API request. (integer value) +# Minimum value: 1 +#default_api_return_limit = 100 + +[conductor_api] + +# Basic Authentication Username (string value) +username = admin1 + +# Basic Authentication Password (string value) +password = plan.15 + +basic_auth_secure = False + +[controller] + +# +# From conductor +# + +# Timeout for planning requests. Default value is 10. (integer value) +# Minimum value: 1 +timeout = 200 + +# Maximum number of result sets to return. Default value is 1. (integer value) +# Minimum value: 1 +#limit = 1 + +# Number of workers for controller service. Default value is 1. (integer value) +# Minimum value: 1 +#workers = 1 + +# Time between checking for new plans. Default value is 1. (integer value) +# Minimum value: 1 +#polling_interval = 1 +concurrent = true + + +[inventory_provider] + +# +# From conductor +# + +# Extensions list to use (list value) +#extensions = aai + + +[messaging_server] + +# +# From conductor +# + +# Music keyspace for messages (string value) +keyspace = conductor_rpc + +# Wait interval while checking for a message response. Default value is 1 +# second. (integer value) +# Minimum value: 1 +#check_interval = 1 + +# Overall message response timeout. Default value is 10 seconds. (integer +# value) +# Minimum value: 1 +timeout = 300 + +# Number of workers for messaging service. Default value is 1. (integer value) +# Minimum value: 1 +#workers = 1 + +# Time between checking for new messages. Default value is 1. (integer value) +# Minimum value: 1 +#polling_interval = 1 + +# Log debug messages. Default value is False. (boolean value) +#debug = false + + +[music_api] + +# +# From conductor +# +music_new_version = True +# Base URL for Music REST API without a trailing slash. (string value) +server_url = http://oof-has-music:8080/MUSIC/rest/v2 +version = v2 +music_version = "2.5.3" +aafuser = conductor +aafpass = c0nduct0r +aafns = conductor + +# DEPRECATED: List of hostnames (round-robin access) (list value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Use server_url instead +#hostnames = <None> + +# DEPRECATED: Port (integer value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Use server_url instead +#port = <None> + +# DEPRECATED: Path (string value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Use server_url instead +#path = <None> + +# Lock timeout (integer value) +#lock_timeout = 10 +replication_factor = 1 +# Log debug messages. Default value is False. (boolean value) +#debug = false + +# Use mock API (boolean value) +#mock = false + +# Socket connection timeout (floating point value) +connect_timeout = 3.05 + +# Socket read timeout (floating point value) +read_timeout = 12.05 + + + +[sdnc] + +# +# From conductor +# + +# Interval with which to refresh the local cache, in minutes. (integer value) +#cache_refresh_interval = 1440 + +# Data Store table prefix. (string value) +#table_prefix = sdnc + +# Base URL for SDN-C, up to and including the version. (string value) +server_url = https://sdncodl-conexus-e2e.ecomp.cci.att.com:8543/restconf/ + +# Basic Authentication Username (string value) +username = admin + +# Basic Authentication Password (string value) +password = sdnc.15 + + +[service_controller] + +# +# From conductor +# + +# Extensions list to use (list value) +#extensions = sdnc + + +[solver] + +# +# From conductor +# + +# Number of workers for solver service. Default value is 1. (integer value) +# Minimum value: 1 +#workers = 1 + +# Set to True when solver will run in active-active mode. When set to False, +# solver will restart any orphaned solving requests at startup. (boolean value) +#concurrent = false +concurrent = true + + + +[reservation] +concurrent = true + diff --git a/kubernetes/oof/charts/oof-has/resources/config/healthy.sh b/kubernetes/oof/charts/oof-has/resources/config/healthy.sh new file mode 100755 index 0000000000..9b53975d63 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/healthy.sh @@ -0,0 +1,29 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +# Controller is a process that reads from Music Q +# It uses no ports (TCP or HTTP). The PROB will check +# if the controller process exists or not. In case +# it exists, it will send 0, else send 1 so k8s can i +# restart the container + +pid="$(pgrep -f '/usr/local/bin/conductor')" +if [ -z "$pid" ] +then + echo 1 +else + echo 0 +fi diff --git a/kubernetes/oof/charts/oof-has/resources/config/log.conf b/kubernetes/oof/charts/oof-has/resources/config/log.conf new file mode 100755 index 0000000000..4dc2793c2c --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/log.conf @@ -0,0 +1,78 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[loggers] +keys=root + +[handlers] +keys=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[logger_root] +level=NOTSET +handlers=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[handler_consoleHandler] +class=StreamHandler +level=NOTSET +formatter=generic +args=(sys.stdout,) + +[handler_trfhand] +class=handlers.TimedRotatingFileHandler +level=NOTSET +formatter=generic +args=('application.log','midnight', 1, 10) + +[handler_audithand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=audit +args=('audit.log', 'midnight', 1, 10) + +[handler_metrichand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=metric +args=('metric.log','midnight', 1, 10) + +[handler_errhand] +class=handlers.TimedRotatingFileHandler +level=ERROR +formatter=error +args=('error.log','midnight', 1, 10) + +[handler_debughand] +class=handlers.TimedRotatingFileHandler +level=DEBUG +formatter=generic +args=('debug.log','midnight', 1, 10) + +[formatters] +keys=generic,audit,metric,error + +[formatter_audit] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s|||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_metric] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|N/A|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s||||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_error] +format=%(asctime)s|00000000-0000-0000-0000-000000000000|%(thread)d|Conductor|N/A|N/A|N/A|ERROR|500|N/A|%(name)s : [-] %(message)s +datefmt= + +[formatter_generic] +format=%(asctime)s||%(thread)d|%(levelname)s|%(module)s|%(name)s: [-] %(message)s +datefmt= diff --git a/kubernetes/oof/charts/oof-has/resources/config/log/filebeat.yml b/kubernetes/oof/charts/oof-has/resources/config/log/filebeat.yml new file mode 100755 index 0000000000..7c8ddec2c3 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/resources/config/log/filebeat.yml @@ -0,0 +1,31 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*/*.log + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry diff --git a/kubernetes/oof/charts/oof-has/templates/configmap.yaml b/kubernetes/oof/charts/oof-has/templates/configmap.yaml new file mode 100755 index 0000000000..78e63d4435 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/templates/configmap.yaml @@ -0,0 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.global.commonConfigPrefix }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/oof/charts/oof-has/values.yaml b/kubernetes/oof/charts/oof-has/values.yaml new file mode 100755 index 0000000000..52428bdd12 --- /dev/null +++ b/kubernetes/oof/charts/oof-has/values.yaml @@ -0,0 +1,34 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + repository: nexus3.onap.org:10001 + commonConfigPrefix: onap-oof-has + image: + readiness: oomk8s/readiness-check:1.1.0 + optf_has: onap/optf-has:1.1.1 + filebeat: docker.elastic.co/beats/filebeat:5.5.0 + +nsPrefix: onap +pullPolicy: Always +nodePortPrefix: 302 +dataRootDir: /dockerdata-nfs diff --git a/kubernetes/oof/requirements.yaml b/kubernetes/oof/requirements.yaml new file mode 100755 index 0000000000..ce82a2f838 --- /dev/null +++ b/kubernetes/oof/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: common + version: ~2.0.0 + repository: '@local' diff --git a/kubernetes/oof/resources/config/osdf_config.yaml b/kubernetes/oof/resources/config/osdf_config.yaml new file mode 100755 index 0000000000..7fe63a50c8 --- /dev/null +++ b/kubernetes/oof/resources/config/osdf_config.yaml @@ -0,0 +1,53 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Credentials for the OOF placement service – SO. Newly added. +osdfPlacementSOUsername: {{ .Values.config.osdfPlacementSOUsername }} +osdfPlacementSOPassword: {{ .Values.config.osdfPlacementSOPassword }} + +# Credentials for the OOF CM scheduling service – Generic. Newly added +osdfCMSchedulerUsername: {{ .Values.config.osdfCMSchedulerUsername }} +osdfCMSchedulerPassword: {{ .Values.config.osdfCMSchedulerPassword }} + +# msoUrl: "" # The SO url for call back. This will be part of the request, so no need +soUsername: {{ .Values.config.soUsername }} +soPassword: {{ .Values.config.soPassword }} + +conductorUrl: "{{.Release.Name}}-has-api.{{include "common.namespace" .}}:TODO-PORT-FOR-HAS-API" +conductorUsername: {{ .Values.config.conductorUsername }} +conductorPassword: {{ .Values.config.conductorPassword }} +conductorPingWaitTime: {{ .Values.config.conductorPingWaitTime }} +conductorMaxRetries: {{ .Values.config.conductorMaxRetries }} + +# Policy Platform -- requires ClientAuth, Authorization, and Environment +policyPlatformUrl: {{ .Values.config.policyPlatformUrl }} +policyPlatformEnv: {{ .Values.config.policyPlatformEnv }} +policyPlatformUsername: {{ .Values.config.policyPlatformUsername }} +policyPlatformPassword: {{ .Values.config.policyPlatformPassword }} +policyClientUsername: {{ .Values.config.policyClientUsername }} +policyClientPassword: {{ .Values.config.policyClientPassword }} + +messageReaderHosts: {{ .Values.config.messageReaderHosts }} +messageReaderTopic: {{ .Values.config.messageReaderTopic }} +messageReaderAafUserId: {{ .Values.config.messageReaderAafUserId }} +messageReaderAafPassword: {{ .Values.config.messageReaderAafPassword }} + +sdcUrl: {{ .Values.config.sdcUrl }} +sdcUsername: {{ .Values.config.sdcUsername }} +sdcPassword: {{ .Values.config.sdcPassword }} +sdcONAPInstanceID: {{ .Values.config.sdcONAPInstanceID }} + +osdfPlacementUsername: {{ .Values.config.osdfPlacementUsername }} +osdfPlacementPassword: {{ .Values.config.osdfPlacementPassword }} diff --git a/kubernetes/oof/templates/NOTES.txt b/kubernetes/oof/templates/NOTES.txt new file mode 100644 index 0000000000..ee1b36508d --- /dev/null +++ b/kubernetes/oof/templates/NOTES.txt @@ -0,0 +1,33 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/oof/templates/configmap.yaml b/kubernetes/oof/templates/configmap.yaml new file mode 100644 index 0000000000..4ccc7cc526 --- /dev/null +++ b/kubernetes/oof/templates/configmap.yaml @@ -0,0 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file diff --git a/kubernetes/oof/templates/deployment.yaml b/kubernetes/oof/templates/deployment.yaml new file mode 100644 index 0000000000..30a313c7d3 --- /dev/null +++ b/kubernetes/oof/templates/deployment.yaml @@ -0,0 +1,100 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - pdp + - --container-name + - oof-has-api + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/config/osdf_config.yaml + name: {{ include "common.fullname" . }}-config + subPath: osdf_config.yaml + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-config + configMap: + name: {{ include "common.fullname" . }}-configmap + items: + - key: osdf_config.yaml + path: osdf_config.yaml + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/oof/templates/service.yaml b/kubernetes/oof/templates/service.yaml new file mode 100644 index 0000000000..66a26868e2 --- /dev/null +++ b/kubernetes/oof/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/oof/values.yaml b/kubernetes/oof/values.yaml new file mode 100644 index 0000000000..4196cd23b5 --- /dev/null +++ b/kubernetes/oof/values.yaml @@ -0,0 +1,97 @@ +# Copyright © 2017 Amdocs, AT&T, Bell Canada, VMware +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/optf-osdf:latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration +config: + msbgateway: msb-iag.{{ include "common.namespace" . }} + msbPort: 80 + # Credentials for the OOF placement service – SO. + osdfPlacementSOUsername: so_test + osdfPlacementSOPassword: so_testpwd + # Credentials for the OOF CM scheduling service – Generic. + osdfCMSchedulerUsername: test1 + osdfCMSchedulerPassword: testpwd1 + # Credentials of the callback url for SO. + soUsername: "" # SO username for call back. + soPassword: "" # SO password for call back. + # Url and credentials for Conductor. + conductorUrl: https://oof-has-api.{{ include "common.namespace" . }}:8091/v1/plans/ + conductorUsername: admin1 + conductorPassword: plan.15 + conductorPingWaitTime: 60 + conductorMaxRetries: 30 + # Url and credentials for the Policy Platform + policyPlatformUrl: http://pdp:8081/pdp/api/getConfig # Policy Dev platform URL + policyPlatformEnv: TEST # Environment for policy platform + policyPlatformUsername: testpdp # Policy platform username. + policyPlatformPassword: alpha123 # Policy platform password. + policyClientUsername: python # For use with ClientAuth + policyClientPassword: test # For use with ClientAuth + # Credentials for the message reader - A placeholder. + messageReaderHosts: NA + messageReaderTopic: NA + messageReaderAafUserId: NA + messageReaderAafPassword: NA + # Credentials for the SDC interface - A placeholder. + sdcUrl: NA + sdcUsername: NA + sdcPassword: NA + sdcONAPInstanceID: NA + # Credentials for the placement service – Generic. + osdfPlacementUsername: "test" + osdfPlacementPassword: "testpwd" +# default number of instances +replicaCount: 1 +nodeSelector: {} +affinity: {} +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 +service: + type: NodePort + name: oof-osdf + externalPort: 8698 + internalPort: 8699 + nodePort: 48 +ingress: + enabled: false +resources: {} diff --git a/kubernetes/policy/charts/brmsgw/templates/deployment.yaml b/kubernetes/policy/charts/brmsgw/templates/deployment.yaml index e0969022f6..fabef681f4 100644 --- a/kubernetes/policy/charts/brmsgw/templates/deployment.yaml +++ b/kubernetes/policy/charts/brmsgw/templates/deployment.yaml @@ -51,7 +51,7 @@ spec: - ./do-start.sh - brmsgw name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.externalPort }} diff --git a/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml b/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml index c59ed08f3f..1734952b63 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/templates/deployment.yaml @@ -40,21 +40,21 @@ spec: name: nexus-data containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.externalPort }} {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.externalPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: httpGet: path: {{ .Values.readiness.path }} - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.externalPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: diff --git a/kubernetes/policy/charts/drools/charts/nexus/templates/pv.yaml b/kubernetes/policy/charts/drools/charts/nexus/templates/pv.yaml index 8be3d4c9cb..da117f4919 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/templates/pv.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/templates/pv.yaml @@ -33,5 +33,5 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/policy/charts/drools/charts/nexus/templates/service.yaml b/kubernetes/policy/charts/drools/charts/nexus/templates/service.yaml index ded46572a1..594950e647 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/templates/service.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/templates/service.yaml @@ -23,10 +23,17 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: + type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.internalPort }} + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - clusterIP: None diff --git a/kubernetes/policy/charts/drools/charts/nexus/values.yaml b/kubernetes/policy/charts/drools/charts/nexus/values.yaml index 667987640b..55b231a091 100644 --- a/kubernetes/policy/charts/drools/charts/nexus/values.yaml +++ b/kubernetes/policy/charts/drools/charts/nexus/values.yaml @@ -62,7 +62,8 @@ service: type: NodePort name: nexus portName: nexus - internalPort: 8081 + externalPort: 8081 + nodePort: 36 ingress: enabled: false diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh new file mode 100644 index 0000000000..8b290128b3 --- /dev/null +++ b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +# + +# ################################# +# Usage +# ################################# + +function usage { + echo + echo "Usage: $(basename $0)" + echo +} + +if [[ ${DEBUG} == y ]]; then + set -x +fi + +if [[ -z ${BUILD_VERSION} ]]; then + echo "no BUILD_VERSION available as environment variable"" + usage + exit 1 +fi + +if [[ -z ${POLICY_INSTALL} ]]; then + echo "no POLICY_INSTALL available as environment variable"" + usage + exit 2 +fi + +CONFIG_DIR=$(dirname "$0") +echo "invoking ${CONFIG_DIR}/apps-install.sh for controlloop ${BUILD_VERSION} at ${POLICY_INSTALL}" +export DEBUG=y +bash ${CONFIG_DIR}/apps-install.sh controlloop ${BUILD_VERSION} ${POLICY_INSTALL} +unzip -o ${POLICY_INSTALL}/app*.zip -d ${POLICY_INSTALL} diff --git a/kubernetes/policy/charts/drools/resources/scripts/do-start.sh b/kubernetes/policy/charts/drools/resources/scripts/do-start.sh deleted file mode 100644 index 1c40e11b16..0000000000 --- a/kubernetes/policy/charts/drools/resources/scripts/do-start.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada, AT&T -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -#!/bin/bash - -# skip installation if build.info file is present (restarting an existing container) -if [[ -f /opt/app/policy/etc/build.info ]]; then - echo "Found existing installation, will not reinstall" - . /opt/app/policy/etc/profile.d/env.sh -else - # replace conf files from installer with environment-specific files - # mounted from the hosting VM - if [[ -d config ]]; then - cp config/*.conf . - fi - - ./docker-install.sh - - . /opt/app/policy/etc/profile.d/env.sh - - # install policy keystore - mkdir -p $POLICY_HOME/etc/ssl - cp config/policy-keystore $POLICY_HOME/etc/ssl - - if [[ -x config/drools-tweaks.sh ]] ; then - echo "Executing tweaks" - # file may not be executable; running it as an - # argument to bash avoids needing execute perms. - bash config/drools-tweaks.sh - fi - - # sql provisioning scripts should be invoked here. -fi - -echo "Starting processes" - -policy start - -sleep 1000d diff --git a/kubernetes/policy/charts/drools/templates/configmap.yaml b/kubernetes/policy/charts/drools/templates/configmap.yaml index 36f458f5a4..29b1c56b89 100644 --- a/kubernetes/policy/charts/drools/templates/configmap.yaml +++ b/kubernetes/policy/charts/drools/templates/configmap.yaml @@ -31,14 +31,6 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-script-configmap - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/scripts/do-start.sh*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: name: {{ include "common.fullname" . }}-log-configmap namespace: {{ include "common.namespace" . }} data: diff --git a/kubernetes/policy/charts/drools/templates/statefulset.yaml b/kubernetes/policy/charts/drools/templates/statefulset.yaml index 5dd49edfec..9041478c8c 100644 --- a/kubernetes/policy/charts/drools/templates/statefulset.yaml +++ b/kubernetes/policy/charts/drools/templates/statefulset.yaml @@ -57,7 +57,7 @@ spec: - "aai.api.simpledemo.openecomp.org" containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.externalPort }} @@ -85,9 +85,6 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /tmp/policy-install/config/policy-keystore - name: drools-secret - subPath: policy-keystore - mountPath: /tmp/policy-install/config/feature-healthcheck.conf name: drools-secret subPath: feature-healthcheck.conf @@ -103,6 +100,9 @@ spec: - mountPath: /tmp/policy-install/config/apps-install.sh name: drools-config subPath: apps-install.sh + - mountPath: /tmp/policy-install/config/drools-preinstall.sh + name: drools-config + subPath: drools-preinstall.sh - mountPath: /usr/share/maven/conf/settings.xml name: drools-settingsxml subPath: settings.xml @@ -111,9 +111,6 @@ spec: - mountPath: /tmp/logback.xml name: policy-logback subPath: logback.xml - - mountPath: /tmp/policy-install/do-start.sh - name: pe-scripts - subPath: do-start.sh lifecycle: postStart: exec: @@ -169,19 +166,18 @@ spec: - key: drools-tweaks.sh path: drools-tweaks.sh mode: 0755 + - key: apps-install.sh + path: apps-install.sh + mode: 0755 + - key: drools-preinstall.sh + path: drools-preinstall.sh + mode: 0755 - name: drools-secret secret: secretName: {{ include "common.fullname" . }}-secret items: - - key: policy-keystore - path: policy-keystore - mode: 0644 - key: feature-healthcheck.conf path: feature-healthcheck.conf mode: 0644 - - name: pe-scripts - configMap: - name: {{ include "common.fullname" . }}-script-configmap - defaultMode: 0777 imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/policy/charts/mariadb/templates/deployment.yaml b/kubernetes/policy/charts/mariadb/templates/deployment.yaml index 1709af7df2..adfebca206 100644 --- a/kubernetes/policy/charts/mariadb/templates/deployment.yaml +++ b/kubernetes/policy/charts/mariadb/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} @@ -41,6 +41,7 @@ spec: {{- if eq .Values.liveness.enabled true }} args: - --lower-case-table-names=1 + - --wait_timeout=28800 livenessProbe: tcpSocket: port: {{ .Values.service.internalPort }} diff --git a/kubernetes/policy/charts/mariadb/templates/pv.yaml b/kubernetes/policy/charts/mariadb/templates/pv.yaml index 8be3d4c9cb..da117f4919 100644 --- a/kubernetes/policy/charts/mariadb/templates/pv.yaml +++ b/kubernetes/policy/charts/mariadb/templates/pv.yaml @@ -33,5 +33,5 @@ spec: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} diff --git a/kubernetes/policy/charts/mariadb/values.yaml b/kubernetes/policy/charts/mariadb/values.yaml index eb62715e70..ea79ba6d59 100644 --- a/kubernetes/policy/charts/mariadb/values.yaml +++ b/kubernetes/policy/charts/mariadb/values.yaml @@ -25,7 +25,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: mariadb:10.0.34 +image: mariadb:10.2.14 pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/policy/charts/pdp/templates/service.yaml b/kubernetes/policy/charts/pdp/templates/service.yaml index d44fbb9f28..fc608d5ab8 100644 --- a/kubernetes/policy/charts/pdp/templates/service.yaml +++ b/kubernetes/policy/charts/pdp/templates/service.yaml @@ -49,4 +49,3 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} sessionAffinity: None - clusterIP: None diff --git a/kubernetes/policy/charts/pdp/templates/statefulset.yaml b/kubernetes/policy/charts/pdp/templates/statefulset.yaml index 29ded61ffa..7cfc4f0bbd 100644 --- a/kubernetes/policy/charts/pdp/templates/statefulset.yaml +++ b/kubernetes/policy/charts/pdp/templates/statefulset.yaml @@ -55,7 +55,7 @@ spec: - ./do-start.sh - pdp name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.externalPort }} diff --git a/kubernetes/policy/charts/pdp/values.yaml b/kubernetes/policy/charts/pdp/values.yaml index 3287c9f321..959bb8e0b8 100644 --- a/kubernetes/policy/charts/pdp/values.yaml +++ b/kubernetes/policy/charts/pdp/values.yaml @@ -58,11 +58,11 @@ readiness: periodSeconds: 10 service: - type: ClusterIP + type: NodePort name: pdp portName: pdp - internalPort: 8081 externalPort: 8081 + nodePort: 37 ingress: enabled: false diff --git a/kubernetes/policy/charts/policy-common/resources/config/pe/base.conf b/kubernetes/policy/charts/policy-common/resources/config/pe/base.conf index ce8a0306a4..c5dd8ca2a7 100644 --- a/kubernetes/policy/charts/policy-common/resources/config/pe/base.conf +++ b/kubernetes/policy/charts/policy-common/resources/config/pe/base.conf @@ -18,8 +18,8 @@ POLICY_LOGS=/var/log/onap KEYSTORE_PASSWD=Pol1cy_0nap JDBC_DRIVER=org.mariadb.jdbc.Driver -JDBC_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/onap_sdk?failOverReadOnly=false&autoReconnect=true -JDBC_LOG_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/log?failOverReadOnly=false&autoReconnect=true +JDBC_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/onap_sdk?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30 +JDBC_LOG_URL=jdbc:mariadb://{{ .Values.global.mariadb.nameOverride }}:{{.Values.config.mariadbPort}}/log?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30 JDBC_USER=policy_user JDBC_PASSWORD=policy_user diff --git a/kubernetes/policy/templates/deployment.yaml b/kubernetes/policy/templates/deployment.yaml index 8dca8ab34f..42a6544c2b 100644 --- a/kubernetes/policy/templates/deployment.yaml +++ b/kubernetes/policy/templates/deployment.yaml @@ -51,7 +51,7 @@ spec: - ./do-start.sh - pap name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.externalPort }} diff --git a/kubernetes/portal/charts/portal-app/templates/deployment.yaml b/kubernetes/portal/charts/portal-app/templates/deployment.yaml index 7ed8cca681..905d52c8cc 100644 --- a/kubernetes/portal/charts/portal-app/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-app/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /start-apache-tomcat.sh @@ -136,4 +136,4 @@ spec: - name: portal-tomcat-logs emptyDir: {} imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml index 9e1a57d6fa..6f3f23fe31 100644 --- a/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml b/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml index acb26a227f..ffb9ef0a65 100644 --- a/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-mariadb/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml b/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml index 3b1d1fd478..2d74aae080 100644 --- a/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-sdk/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /start-apache-tomcat.sh @@ -127,4 +127,4 @@ spec: - name: portal-tomcat-logs emptyDir: {} imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/portal/charts/portal-widget/templates/deployment.yaml b/kubernetes/portal/charts/portal-widget/templates/deployment.yaml index 6ce7d4eaee..6eafd7ad69 100644 --- a/kubernetes/portal/charts/portal-widget/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-widget/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /start-wms.sh @@ -94,4 +94,4 @@ spec: name: {{ include "common.fullname" . }}-onapwidgetms defaultMode: 0755 imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/portal/charts/portal-zookeeper/templates/deployment.yaml b/kubernetes/portal/charts/portal-zookeeper/templates/deployment.yaml index fa891f80e3..cf93f6bbe1 100644 --- a/kubernetes/portal/charts/portal-zookeeper/templates/deployment.yaml +++ b/kubernetes/portal/charts/portal-zookeeper/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py b/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py index f5df9fc32d..a450af3dd9 100755 --- a/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py +++ b/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py @@ -1,7 +1,8 @@ # aaf info - everything is from the private oam network (also called onap private network) -GLOBAL_AAF_SERVER = "http://aaf.{{include "common.namespace" .}}:8101" -GLOBAL_AAF_USERNAME = "dgl@openecomp.org" -GLOBAL_AAF_PASSWORD = "ecomp_admin" +GLOBAL_AAF_SERVER = "https://aaf-service.{{include "common.namespace" .}}:8100" +GLOBAL_AAF_USERNAME = "demo@people.osaaf.org" +GLOBAL_AAF_PASSWORD = "demo123456!" + # aai info - everything is from the private oam network (also called onap private network) GLOBAL_AAI_SERVER_PROTOCOL = "https" GLOBAL_AAI_SERVER_PORT = "8443" @@ -17,7 +18,6 @@ GLOBAL_APPC_PASSWORD = "admin" GLOBAL_ASDC_SERVER_PROTOCOL = "http" GLOBAL_ASDC_FE_PORT = "8181" GLOBAL_ASDC_BE_PORT = "8080" -GLOBAL_ASDC_BE_ONBOARD_PORT = "8081" GLOBAL_ASDC_BE_USERNAME = "beep" GLOBAL_ASDC_BE_PASSWORD = "boop" # clamp info - everything is from the private oam network (also called onap private network) @@ -48,6 +48,10 @@ GLOBAL_MSO_PASSWORD = "password1$" # music info - everything is from the private oam network (also called onap private network) GLOBAL_MUSIC_SERVER_PROTOCOL = "http" GLOBAL_MUSIC_SERVER_PORT = "8080" +# oof +GLOBAL_OOF_SERVER_PROTOCOL = "http" +GLOBAL_OOF_HOMING_SERVER_PORT = "8091" +GLOBAL_OOF_SNIRO_SERVER_PORT = "8698" # openstack info - info to select right info in environment # packet generate vnf info - everything is from the private oam network (also called onap private network) GLOBAL_PACKET_GENERATOR_PORT = "8183" diff --git a/kubernetes/robot/resources/config/eteshare/config/vm_properties.py b/kubernetes/robot/resources/config/eteshare/config/vm_properties.py index 585555312c..6a07a75f72 100755 --- a/kubernetes/robot/resources/config/eteshare/config/vm_properties.py +++ b/kubernetes/robot/resources/config/eteshare/config/vm_properties.py @@ -1,6 +1,6 @@ # File generated from /opt/config # -GLOBAL_INJECTED_AAF_IP_ADDR = "aaf.{{include "common.namespace" .}}" +GLOBAL_INJECTED_AAF_IP_ADDR = "aaf-service.{{include "common.namespace" .}}" GLOBAL_INJECTED_AAI1_IP_ADDR = "aai.{{include "common.namespace" .}}" GLOBAL_INJECTED_AAI2_IP_ADDR = "N/A" GLOBAL_INJECTED_APPC_IP_ADDR = "appc.{{include "common.namespace" .}}" @@ -26,7 +26,9 @@ GLOBAL_INJECTED_NEXUS_DOCKER_REPO = "nexus3.onap.org:10001" GLOBAL_INJECTED_NEXUS_PASSWORD = "docker" GLOBAL_INJECTED_NEXUS_REPO = "https://nexus.onap.org/content/sites/raw" GLOBAL_INJECTED_NEXUS_USERNAME = "docker" -GLOBAL_INJECTED_OOF_IP_ADDR = "oof.{{include "common.namespace" .}}" +GLOBAL_INJECTED_OOF_IP_ADDR = "N/A" +GLOBAL_INJECTED_OOF_HOMING_IP_ADDR = "oof-has-api.{{include "common.namespace" .}}" +GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR = "oof-osdf.{{include "common.namespace" .}}" GLOBAL_INJECTED_OPENO_IP_ADDR = "msb-iag.{{include "common.namespace" .}}" GLOBAL_INJECTED_OPENSTACK_PASSWORD = "{{ .Values.openStackPassword }}" GLOBAL_INJECTED_OPENSTACK_TENANT_ID = "{{ .Values.openStackTenantId }}" @@ -39,7 +41,6 @@ GLOBAL_INJECTED_REGION = "{{ .Values.openStackRegion }}" GLOBAL_INJECTED_REMOTE_REPO = "http://gerrit.onap.org/r/testsuite/properties.git" GLOBAL_INJECTED_SCRIPT_VERSION = "{{ .Values.scriptVersion }}" GLOBAL_INJECTED_SDC_BE_IP_ADDR = "sdc-be.{{include "common.namespace" .}}" -GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR = "sdc-onboarding-be.{{include "common.namespace" .}}" GLOBAL_INJECTED_SDC_FE_IP_ADDR = "sdc-fe.{{include "common.namespace" .}}" GLOBAL_INJECTED_SDC_IP_ADDR = "N/A" GLOBAL_INJECTED_SDNC_IP_ADDR = "sdnc.{{include "common.namespace" .}}" @@ -52,7 +53,7 @@ GLOBAL_INJECTED_VM_FLAVOR = "{{ .Values.openStackFlavourMedium }}" GLOBAL_INJECTED_VNFSDK_IP_ADDR = "refrepo.{{include "common.namespace" .}}" GLOBAL_INJECTED_PROPERTIES = { - "GLOBAL_INJECTED_AAF_IP_ADDR" : "aaf.{{include "common.namespace" .}}", + "GLOBAL_INJECTED_AAF_IP_ADDR" : "aaf-service.{{include "common.namespace" .}}", "GLOBAL_INJECTED_AAI1_IP_ADDR" : "aai.{{include "common.namespace" .}}", "GLOBAL_INJECTED_AAI2_IP_ADDR" : "N/A", "GLOBAL_INJECTED_APPC_IP_ADDR" : "appc.{{include "common.namespace" .}}", @@ -78,7 +79,9 @@ GLOBAL_INJECTED_PROPERTIES = { "GLOBAL_INJECTED_NEXUS_PASSWORD" : "docker", "GLOBAL_INJECTED_NEXUS_REPO" : "https://nexus.onap.org/content/sites/raw", "GLOBAL_INJECTED_NEXUS_USERNAME" : "docker", - "GLOBAL_INJECTED_OOF_IP_ADDR" : "oof.{{include "common.namespace" .}}", + "GLOBAL_INJECTED_OOF_IP_ADDR" : "N/A", + "GLOBAL_INJECTED_OOF_HOMING_IP_ADDR" : "oof-has-api.{{include "common.namespace" .}}", + "GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR" : "oof-osdf.{{include "common.namespace" .}}", "GLOBAL_INJECTED_OPENO_IP_ADDR" : "msb-iag.{{include "common.namespace" .}}", "GLOBAL_INJECTED_OPENSTACK_PASSWORD" : "{{ .Values.openStackEncryptedPassword }}", "GLOBAL_INJECTED_OPENSTACK_TENANT_ID" : "{{ .Values.openStackTenantId }}", @@ -90,7 +93,6 @@ GLOBAL_INJECTED_PROPERTIES = { "GLOBAL_INJECTED_REGION" : "{{ .Values.openStackRegion }}", "GLOBAL_INJECTED_REMOTE_REPO" : "http://gerrit.onap.org/r/testsuite/properties.git", "GLOBAL_INJECTED_SDC_BE_IP_ADDR" : "sdc-be.{{include "common.namespace" .}}", - "GLOBAL_INJECTED_SDC_BE_ONBOARD_IP_ADDR" : "sdc-onboarding-be.{{include "common.namespace" .}}", "GLOBAL_INJECTED_SDC_FE_IP_ADDR" : "sdc-fe.{{include "common.namespace" .}}", "GLOBAL_INJECTED_SDC_IP_ADDR" : "N/A", "GLOBAL_INJECTED_SCRIPT_VERSION" : "{{ .Values.scriptVersion }}", diff --git a/kubernetes/robot/resources/config/robot/resources/oof_interface.robot b/kubernetes/robot/resources/config/robot/resources/oof_interface.robot new file mode 100644 index 0000000000..1c3137e431 --- /dev/null +++ b/kubernetes/robot/resources/config/robot/resources/oof_interface.robot @@ -0,0 +1,41 @@ +*** Settings *** +Documentation The main interface for interacting with OOF: SNIRO and Homing Service +Library RequestsLibrary + +Resource global_properties.robot + +*** Variables *** +${OOF_HOMING_HEALTH_CHECK_PATH} /v1/plans/healthcheck +${OOF_SNIRO_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck + +${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT} +${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT} + +*** Keywords *** +Run OOF-Homing Health Check + [Documentation] Runs OOF-Homing Health check + ${resp}= Run OOF-Homing Get Request ${OOF_HOMING_HEALTH_CHECK_PATH} + Should Be Equal As Integers ${resp.status_code} 200 + +Run OOF-Homing Get Request + [Documentation] Runs OOF-Homing Get request + [Arguments] ${data_path} + ${session}= Create Session session ${OOF_HOMING_ENDPOINT} + ${resp}= Get Request session ${data_path} + Should Be Equal As Integers ${resp.status_code} 200 + Log Received response from OOF-Homing ${resp.text} + [Return] ${resp} + +Run OOF-SNIRO Health Check + [Documentation] Runs OOF-SNIRO Health check + ${resp}= Run OOF-SNIRO Get Request ${OOF_SNIRO_HEALTH_CHECK_PATH} + Should Be Equal As Integers ${resp.status_code} 200 + +Run OOF-SNIRO Get Request + [Documentation] Runs OOF-SNIRO Get request + [Arguments] ${data_path} + ${session}= Create Session session ${OOF_SNIRO_ENDPOINT} + ${resp}= Get Request session ${data_path} + Should Be Equal As Integers ${resp.status_code} 200 + Log Received response from OOF-SNIRO ${resp.text} + [Return] ${resp} diff --git a/kubernetes/robot/templates/deployment.yaml b/kubernetes/robot/templates/deployment.yaml index 6379aa1908..0b658093bf 100644 --- a/kubernetes/robot/templates/deployment.yaml +++ b/kubernetes/robot/templates/deployment.yaml @@ -75,6 +75,9 @@ spec: - name: robot-resources mountPath: /var/opt/OpenECOMP_ETE/robot/resources/sdngc_interface.robot subPath: sdngc_interface.robot + - name: robot-resources + mountPath: /var/opt/OpenECOMP_ETE/robot/resources/oof_interface.robot + subPath: oof_interface.robot - name: robot-lighttpd-authorization mountPath: /etc/lighttpd/authorization subPath: authorization diff --git a/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml index 733b21e7bc..db32362c3d 100644 --- a/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml +++ b/kubernetes/sdnc/charts/dmaap-listener/templates/deployment.yaml @@ -53,7 +53,7 @@ spec: - command: - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: PROPERTY_DIR @@ -86,4 +86,4 @@ spec: configMap: name: sdnc-dmaap-configmap imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml index 3ca8a6ba47..b456d8ee91 100644 --- a/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml +++ b/kubernetes/sdnc/charts/sdnc-portal/templates/deployment.yaml @@ -51,7 +51,7 @@ spec: - name: {{ include "common.name" . }} command: ["/bin/bash"] args: ["-c", "cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh"] - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} @@ -101,4 +101,4 @@ spec: configMap: name: {{ include "common.fullname" . }}-portal imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml index 48de1dd668..43480398f1 100644 --- a/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml +++ b/kubernetes/sdnc/charts/ueb-listener/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: - command: - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: PROPERTY_DIR @@ -87,4 +87,4 @@ spec: configMap: name: {{ include "common.fullname" . }} imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index ccf283ff4c..c8565f5e89 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -49,7 +49,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/bin/bash"] args: ["-c", "/opt/sdnc/bin/startODL.sh"] @@ -202,4 +202,4 @@ spec: resources: requests: storage: {{ .Values.persistence.size }} - {{ end }}
\ No newline at end of file + {{ end }} diff --git a/kubernetes/uui/charts/uui-server/templates/deployment.yaml b/kubernetes/uui/charts/uui-server/templates/deployment.yaml index 29fbd6477a..accdff9e7f 100644 --- a/kubernetes/uui/charts/uui-server/templates/deployment.yaml +++ b/kubernetes/uui/charts/uui-server/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/uui/templates/deployment.yaml b/kubernetes/uui/templates/deployment.yaml index 4b3ed7c66e..9578d9c5d8 100644 --- a/kubernetes/uui/templates/deployment.yaml +++ b/kubernetes/uui/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /bin/bash diff --git a/kubernetes/vid/charts/mariadb/templates/deployment.yaml b/kubernetes/vid/charts/mariadb/templates/deployment.yaml index cafab0c17e..0560f60d8f 100644 --- a/kubernetes/vid/charts/mariadb/templates/deployment.yaml +++ b/kubernetes/vid/charts/mariadb/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/vid/templates/deployment.yaml b/kubernetes/vid/templates/deployment.yaml index 5491808b9c..46f3ea0aef 100644 --- a/kubernetes/vid/templates/deployment.yaml +++ b/kubernetes/vid/templates/deployment.yaml @@ -47,7 +47,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} lifecycle: postStart: |