From: Zhe Huang Date: Sat, 22 Jun 2019 03:24:51 +0000 (-0400) Subject: Integrate the R1 version of the xapp manager. X-Git-Tag: 0.0.2~91 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=2485dce0a85ca45a97c7eafb88864e77a5fb6782;p=it%2Fdep.git Integrate the R1 version of the xapp manager. Signed-off-by: Zhe Huang Change-Id: Ia3546f42a41cc035a9059c6ce888bf7d57c3a1f2 --- diff --git a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE index 65a0f07e..737526d3 100644 --- a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE @@ -59,12 +59,12 @@ cluster: repositoryCredential: user: "docker" - password: "haha" + password: "docker" helmrepoCredential: user: "helm" - password: "hehe" + password: "docker" adminPassword: admin123 diff --git a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE index 97103b4f..7d704757 100644 --- a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE @@ -53,15 +53,15 @@ global: # xApp Manager appmgr: image: - name: xapp-manager - tag: latest + name: ric-plt-appmgr + tag: 0.1.3 # DBAAS dbaas: backend: image: - name: redis-standalone - tag: latest + name: ric-plt-dbaas + tag: 0.1.0 # E2 Manager e2mgr: diff --git a/ric-infra/20-Credential/helm/resources/tls.crt b/ric-infra/20-Credential/helm/resources/tls.crt index 3060f345..984701e9 100644 --- a/ric-infra/20-Credential/helm/resources/tls.crt +++ b/ric-infra/20-Credential/helm/resources/tls.crt @@ -1,19 +1,19 @@ -----BEGIN CERTIFICATE----- -MIIDCTCCAfGgAwIBAgIBATANBgkqhkiG9w0BAQsFADA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platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml new file mode 100644 index 00000000..c52bf15d --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/appmgr/resources/appenv.yaml @@ -0,0 +1,5 @@ +NAME: xappmgr +DBAAS_SERVICE_HOST: "r0-dbaas-redis-standalone" +DBAAS_SERVICE_PORT: "6379" +DBAAS_PORT_6379_TCP_ADDR: "r0-dbaas-redis-standalone" +DBAAS_PORT_6379_TCP_PORT: "6379" diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/resources/appmgr.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/resources/appmgr.yaml new file mode 100644 index 00000000..c7c80863 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/appmgr/resources/appmgr.yaml @@ -0,0 +1,25 @@ +"local": + # Port on which the xapp-manager REST services are provided + "host": __REST_PORT__ +"helm": + # Remote helm repo URL. UPDATE this as required. + "repo": __HELM_REPO__ + + # Repo name referred within the xapp-manager + "repo-name": __REPO_NAME__ + + # Tiller service details in the cluster. UPDATE this as required. + "tiller-service": __TILLER_SERVICE__ + "tiller-namespace": __TILLER_NAMESPACE__ + "tiller-port": __TILLER_PORT__ + # helm username and password files + "helm-username-file": "/opt/ric/secret/helm_repo_username" + "helm-password-file": "/opt/ric/secret/helm_repo_password" + "retry": 1 +"xapp": + #Namespace to install xAPPs + "namespace": "ricxapp" + "tarDir": "/tmp" + "schema": "descriptors/schema.json" + "config": "config/config-file.json" + "tmpConfig": "/tmp/config-file.json" diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/resources/xapp-manager.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/resources/xapp-manager.yaml deleted file mode 100644 index 179bb756..00000000 --- a/ric-platform/50-RIC-Platform/helm/appmgr/resources/xapp-manager.yaml +++ /dev/null @@ -1,14 +0,0 @@ -"local": - # Port on which the xapp-manager REST services are provided - "host": __REST_PORT__ -"helm": - # Remote helm repo URL. UPDATE this as required. - "repo": __HELM_REPO__ - - # Repo name referred within the xapp-manager - "repo-name": __REPO_NAME__ - - # Tiller service details in the cluster. UPDATE this as required. - "tiller-service": __TILLER_SERVICE__ - "tiller-namespace": __TILLER_SERVICE__ - "tiller-port": __TILLER_PORT__ diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml index 0ed87d49..79f334d5 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/templates/appconfig.yaml @@ -20,10 +20,11 @@ kind: ConfigMap metadata: name: {{ include "appmgr.fullname" . }}-appconfig data: - {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.containerPort) | quote -}} - {{- $helmrepo := include "common.helmrepository" . | quote -}} - {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}} - {{- $tiller := include "common.helmrepositorytiller" . | quote -}} - {{- $tillernamespace := include "common.helmrepositorytillernamespace" . | quote -}} - {{- $tillerport := include "common.helmrepositorytillerport" . | quote -}} - {{- (.Files.Glob "resources/xapp-manager.yaml").AsConfig | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }} + appmgr.yaml: | + {{- $restport := default ":8080" (printf ":%.0f" .Values.appmgr.containerPort) | quote -}} + {{- $helmrepo := include "common.helmrepository" . | quote -}} + {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}} + {{- $tiller := include "common.helmrepositorytiller" . | quote -}} + {{- $tillernamespace := include "common.helmrepositorytillernamespace" . | quote -}} + {{- $tillerport := include "common.helmrepositorytillerport" . | quote -}} + {{- (.Files.Glob "resources/appmgr.yaml").AsConfig | replace "__HELM_REPO__" $helmrepo | replace "__REST_PORT__" $restport | replace "__REPO_NAME__" $reponame | replace "__TILLER_SERVICE__" $tiller | replace "__TILLER_NAMESPACE__" $tillernamespace | replace "__TILLER_PORT__" $tillerport | nindent 2 }} diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml index 465f08c5..5f6c8e7a 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/templates/appenv.yaml @@ -20,6 +20,5 @@ kind: ConfigMap metadata: name: {{ include "appmgr.fullname" . }}-appenv data: - {{- with .Values.appmgr.appenv }} - {{- toYaml . | nindent 2 }} - {{- end }} + {{- (.Files.Get "resources/appenv.yaml") | nindent 2 }} + diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml index b425365a..b6711523 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml @@ -40,6 +40,10 @@ spec: release: {{ .Release.Name }} spec: hostname: {{ .Chart.Name }} + hostAliases: + - ip: "135.207.143.86" + hostnames: + - "helm.ricinfra.local" imagePullSecrets: - name: {{ include "common.repositoryCred" . }} containers: @@ -52,7 +56,8 @@ spec: protocol: TCP volumeMounts: - name: config-volume - mountPath: {{ .Values.appmgr.appconfigpath }} + mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml + subPath: appmgr.yaml - name: secret-volume mountPath: {{ .Values.appmgr.appsecretpath }} - name: cert-volume diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/values.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/values.yaml index fef7eb9b..2bb470b4 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/values.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/values.yaml @@ -16,15 +16,15 @@ ################################################################################ repository: "nexus3.o-ran-sc.org:10004" +#repositoryOverride: "nexus3.o-ran-sc.org:10004" imagePullPolicy: IfNotPresent repositoryCred: docker-reg-cred - # Helm Repo for xApp # By default a local helm repo is used. The global setting will override # the default value. You can further override using #helmRepositoryOverride: "" -helmRepository: "helm.ricinfra.local" +helmRepository: "https://helm.ricinfra.local:31000" # Default secret name for Helm Repo credential. .Value.golbal.helmRepositoryCred will # override the default value. You can further override uing @@ -65,8 +65,8 @@ helmRepositoryTillerPort: "44134" appmgr: image: # xAppmanager Docker image name and tag - name: xapp-manager - tag: latest + name: ric-plt-appmgr + tag: 0.1.3 # This section describes xAppManager replicaCount: 1 @@ -79,18 +79,13 @@ appmgr: port: 8080 name: appmgr-service protocol: "TCP" - export: 30020 + extport: 30020 # config # Path referred in xapp-manager for retrieving configuration details appconfigpath: /opt/ric/config - # To be provided as env variables - appenv: - NAME: xappmgr - #ENV1: "envvalue1" - #ENV2: "envvalue2" # secret # Path referred in xapp-manager for retrieving helm repo secrets diff --git a/ric-platform/50-RIC-Platform/helm/common/templates/_helmrepo.tpl b/ric-platform/50-RIC-Platform/helm/common/templates/_helmrepo.tpl index 4143ce35..c662cf53 100644 --- a/ric-platform/50-RIC-Platform/helm/common/templates/_helmrepo.tpl +++ b/ric-platform/50-RIC-Platform/helm/common/templates/_helmrepo.tpl @@ -154,16 +154,16 @@ */}} {{- define "common.helmrepositorytillerport" -}} {{- if .Values.helmRepositoryTillerPortOverride -}} - {{- printf "%s" .Values.helmRepositoryTillerPortOverride -}} + {{- printf "%.0f" .Values.helmRepositoryTillerPortOverride -}} {{- else -}} {{- if .Values.global -}} {{- if .Values.global.helmRepositoryTillerPort -}} - {{- printf "%s" .Values.global.helmRepositoryTillerPort -}} + {{- printf "%.0f" .Values.global.helmRepositoryTillerPort -}} {{- else -}} - {{- printf "%s" .Values.helmRepositoryTillerPort -}} + {{- printf "%.0f" .Values.helmRepositoryTillerPort -}} {{- end -}} {{- else -}} - {{- printf "%s" .Values.helmRepositoryTillerPort -}} + {{- printf "%.0f" .Values.helmRepositoryTillerPort -}} {{- end -}} {{- end -}} {{- end -}}