RUN mv ./kubectl /usr/local/bin/kubectl
-# Copy app config and app jar
-WORKDIR /opt/app/helm-manager/src/main/resources/config
-
-COPY config/KubernetesParticipantConfig.json .
+WORKDIR /etc/app/helm-manager
COPY config/application.yaml .
WORKDIR /opt/app/helm-manager
COPY target/app.jar app.jar
-CMD [ "java", "-jar", "app.jar" ]
+CMD [ "java", "-jar", "app.jar", "--spring.config.location=optional:file:/etc/app/helm-manager/"]
protocol: TCP
{{- end }}
{{- end }}
-{{- if .tls }}
-{{if eq .tls.enabled true -}}
-- name: {{ .name }}-tls
- port: {{ .tls.servicePort }}
- targetPort: {{ .tls.containerPort }}
- protocol: TCP
-{{- end }}
-{{- end }}
{{- end -}}
\ No newline at end of file
ports:
- containerPort: {{ .Values.service.http.containerPort }}
protocol: TCP
- - containerPort: {{ .Values.service.tls.containerPort }}
- protocol: TCP
volumeMounts:
- name: {{ template "helmmanager.name" . }}-pv
mountPath: /var/helm-manager-service
# -----------------------------------------------------------------------------
# Specify Helm Manager's Docker image and repository details here
image:
- registry: nexus3.o-ran-sc.org:10004
+ registry: nexus3.o-ran-sc.org:10002
name: o-ran-sc/nonrtric-helm-manager
- tag: "1.0.0"
- pullPolicy: IfNotPresent
+ tag: "1.1.0"
+ pullPolicy: Always
service:
type: NodePort
http:
- # Enable plaintext HTTP call to the API
- # Disabling this and using a TLS listen only is recommended for most configuration
enabled: true
- servicePort: 8080
- containerPort: 8080
- tls:
- # Enable HTTPS listen for the API
- enabled: true
- servicePort: 8443
- containerPort: 8443
+ servicePort: 8112
+ containerPort: 8083
# -----------------------------------------------------------------------------
# Ingress Controller parameters
readinessProbe:
httpGet:
path: "/helm/charts"
- port: 8080
+ port: 8083
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
livenessProbe:
httpGet:
path: "/helm/charts"
- port: 8080
+ port: 8083
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
--- /dev/null
+{
+ "address" : "chartrepo.nonrtric",
+ "repoName": "cm",
+ "protocol": "http",
+ "port": "8080"
+}
\ No newline at end of file
+++ /dev/null
-{
- "name": "ControlLoopParticipantK8s",
- "localChartDirectory": "/var/helm-manager/local-charts",
- "infoFileName": "CHART_INFO.json",
-
- "intermediaryParameters":{
- "name":"Participant parameters",
- "reportingTimeInterval":120000,
- "description":"Participant Description",
- "participantId":{
- "name":"K8sParticipant0",
- "version":"1.0.0"
- },
- "participantType":{
- "name":"org.onap.k8s.controlloop.K8SControlLoopParticipant",
- "version":"2.3.4"
- },
- "clampControlLoopTopics":{
- "topicSources":[
-
- ],
- "topicSinks":[
- {
- "topic":"POLICY-CLRUNTIME-PARTICIPANT",
- "servers":[
- "localhost"
- ],
- "topicCommInfrastructure":"dmaap"
- },
- {
- "topic":"POLICY-NOTIFICATION",
- "servers":[
- "localhost"
- ],
- "topicCommInfrastructure":"dmaap"
- }
- ]
- }
- },
- "databaseProviderParameters":{
- "name":"PolicyProviderParameterGroup",
- "implementation":"org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
- "databaseDriver":"org.mariadb.jdbc.Driver",
- "databaseUrl":"jdbc:mariadb://localhost:3306/controlloop",
- "databaseUser":"admin",
- "databasePassword":"passme",
- "persistenceUnit":"ToscaConceptTest"
- }
-}
spring:
profiles:
active: prod
+ security:
+ user:
+ name: helmadmin
+ password: itisasecret
+security:
+ enable-csrf: false
+
participant:
- file: src/main/resources/config/KubernetesParticipantConfig.json
+ localChartDirectory: /var/helm-manager-service
+ # This below is not used but need to be here to make the app work
+ infoFileName: CHART_INFO.json
+ intermediaryParameters:
+ reportingTimeIntervalMs: 120000
+ description: Dummy Description
+ participantId:
+ name: noname
+ version: 0.0.1
+ participantType:
+ name: noname
+ version: 0.0.1
+ clampControlLoopTopics:
+ topicSources:
+ topicSinks:
+ -
+ topic: NOTOPIC
+ servers:
+ - localhost
+ topicCommInfrastructure: dmaap
+
management:
endpoints:
web:
server:
# Configuration of the HTTP/REST server. The parameters are defined and handled by the springboot framework.
# See springboot documentation.
- http-port : 8083
+ port: 8083
+ servlet:
+ context-path:
logging:
# Configuration of logging
org.springframework: ERROR
org.springframework.data: ERROR
org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ com.att.nsa.cambria.client.impl: OFF
+ com.att.nsa.apiClient.http: OFF
file:
- name: /var/log/helm-manager/application.log
+ name: /var/log/onap/policy/clamp/application.log
type: NodePort
ports:
- port: 8080
- targetPort: 8080
+ targetPort: 8083
protocol: TCP
name: http
- port: 8443
serviceAccountName: helm-manager-sa
containers:
- name: helmmanagerservice
- image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-helm-manager:1.1.0-SNAPSHOT
+ image: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-helm-manager:1.1.0
imagePullPolicy: Always
ports:
- name: http
- containerPort: 8080
+ containerPort: 8083
- name: https
containerPort: 8443
volumeMounts:
<name>onap-releases</name>
<url>https://nexus.onap.org/content/repositories/releases/</url>
</repository>
- <repository>
- <id>onap-snapshots</id>
- <name>onap-snapshots</name>
- <url>https://nexus.onap.org/content/repositories/snapshots/</url>
- </repository>
- <repository>
- <id>nordix</id>
- <name>39bf7eabe020-releases</name>
- <url>https://artifactory.nordix.org/artifactory/onap-policy-clamp-participant-maven-local</url>
- </repository>
</repositories>
<properties>
<!-- Update this when a new version of the dependency jar shall be included -->
{
- "releaseName": "simpleapp",
- "chartName": "simple-app",
- "version": "0.1.0",
+ "chartId": {
+ "name": "simple-app",
+ "version": "0.1.0"
+ },
"namespace": "ckhm",
- "repository": "cm"
-}
\ No newline at end of file
+ "repository": {
+ "repoName": "cm"
+ },
+ "releaseName": "simpleapp"
+ }
\ No newline at end of file
VALUES_YAML="simple-app-values.yaml"
INFO_JSON="simple-app.json"
INSTALL_JSON="simple-app-installation.json"
+REPO_JSON="cm-repo.json"
PORT=""
HOST=""
PROXY_TAG=""
OK="All tests ok"
-
+USER=helmadmin
+#USER=""
+PWD=itisasecret
+#PWD=""
+PREFIX=/onap/k8sparticipant
+PREFIX=""
print_usage() {
echo "usage: ./test.sh docker|(kube <cluster-ip>)"
}
if [ $1 == "docker" ]; then
PORT=8112
HOST="localhost"
- URL="http://$HOST:$PORT"
+ URL="http://$USER:$PWD@$HOST:$PORT"$PREFIX
+ #URL="http://$HOST:$PORT"$PREFIX
HM_PATH=$URL
else
print_usage
if [ $1 == "kube" ]; then
PORT=$(kubectl get svc helmmanagerservice -n nonrtric -o jsonpath='{...ports[?(@.name=="'http'")].nodePort}')
HOST=$2
- URL="http://$HOST:$PORT"
+ URL="http://$USER:$PWD@$HOST:$PORT"$PREFIX
+ #URL="http://$HOST:$PORT"$PREFIX
HM_PATH=$URL
else
print_usage
echo
+echo "================"
+echo "Add repo"
+echo "================"
+cmd="/helm/repo -X POST -H Content-Type:application/json -d @$REPO_JSON"
+run-curl $cmd
+echo
+
+
echo "============"
echo "Onboard app"
echo "==========="
-cmd="/helm/charts -X POST -F chart=@$APP_TGZ -F values=@$VALUES_YAML -F info=<$INFO_JSON"
+cmd="/helm/onboard/chart -X POST -F chart=@$APP_TGZ -F values=@$VALUES_YAML -F info=<$INFO_JSON"
run-curl $cmd
echo
echo "============"
echo "Delete chart"
echo "==========="
-cmd="/helm/charts/simple-app/0.1.0 -X DELETE"
+cmd="/helm/chart/simple-app/0.1.0 -X DELETE"
run-curl $cmd
echo