This wiki describes how to set up a Kubernetes cluster with kuberadm, and then deploying APPC within that Kubernetes cluster.
...
Note |
---|
You may use any specific known stable OOM release for APPC deployment. The above URL downloads latest OOM. |
Customize the oom/kubernetes/onap parent chart, like the values.yaml file, to suit your deployment. You may want to selectively enable or disable ONAP components by changing the subchart **enabled** flags to *true* or *false*.
Code Block |
---|
$ vi oom/kubernetes/onap/values.yaml Example: ... robot: # Robot Health Check enabled: true sdc: enabled: false appc: enabled: true so: # Service Orchestrator enabled: false |
...
Code Block | ||
---|---|---|
| ||
$ kubectl -n onap describe po/devonap-appc-0 Name: dev onap-appc-0 Namespace: onap Priority: 0 PriorityClassName: <none> Node: k8s-node2appc4/10.12.56.19373 Start Time: TueWed, 1520 MayFeb 20182019 1117:3135:4742 -04000500 Labels: app=appc controller-revision-hash=devonap-appc-7d976dd9b9787488477 release=devonap statefulset.kubernetes.io/pod-name=devonap-appc-0 Annotations: <none> Status: RunningPending IP: 10.4742.0.5 Controlled By: StatefulSet/devonap-appc Init Containers: appc-readiness: Container ID: docker://fdbf3011e7911b181a25c868f7d342951ced2832ed63c481253bb06447a0c04fa7582fb876b85ca934024d10814d339cb951803e76a842361be08540edacc08a Image: oomk8s/readiness-check:2.0.0 Image ID: docker-pullable://oomk8s/readiness-check@sha256:7daa08b81954360a1111d03364febcb3dcfeb723bcc12ce3eb3ed3e53f2323ed Port: <none> Host Port: <none> Command: /root/ready.py Args: --container-name appc-db State: TerminatedRunning ReasonStarted: Wed, Completed20 Feb 2019 19:37:31 -0500 Exit Code: Last State: 0 Terminated Started: Reason: Tue, 15 May 2018 11:32:00 -0400Error Exit FinishedCode: 1 Tue, 15 May 2018 11:32:16 -0400 Ready Started: Wed, 20 Feb True2019 19:27:25 -0500 Finished: Wed, 20 Feb 2019 19:37:25 -0500 Ready: False Restart Count: 012 Environment: NAMESPACE: onap (v1:metadata.namespace) Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-v9mnv6vq96 (ro) Containers: appc: Container ID: docker://2b921a54a6cc19f9b7cdd3c8e7904ae3426019224d247fc31a74f92ec6f05ba0 Image: nexus3.onap.org:10001/onap/appc-image:1.35.0-SNAPSHOT-latest Image ID: docker-pullable://nexus3.onap.org:10001/onap/appc-image@sha256:ee8b64bd578f42169a86951cd45b1f2349192e67d38a7a350af729d1bf33069c Ports: 8181/TCP, 1830/TCP Host Ports: 0/TCP, 0/TCP Command: /opt/appc/bin/startODL.sh State: RunningWaiting StartedReason: Tue, 15 May 2018 11:40:13 -0400 PodInitializing Ready: TrueFalse Restart Count: 0 Readiness: tcp-socket :8181exec [/opt/appc/bin/health_check.sh] delay=10s timeout=1s period=10s #success=1 #failure=3 Environment: MYSQL_ROOT_PASSWORD: <set to the key 'db-root-password' in secret 'devonap-appc'> Optional: false SDNC_CONFIG_DIR: /opt/onap/appc/data/properties APPC_CONFIG_DIR: /opt/onap/appc/data/properties DMAAP_TOPIC_ENV: SUCCESS ENABLE_AAF: true ENABLE_ODL_CLUSTER: true APPC_REPLICAS: 3 Mounts: /etc/localtime from localtime (ro) /opt/onap/appc/bin/installAppcDbhealth_check.sh from onap-appc-bin (rw) /opt/onap/appc/bin/startODLinstallAppcDb.sh from onap-appc-bin (rw) /opt/onap/appc/databin/properties/aaiclientinstallFeatures.propertiessh from onap-appc-data-propertiesbin (rw) /opt/onap/appc/data/properties/appcbin/startODL.sh from onap-appc-bin (rw) /opt/onap/appc/data/properties/aaa-app-config.xml from onap-appc-data-properties (rw) /opt/onap/appc/data/properties/aaiclient.properties from onap-appc-data-properties (rw) /opt/onap/appc/data/properties/appc.properties from onap-appc-data-properties (rw) /opt/onap/appc/data/properties/cadi.properties from onap-appc-data-properties (rw) /opt/onap/appc/data/properties/dblib.properties from onap-appc-data-properties (rw) /opt/onap/appc/data/properties/svclogic.properties from onap-appc-data-properties (rw) /opt/onap/appc/svclogic/bin/showActiveGraphs.sh from onap-appc-svclogic-bin (rw) /opt/onap/appc/svclogic/config/svclogic.properties from onap-appc-svclogic-config (rw) /opt/onap/ccsdk/bin/installSdncDb.sh from onap-sdnc-bin (rw) /opt/onap/ccsdk/bin/startODL.sh from onap-sdnc-bin (rw) /opt/onap/ccsdk/data/properties/aaiclient.properties from onap-sdnc-data-properties (rw) /opt/onap/ccsdk/data/properties/dblib.properties from onap-sdnc-data-properties (rw) /opt/onap/ccsdk/data/properties/svclogic.properties from onap-sdnc-data-properties (rw) /opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh from onap-sdnc-svclogic-bin (rw) /opt/onap/ccsdk/svclogic/config/svclogic.properties from onap-sdnc-svclogic-config (rw) /opt/opendaylight/current/daexim from devonap-appc-data (rw) /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg from log-config (rw) /var/log/onap from logs (rw) /var/run/secrets/kubernetes.io/serviceaccount from default-token-v9mnv6vq96 (ro) filebeat-onap: Container ID: docker://b9143c9898a4a071d1d781359e190bdd297e31a2bd04223225a55ff8b1990b32 Image: docker.elastic.co/beats/filebeat:5.5.0 Image ID: docker-pullable://docker.elastic.co/beats/filebeat@sha256:fe7602b641ed8ee288f067f7b31ebde14644c4722d9f7960f176d621097a5942 Port: <none> Host StatePort: <none> RunningState: Started: Waiting Tue, 15 May 2018 11:40:14 -0400Reason: PodInitializing Ready: TrueFalse Restart Count: 0 Environment: <none> Mounts: /usr/share/filebeat/data from data-filebeat (rw) /usr/share/filebeat/filebeat.yml from filebeat-conf (rw) /var/log/onap from logs (rw) /var/run/secrets/kubernetes.io/serviceaccount from default-token-v9mnv6vq96 (ro) Conditions: Type Status Initialized True False Ready True False ContainersReady False PodScheduled True Volumes: devonap-appc-data: Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) ClaimName: devonap-appc-data-devonap-appc-0 ReadOnly: false localtime: Type: HostPath (bare host directory volume) Path: /etc/localtime HostPathType: filebeat-conf: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-filebeat Optional: false log-config: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-logging-cfg Optional: false logs: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: data-filebeat: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: onap-appc-data-properties: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-appc-data-properties Optional: false onap-appc-svclogic-config: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-appc-svclogic-config Optional: false onap-appc-svclogic-bin: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-appc-svclogic-bin Optional: false onap-appc-bin: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-appc-bin Optional: false onap-sdnc-data-properties: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-sdnc-data-properties Optional: false onap-sdnc-svclogic-config: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-sdnc-svclogic-config Optional: false onap-sdnc-svclogic-bin: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-sdnc-svclogic-bin Optional: false onap-sdnc-bin: Type: ConfigMap (a volume populated by a ConfigMap) Name: devonap-appc-onap-sdnc-bin Optional: false default-token-v9mnv6vq96: Type: Secret (a volume populated by a Secret) SecretName: default-token-v9mnv6vq96 Optional: false QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s node.kubernetes.io/unreachable:NoExecute for 300s Events: Type Reason Age Age From Message ---- ------ ---- ---- ------- WarningNormal FailedSchedulingStarted 20m (x11 over 121m) 29m (x2 over 29m) default-scheduler pod has unbound PersistentVolumeClaims (repeated 3 times) Normal Scheduled 29m default-scheduler Successfully assigned dev-appc-0 to k8s-node2 Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "data-filebeat" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "localtime" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "logs" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "dev-appc-data0" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "onap-sdnc-svclogic-bin" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "onap-sdnc-bin" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "onap-appc-data-properties" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "onap-sdnc-data-properties" Normal SuccessfulMountVolume 29m kubelet, k8s-node2 MountVolume.SetUp succeeded for volume "filebeat-conf" Normal SuccessfulMountVolume 29m (x6 over 29m) kubelet, k8s-node2 (combined from similar events): MountVolume.SetUp succeeded for volume "default-token-v9mnv" Normal Pulling 29m kubelet, k8s-node2 pulling image "oomk8s/readiness-check:2.0.0" Normal Pulled 29m kubelet, k8s-node2 Successfully pulled image "oomk8s/readiness-check:2.0.0" Normal Created 29m kubelet, k8s-node2 Created container Normal Started 29m kubelet, k8s-node2 Started container Normal Pulling 29m kubelet, k8s-node2 pulling image "nexus3.onap.org:10001/onap/appc-image:1.3.0-SNAPSHOT-latest" Normal Pulled 21m kubelet, k8s-node2 Successfully pulled image "nexus3.onap.org:10001/onap/appc-image:1.3.0-SNAPSHOT-latest" Normal Created 21m kubelet, k8s-node2 Created container Normal Started 21m kubelet, k8s-node2 Started container Normal Pulling 21m kubelet, k8s-node2 pulling image "docker.elastic.co/beats/filebeat:5.5.0" Normal Pulled 21m kubelet, k8s-node2kubelet, k8s-appc4 Started container Normal Created 10m (x12 over 121m) kubelet, k8s-appc4 Created container Normal Pulling 9s (x13 over 121m) kubelet, k8s-appc4 pulling image "oomk8s/readiness-check:2.0.0" Normal Pulled 8s (x13 over 121m) kubelet, k8s-appc4 Successfully pulled image "docker.elastic.co/beats/filebeat:5.5.0" Normal Created 21m kubelet, k8s-node2 Created container Warning Unhealthy 5m (x16 over 21m) kubelet, k8s-node2 Readiness probe failed: dial tcp 10.47.0.5:8181: getsockopt: connection refusedoomk8s/readiness-check:2.0.0 |
Get logs of containers inside each pod:
...