From: Chen, Jackie (jv246a) Date: Fri, 12 Mar 2021 20:25:18 +0000 (-0500) Subject: updating otf-deployment process with more details X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fotf.git;a=commitdiff_plain;h=511121c6c7d682288fd3fc72666db8f2221b72ae updating otf-deployment process with more details one-click deployment process is now much easier and Readme is updated with more details Signed-off-by: Chen, Jackie (jv246a) Change-Id: Idf4b1aa091be4a057ccd160bf7e760219e17f66f --- diff --git a/a1-mediator-vth/helm/a1-mediator-vth/templates/deployment.yaml b/a1-mediator-vth/helm/a1-mediator-vth/templates/deployment.yaml index 08de1a0..0eeac3e 100644 --- a/a1-mediator-vth/helm/a1-mediator-vth/templates/deployment.yaml +++ b/a1-mediator-vth/helm/a1-mediator-vth/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/a1-mediator-vth/helm/a1-mediator-vth/values.yaml b/a1-mediator-vth/helm/a1-mediator-vth/values.yaml index 81d2226..039a867 100644 --- a/a1-mediator-vth/helm/a1-mediator-vth/values.yaml +++ b/a1-mediator-vth/helm/a1-mediator-vth/values.yaml @@ -3,7 +3,7 @@ env: dev version: 0.0.1-SNAPSHOT image: a1-mediator-vth:0.0.1-SNAPSHOT namespace: org-oran-otf -nodePort: 32324 +nodePort: 32325 replicas: 1 health : /otf/vth/oran/a1/v1/health sharedCert: otf-cert-secret-builder diff --git a/a1-policy-manager-vth/helm/a1-policy-manager-vth/templates/deployment.yaml b/a1-policy-manager-vth/helm/a1-policy-manager-vth/templates/deployment.yaml index 9b5eaab..5a00fe7 100644 --- a/a1-policy-manager-vth/helm/a1-policy-manager-vth/templates/deployment.yaml +++ b/a1-policy-manager-vth/helm/a1-policy-manager-vth/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/a1-sdnc-vth/helm/a1-sdnc-vth/templates/deployment.yaml b/a1-sdnc-vth/helm/a1-sdnc-vth/templates/deployment.yaml index 43fd64f..1f1a915 100644 --- a/a1-sdnc-vth/helm/a1-sdnc-vth/templates/deployment.yaml +++ b/a1-sdnc-vth/helm/a1-sdnc-vth/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/dmaap-vth/helm/dmaap-vth/templates/deployment.yaml b/dmaap-vth/helm/dmaap-vth/templates/deployment.yaml index 375335e..c07daad 100644 --- a/dmaap-vth/helm/dmaap-vth/templates/deployment.yaml +++ b/dmaap-vth/helm/dmaap-vth/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/one-click/README b/one-click/README index 9522299..0f4f88a 100644 --- a/one-click/README +++ b/one-click/README @@ -1,4 +1,4 @@ -**NOTE: +**NOTE: ** Database must be initialized before the cores and VTHs are installed, docker images have to be build, and individual charts have to be updated to pull the correct image. ** If using one-click, you need to build or update the helm dependencies after updating the individual charts that should now point to correct docker images. Oneclick uses ** anchors and pointers in its yaml, so values need to be updated in the file, do not pass values in the command line as it will ignore those values. @@ -6,16 +6,23 @@ Prerequisites: - Kubernetes - Helm 3.0 -- Docker Images +- Docker + +What we are using: +Kubernetes: +- Client Version: v1.17.1 +- Server Version: v1.18.14 +Helm: 3.3.0 +Docker: 19.03.8 For both server and client Useful k8 commands: view ports: kubectl get svc -n [namespace] view secrets: kubectl get secrets -n [namespace] view pvc: kubectl get pvc -n [namespace] -usefule helm commands: - dependency build: helm depenency build - dependency update: helm depenency udpate +useful helm commands: + dependency build: helm dependency build + dependency update: helm dependency update (do this when you make any changes the specific helm charts, it will update the charts that one-click stores) install charts: helm install [chart_name] [path_to_chart] -n [namespace] uninstall charts: helm uninstall [chart_name] -n [namespace] view charts: helm ls -n [namespace] @@ -24,26 +31,44 @@ usefule helm commands: 1. This step is to install otf databases: mysql and mongodb NOTE: each install of dbs requires dbs to not have pvcs set, if they exist delete them on every install. If primary starts failing, uninstall and remove pvc and reinstall - a) helm install one-click-dbs -n [namespace] . (dir: otf-oran/one-click/one-click-dbs) - + a) helm dependency update + b) "helm install one-click-dbs -n [namespace] ." (dir: otf-oran/one-click/one-click-dbs) + 2. This step is to install otf-core componenets: otf-service-api,otf-camunda, and otf-frontend + NOTE: make sure all the db pods from previous step are running before starting step 2 + + a) You will need to update the internal URLS on one-click-core/values.yaml. The default values are set to the local cluster IP. + You will need to modify it with your namespace in each of the internal urls. - a) modify one-click-core values.yaml (otf-oran/one-click/one-click-core/values.yaml) with correct secret name and ip from the previous step. Fill in otf-service-api and otf-camunda ip adresses. - NOTE: format is-> mongo-ip=X.X.X.X:27017 mysql-ip=X.X.X.X:3306/otf_camunda ips are the cluster ports - NOTE: format is-> otf-url: http://X.X.X.X:80 - camunda-url: http://X.X.X.X:8443/ - service-api-url: http://X.X.X.X:8443/otf/api/ - camunda-url-no-port: http://X.X.X.X - - b) fill in the rest of the values.yaml accordingly (ie, camunda-url,&svc-url,etc) + For example if your namespace is "oran", your mongo cluster ip would be one-click-dbs-mongodb.oran.svc.cluster.local:27017 <- you will need to replace the oran part with your own namespace + You will need to modify this for mongo-ip,mysql-ip,fe-ip,svc-ip, and camunda-ip - c) helm install otf-core -n [namespace] . (dir: otf-oran/one-click/one-click-core) + Note: you can also do kubectl get service -n [your_namespace] and put the cluster ip directly + NOTE: format is-> + mongo-ip: one-click-dbs-mongodb.[namespace].svc.cluster.local:27017 + mysql-ip: one-click-dbs-mysql.[namespace].svc.cluster.local:3306/otf_camunda + otf-url: &otfUrl http://otf-frontend.[namspace].svc.cluster.local:80/ + camunda-url: &camundaUrl http://otf-camunda.[namspace].svc.cluster.local:8443/ + service-api-url: &svcUrl http://otf-service-api.[namspace].svc.cluster.local:8443/otf/api/ + camunda-url-no-port: &camundaUrlNoPort http://otf-camunda.[namspace].svc.cluster.local + + b) Update one-click-core/values.yaml with your docker image repo location (you will have to build each of these docker images and push them to a repo such as dockerhub) + + c) helm dependency update + + d) helm install otf-core -n [namespace] . (dir: otf-oran/one-click/one-click-core) -3. This step is to run otf-vths if desired (dir: otf-oran/one-click/one-click-vths). This step will deploy ALL of OTF's VTHS so if you are only deploying specfic ones, you should skip this step. +3. This step is optional. It will run otf-vths (dir: otf-oran/one-click/one-click-vths) but you can make your own vths and make them accessible(i.e. via HTTP request). + We recommend making and deploying your own VTHS(micro-services) to fit your own workflows and solutions. + This step will deploy ALL of OTF's VTHS so if you are only deploying specific ones, you should skip this step. + + a) update the image location for all the vths (otf-oran/one-click/one-click-vths/values.yaml). + Robot vth needs a mongo connections so you will have to update the values.yaml with the appropriate + mongo IP and mongo secret name from step one. Format is one-click-dbs-mongodb.[namespace].svc.cluster.local:27017/ or X.X.X.X:27017/ - a) robot vths needs a mongo connections so you will have to update the values.yaml (otf-oran/one-click/one-click-vths/values.yaml) with the approiate IP and mongo secret name from step one. format is mongo-ip=X.X.X.X:27017/ + b) helm dependency update. (you have to run this step if you made any changes to their individual helm charts" - b) helm install otf-vths -n [namespace] . (dir: otf-oran/one-click/one-click-vths) + c) helm install otf-vths -n [namespace] . (dir: otf-oran/one-click/one-click-vths) SELF-CHECK **MORE UPDATES COMING** @@ -53,10 +78,11 @@ SELF-CHECK **MORE UPDATES COMING** 1) Later verisons of chrome might have an issue where users might get stuck on the login page when trying to login. WORKAROUND: - use firefox - - if you have to use chrome, go to your chrome brower and paste chrome://flags/#cookies-without-same-site-must-be-secure on the URL section and disable cookies must be secure flag. + - if you have to use chrome, go to your chrome browser and paste chrome://flags/#cookies-without-same-site-must-be-secure on the URL section and disable cookies must be secure flag. ***NOTES*** - - defaut username and password-> otfuser@email.com:password (use this account to managed other users via user managment tab. You can change password via the mongo database) + - to access frontend via browser, use the external ip of frontend. + - default username and password-> otfuser@email.com:password (use this account to managed other users via user managment tab. You can change password via the mongo database) - You have to be in a group before you can execute any workflows or add anything VTHs.(Test def, instance, execution are saved to the group that executed it) - In values. \ No newline at end of file diff --git a/one-click/one-click-core/values.yaml b/one-click/one-click-core/values.yaml index 23433a1..9aabcdf 100644 --- a/one-click/one-click-core/values.yaml +++ b/one-click/one-click-core/values.yaml @@ -1,14 +1,30 @@ -mongo-ip: &mongoIp 127.0.0.1:27017 +### internal db ip +mongo-ip: &mongoIp one-click-dbs-mongodb..svc.cluster.local:27017 +mysql-ip: &mysqlIp one-click-dbs-mysql..svc.cluster.local:3306/otf_camunda +#mongo-ip: &mongoIp 10.0.190.153:27017 +#mysql-ip: &mysqlIp 10.0.178.26:3306/otf_camunda mongo-secret-name: &mongoSecret one-click-dbs-mongodb -mysql-ip: &mysqlIp 127.0.0.1:3306/otf_camunda mysql-secret-name: &mysqlSecret mysql -otf-url: &otfUrl http://127.0.0.1:80 -camunda-url: &camundaUrl http://127.0.0.1:8443/ -service-api-url: &svcUrl http://127.0.0.1:8443/otf/api/ -camunda-url-no-port: &camundaUrlNoPort http://127.0.0.1 +frontend-image: &frontendImage FE-image #Your frontend docker image location +service-api-image: &serviceApiImage SVC-API image #Your service-api docker image location +camunda-image: &camundaImage CAMUNDA-image #Your camunda docker image location + +###internal urls +otf-url: &otfUrl http://otf-frontend..svc.cluster.local:80/ #fe ip address +camunda-url: &camundaUrl http://otf-camunda..svc.cluster.local:8443/ #camunda ip address +service-api-url: &svcUrl http://otf-service-api..svc.cluster.local:8443/otf/api/ #service api ip address +camunda-url-no-port: &camundaUrlNoPort http://otf-camunda..svc.cluster.local #camunda ip address w/o port camunda-port: &camundaPort 8443 +#otf-url: &otfUrl http://10.0.5.126:80/ #fe ip address +#camunda-url: &camundaUrl http://10.0.75.51:8443/ #camunda ip address +#service-api-url: &svcUrl http://10.0.96.153:8443/otf/api/ #service api ip adress +#camunda-url-no-port: &camundaUrlNoPort http://10.0.75.51 #camunda ip address w/o port + +mechId: &mechId username +mechIdPassword: &mechIdPassword password otf-oran-service-api: + image: *serviceApiImage one_click: mongo: ip: *mongoIp @@ -28,6 +44,7 @@ otf-oran-service-api: host: *camundaUrlNoPort port: *camundaPort otf-camunda: + image: *camundaImage one_click: mongo: ip: *mongoIp @@ -36,10 +53,13 @@ otf-camunda: ip: *mysqlIp secret_name: *mysqlSecret otf-frontend: + image: *frontendImage one_click: mongo: ip: *mongoIp secret_name: *mongoSecret + mechId: *mechId + mechIdPassword: *mechIdPassword otf: OTF_URL: dev: *otfUrl diff --git a/one-click/one-click-vths/Chart.yaml b/one-click/one-click-vths/Chart.yaml index f233748..1ce7f7a 100644 --- a/one-click/one-click-vths/Chart.yaml +++ b/one-click/one-click-vths/Chart.yaml @@ -46,7 +46,7 @@ dependencies: repository: "file://../../otf-ssh-test-head/helm/otf-ssh-test-head/" - name: smo-o1-vth version: 0.0.1 - repository: "file://../../smo-o1-vth/helm/smo-o1-vth/" + repository: "file://../../smo-o1-vth/helm/o1-vth/" - name: otf-robot-test-head version: 0.0.5-SNAPSHOT repository: "file://../../otf-robot-test-head/helm/otf-robot-test-head/" diff --git a/one-click/one-click-vths/values.yaml b/one-click/one-click-vths/values.yaml index ceb4693..1e939c0 100644 --- a/one-click/one-click-vths/values.yaml +++ b/one-click/one-click-vths/values.yaml @@ -1,7 +1,54 @@ -mongo-ip: &mongoIp 10.0.248.46:27017/ +mongo-ip: &mongoIp one-click-dbs-mongodb..svc.cluster.local:27017/ mongo-secret-name: &mongoSecret one-click-dbs-mongodb +ping-image: &pingImage #your ping image repo +ssh-image: &sshImage #your ssh image repo +a1-mediator-image: &a1Mediator # a1 med image repo +a1-policy-image: &a1Policy +a1-sdnc-image: &a1Sdnc +dmaap-image: &dmaap +ric-image: &ric +o1-image: &o1 +robot-image: &robot + +namespace: &nameSpace oran # your namespace + + +otf-ssh-test-head: + image: *sshImage + namespace: *nameSpace + +otf-ping-test-head: + image: *pingImage + namespace: *nameSpace + +a1-mediator-vth: + image: *a1Mediator + namespace: *nameSpace + +a1-policy-manager-vth: + image: *a1Policy + namespace: *nameSpace + +a1-sdnc-vth: + image: *a1Sdnc + namespace: *nameSpace + +dmaap-vth: + image: *dmaap + namespace: *nameSpace + +oran-ric-test-head: + image: *ric + namespace: *nameSpace + +smo-o1-vth: + image: *o1 + namespace: *nameSpace + otf-robot-test-head: + image: *robot + namespace: *nameSpace one_click: mongo: ip: *mongoIp diff --git a/oran-ric-test-head/helm/ric-test-head/templates/deployment.yaml b/oran-ric-test-head/helm/ric-test-head/templates/deployment.yaml index dc0b012..141e6bc 100644 --- a/oran-ric-test-head/helm/ric-test-head/templates/deployment.yaml +++ b/oran-ric-test-head/helm/ric-test-head/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/oran-ric-test-head/helm/ric-test-head/values.yaml b/oran-ric-test-head/helm/ric-test-head/values.yaml index e0084c4..60f0455 100644 --- a/oran-ric-test-head/helm/ric-test-head/values.yaml +++ b/oran-ric-test-head/helm/ric-test-head/values.yaml @@ -2,7 +2,7 @@ appName: ric-test-head env: dev version: 0.0.1-SNAPSHOT image: ric-test-head:0.0.1-SNAPSHOT -namespace: org-oran-otf +#namespace: org-oran-otf nodePort: 32323 replicas: 1 health : /otf/vth/oran/v1/health diff --git a/otf-camunda/helm/otf-camunda/templates/deployment.yaml b/otf-camunda/helm/otf-camunda/templates/deployment.yaml index c2deb26..113ea64 100644 --- a/otf-camunda/helm/otf-camunda/templates/deployment.yaml +++ b/otf-camunda/helm/otf-camunda/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ .Values.appName}}-{{ .Values.env }} diff --git a/otf-camunda/helm/otf-camunda/values.yaml b/otf-camunda/helm/otf-camunda/values.yaml index 4e42c06..730897a 100644 --- a/otf-camunda/helm/otf-camunda/values.yaml +++ b/otf-camunda/helm/otf-camunda/values.yaml @@ -1,9 +1,9 @@ appName: otf-camunda version: 0.0.1-SNAPSHOT image: otf-camunda:0.0.1-SNAPSHOT -namespace: org.oran.otf +#namespace: org.oran.otf nodePort: 31313 -replicas: 2 +replicas: 1 terminationGracePeriodSeconds: 360 env: dev diff --git a/otf-frontend/helm/otf-frontend/templates/deployment.yaml b/otf-frontend/helm/otf-frontend/templates/deployment.yaml index 7bb59d1..4a672d9 100644 --- a/otf-frontend/helm/otf-frontend/templates/deployment.yaml +++ b/otf-frontend/helm/otf-frontend/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} @@ -126,17 +126,19 @@ spec: value: {{.Values.serviceApi.dev.SERVICEAPI_URIEXECUTETESTINSTANCE | quote}} {{ end }} - name: SERVICEAPI_AAFID - valueFrom: - secretKeyRef: - name: {{ .Values.sharedSecret}} - key: aaf_id - optional: true + value: {{.Values.one_click.mechId}} +# valueFrom: +# secretKeyRef: +# name: {{ .Values.sharedSecret}} +# key: aaf_id +# optional: true - name: SERVICEAPI_AAFPASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.sharedSecret}} - key: aaf_mech_password - optional: true + value: {{.Values.one_click.mechIdPassword}} +# valueFrom: +# secretKeyRef: +# name: {{ .Values.sharedSecret}} +# key: aaf_mech_password +# optional: true - name: CAMUNDAAPI_URL {{ if eq .Values.env "prod" }} value: {{ .Values.camundaApi.prod.CAMUNDAAPI_URL | quote}} @@ -148,17 +150,19 @@ spec: value: {{ .Values.camundaApi.dev.CAMUNDAAPI_URL | quote}} {{ end }} - name: CAMUNDAAPI_AAFID - valueFrom: - secretKeyRef: - name: {{ .Values.sharedSecret}} - key: aaf_id - optional: true + value: {{.Values.one_click.mechId}} +# valueFrom: +# secretKeyRef: +# name: {{ .Values.sharedSecret}} +# key: aaf_id +# optional: true - name: CAMUNDAAPI_AAFPASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.sharedSecret}} - key: aaf_mech_password - optional: true + value: {{.Values.one_click.mechIdPassword}} +# valueFrom: +# secretKeyRef: +# name: {{ .Values.sharedSecret}} +# key: aaf_mech_password +# optional: true - name: MONGO_BASEURL value: {{ .Values.one_click.mongo.ip | quote }} # {{ if or (eq .Values.env "prod") (eq .Values.env "prod-dr")}} diff --git a/otf-frontend/helm/otf-frontend/templates/secret.yaml b/otf-frontend/helm/otf-frontend/templates/secret.yaml index fcca0f8..5f70306 100644 --- a/otf-frontend/helm/otf-frontend/templates/secret.yaml +++ b/otf-frontend/helm/otf-frontend/templates/secret.yaml @@ -1,20 +1,10 @@ apiVersion: v1 -kind: Service +kind: Secret metadata: - name: {{ .Values.appName }} - namespace: {{ .Values.namespace }} - labels: - app: {{ .Values.appName }} - version: {{ .Values.version }} - # annotations: - # service.beta.kubernetes.io/azure-load-balancer-internal: "true" -spec: - type: LoadBalancer - ports: - - name: https - protocol: TCP - port: 80 - # nodePort: {{ .Values.nodePort }} - selector: - app: {{ .Values.appName }} - version: {{ .Values.version }} + name: {{ .Values.appName}} +type: Opaque +data: + mongo_username: {{ .Values.mongo.username | b64enc}} + mongo_password: {{ .Values.mongo.password | b64enc}} +# authentication_secret: {{.Values.AUTHENTICATION_SECRET | b64enc}} + diff --git a/otf-frontend/helm/otf-frontend/templates/service.yaml b/otf-frontend/helm/otf-frontend/templates/service.yaml index 0b0badd..be2bb54 100644 --- a/otf-frontend/helm/otf-frontend/templates/service.yaml +++ b/otf-frontend/helm/otf-frontend/templates/service.yaml @@ -1,3 +1,21 @@ +#apiVersion: v1 +#kind: Service +#metadata: +# name: {{ .Values.appName }} +# namespace: {{ .Values.namespace }} +# labels: +# app: {{ .Values.appName }} +# version: {{ .Values.version }} +#spec: +# type: NodePort +# ports: +# - name: https +# protocol: TCP +# port: 80 +# nodePort: {{ .Values.nodePort }} +# selector: +# app: {{ .Values.appName }} +# version: {{ .Values.version }} apiVersion: v1 kind: Service metadata: @@ -6,13 +24,15 @@ metadata: labels: app: {{ .Values.appName }} version: {{ .Values.version }} + # annotations: + # service.beta.kubernetes.io/azure-load-balancer-internal: "true" spec: - type: NodePort + type: LoadBalancer ports: - - name: https - protocol: TCP - port: 443 - nodePort: {{ .Values.nodePort }} + - name: https + protocol: TCP + port: 80 + # nodePort: {{ .Values.nodePort }} selector: app: {{ .Values.appName }} - version: {{ .Values.version }} + version: {{ .Values.version }} \ No newline at end of file diff --git a/otf-frontend/helm/otf-frontend/values.yaml b/otf-frontend/helm/otf-frontend/values.yaml index 829b81a..1919555 100644 --- a/otf-frontend/helm/otf-frontend/values.yaml +++ b/otf-frontend/helm/otf-frontend/values.yaml @@ -2,12 +2,12 @@ appName: otf-frontend version: 0.0.4-SNAPSHOT #pullSecret: "" image: otf-frontend -namespace: +#namespace: nodePort: 32524 replicas: - dev: 2 + dev: 1 st: 1 - prod: 2 + prod: 1 env: dev AUTHENTICATION_SECRET: "" serviceApi: @@ -68,3 +68,5 @@ one_click: ip: 10.0.51.84:27017 username: "!" password: "!" + mechId: "!" + mechIdPassword: "!" diff --git a/otf-helm/otf/charts/databases/mongodb/files/docker-entrypoint-initdb.d/one.js b/otf-helm/otf/charts/databases/mongodb/files/docker-entrypoint-initdb.d/one.js index 2e218a1..9fc704a 100644 --- a/otf-helm/otf/charts/databases/mongodb/files/docker-entrypoint-initdb.d/one.js +++ b/otf-helm/otf/charts/databases/mongodb/files/docker-entrypoint-initdb.d/one.js @@ -1,6 +1,8 @@ sleep(12000); -use admin; -db.createUser({user: "your-mongo-username", pwd: "your-mongo-password", roles: [ { role: "readWrite", db: "test" } ]}) -use otf; -db.users.insert({"permissions":["user"], "enabled":true, "password":"$2a$14$QWEuhquhhT.1dtVsmXq0QOxOMSmInjvQtr43Jbyz07nEeTbABdwqa", "firstName":"username", "lastname":"username", "email":"username", "isVerified":true}) -db.users.insert({"permissions":["admin"], "enabled":true, "password":"$2a$14$QWEuhquhhT.1dtVsmXq0QOxOMSmInjvQtr43Jbyz07nEeTbABdwqa", "firstName":"otf", "lastname":"user", "email":"otfuser@email.com", "isVerified":true}) +admin = db.getSiblingDB('admin'); +admin.createUser({user: "your-mongo-username", pwd: "your-mongo-password", roles: [ { role: "readWriteAnyDatabase", db: "admin" } ]}); +otf= db.getSiblingDB('otf'); +//add default group +otf.groups.insert({ "_id" : ObjectId("604901d4498e3a006261b1e6"), "mechanizedIds" : [], "groupName" : "otf", "parentGroupId" : null, "ownerId" : ObjectId("6048fed6bdc2a67d6e9c7fc2"), "groupDescription" : "otf", "roles" : [ { "permissions" : [ "management", "write", "delete", "read", "execute" ], "roleName" : "admin" }, { "permissions" : [ "read" ], "roleName" : "user" }, { "permissions" : [ "write", "delete", "read", "execute" ], "roleName" : "developer" } ], "members" : [ { "roles" : [ "admin", "user", "developer" ], "userId" : ObjectId("6048fed6bdc2a67d6e9c7fc1") }, { "roles" : [ "admin", "user", "developer" ], "userId" : ObjectId("6048fed6bdc2a67d6e9c7fc2") } ] }); +otf.users.insert({"_id": ObjectId("6048fed6bdc2a67d6e9c7fc1"),"permissions":["user"], "enabled":true, "password":"$2a$14$QWEuhquhhT.1dtVsmXq0QOxOMSmInjvQtr43Jbyz07nEeTbABdwqa", "firstName":"username", "lastName":"username", "email":"username", "isVerified":true}); +otf.users.insert({"_id": ObjectId("6048fed6bdc2a67d6e9c7fc2"),"permissions":["admin"], "enabled":true, "password":"$2a$14$QWEuhquhhT.1dtVsmXq0QOxOMSmInjvQtr43Jbyz07nEeTbABdwqa", "firstName":"otf", "lastName":"user", "email":"otfuser@email.com", "defaultGroup" : ObjectId("604901d4498e3a006261b1e6"), "isVerified":true}); diff --git a/otf-helm/otf/charts/databases/mongodb/values.yaml b/otf-helm/otf/charts/databases/mongodb/values.yaml index 0c6f215..0e5843c 100644 --- a/otf-helm/otf/charts/databases/mongodb/values.yaml +++ b/otf-helm/otf/charts/databases/mongodb/values.yaml @@ -71,7 +71,7 @@ usePassword: true ## MongoDB admin password ## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run ## -mongodbRootPassword: otf.123 +mongodbRootPassword: root-password ## MongoDB custom user and database ## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run diff --git a/otf-ping-test-head/helm/otf-ping-test-head/templates/deployment.yaml b/otf-ping-test-head/helm/otf-ping-test-head/templates/deployment.yaml index 0a0455c..1081524 100644 --- a/otf-ping-test-head/helm/otf-ping-test-head/templates/deployment.yaml +++ b/otf-ping-test-head/helm/otf-ping-test-head/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} @@ -32,15 +32,15 @@ spec: {{ end }} serviceAccount: default volumes: - - name: {{ .Values.appName}}-cert-volume - secret: - secretName: {{.Values.sharedCert}} - optional: true - items: - - key: PEM_CERT - path: otf.pem - - key: PEM_KEY - path: privateKey.pem +# - name: {{ .Values.appName}}-cert-volume +# secret: +# secretName: {{.Values.sharedCert}} +# optional: true +# items: +# - key: PEM_CERT +# path: otf.pem +# - key: PEM_KEY +# path: privateKey.pem {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}} {{else}} - name: logging-pvc @@ -85,8 +85,8 @@ spec: - name: APP_VERSION value: {{.Values.version}} volumeMounts: - - name: {{.Values.appName}}-cert-volume - mountPath: /opt/cert +# - name: {{.Values.appName}}-cert-volume +# mountPath: /opt/cert {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}} {{else}} - name: logging-pvc diff --git a/otf-ping-test-head/helm/otf-ping-test-head/values.yaml b/otf-ping-test-head/helm/otf-ping-test-head/values.yaml index 4a447ca..b8e2d04 100644 --- a/otf-ping-test-head/helm/otf-ping-test-head/values.yaml +++ b/otf-ping-test-head/helm/otf-ping-test-head/values.yaml @@ -2,11 +2,11 @@ appName: otf-ping-test-head env: dev version: 0.0.1-SNAPSHOT image: otf-ping-test-head:0.0.1-SNAPSHOT -namespace: org-oran-otf +#namespace: nodePort: 32225 replicas: 1 health : /otf/vth/ping/v1/health -sharedCert: otf-cert-secret-builder +#sharedCert: otf-cert-secret-builder #pullSecret: "" pvc: dev: org-oran-otf-dev-logs-pv diff --git a/otf-robot-test-head/helm/otf-robot-test-head/templates/deployment.yaml b/otf-robot-test-head/helm/otf-robot-test-head/templates/deployment.yaml index d6d372d..349e13b 100644 --- a/otf-robot-test-head/helm/otf-robot-test-head/templates/deployment.yaml +++ b/otf-robot-test-head/helm/otf-robot-test-head/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/otf-robot-test-head/run.py b/otf-robot-test-head/run.py index 4527bd0..e9b74f9 100644 --- a/otf-robot-test-head/run.py +++ b/otf-robot-test-head/run.py @@ -27,4 +27,4 @@ if __name__ == '__main__': # use_reloader=True, # ssl_context=context) # Run without ssl - app.run(debug=app.config['DEBUG'], host='0.0.0.0', use_reloader=True, port=5000) \ No newline at end of file + app.run(debug=app.config['DEBUG'], host='0.0.0.0', use_reloader=True, port=5000) \ No newline at end of file diff --git a/otf-service-api/helm/otf-service-api/templates/deployment.yaml b/otf-service-api/helm/otf-service-api/templates/deployment.yaml index 069f8ac..9ac2544 100644 --- a/otf-service-api/helm/otf-service-api/templates/deployment.yaml +++ b/otf-service-api/helm/otf-service-api/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/otf-ssh-test-head/helm/otf-ssh-test-head/templates/deployment.yaml b/otf-ssh-test-head/helm/otf-ssh-test-head/templates/deployment.yaml index 0fae853..5b35469 100644 --- a/otf-ssh-test-head/helm/otf-ssh-test-head/templates/deployment.yaml +++ b/otf-ssh-test-head/helm/otf-ssh-test-head/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} diff --git a/otf-ssh-test-head/helm/otf-ssh-test-head/values.yaml b/otf-ssh-test-head/helm/otf-ssh-test-head/values.yaml index 590e533..cffa277 100644 --- a/otf-ssh-test-head/helm/otf-ssh-test-head/values.yaml +++ b/otf-ssh-test-head/helm/otf-ssh-test-head/values.yaml @@ -2,7 +2,7 @@ appName: otf-ssh-test-head env: dev version: 0.0.1-SNAPSHOT image: otf-ssh-test-head:0.0.1-SNAPSHOT -namespace: org-oran-otf +namespace: nodePort: 32222 replicas: 1 health : /otf/vth/ssh/v1/health diff --git a/smo-o1-vth/helm/o1-vth/templates/deployment.yaml b/smo-o1-vth/helm/o1-vth/templates/deployment.yaml index 26a76cc..10cf178 100644 --- a/smo-o1-vth/helm/o1-vth/templates/deployment.yaml +++ b/smo-o1-vth/helm/o1-vth/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.appName}} @@ -52,11 +52,11 @@ spec: protocol: TCP env: - name: NAMESPACE - value: {{.Values.namespace}} + value: {{ .Values.namespace}} - name: APP_NAME value: {{ .Values.appName}} - name: APP_VERSION - value: {{.Values.version}} + value: {{ .Values.version}} - name: HTTP value: {{ .Values.HTTP}} - name: HTTPS diff --git a/smo-o1-vth/helm/o1-vth/values.yaml b/smo-o1-vth/helm/o1-vth/values.yaml index bbc6090..69d88eb 100644 --- a/smo-o1-vth/helm/o1-vth/values.yaml +++ b/smo-o1-vth/helm/o1-vth/values.yaml @@ -11,8 +11,8 @@ sharedCert: otf-cert-secret-builder pvc: dev: org-oran-otf-dev-logs-pv prod: org-oran-otf-prod-logs-pv -HTTP: "[Your HTTP PROXY HERE]" -HTTPS: "[Your HTTPS PROXY HERE]" +HTTP: "Your HTTP PROXY HERE" +HTTPS: "Your HTTPS PROXY HERE" BASE_URL: "base url for health check" credentials: username: "!"