diff options
author | Edyta Krukowska <edyta.krukowska@nokia.com> | 2021-04-22 14:48:13 +0200 |
---|---|---|
committer | Edyta Krukowska <edyta.krukowska@nokia.com> | 2021-04-23 11:46:44 +0200 |
commit | 15c88d48aab835770889f9db1bd4fd46fcb89772 (patch) | |
tree | d3acaa7f2ccb08fba80432f4e6c7c65b51108929 | |
parent | 831e07a31fff07a9d2ab59f730852cd38680384a (diff) |
Create chart for nf-simulator agregating avcn, netconf and ves-client
Issue-ID: INT-1869
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: Iadbf7c5186aedb3b9c74c2daed51eda0b67bd1a6
-rw-r--r-- | helm/README.md | 39 | ||||
-rw-r--r-- | helm/avcn-manager/Chart.yaml | 3 | ||||
-rw-r--r-- | helm/avcn-manager/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | helm/avcn-manager/values.yaml | 10 | ||||
-rw-r--r-- | helm/netconf/Chart.yaml | 2 | ||||
-rw-r--r-- | helm/netconf/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | helm/netconf/values.yaml | 10 | ||||
-rw-r--r-- | helm/nf-simulator/Chart.yaml | 49 | ||||
-rw-r--r-- | helm/nf-simulator/values.yaml | 32 | ||||
-rw-r--r-- | helm/pm-https-server/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | helm/pm-https-server/values.yaml | 2 | ||||
-rw-r--r-- | helm/ves-client/templates/deployment.yaml | 2 | ||||
-rw-r--r-- | helm/ves-client/values.yaml | 10 |
13 files changed, 143 insertions, 22 deletions
diff --git a/helm/README.md b/helm/README.md new file mode 100644 index 0000000..4e314d6 --- /dev/null +++ b/helm/README.md @@ -0,0 +1,39 @@ +# Nf-simulator + +# How to deploy on lab + +1. Copy files from helm to lab + + `scp -i <path to key file .pem> -r <path to helm/> ubuntu@<RKE_NODE_IP>:<remote path to>/nf-simulator ` +2. Log into the RKE + +3. Update helm dependencies + + WARNING: Before this step make sure, that in subproject folders "charts" folders are empty + + `cd ./nf-simulator` + `helm dependency update nf-simulator` + +4. Install chart on your lab + + `helm install nf nf-simulator/nf-simulator/ -f oom/kubernetes/registry.yaml` + +# How to use nf-simulator +1. Try to send message: + + `<config xmlns="http://onap.org/pnf-simulator"> + <itemValue1>4265</itemValue1> + <itemValue2>87</itemValue2> + </config> ` + + to http://<WORKER_ID_NODE>:30555/change_config/pnf-simulator +2. List all your pods +3. Check logs in netconf (you should see information that configuration has changed) + `kubectl get logs <netconf pod name>` +4. Check logs in avcn-manager (you have to wait couple of minutes, and you should see information about sending new config to ves-client) + `kubectl get logs <avcn-manager pod name>` +5. Check logs in ves-client (you should see logs about trying to send a new message to ves) + `kubectl get logs <ves-client pod name>` + + +
\ No newline at end of file diff --git a/helm/avcn-manager/Chart.yaml b/helm/avcn-manager/Chart.yaml index 6f1e851..858157f 100644 --- a/helm/avcn-manager/Chart.yaml +++ b/helm/avcn-manager/Chart.yaml @@ -30,3 +30,6 @@ dependencies: - name: kafka version: 12.17.2 repository: https://charts.bitnami.com/bitnami + - name: repositoryGenerator + version: ~8.x-0 + repository: '@local'
\ No newline at end of file diff --git a/helm/avcn-manager/templates/deployment.yaml b/helm/avcn-manager/templates/deployment.yaml index 5b0c472..e83ff04 100644 --- a/helm/avcn-manager/templates/deployment.yaml +++ b/helm/avcn-manager/templates/deployment.yaml @@ -38,7 +38,7 @@ spec: name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/helm/avcn-manager/values.yaml b/helm/avcn-manager/values.yaml index 85ccb09..3a60df8 100644 --- a/helm/avcn-manager/values.yaml +++ b/helm/avcn-manager/values.yaml @@ -12,12 +12,11 @@ image: config: vesEndpoint: http://ves:8080/eventListener/v7 - kafkaBootstrapServer: avcn-manager-kafka:9092 + kafkaBootstrapServer: nf-simulator-kafka:9092 kafkaSourceTopic: config kafkaAplicationId: avcn-manager pnfsimulatorEndpoint: http://ves-client:5000/simulator/start - imagePullSecrets: [] nameOverride: "" fullnameOverride: "avcn-manager" @@ -47,7 +46,7 @@ affinity: {} zookeeper: - fullnameOverride: "avcn-manager-zookeeper" + fullnameOverride: "nf-simulator-zookeeper" auth: enabled: false allowAnonymousLogin: true @@ -55,11 +54,10 @@ zookeeper: enabled: false kafka: - fullnameOverride: "avcn-manager-kafka" + fullnameOverride: "nf-simulator-kafka" zookeeper: enabled: false - connect: "avcn-manager-zookeeper:2181" externalZookeeper: - servers: "avcn-manager-zookeeper" + servers: "nf-simulator-zookeeper" persistence: enabled: false diff --git a/helm/netconf/Chart.yaml b/helm/netconf/Chart.yaml index 348ffaf..eed7e7b 100644 --- a/helm/netconf/Chart.yaml +++ b/helm/netconf/Chart.yaml @@ -20,7 +20,7 @@ version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.0.0 +appVersion: 1.0.1 dependencies: - name: zookeeper version: 6.7.0 diff --git a/helm/netconf/templates/deployment.yaml b/helm/netconf/templates/deployment.yaml index 15785cd..4a4663a 100644 --- a/helm/netconf/templates/deployment.yaml +++ b/helm/netconf/templates/deployment.yaml @@ -31,7 +31,7 @@ spec: name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: {{ include "repositoryGenerator.repository" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.image.pullPolicy }} livenessProbe: httpGet: diff --git a/helm/netconf/values.yaml b/helm/netconf/values.yaml index 146cd8a..3feebe1 100644 --- a/helm/netconf/values.yaml +++ b/helm/netconf/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: /onap/org.onap.integration.nfsimulator.netconfserver + repository: onap/org.onap.integration.nfsimulator.netconfserver pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" @@ -29,7 +29,7 @@ service: resources: {} zookeeper: - fullnameOverride: "netconf-server-zookeeper" + fullnameOverride: "nf-simulator-zookeeper" auth: enabled: false allowAnonymousLogin: true @@ -37,16 +37,16 @@ zookeeper: enabled: false kafka: - fullnameOverride: "netconf-server-kafka" + fullnameOverride: "nf-simulator-kafka" zookeeper: enabled: false externalZookeeper: - servers: "netconf-server-zookeeper" + servers: "nf-simulator-zookeeper" persistence: enabled: false config: - kafka_hostname: "netconf-server-kafka" + kafka_hostname: "nf-simulator-kafka" nodeSelector: {} diff --git a/helm/nf-simulator/Chart.yaml b/helm/nf-simulator/Chart.yaml new file mode 100644 index 0000000..5db0d82 --- /dev/null +++ b/helm/nf-simulator/Chart.yaml @@ -0,0 +1,49 @@ +apiVersion: v2 +name: nf-simulator +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: 0.1.0 + +dependencies: + - name: ves-client + version: 0.1.0 + repository: 'file://../ves-client' + - name: netconf-server + version: 0.1.0 + repository: 'file://../netconf' + - name: avcn-manager + version: 0.1.0 + repository: 'file://../avcn-manager' + - name: zookeeper + version: 6.7.0 + repository: https://charts.bitnami.com/bitnami + - name: kafka + version: 12.17.2 + repository: https://charts.bitnami.com/bitnami + - name: mongodb + version: 10.x + repository: https://charts.bitnami.com/bitnami + - name: mongo-express + version: 2.x + repository: https://cowboysysop.github.io/charts/ + - name: repositoryGenerator + version: ~8.x-0 + repository: '@local'
\ No newline at end of file diff --git a/helm/nf-simulator/values.yaml b/helm/nf-simulator/values.yaml new file mode 100644 index 0000000..845576f --- /dev/null +++ b/helm/nf-simulator/values.yaml @@ -0,0 +1,32 @@ +zookeeper: + fullnameOverride: "nf-simulator-zookeeper" + auth: + enabled: false + allowAnonymousLogin: true + persistence: + enabled: false + +kafka: + fullnameOverride: "nf-simulator-kafka" + zookeeper: + enabled: false + externalZookeeper: + servers: "nf-simulator-zookeeper" + persistence: + enabled: false + + +mongo-express: + fullnameOverride: "nf-simulator-mongo-express" + mongodbServer: nf-simulator-mongodb + nameOverride: mongo-express + mongodbAdminPassword: zXcVbN123! + +mongodb: + fullnameOverride: "nf-simulator-mongodb" + persistence: + enabled: false + auth: + rootPassword: zXcVbN123! + database: pnf_simulator + username: root diff --git a/helm/pm-https-server/templates/deployment.yaml b/helm/pm-https-server/templates/deployment.yaml index 80a4079..dacee57 100644 --- a/helm/pm-https-server/templates/deployment.yaml +++ b/helm/pm-https-server/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/helm/pm-https-server/values.yaml b/helm/pm-https-server/values.yaml index 5301bba..f2b7ddf 100644 --- a/helm/pm-https-server/values.yaml +++ b/helm/pm-https-server/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. image: - repository: onap/org.onap.integration.nfsimulator.pmhttpsserver + repository: onap/org.onap.integration.nfsimulator.pmhttpsserver pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" diff --git a/helm/ves-client/templates/deployment.yaml b/helm/ves-client/templates/deployment.yaml index d635c69..6220ced 100644 --- a/helm/ves-client/templates/deployment.yaml +++ b/helm/ves-client/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: {{ include "repositoryGenerator.repository" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - containerPort: {{ .Values.config.containerPort }} diff --git a/helm/ves-client/values.yaml b/helm/ves-client/values.yaml index c5a8391..7ad63d3 100644 --- a/helm/ves-client/values.yaml +++ b/helm/ves-client/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: /onap/org.onap.integration.nfsimulator.vesclient + repository: onap/org.onap.integration.nfsimulator.vesclient pullPolicy: IfNotPresent tag: "" @@ -13,7 +13,7 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "ves-client" config: - mongoDbServer: ves-client-mongodb + mongoDbServer: nf-simulator-mongodb useCertForAuth: true containerPort: 5000 @@ -39,13 +39,13 @@ tolerations: [] affinity: {} mongo-express: - fullnameOverride: "ves-client-mongo-express" - mongodbServer: ves-client-mongodb + fullnameOverride: "nf-simulator-mongo-express" + mongodbServer: nf-simulator-mongodb nameOverride: mongo-express mongodbAdminPassword: zXcVbN123! mongodb: - fullnameOverride: "ves-client-mongodb" + fullnameOverride: "nf-simulator-mongodb" persistence: enabled: false auth: |