# for metrics and smo stack
(cd application; ./setup-smo-template.sh)
-
-
## create-infrastructure: Create kubernetes all-in one infrastructure
.PHONY: create-infrastructure
create-infrastructure:
# TODO: create kubeone.yaml from template file
-
+
(cd infrastructure; kubeone apply -m kubeone.yaml)
(cd infrastructure; mkdir -p ~/.kube; cp o-ran-sc-test-cluster-kubeconfig ~/.kube/config)
kubectl wait --for=condition=ready node -l node-role.kubernetes.io/control-plane=
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=sdnc-web --timeout 1800s --namespace onap
(cd application; ./patch-pmbulk.sh)
-## undeploy-smo: Un-Deploys SMO
+## undeploy-smo: Un-Deploys SMO
.PHONY: undeploy-smo
undeploy-smo:
helm undeploy onap -n onap
for topic in $$(kubectl get kafkatopic -n onap -o name); do kubectl patch $$topic -n onap --type=json -p '[{"op": "remove", "path": "/metadata/finalizers"}]'; done
kubectl delete ns onap
sudo rm -rf /dockerdata-nfs/onap
-
+
## deploy-metric: Deploys grafana and influxdb for PM data
.PHONY: deploy-metric
deploy-metric:
(cd metrics; ./deploy-metric-stack.sh )
- (cd metrics; ./deploy-pm-ms.sh )
+ (cd application; ./deploy-pm-ms.sh )
## undeploy-metric: Deploys grafana and influxdb for PM data
.PHONY: undeploy-metric
undeploy-metric:
(cd metrics; ./undeploy-metric-stack.sh )
- helm uninstall -n metric pm-metric-service
+ helm uninstall -n onap pm-metric-service
## deploy-test-nfs: Deploys test network functions
.PHONY: deploy-test-nfs
deploy-test-nfs:
(cd tests/network-simulation; ./start-network-simulation.sh )
-## undeploy-test-nfs: un-deploys test network functions
-.PHONY: undeploy-test-nfs
-undeploy-test-nfs:
- (cd tests/network-simulation; ./stop-network-simulation.sh )
+
+## get-deploy-info: returns list of useful information
+.PHONY: get-deploy-info
+get-deploy-info:
+ @echo "FQDN and passwords for services"
+ @echo "Grafana Dashboard:"
+ @kubectl get ingress -o custom-columns="NAME:.metadata.name,HOSTS:.spec.rules[].host" -n metric |grep grafana
+ @echo "Grafana Credentials:"
+ @echo user: $$(kubectl get secret --namespace metric onap-grafana -o jsonpath="{.data.admin-user}" | base64 --decode ; echo)
+ @echo password: $$(kubectl get secret --namespace metric onap-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo)
+ @echo
+ @echo "SMO RESTCONF ODLUX:"
+ @kubectl get ingress -o custom-columns="NAME:.metadata.name,HOSTS:.spec.rules[].host" -n onap |grep sdnc
+ @echo user: $$(kubectl get secret --namespace onap onap-sdnc-odl-creds -o jsonpath="{.data.login}" | base64 --decode ; echo)
+ @echo password: $$(kubectl get secret --namespace onap onap-sdnc-odl-creds -o jsonpath="{.data.password}" | base64 --decode ; echo)
+ @echo
+ @echo "SMO O1-VES-Collector:"
+ @kubectl get ingress -o custom-columns="NAME:.metadata.name,HOSTS:.spec.rules[].host" -n onap |grep ves
+ @VES_USER=$$(kubectl get secret --namespace onap onap-sdnc-ves-collector-secret -o jsonpath="{.data.login}" | base64 --decode);\
+ VES_PASSWORD=$$(kubectl get secret --namespace onap onap-sdnc-ves-collector-secret -o jsonpath="{.data.password}" | base64 --decode ; echo);\
+ echo user: $$VES_USER; \
+ echo password: $$VES_PASSWORD;\
+ echo example for ves-collector end point: https://$$VES_USER:$$VES_PASSWORD@$$(kubectl get ingress -o custom-columns="HOSTS:.spec.rules[].host" -n onap |grep ves)/eventListener/v7 \
+
+
+
+
+
+
+
+
+
+++ /dev/null
-1. Get the application URL by running these commands:
-{{- if .Values.ingress.enabled }}
-{{- range $host := .Values.ingress.hosts }}
- {{- range .paths }}
- http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
- {{- end }}
-{{- end }}
-{{- else if contains "NodePort" .Values.service.type }}
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "pm-metric-service.fullname" . }})
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.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 --namespace {{ .Release.Namespace }} svc -w {{ include "pm-metric-service.fullname" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "pm-metric-service.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
- echo http://$SERVICE_IP:{{ .Values.service.port }}
-{{- else if contains "ClusterIP" .Values.service.type }}
- export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "pm-metric-service.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
- export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
- echo "Visit http://127.0.0.1:8080 to use your application"
- kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
-{{- end }}