Merge "Service endpoint annotation for VF-C"
authorMike Elliott <mike.elliott@amdocs.com>
Thu, 5 Oct 2017 18:02:19 +0000 (18:02 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 5 Oct 2017 18:02:19 +0000 (18:02 +0000)
81 files changed:
cloudify-onap/blueprint.yaml [new file with mode: 0644]
cloudify-onap/docker-custom-readiness/Dockerfile [new file with mode: 0644]
cloudify-onap/docker-custom-readiness/ready.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/__init__.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/app.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/__init__.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/constants.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/deployment_result.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/helm.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/init_pod.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/namespace.py [moved from cloudify/scripts/onap/create_namespace.py with 50% similarity]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/resources_services.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/workarounds.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/environment.py [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/k8s_installer/requirements.txt [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/plugin.yaml [new file with mode: 0755]
cloudify-onap/plugins/onap-installation-plugin/requirements.txt [new file with mode: 0644]
cloudify-onap/plugins/onap-installation-plugin/setup.py [new file with mode: 0755]
cloudify/inputs/message-router-blueprint.yaml.example [deleted file]
cloudify/scripts/configure_node.py [deleted file]
cloudify/scripts/create.py [deleted file]
cloudify/scripts/onap/configure_docker_secret_workaround.py [deleted file]
cloudify/scripts/onap/create_init_pod.py [deleted file]
cloudify/scripts/onap/create_resources_services.py [deleted file]
cloudify/scripts/onap/delete_init_pod.py [deleted file]
cloudify/scripts/onap/delete_namespace.py [deleted file]
cloudify/scripts/onap/delete_resources_services.py [deleted file]
cloudify/scripts/tasks.py [deleted file]
cloudify/types/kubernetes.yaml [deleted file]
cloudify/types/onap.yaml [deleted file]
kubernetes/aaf/templates/aaf-cs-deployment.yaml
kubernetes/aaf/templates/aaf-deployment.yaml
kubernetes/aai/templates/aai-resources-deployment.yaml
kubernetes/aai/templates/aai-traversal-deployment.yaml
kubernetes/aai/values.yaml
kubernetes/appc/templates/appc-deployment.yaml
kubernetes/appc/values.yaml
kubernetes/config/docker/init/config-init.sh
kubernetes/config/docker/init/src/config/aaf/data2/identities.dat [new file with mode: 0644]
kubernetes/config/docker/init/src/config/sdnc/conf/aaiclient.properties
kubernetes/config/docker/init/src/config/sdnc/conf/admportal.json
kubernetes/mock/Chart.yaml [new file with mode: 0644]
kubernetes/mock/templates/all-services.yaml [new file with mode: 0644]
kubernetes/mock/templates/sniroemulator-deployment.yaml [new file with mode: 0644]
kubernetes/mock/values.yaml [new file with mode: 0644]
kubernetes/mso/templates/mso-deployment.yaml
kubernetes/mso/values.yaml
kubernetes/oneclick/aaf.sh [deleted file]
kubernetes/oneclick/aai.sh [deleted file]
kubernetes/oneclick/appc.sh [deleted file]
kubernetes/oneclick/clamp.sh [deleted file]
kubernetes/oneclick/dcae.sh [deleted file]
kubernetes/oneclick/message-router.sh [deleted file]
kubernetes/oneclick/mso.sh [deleted file]
kubernetes/oneclick/policy.sh [deleted file]
kubernetes/oneclick/portal.sh [deleted file]
kubernetes/oneclick/robot.sh [deleted file]
kubernetes/oneclick/sdc.sh [deleted file]
kubernetes/oneclick/sdnc.sh [deleted file]
kubernetes/oneclick/setenv.bash
kubernetes/oneclick/vfc.sh [deleted file]
kubernetes/oneclick/vid.sh [deleted file]
kubernetes/oneclick/vnfsdk.sh [deleted file]
kubernetes/policy/templates/dep-drools.yaml
kubernetes/policy/templates/dep-pap.yaml
kubernetes/policy/templates/dep-pdp.yaml
kubernetes/policy/values.yaml
kubernetes/portal/templates/portal-apps-deployment.yaml
kubernetes/portal/templates/portal-mariadb-deployment.yaml
kubernetes/portal/values.yaml
kubernetes/sdc/templates/sdc-be.yaml
kubernetes/sdc/templates/sdc-fe.yaml
kubernetes/sdc/values.yaml
kubernetes/sdnc/templates/all-services.yaml
kubernetes/sdnc/templates/dgbuilder-deployment.yaml
kubernetes/sdnc/templates/sdnc-deployment.yaml
kubernetes/sdnc/templates/web-deployment.yaml
kubernetes/sdnc/values.yaml
kubernetes/vid/templates/vid-server-deployment.yaml
kubernetes/vid/values.yaml
onap-blueprint.yaml [deleted file]

diff --git a/cloudify-onap/blueprint.yaml b/cloudify-onap/blueprint.yaml
new file mode 100644 (file)
index 0000000..96d297d
--- /dev/null
@@ -0,0 +1,188 @@
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+  Blueprint deploys all ONAP kubernetes resources defined in YAML files on existing kubernetes cluster
+  The following pre-setup steps are assumed, but not required:
+  - Create Cloudify Example Environment: https://github.com/cloudify-examples/cloudify-environment-setup.
+  - Create Kubernetes Cluster: https://github.com/cloudify-examples/simple-kubernetes-blueprint.
+
+imports:
+  - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.1/resources/rest-service/cloudify/types/types.yaml
+  # Plugin required: https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/releases/download/1.2.1rc1/cloudify_kubernetes_plugin-1.2.1rc1-py27-none-linux_x86_64-centos-Core.wgn
+  - https://raw.githubusercontent.com/cloudify-incubator/cloudify-kubernetes-plugin/1.2.1/plugin.yaml
+#  - https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1.zip
+  - plugins/onap-installation-plugin/plugin.yaml
+
+inputs:
+  kubernetes_configuration_file_content:
+    description: >
+      File content of kubernetes master YAML configuration
+    default:
+      apiVersion: v1
+      clusters:
+      - cluster:
+          certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFM01UQXdNakV6TVRNeU4xb1hEVEkzTURrek1ERXpNVE15TjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTDN4CnRqRllVd25GVmxnNFZhd3BNaFB1N2hDOXVNSEJmUU9JclIrU1B4TElaMUVjTERXdTBod1pWWloxSUF4K0NrQlcKU1BmVDdXSE5zNld4RHAyRUpoVlp2TEFBVW9nem5aSlJnU0Z2RW1NZWg4cXhTaSsrQmtNNmxvTytTTVE0eFJlVApFbTZpd3JrdFZNUXVocDhkVG01MGpIUjMyelBTQklZRGpQejYwWEpzNXp2MEJzL0VlSHRDS0RxV2ZoZWpYZjBECmhQNi9DSU45UjBwNk9UZTdSYUV6dUtlblRtTml0dzNJTkg4b3BhYlY2TW8ycEFvbVRRUG5pZTVZZ2EzNGNndXEKTXpYSmVQUE1CQSs4UDNmS3BFcDJQU3UzWUF3SGg4VWo0MlRDTjMxQ1BBM3F4dUxGejBwOGw5ckJ5WVh6amRybQpwNFZIV1FGOTh3eXBFUW0xNFdVQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFBS3Q2a2E2R04rWksveEx5Nk1tcWpSQTZpa2QKMjYwS3g0ak9FWUtrNWtTemlPOE5Iazhza3JNNzZSVksxdUwxZkFzU0N5SnYyOUJNb3NGQkhISDltOGNBbnFFcgowRGVvdDhHY0d6OWh6ZTlOcGhGNkFNNEhCZTFDbDhkME9vdm91K3dsYk1VTDN4M1hNUHZmMDRKajZsMUJMdEx2Cjh2Nk5Eb0lWdkppS1FLM0tuK3BHUVBZd2x1UEFoSEZQZUdlZ1gvTnBlNXJjMVZGRUtLUkRQRVFRS0xrcE5TZ2IKNzgwZ2ZMTkxJUTJsQnczZHRjazcyelkyK0dlWlp3MEM2ckk5QUhBekg3ZXpZY0pvT2VmVjArZE9zV2lJNVB4UgowZnNYSlNEOVR4SDVVMlRSQ25KZ214M1ZLTGl5OTZyOGsrOTdkWlAvN3h2Q3dGSU9wc2I2UGcxdjNxZz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
+          server: https://192.168.120.5:6443
+        name: kubernetes
+      contexts:
+      - context:
+          cluster: kubernetes
+          user: kubernetes-admin
+        name: kubernetes-admin@kubernetes
+      current-context: kubernetes-admin@kubernetes
+      kind: Config
+      preferences: {}
+      users:
+      - name: kubernetes-admin
+        user:
+          client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJRUFMaVFKV0d2ZmN3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4TnpFd01ESXhNekV6TWpkYUZ3MHhPREV3TURJeE16RXpNamxhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXVOWFFJSlNzSmdtWndXMTEKcEtRZTV5TkQ1THBUdDY5dENKeEpoWXZPbElUOTRwVmdtVnBLNjhlMUNhQ2YxYkt0N2hCMUFOSVJHam8xMTYxNgpGUVRkaE5ZN0tnZFFUNGsrMC9mV0hBZzdCYnhKSDFCdEVvOGorTFk0dDRMNUVCS1l2dTN4Z21NS2E3SGMxZiszCkRQdWtndDZUZm1JazZEM0JkTHQyays2ZDhMclAzYmtkVmQwS1o2OWtnRnBuSWxtNkdrQWhrZWRleE5PQ21vRE8KU0hHMEJvaWphSjRuNUUrWGtNUEpHM3c3aUhNeE5RQ1Fob1lVOC84MGZHWUd5Y2M5TklLSlRFWmVjVGxOeCtPVApyd1F4aWRWa0FNK3I2K085ZlVMSmV1VDlhbXhzOEJNbVNwQko2TU0xelZaTDA5RGp3QytKSFRmY25IMTRBTTJ5CnN3c1hSUUlEQVFBQm95Y3dKVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFCNkRNanRFQkMvSTlkK1VqYWNXM0R5K0pZd21hYWdOUHJycApyaWV0OExlMHFuOS9GUkRpcnpTZldUNXFSNzg3dEpqRWdIaHlvZzFQWE1ZY3l6ajhRS0hyTXJXZUJMck5EQ08wCkVFTGMzSnNyUkdiK0MxWk1MQ3k1VmRVd2Q4ZnYzNm5vRlZOelVneitBTG9WSmVUUEdBYUxTbjA5OWo0RXhxUXoKK3FYTDltZEpQc1FwVVR4OTN3Z1ppcjJRMzcxdXovU21UYkxsOEhjMUtkbC9MODFXM0xYY3JrbFAvbFBkUG9yVgpjUmFBYm94NjBTMmxFTE16dUZHRThaR0lPYlFseDJUdzAxcENvckQ0NHVqOHU1ZmRiWkxhRHZuSHZDODlvSjhNCml5VnU5dkxSajhzbmZvb0ZLMjVqOGI1SzNGMGlLcWRzaktiSWVPS3dKWWkwdGNPWC9GYz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
+          client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVBdU5YUUlKU3NKZ21ad1cxMXBLUWU1eU5ENUxwVHQ2OXRDSnhKaFl2T2xJVDk0cFZnCm1WcEs2OGUxQ2FDZjFiS3Q3aEIxQU5JUkdqbzExNjE2RlFUZGhOWTdLZ2RRVDRrKzAvZldIQWc3QmJ4SkgxQnQKRW84aitMWTR0NEw1RUJLWXZ1M3hnbU1LYTdIYzFmKzNEUHVrZ3Q2VGZtSWs2RDNCZEx0MmsrNmQ4THJQM2JrZApWZDBLWjY5a2dGcG5JbG02R2tBaGtlZGV4Tk9DbW9ET1NIRzBCb2lqYUo0bjVFK1hrTVBKRzN3N2lITXhOUUNRCmhvWVU4LzgwZkdZR3ljYzlOSUtKVEVaZWNUbE54K09UcndReGlkVmtBTStyNitPOWZVTEpldVQ5YW14czhCTW0KU3BCSjZNTTF6VlpMMDlEandDK0pIVGZjbkgxNEFNMnlzd3NYUlFJREFRQUJBb0lCQVFDTjVnL2ZRMlFaMjVyLwp4Vkhnc09MTW5lVThqdE5BbkZ1L2xZUllFeW5vR1dWejh5dnk3eisvWFZVZDdBTnBJc0NtbUZuSzVIcWV3UHVlCjlaNVl6cUJsbjdaU0lNVkdHbDV5aXIwRVRrbEpzUEFPSzBkaFRTVFhoc1ZxRlJHeWhpUmZ4L3AyR0NUaTR1eGcKR2UzaytMZW1oTXVFNWtIaFRhL2NOeUxrbFBjSjNJTHl5bnNOSmtwSlI4M0FBb1NxVkVObHhmQVFLT3VUVnNqOApRTXF4ekNMblU1RVFYc0pCamVNa0YrVllFdVRUZENUUm8vWXluR3g0K2ptR3IxTGNRRExjbllpTGtuS2YvTjNRCmpBV2QwUGVZS2p6V0M3aGs3a0JKdEl5MjcyVEtudS9nN3FIQktSVVNSUnBnWHFsTGJMZDVpZTdzTXJEdnMyd3AKMjhxK01XbE5Bb0dCQU5CSzVDc2JGNSsxZkx3VldPaWUxRlpTSVAzMnQvRWJvODJkS1VIZWxGVldEQXV3cXRUTQpsT2psUnRZVkxRODV1WWtxMExBRkl2TjNlNDlmcWQ3aUk3cEE4WE5uZnovWVozRGFEREZ0cVRuZU84VmlOTHkvCjd0SUh4bWVwWHJpay9GUXFNZjNmNnNiYzBTcDgvSXdXWlZ4Y2hmOVVFV3pOYmZpNDZoV3BjTjlUQW9HQkFPTXIKZzhrMHFlU01teTc5Z3pwMTVvT0VMWW9VdkhLZTJibk8wbnA1aldhbVprdGR1blRNMGg2dmdLQTF5UnNnejFjNApncmtZUkp5V1JhRElYb0YzOVdvMWJrbHZvaWN5NURqWUtBK0hKWUVUT0pmOC9odzJ1WngzTk54bm5UZXpJSVA5CnVDZHlJSDhRNFU1VkloeWVXTDV5WlR6WGs3YlhyRVllZjB3cW81UUhBb0dBZlhiZkFXZ01UdE5QRXl2NHBnWWwKK09qM25vSmlRZ1ZZSVo0dEg5UW1uVkI3YVA4OXAzaWpxYldSZVpxL3paQUR4aS9ZREc3TG9zT3gxYWJWOTc5WApyZlU0ZXo4NFV3alRKaEx4alVSMHpycWlYajdOYlhSZk1ud2tjb1IrM2RIamUvNytwZUdlMWJKays2YlZxTHhFCnllR2hoUzdxWUJOTnpxZnp1S0Nic0trQ2dZRUF6N2g4ZXNEekVJOFpYekJrakZJK2c4ZWJOSVdkZzFtSlVRT3oKSmxaN1czK1FUaDNZWHZEaXVUaFZieWwvU0pVSndvRmoxd2cveE1jTHgrY3ZzMGNUV3hpY1RmNEwwYmdSUTRFegpzRzh0ZGdjeldwYjFiS3NGc2ZLMm5Vc0pVV016dWoySDVGblJLUjh3UmNaR3VOQjU2VHNGSTBza1FLNlpVa3lVCnJmclhOSVVDZ1lFQW83NGp6NnBJbDgwOU51dERZeHVON3J4RzYrTVMwRkVRa2tTSGdtZTlvN0Y0QjNWRHJ6WE4Ka1g3dC95cm1ieHBjK0R2VmUzWm1hWHE1QXJzdjRVbW5Za1ArNCs0L2REcWdmbjd3ZmVKUkpzU1Uzd2V0YWJnRwpDQW5xMFpLR3RJWWhud1h5cWF6elBsUUFteFIxWUdDczIxL05kUVJvWDdsOFdyaUJmbkpVM3hZPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
+
+  namespace_prefix:
+    type: string
+    description: >
+      Kubernetes namespace name prefix which will be uese for all ONAP apps
+    default: onap
+
+dsl_definitions:
+  options: &app_options
+    namespace:
+      concat: [{ get_input: namespace_prefix }, '-', { get_property: [SELF, name] }]
+
+node_templates:
+  kubernetes_master:
+    type: cloudify.kubernetes.nodes.Master
+    properties:
+      configuration:
+        file_content: { get_input: kubernetes_configuration_file_content }
+
+  onap_environment:
+    type: cloudify.onap.kubernetes.Environment
+    properties:
+      namespace: { get_input: namespace_prefix }
+      init_pod: kubernetes/config
+      options:
+        namespace: { get_input: namespace_prefix }
+    relationships:
+      - type: cloudify.kubernetes.relationships.managed_by_master
+        target: kubernetes_master
+
+#  mso_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: mso
+#      path: kubernetes/mso
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+  message_router_app:
+    type: cloudify.onap.kubernetes.App
+    properties:
+      name: message-router
+      path: kubernetes/message-router
+      options: *app_options
+    relationships:
+      - type: cloudify.kubernetes.relationships.managed_by_master
+        target: kubernetes_master
+      - type: cloudify.relationships.depends_on
+        target: onap_environment
+#
+#  sdc_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: sdc
+#      path: kubernetes/sdc
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  aai_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: aai
+#      path: kubernetes/aai
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  robot_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: robot
+#      path: kubernetes/robot
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  vid_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: vid
+#      path: kubernetes/vid
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  sdnc_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: sdnc
+#      path: kubernetes/sdnc
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  portal_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: portal
+#      path: kubernetes/portal
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  policy_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: policy
+#      path: kubernetes/policy
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
+#
+#  appc_app:
+#    type: cloudify.onap.kubernetes.App
+#    properties:
+#      name: appc
+#      path: kubernetes/appc
+#      options: *app_options
+#    relationships:
+#      - type: cloudify.kubernetes.relationships.managed_by_master
+#        target: kubernetes_master
+#      - type: cloudify.relationships.depends_on
+#        target: onap_environment
diff --git a/cloudify-onap/docker-custom-readiness/Dockerfile b/cloudify-onap/docker-custom-readiness/Dockerfile
new file mode 100644 (file)
index 0000000..d42456d
--- /dev/null
@@ -0,0 +1,21 @@
+from ubuntu:16.04
+
+ENV no_proxy "localhost,127.0.0.1,.cluster.local,$KUBERNETES_SERVICE_HOST"
+# Setup Corporate proxy
+ENV https_proxy ${HTTPS_PROXY}
+ENV http_proxy ${HTTP_PROXY}
+
+# Additional packages
+RUN apt-get update
+RUN apt-get install -y apt-utils git wget curl dnsutils python python-pip jq net-tools coreutils vim
+
+RUN pip install requests pyyaml kubernetes==1.0.2
+
+
+ENV CERT="/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
+ENV TOKEN="/var/run/secrets/kubernetes.io/serviceaccount/token"
+
+COPY ready.py /root/ready.py
+RUN chmod a+x /root/ready.py
+#ENTRYPOINT /root/ready.py
+
diff --git a/cloudify-onap/docker-custom-readiness/ready.py b/cloudify-onap/docker-custom-readiness/ready.py
new file mode 100644 (file)
index 0000000..22b24d3
--- /dev/null
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+#from kubernetes import client, config
+import kubernetes
+import time, argparse, logging, sys, os, base64
+import yaml
+
+#setup logging
+log = logging.getLogger(__name__)
+handler = logging.StreamHandler(sys.stdout)
+handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
+handler.setLevel(logging.DEBUG)
+log.addHandler(handler)
+log.setLevel(logging.DEBUG)
+
+
+def is_ready(container_name):
+    log.info( "Checking if " + container_name + "  is ready")
+
+    kubernetes.config.kube_config.KubeConfigLoader(config_dict=get_k8s_config_env()).load_and_set()
+    client = kubernetes.client
+    namespace = get_namespace_env()
+    v1 = client.CoreV1Api()
+
+    ready = False
+
+    try:
+        response = v1.list_namespaced_pod(namespace=namespace, watch=False)
+        for i in response.items:
+            for s in i.status.container_statuses:
+                if s.name == container_name:
+                    log.debug ( "response %s" % response )
+                    ready = s.ready
+                    if not ready:
+                        log.info( container_name + " is not ready.")
+                    else:
+                        log.info( container_name + " is ready!")
+                else:
+                    continue
+        return ready
+    except Exception as e:
+        log.error("Exception when calling list_namespaced_pod: %s\n" % e)
+
+
+def get_k8s_config_env():
+    try:
+        k8s_config_env = os.environ.get("K8S_CONFIG_B64")
+        decoded = base64.b64decode(k8s_config_env)
+        return yaml.load(decoded)
+    except KeyError as ke:
+        raise Exception("K8S_CONFIG_B64 variable is not set.")
+
+
+def get_namespace_env():
+    try:
+        namespace_env = os.environ.get("NAMESPACE")
+        return namespace_env
+    except KeyError as ke:
+        raise Exception("NAMESPACE variable is not set.")
+
+
+def main(args):#from kubernetes import client, config
+
+    # args are a list of container names
+    for container_name in args:
+        # 5 min, TODO: make configurable
+        timeout = time.time() + 60 * 10
+        while True:
+            ready = is_ready(container_name)
+            if ready is True:
+                break
+            elif time.time() > timeout:
+                log.warning( "timed out waiting for '" + container_name + "' to be ready")
+                exit(1)
+            else:
+                time.sleep(5)
+
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description='Process some names.')
+    parser.add_argument('--container-name', action='append', required=True, help='A container name')
+    args = parser.parse_args()
+    arg_dict = vars(args)
+
+    for arg in arg_dict.itervalues():
+        main(arg)
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/__init__.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/__init__.py
new file mode 100644 (file)
index 0000000..19a30ba
--- /dev/null
@@ -0,0 +1,14 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/app.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/app.py
new file mode 100644 (file)
index 0000000..fc8af2e
--- /dev/null
@@ -0,0 +1,47 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+
+from cloudify.decorators import operation
+
+from common import namespace
+from common import resources_services
+from common import workarounds
+
+
+@operation
+def configure_docker_secret(**kwargs):
+    workarounds.configure_secret()
+
+
+@operation
+def create_namespace(**kwargs):
+    namespace.do_create_namespace()
+
+
+@operation
+def create_resources_services(**kwargs):
+    resources_services.create_resoruces()
+
+
+@operation
+def delete_namespace(**kwargs):
+    namespace.do_delete_namespace()
+
+
+@operation
+def delete_resources_services(**kwargs):
+    resources_services.delete_resoruces()
+
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/__init__.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/__init__.py
new file mode 100644 (file)
index 0000000..19a30ba
--- /dev/null
@@ -0,0 +1,14 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/constants.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/constants.py
new file mode 100644 (file)
index 0000000..493a44f
--- /dev/null
@@ -0,0 +1,20 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+HELM_URL = 'https://kubernetes-helm.storage.googleapis.com/helm-canary-linux-amd64.tar.gz'
+OOM_GIT_URL = 'https://gerrit.onap.org/r/oom.git'
+
+RT_HELM_CLI_PATH = "helm_cli_path"
+RT_APPS_ROOT_PATH = "app_root_path"
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/deployment_result.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/deployment_result.py
new file mode 100644 (file)
index 0000000..48d49e0
--- /dev/null
@@ -0,0 +1,27 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+from cloudify import ctx
+
+
+def save_deployment_result(key):
+    result = ctx.instance.runtime_properties['kubernetes']
+    ctx.instance.runtime_properties[key] = result
+    ctx.instance.runtime_properties['kubernetes'] = {}
+
+
+def set_deployment_result(key):
+    result = ctx.instance.runtime_properties.pop(key)
+    ctx.instance.runtime_properties['kubernetes'] = result
\ No newline at end of file
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/helm.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/helm.py
new file mode 100644 (file)
index 0000000..4404f6f
--- /dev/null
@@ -0,0 +1,62 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+import urllib
+import tarfile
+import os
+import tempfile
+from git import Repo
+
+def get_helm_path(url):
+    tarball = _fetch_helm(url)
+    helm_dir = _get_tmp_file_name()
+    _untar_helm_archive(tarball, helm_dir)
+    helm_binary_path = _find_file('helm', helm_dir)
+    return helm_binary_path
+
+
+def get_apps_root_path(git_url):
+    dst_repo_path = _get_tmp_file_name()
+    Repo.clone_from(git_url, dst_repo_path)
+    apps_root = format(dst_repo_path)
+    return apps_root
+
+def _fetch_helm(url):
+    dst_tar_path = _get_tmp_file_name()
+
+    file = urllib.URLopener()
+    file.retrieve(url, dst_tar_path)
+
+    return dst_tar_path
+
+def _untar_helm_archive(tar_path, helm_dir):
+    helm_tar = tarfile.open(tar_path)
+    helm_tar.extractall(helm_dir)
+    helm_tar.close()
+
+
+def _find_file(filename, base_path):
+    for root, dirs, files in os.walk(base_path):
+        for name in files:
+            if name == filename:
+                return os.path.abspath(os.path.join(root, name))
+
+    raise Exception('Cannot find helm binary')
+
+
+def _get_tmp_file_name():
+    return '{}/{}'.format(tempfile._get_default_tempdir(), next(tempfile._get_candidate_names()))
+
+
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/init_pod.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/init_pod.py
new file mode 100644 (file)
index 0000000..1376818
--- /dev/null
@@ -0,0 +1,63 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+from cloudify import ctx
+import yaml
+
+import constants
+import resources_services
+
+SERVICES_FILE_PARTS_SEPARATOR = '---'
+
+
+def do_create_init_pod():
+    ctx.logger.info('Creating init pod')
+
+    yaml_config = resources_services.render_chart(
+        ctx.node.properties["init_pod"],
+        _retrieve_root_path(),
+        _retrieve_helm_cli_path()
+    )
+    yaml_content_part = yaml_config.split(SERVICES_FILE_PARTS_SEPARATOR)[2]
+    enhanced_yaml = _add_openstack_envs(yaml_content_part)
+
+    resources_services.create_resource(enhanced_yaml)
+
+    ctx.logger.info('Init pod created successfully')
+
+
+def do_delete_init_pod():
+    ctx.logger.info('Deleting init pod')
+
+    ctx.logger.info('Init pod deleted successfully')
+
+def _add_openstack_envs(yaml_content):
+    input_dict = yaml.load(yaml_content)
+
+    container_dict = input_dict['spec']['containers'][0]
+    container_dict.pop('envFrom')
+
+    openstack_envs = ctx.node.properties["openstack_envs"]
+    for item in openstack_envs.items():
+        ctx.logger.debug("adding item = {}".format(item))
+        container_dict['env'].append(item)
+
+    return input_dict
+
+def _retrieve_root_path():
+    return ctx.instance.runtime_properties.get(constants.RT_APPS_ROOT_PATH, None)
+
+def _retrieve_helm_cli_path():
+    return ctx.instance.runtime_properties.get(constants.RT_HELM_CLI_PATH, None)
\ No newline at end of file
@@ -1,37 +1,67 @@
-import pip
-
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+import cloudify_kubernetes.tasks as kubernetes_plugin
 from cloudify import ctx
 from cloudify.exceptions import NonRecoverableError
 
+import deployment_result
 
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
 
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
+def do_create_namespace():
+    namespace = _retrieve_namespace()
+    ctx.logger.info('Creating namespace: {0}'.format(namespace))
 
-    import yaml
-    import cloudify_kubernetes.tasks as kubernetes_plugin
+    namespace_resource_template = _prepare_namespace_resource_template(
+        namespace
+    )
 
-    return yaml, kubernetes_plugin
+    ctx.logger.debug(
+        'Kubernetes object which will be deployed: {0}'
+            .format(namespace_resource_template)
+    )
 
+    kubernetes_plugin.custom_resource_create(**namespace_resource_template)
+    deployment_result.save_deployment_result('namespace')
+    ctx.logger.info('Namespace created successfully')
 
-def _retrieve_namespace():
-    namespace = ctx.node.properties.get(
-        'namespace',
-        ctx.node.properties
-            .get('options', {})
-            .get('namespace', None)
+
+def do_delete_namespace():
+    namespace = _retrieve_namespace()
+    ctx.logger.info('Deleting namespace: {0}'.format(namespace))
+
+    namespace_resource_template = _prepare_namespace_resource_template(
+        namespace
+    )
+
+    ctx.logger.debug(
+        'Kubernetes object which will be deleted: {0}'
+            .format(namespace_resource_template)
     )
 
+    deployment_result.set_deployment_result('namespace')
+    kubernetes_plugin.custom_resource_delete(**namespace_resource_template)
+    ctx.logger.info('Namespace deleted successfully')
+
+
+
+def _retrieve_namespace():
+
+    default_namespace = ctx.node.properties.get('options', {}).get('namespace')
+    namespace = ctx.node.properties.get('namespace', default_namespace)
+
     if not namespace:
         raise NonRecoverableError(
             'Namespace is not defined (node={})'.format(ctx.node.name)
@@ -69,33 +99,3 @@ def _prepare_namespace_resource_template(name):
             }
         }
     }
-
-
-def _save_deployment_result(key):
-    result = ctx.instance.runtime_properties['kubernetes']
-    ctx.instance.runtime_properties[key] = result
-    ctx.instance.runtime_properties['kubernetes'] = {}
-
-
-def _do_create_namespace(kubernetes_plugin):
-    namespace = _retrieve_namespace()
-    ctx.logger.info('Creating namespace: {0}'.format(namespace))
-
-    namespace_resource_template = _prepare_namespace_resource_template(
-        namespace
-    )
-
-    ctx.logger.debug(
-        'Kubernetes object which will be deployed: {0}'
-            .format(namespace_resource_template)
-    )
-
-    kubernetes_plugin.custom_resource_create(**namespace_resource_template)
-    _save_deployment_result('namespace')
-    ctx.logger.info('Namespace created successfully')
-
-
-if __name__ == '__main__':
-    _, kubernetes_plugin = _import_or_install()
-
-    _do_create_namespace(kubernetes_plugin)
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/resources_services.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/resources_services.py
new file mode 100644 (file)
index 0000000..268068f
--- /dev/null
@@ -0,0 +1,230 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+import subprocess
+
+import cloudify_kubernetes.tasks as kubernetes_plugin
+import yaml
+from cloudify import ctx
+from cloudify.exceptions import NonRecoverableError
+
+import constants
+import deployment_result
+import time
+import ast
+import json
+import base64
+
+SERVICES_FILE_PARTS_SEPARATOR = '---'
+
+
+def create_resoruces():
+    ctx.logger.info('Creating resources')
+    apps_path = _retrieve_root_path()
+
+    if not apps_path:
+        ctx.logger.warn(
+            'Apps dir is not defined. Skipping!'
+        )
+
+        return
+
+    helm_app = ctx.node.properties.get('path', None)
+
+    yaml_file = prepare_content(helm_app)
+
+    yaml_content_parts = yaml_file.split(SERVICES_FILE_PARTS_SEPARATOR)
+
+    for yaml_content_part in yaml_content_parts:
+        if yaml_content_part:
+            yaml_content = _apply_readiness_workaround(yaml_content_part)
+            if yaml_content:
+                create_resource(yaml_content)
+
+    ctx.logger.info('Resource created successfully')
+
+def delete_resoruces():
+
+    ctx.logger.info('Deleting resources')
+    apps_path = _retrieve_root_path()
+
+    if not apps_path:
+        ctx.logger.warn(
+            'Apps dir is not defined. Skipping!'
+        )
+        return
+
+    helm_app = ctx.node.properties.get('path', None)
+
+    yaml_file = prepare_content(helm_app)
+
+    yaml_content_parts = yaml_file.split(SERVICES_FILE_PARTS_SEPARATOR)
+
+    for yaml_content_part in yaml_content_parts:
+        if yaml_content_part:
+            yaml_content = _apply_readiness_workaround(yaml_content_part)
+            if yaml_content:
+                delete_resource(yaml_content)
+
+        ctx.logger.info('Resources deleted successfully')
+
+
+def prepare_content(resource):
+    helm_path = _retrieve_helm_cli_path()
+    yaml_file = render_chart(resource, _retrieve_root_path(), helm_path)
+
+    return yaml_file
+
+
+def create_resource(yaml_content_dict):
+    ctx.logger.debug("Loading yaml: {}".format(yaml_content_dict))
+
+    if yaml_content_dict.get('kind', '') == 'PersistentVolumeClaim':
+        ctx.logger.debug("PersistentVolumeClaim custom handling")
+        kubernetes_plugin.custom_resource_create(definition=yaml_content_dict, api_mapping=_get_persistent_volume_mapping_claim_api())
+    else:
+        kubernetes_plugin.resource_create(definition=yaml_content_dict)
+
+    deployment_result.save_deployment_result('resource_{0}'.format(yaml_content_dict['metadata']['name']))
+
+def delete_resource(yaml_content_dict):
+    ctx.logger.debug("Loading yaml: {}".format(yaml_content_dict))
+
+    deployment_result.save_deployment_result('resource_{0}'.format(yaml_content_dict['metadata']['name']))
+    if yaml_content_dict.get('kind', '') == 'PersistentVolumeClaim':
+        ctx.logger.debug("PersistentVolumeClaim custom handling")
+        kubernetes_plugin.custom_resource_delete(definition=yaml_content_dict, api_mapping=_get_persistent_volume_mapping_claim_api())
+    else:
+        kubernetes_plugin.resource_delete(definition=yaml_content_dict)
+
+
+def render_chart(app, app_root_path, helm_cli_path):
+    app_chart_path = "{}/{}/".format(app_root_path, app)
+    ctx.logger.debug('App chart path = {}'.format(app_chart_path))
+    return _exec_helm_template(helm_cli_path, app_chart_path)
+
+
+def _exec_helm_template(helm_path, chart):
+    cmd = '{0} template {1}'.format(helm_path, chart)
+    ctx.logger.debug('Executing helm template cmd: {}'.format(cmd))
+    rendered = subprocess.Popen(cmd.split(" "), stdout=subprocess.PIPE).stdout.read().decode()
+
+    return rendered
+
+def _get_persistent_volume_mapping_claim_api():
+    api_mapping = {
+      'create' : {
+        'api': 'CoreV1Api',
+        'method': 'create_namespaced_persistent_volume_claim',
+        'payload': 'V1PersistentVolumeClaim'
+      },
+      'read' : {
+        'api': 'CoreV1Api',
+        'method': 'read_namespaced_persistent_volume_claim',
+      },
+      'delete': {
+        'api': 'CoreV1Api',
+        'method': 'delete_namespaced_persistent_volume_claim',
+        'payload': 'V1DeleteOptions'
+      }
+    }
+
+    return api_mapping
+
+
+def _apply_readiness_workaround(yaml_file):
+    b64_env = _get_k8s_b64_env()
+
+    input_dict = yaml.load(yaml_file)
+
+    try:
+        init_containers = input_dict['spec']['template']['metadata']['annotations'][
+            'pod.beta.kubernetes.io/init-containers']
+        init_cont_list = eval(init_containers)
+
+        new_init_cont_list = list()
+        new_cont = None
+        for init_cont in init_cont_list:
+            if "oomk8s/readiness-check" in init_cont['image']:
+                init_cont['image'] = "clfy/oomk8s-cfy-readiness-check:1.0.1"
+                #init_cont['imagePullPolicy'] = "IfNotPresent"
+                init_cont['env'].append(b64_env)
+                new_cont = init_cont
+                new_init_cont_list.append(json.dumps(init_cont))
+
+        new_payload = ",".join(new_init_cont_list)
+
+        if new_cont:
+            input_dict['spec']['template']['metadata']['annotations'].pop('pod.beta.kubernetes.io/init-containers')
+            input_dict['spec']['template']['metadata']['annotations']['pod.beta.kubernetes.io/init-containers'] = '[{}]'.format(new_payload)
+
+
+    except KeyError as ke:
+        ctx.logger.debug('Readiness section is not found.')
+
+    return input_dict
+
+
+def _get_k8s_b64():
+    target_relationship = _retrieve_managed_by_master()
+
+    k8s_config = target_relationship.node.properties.get('configuration').get('file_content')
+
+    if not k8s_config:
+        raise Exception("Cannot find kubernetes config")
+
+    k8s_config_plain = yaml.dump(k8s_config, allow_unicode=True)
+
+    k8s_config_b64 = base64.b64encode(k8s_config_plain)
+
+    return k8s_config_b64
+
+
+def _get_k8s_b64_env():
+    env = dict()
+    env['name'] = 'K8S_CONFIG_B64'
+    env['value'] = _get_k8s_b64()
+    return env
+
+
+def _retrieve_root_path():
+    target_relationship = _retrieve_depends_on()
+
+    apps_root_path = target_relationship.instance.runtime_properties.get(constants.RT_APPS_ROOT_PATH, None)
+
+    ctx.logger.debug("Retrived apps root path = {}".format(apps_root_path))
+
+    return apps_root_path
+
+def _retrieve_helm_cli_path():
+    target_relationship = _retrieve_depends_on()
+
+    helm_cli_path = target_relationship.instance.runtime_properties.get(constants.RT_HELM_CLI_PATH, None)
+
+    ctx.logger.debug("Retrived helm clis path = {}".format(helm_cli_path))
+
+    return helm_cli_path
+
+def _retrieve_depends_on():
+    result = None
+    for relationship in ctx.instance.relationships:
+        if relationship.type == 'cloudify.relationships.depends_on':
+            return relationship.target
+
+def _retrieve_managed_by_master():
+    result = None
+    for relationship in ctx.instance.relationships:
+        if relationship.type == 'cloudify.kubernetes.relationships.managed_by_master':
+            return relationship.target
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/workarounds.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/common/workarounds.py
new file mode 100644 (file)
index 0000000..fe3e892
--- /dev/null
@@ -0,0 +1,67 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+from cloudify import ctx
+from cloudify.exceptions import NonRecoverableError
+
+from fabric import api as fabric_api
+
+def _retrieve_namespace():
+    namespace = ctx.node.properties.get(
+        'namespace',
+        ctx.node.properties
+            .get('options', {})
+            .get('namespace', None)
+    )
+
+    if not namespace:
+        raise NonRecoverableError(
+            'Namespace is not defined (node={})'.format(ctx.node.name)
+        )
+
+    return namespace
+
+
+def configure_secret():
+    namespace = _retrieve_namespace()
+    ctx.logger.info(
+        'Configuring docker secrets for namespace: {0}'.format(namespace)
+    )
+
+    command = 'kubectl create secret ' \
+              'docker-registry onap-docker-registry-key ' \
+              '--docker-server=nexus3.onap.org:10001 ' \
+              '--docker-username=docker ' \
+              '--docker-password=docker ' \
+              '--docker-email=email@email.com ' \
+              '--namespace={0}'.format(namespace)
+
+    ctx.logger.info('Command "{0}" will be executed'.format(command))
+
+    with fabric_api.settings(
+            **ctx.node.properties.get('ssh_credentials')):
+        fabric_api.run(command)
+
+    ctx.logger.info('Docker secrets configured successfully')
+
+
+def _get_fabric_env():
+    result = dict()
+
+    result['host_string'] = ctx.node.properties.get('ssh_credentials')['host_string']
+    result['user'] = ctx.node.properties.get('ssh_credentials')['user']
+    result['key'] = ctx.node.properties.get('ssh_credentials')['key']
+
+    return result
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/environment.py b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/environment.py
new file mode 100644 (file)
index 0000000..741f28e
--- /dev/null
@@ -0,0 +1,58 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+
+from cloudify import ctx
+from cloudify.decorators import operation
+
+from common import constants
+from common import helm
+from common import init_pod, namespace
+
+
+@operation
+def create_init_pod(**kwargs):
+    init_pod.do_create_init_pod()
+    pass
+
+
+@operation
+def create_namespace(**kwargs):
+    namespace.do_create_namespace()
+
+
+@operation
+def delete_init_pod(**kwargs):
+    init_pod.do_delete_init_pod()
+
+
+@operation
+def delete_namespace(**kwargs):
+    namespace.do_delete_namespace()
+
+
+@operation
+def setup_helm_templates(**kwargs):
+    helm_url = constants.HELM_URL
+    ctx.instance.runtime_properties[constants.RT_HELM_CLI_PATH] = helm.get_helm_path(helm_url)
+    ctx.logger.debug('Helm cli path = {}'.format(ctx.instance.runtime_properties[constants.RT_HELM_CLI_PATH]))
+
+    oom_git_url = constants.OOM_GIT_URL
+    ctx.instance.runtime_properties[constants.RT_APPS_ROOT_PATH] = helm.get_apps_root_path(oom_git_url)
+    ctx.logger.debug('Apps root path = {}'.format(ctx.instance.runtime_properties[constants.RT_APPS_ROOT_PATH]))
+
+
+
+
diff --git a/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/requirements.txt b/cloudify-onap/plugins/onap-installation-plugin/k8s_installer/requirements.txt
new file mode 100644 (file)
index 0000000..9d8d880
--- /dev/null
@@ -0,0 +1 @@
+https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1.zip
\ No newline at end of file
diff --git a/cloudify-onap/plugins/onap-installation-plugin/plugin.yaml b/cloudify-onap/plugins/onap-installation-plugin/plugin.yaml
new file mode 100755 (executable)
index 0000000..f88b50b
--- /dev/null
@@ -0,0 +1,87 @@
+plugins:
+  onap:
+    executor: central_deployment_agent
+    package_name: onap-installation-plugin
+    package_version: '1.0.0'
+    source: onap-installation-plugin
+  #  install_arguments: '--process-dependency-links'
+
+node_types:
+  cloudify.onap.kubernetes.Environment:
+    derived_from: cloudify.nodes.Root
+    properties:
+      namespace:
+        type: string
+      init_pod:
+        type: string
+        description: >
+          Path to init pod chart
+      openstack_envs:
+        description: >
+          ONAP parameters defined at the onap-parameters.yaml file
+        default: {}
+      options:
+        description: >
+          For compatibility with kubernetes plugin.
+          To be removed in the future.
+        default: {}
+    interfaces:
+      cloudify.interfaces.lifecycle:
+        create:
+          implementation: onap.k8s_installer.environment.create_namespace
+          executor: central_deployment_agent
+        configure:
+          implementation: onap.k8s_installer.environment.setup_helm_templates
+          executor: central_deployment_agent
+        start:
+          implementation: onap.k8s_installer.environment.create_init_pod
+          executor: central_deployment_agent
+        stop:
+          implementation: onap.k8s_installer.environment.delete_init_pod
+          executor: central_deployment_agent
+        delete:
+          implementation: onap.k8s_installer.environment.delete_namespace
+          executor: central_deployment_agent
+
+  cloudify.onap.kubernetes.App:
+    derived_from: cloudify.nodes.Root
+    properties:
+      name:
+        type: string
+        description: >
+          Name of ONAP app
+      path:
+        type: string
+        description: >
+          Paths (relative, blueprint prespective) to app chart directory
+        required: false
+      options:
+        description: >
+          For compatibility with kubernetes plugin.
+          To be removed in the future.
+        default: {}
+      ssh_credentials:
+        description: >
+          Workaround for docker secret settings
+          via fabric plugin
+        default:
+          host_string: { get_secret: kubernetes_master_ip }
+          user: { get_secret: agent_user }
+          key: { get_secret: agent_key_private }
+    interfaces:
+      cloudify.interfaces.lifecycle:
+        create:
+          implementation: onap.k8s_installer.app.create_namespace
+          executor: central_deployment_agent
+        configure:
+          implementation: onap.k8s_installer.app.configure_docker_secret
+          executor: central_deployment_agent
+        start:
+          implementation: onap.k8s_installer.app.create_resources_services
+          executor: central_deployment_agent
+        stop:
+          implementation: onap.k8s_installer.app.delete_resources_services
+          executor: central_deployment_agent
+        delete:
+          implementation: onap.k8s_installer.app.delete_namespace
+          executor: central_deployment_agent
diff --git a/cloudify-onap/plugins/onap-installation-plugin/requirements.txt b/cloudify-onap/plugins/onap-installation-plugin/requirements.txt
new file mode 100644 (file)
index 0000000..9d8d880
--- /dev/null
@@ -0,0 +1 @@
+https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1.zip
\ No newline at end of file
diff --git a/cloudify-onap/plugins/onap-installation-plugin/setup.py b/cloudify-onap/plugins/onap-installation-plugin/setup.py
new file mode 100755 (executable)
index 0000000..d413daa
--- /dev/null
@@ -0,0 +1,40 @@
+########
+# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+#    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    * See the License for the specific language governing permissions and
+#    * limitations under the License.
+
+
+from setuptools import setup
+
+try:
+    import cloudify_kubernetes
+except ImportError:
+    import pip
+    pip.main(['install', 'https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1.zip'])
+
+setup(
+    name='onap-installation-plugin',
+    version='1.0.0',
+    author='',
+    author_email='',
+    packages=['k8s_installer', 'k8s_installer.common'],
+    install_requires=[
+        'cloudify-plugins-common>=3.3.1',
+        'cloudify-kubernetes-plugin==1.2.1',
+        #'/tmp/k8spl/cloudify-kubernetes-plugin'
+        'pyyaml',
+        'gitpython',
+        'paramiko==1.18.3',
+        'fabric==1.13.1'
+    ]
+)
diff --git a/cloudify/inputs/message-router-blueprint.yaml.example b/cloudify/inputs/message-router-blueprint.yaml.example
deleted file mode 100644 (file)
index ecab0ec..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-join_command: kubeadm join --token f66aad.cb001cc90bd69b38 192.168.120.6:6443
-kubernetes_master_ip: 192.168.120.6
-flavor: 3
-configuration_file_content:
-    apiVersion: v1
-    clusters:
-    - cluster:
-        certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFM01EZ3dNekEzTXpJek4xb1hEVEkzTURnd01UQTNNekl6TjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTUF4Ckxzdmkyek1ZU0pjaG5QWjVDUkJQTnBLbklHTDlHY1FYRFZnQjNEc0FuaTVpc2VadDlmeENtOURxSS94NkkrRGoKSlA5ZkNNbEo5a3Z1OGgvZFF4dWJFbHhaSmZkdkFqY3p0RlVWdGpaVGREcTFDTk81UENOcnNRSkdQVS9HWDNzagpRWmlHYVNPYmJJOGQ0d2Z0bkI5dE51ZDNXMnZDZmZJUzNCNU9YMVRVMzBjVE1xVnJjZ0FLT2EvR2FUK01WV3c2CkVHZDErWmVoYWZBUWJDeG1jbHRpMlJHSUNVakpLc2xqUFRUS3JTNXJVMkwxUjdYSFd3SUhyWWtuZ05SQllwTkQKaXk3UjlCZy93S1dkMVNYVVpUODU3eE8xdjB0aU9ucFJML0tGS2IrcHBKUnVITDVORE9TbTJZSzR1OFI3MjFudgpyYVNOSTk2K0VoVGhWL2U4VWU4Q0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFFOUFhbWQzL0JmRVAyRitSeXJRdXp2TGQzSWEKbGZoR3Fab1JqZWFId1pnanVwQVh0VXdzd0JiYkFhZm5XMXJDd3VDVldRYXVYVWhyZ1VNelcvbEQ2blBYYWtUcgpwWTJ6NG83ZG90dlZSekVtN0dmWllMUUs2cW9Wczk4TTRjS3RhdjVlL3VVcXFGckY2NVYzUE1QV3M1NGp2Q1U5CklFTDJ0ZmQ1TzFrMGlEcXFtdWdBVjgxblNOdHlnK0FZN3o5SVdXRFhKcTNUQ1RHQnZLQmxCdzNWSDVBbnQxblEKSFNrSmJ0ZGhpaFA0KzU0emlKZEhPNFcxekFGam4zUVpIZVZDNU8rSkdSOWNZWW5aTHc4ZC92YmxZeXRpTWZPVwoyN3VzcW1RbmtPZDliNXozaTlvRDBvUUYyY1RObk85NzJkeTBuTmhiK0VMclpGNEpKUS9XVjB0Z083ST0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
-        server: https://192.168.120.6:6443
-      name: kubernetes
-    contexts:
-    - context:
-        cluster: kubernetes
-        user: kubernetes-admin
-      name: kubernetes-admin@kubernetes
-    current-context: kubernetes-admin@kubernetes
-    kind: Config
-    preferences: {}
-    users:
-    - name: kubernetes-admin
-      user:
-        client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJSm9EQWNpYWVkSVF3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4TnpBNE1ETXdOek15TXpkYUZ3MHhPREE0TURNd056TXlNemxhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQW1xd3duNlU0TFVFQkphMWUKQzIrUjM0K0oyZ3BBYTJ0aDVOZXdnS2NhUWQwaE5BODNjNE1IMDFVUjU3b3ByNUNFczFQVmVwMkZtczlpaFRITwo0SUpINjkxUVQvTUVJZE5iWTl0RXdDV21ia1lMbFBjc09yclErYTl5VGdxYm5IWjBONnJOdUZ4dDB2alRPSUR1CmRDMnBQR3dFMW5kaHd1VVB3UUFxeS9SVjN6MTgzRnoyOWZuVHg3UXdWR0J4Rk84Z0JxRTFRYTVYenhIZ0lTQ2sKSkJka2FtRUFhSjl6NHgwZjFmbHQ4MG4wZ3RHRitkbUZuMThkbGwzZmoreGpNOGxqS21QZnRNdlc4MXF0bkVnZApoU1I3bWdMODlUckx3SmFtNkxmVmZhN29CWWJvWUMyT2gvKytZMkpwOXRpRkMyZ1ExeVBXSHJBMVZJTVBQUWdkCk8yTGNuUUlEQVFBQm95Y3dKVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFIZ2ZjRVd6R08yQ1p0cEJFbUxzbllXWTJmdGlSOU1BNHY5OQpXVFhBUzNzZ3VJTm43WktUUElSeTVyTmVmSTVhS1ltMWMyU0w5ZzJlM0JpeFZUUHRsYmRWczVBanMxWnVWRGRkClhmYk93blozcnBQbDZoenpxSVh2VmxsNzI4VC9hZDRJbmZ6SFVtT1o3YSs4enBIUS9EREZKLzR1aDYrSVlnSFkKVzBBQmFXMXpOc3lQSzNhK3paV0ROSVFvNS8yTVFJYkNwN1ZQOHhobUUxZ1diY1BxVmJ1YVZJY09IZjkvUVhqeQpKZTdoK2tzSEJPNUFZczRZOFZBYXlVb0t4bTJZbmNkZHJGTWl4STRKNEkrSUp5aGRPdE5TNG1lTmcyMXIwN3U2ClZkL2E2SGt6ekxFcmdqWkxzVktIK0RUMTVhTWNSZGg3OVE1YXo1ckh1Qm5vZ0RYejFtVT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
-        client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBbXF3d242VTRMVUVCSmExZUMyK1IzNCtKMmdwQWEydGg1TmV3Z0tjYVFkMGhOQTgzCmM0TUgwMVVSNTdvcHI1Q0VzMVBWZXAyRm1zOWloVEhPNElKSDY5MVFUL01FSWROYlk5dEV3Q1dtYmtZTGxQY3MKT3JyUSthOXlUZ3FibkhaME42ck51Rnh0MHZqVE9JRHVkQzJwUEd3RTFuZGh3dVVQd1FBcXkvUlYzejE4M0Z6Mgo5Zm5UeDdRd1ZHQnhGTzhnQnFFMVFhNVh6eEhnSVNDa0pCZGthbUVBYUo5ejR4MGYxZmx0ODBuMGd0R0YrZG1GCm4xOGRsbDNmait4ak04bGpLbVBmdE12VzgxcXRuRWdkaFNSN21nTDg5VHJMd0phbTZMZlZmYTdvQllib1lDMk8KaC8rK1kySnA5dGlGQzJnUTF5UFdIckExVklNUFBRZ2RPMkxjblFJREFRQUJBb0lCQUhxbjMrdEo5ekdUNGhnQgowcGxaQWFINnp3TzBxMzlENlo2ekdNbjlPY3BQVkp4WEVNOHVjbzg1WC9pV1hhWlhBWlMvLzRPNzFRNStOUStRCi94QjA0Qm9BS0VjdVhQR0NEWEF6bXVLUk9Oa3IvTlZGNmJJdElibFBVMkxsOEo3MEpKZGNnTVVacnhIbHRvS1IKWkFlSGlqUmJLTDcyYnZWQjl1dERlYXpCZHpPTzhHbG5VaU5WTWRoaVowazRNbEFobmV0ZjNNazFHbXFjbHJyNApISjIwbElSR2NWTWRqZm1OaThFVG5LckRwWWNvRUZ5QnozMVN2RHVTaU1GVm9sUWpZMkU1N2kyd1RVdDlSU1NjCk5oRlpEM2s1dkxwMFNIcjZtSXRURW1jY0w2VDdzTDh0UXNGLzhaZG9aUXpoRzRXUU5IZ00yUldsdEN4eklCNy8KT3czUk5OVUNnWUVBelcvNVdkWk5QV2hsRXR2VGQ4a1FjbUF3VkVYaGgrU2NvajhpVGdHbW5GNXhsSGhWVjZUdwpVYzRtRmhGU0JBSGpRWlN5Vm1NTDkwMWU1UE1aOXVRQ05Xb0pWVzU4cUI0VDJsRXNKRjJkdXdRSVZDL2g4QkhiClJ4TVZLaDJhdHZKR2dHbWsxME5tblZTYmxQVVpDVVBRWFN4R1B5VXh0UStSSmRUNHVPSm43QXNDZ1lFQXdMMnIKNUlQeFRvTHplZ254b0I5Z0RnbnFBazB3b3NicHg3V2pJY2RpdnlWNGpib2U3TmlYbEpQZXJ3MmExd2M2Ky96VgpSeVpkUjN2U1lrUnczNnp4Q1N0UHZhRFVMT053eDhtSjVRVVIwYXdReEQ4R1ZneHZmVTBhYzdqeW04L2laZWpjCkk5V1UxOXo0eEk3akIvMXNYOFpFTWFtb1RXOGVUM0I4aWNPUEd2Y0NnWUVBcWtOZmVlRnU2cklXOHVaV0FUVVcKK0hSWUdjQkJCd3VsOWFJMW9Fa2wrUHNkVDF2Yi8yT24rV1RObEFTTzROdGZxZjYvUDNHZmZUc1dwdElFZHViSwpIZExnSVhvTXZwa1BBeVc3Vy9ocXZaQytCbWdZN1lzZkhXem5ZWnhmbWJoNlRmdEFyMWdoTjh2amxqVDhwdjBaCk45OTE2T2UrcHIxY0l1cTdxUitiMmJrQ2dZQUxMYlQvZnV1SzZ5dGw0NWZBK3JEZWY1S3o2WGd0cUsyOGFIdDYKcFE3RUdVOUJvUTdVRzhmRzFVQ3dGSERya2I3SkNLUHlDWGFWZzhmeTdSZEMwY3YxQlM4Tngzc20wMVlpTUQwdwpMRGdaV2dwcTUyRGRzc0R3bW4welF3SEhLYXB1MEsrYjRISk9oc0ZpM1FxcjF2WG5KQittWmJtZUxCaXM4TkE0ClNVQk9od0tCZ0drTkJhaTFWVU9RaGVYU3Mrb3JPVWxDNDNsenlBanJZa2dod0lRd25LTWpqK2lrak9oNmtqc3IKL1lDTHVRcWNBYWNKVEF2VmZOVGcyZldyUUJTODlwVjlFRVBnV0JIQmt4a1JsNnY0WTFQZVRqOVVzeVdzaHljYQpXRkFHSkpDMXg1NWg2OWdFWSsyR1NpUEQ0MzNrQUZUd3NBUEhPbmRwdmlOTVBLek9KTldnCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
-
-
diff --git a/cloudify/scripts/configure_node.py b/cloudify/scripts/configure_node.py
deleted file mode 100644 (file)
index 9cfa206..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-
-import subprocess
-from cloudify import ctx
-from cloudify.state import ctx_parameters as inputs
-
-
-def execute_command(_command):
-
-    ctx.logger.debug('_command {0}.'.format(_command))
-
-    subprocess_args = {
-        'args': _command.split(),
-        'stdout': subprocess.PIPE,
-        'stderr': subprocess.PIPE
-    }
-
-    ctx.logger.debug('subprocess_args {0}.'.format(subprocess_args))
-
-    process = subprocess.Popen(**subprocess_args)
-    output, error = process.communicate()
-
-    ctx.logger.debug('command: {0} '.format(_command))
-    ctx.logger.debug('output: {0} '.format(output))
-    ctx.logger.debug('error: {0} '.format(error))
-    ctx.logger.debug('process.returncode: {0} '.format(process.returncode))
-
-    if process.returncode:
-        ctx.logger.error('Running `{0}` returns error.'.format(_command))
-        return False
-
-    return output
-
-
-if __name__ == '__main__':
-
-    join_command = inputs['join_command']
-    join_command = 'sudo {0} --skip-preflight-checks'.format(join_command)
-    execute_command(join_command)
-
-    # Install weave-related utils
-    execute_command('sudo curl -L git.io/weave -o /usr/local/bin/weave')
-    execute_command('sudo chmod a+x /usr/local/bin/weave')
-    execute_command('sudo curl -L git.io/scope -o /usr/local/bin/scope')
-    execute_command('sudo chmod a+x /usr/local/bin/scope')
-    execute_command('/usr/local/bin/scope launch')
-
-    hostname = execute_command('hostname')
-    ctx.instance.runtime_properties['hostname'] = hostname.rstrip('\n')
diff --git a/cloudify/scripts/create.py b/cloudify/scripts/create.py
deleted file mode 100644 (file)
index eb362a4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-
-import subprocess
-from cloudify import ctx
-from cloudify.exceptions import OperationRetry
-
-
-def check_command(command):
-
-    try:
-        process = subprocess.Popen(
-            command.split()
-        )
-    except OSError:
-        return False
-
-    output, error = process.communicate()
-
-    ctx.logger.debug('command: {0} '.format(command))
-    ctx.logger.debug('output: {0} '.format(output))
-    ctx.logger.debug('error: {0} '.format(error))
-    ctx.logger.debug('process.returncode: {0} '.format(process.returncode))
-
-    if process.returncode:
-        ctx.logger.error('Running `{0}` returns error.'.format(command))
-        return False
-
-    return True
-
-
-def execute_command(_command):
-
-    ctx.logger.debug('_command {0}.'.format(_command))
-
-    subprocess_args = {
-        'args': _command.split(),
-        'stdout': subprocess.PIPE,
-        'stderr': subprocess.PIPE
-    }
-
-    ctx.logger.debug('subprocess_args {0}.'.format(subprocess_args))
-
-    process = subprocess.Popen(**subprocess_args)
-    output, error = process.communicate()
-
-    ctx.logger.debug('command: {0} '.format(_command))
-    ctx.logger.debug('output: {0} '.format(output))
-    ctx.logger.debug('error: {0} '.format(error))
-    ctx.logger.debug('process.returncode: {0} '.format(process.returncode))
-
-    if process.returncode:
-        ctx.logger.error('Running `{0}` returns error.'.format(_command))
-        return False
-
-    return output
-
-
-if __name__ == '__main__':
-
-    docker_command = 'docker ps'
-
-    if not check_command(docker_command):
-        raise OperationRetry('Waiting for docker to be installed.')
-
-    finished = False
-    ps = execute_command('ps -ef')
-    for line in ps.split('\n'):
-        if '/usr/bin/python /usr/bin/cloud-init modules' in line:
-            ctx.logger.error('in line')
-            raise OperationRetry('Waiting for Cloud Init to finish.')
-
-    ctx.logger.info('Docker is ready and Cloud Init finished.')
diff --git a/cloudify/scripts/onap/configure_docker_secret_workaround.py b/cloudify/scripts/onap/configure_docker_secret_workaround.py
deleted file mode 100644 (file)
index 6e9deff..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-from fabric.api import run
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-def _retrieve_namespace():
-    namespace = ctx.node.properties.get(
-        'namespace',
-        ctx.node.properties
-            .get('options', {})
-            .get('namespace', None)
-    )
-
-    if not namespace:
-        raise NonRecoverableError(
-            'Namespace is not defined (node={})'.format(ctx.node.name)
-        )
-
-    return namespace
-
-
-def configure_secret():
-    namespace = _retrieve_namespace()
-    ctx.logger.info(
-        'Configuring docker secrets for namespace: {0}'.format(namespace)
-    )
-
-    command = 'kubectl create secret ' \
-              'docker-registry onap-docker-registry-key ' \
-              '--docker-server=nexus3.onap.org:10001 ' \
-              '--docker-username=docker ' \
-              '--docker-password=docker ' \
-              '--docker-email=email@email.com ' \
-              '--namespace={0}'.format(namespace)
-
-    ctx.logger.info('Command "{0}" will be executed'.format(command))
-    run(command)
-
-    ctx.logger.info('Docker secrets configured successfully')
diff --git a/cloudify/scripts/onap/create_init_pod.py b/cloudify/scripts/onap/create_init_pod.py
deleted file mode 100644 (file)
index c82172d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-import pip
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-SERVICES_FILE_PARTS_SEPARATOR = '---'
-
-
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
-
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
-
-    import yaml
-    import cloudify_kubernetes.tasks as kubernetes_plugin
-
-    return yaml, kubernetes_plugin
-
-
-def _retrieve_path():
-    return ctx.node.properties.get('init_pod', None)
-
-
-def _save_deployment_result(key):
-    result = ctx.instance.runtime_properties['kubernetes']
-    ctx.instance.runtime_properties[key] = result
-    ctx.instance.runtime_properties['kubernetes'] = {}
-
-
-def _do_create_init_pod(kubernetes_plugin, yaml):
-    ctx.logger.info('Creating init pod')
-    init_pod_file_path = _retrieve_path()
-
-    if not init_pod_file_path:
-        raise NonRecoverableError('Init pod file is not defined.')
-
-    temp_file_path = ctx.download_resource_and_render(
-        init_pod_file_path
-    )
-
-    with open(temp_file_path) as temp_file:
-        init_pod_file_content = temp_file.read()
-        init_pod_yaml_content = yaml.load(init_pod_file_content)
-
-        kubernetes_plugin.resource_create(definition=init_pod_yaml_content)
-        _save_deployment_result('init_pod')
-
-    ctx.logger.info('Init pod created successfully')
-
-
-if __name__ == '__main__':
-    yaml, kubernetes_plugin = _import_or_install()
-
-    _do_create_init_pod(kubernetes_plugin, yaml)
-
diff --git a/cloudify/scripts/onap/create_resources_services.py b/cloudify/scripts/onap/create_resources_services.py
deleted file mode 100644 (file)
index 8548e29..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-import pip
-
-from cloudify import ctx
-
-
-SERVICES_FILE_PARTS_SEPARATOR = '---'
-
-
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
-
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
-
-    try:
-        import jinja2
-    except ImportError:
-        pip.main(["install", "jinja2"])
-
-    import yaml
-    import jinja2
-    import cloudify_kubernetes.tasks as kubernetes_plugin
-
-    return yaml, kubernetes_plugin, jinja2
-
-
-def _init_jinja(jinja2):
-    return jinja2.Environment(
-        loader=jinja2.BaseLoader()
-    )
-
-
-def _render_template(jinja_env, template_content, values):
-    template_content = template_content.replace('.Values', 'Values')
-
-    template = jinja_env.from_string(template_content)
-    rendered_template = template.render(Values=values)
-    return rendered_template
-
-
-def _retrieve_resources_paths():
-    return ctx.node.properties.get('resources', [])
-
-
-def _retrieve_services_paths():
-    return ctx.node.properties.get('services', None)
-
-
-def _retrieve_values(yaml):
-    values_file_path = ctx.node.properties.get('values', None)
-
-    if values_file_path:
-        return yaml.load(ctx.get_resource(values_file_path))
-
-    ctx.logger.warn('Values file not found')
-
-
-def _save_deployment_result(key):
-    result = ctx.instance.runtime_properties['kubernetes']
-    ctx.instance.runtime_properties[key] = result
-    ctx.instance.runtime_properties['kubernetes'] = {}
-
-
-def _do_create_resources(kubernetes_plugin, yaml, jinja_env, values):
-    for path in _retrieve_resources_paths():
-        ctx.logger.info('Creating resource defined in: {0}'.format(path))
-
-        template_content = ctx.get_resource(path)
-        yaml_content = _render_template(
-            jinja_env,
-            template_content,
-            values
-        )
-        content = yaml.load(yaml_content)
-
-        kubernetes_plugin.resource_create(definition=content)
-        _save_deployment_result(
-            'resource_{0}'.format(content['metadata']['name'])
-        )
-
-    ctx.logger.info('Resources created successfully')
-
-
-def _do_create_services(kubernetes_plugin, yaml, jinja_env, values):
-    ctx.logger.info('Creating services')
-    services_file_path = _retrieve_services_paths()
-
-    if not services_file_path:
-        ctx.logger.warn(
-            'Service file is not defined. Skipping services provisioning !'
-        )
-
-        return
-
-    template_content = ctx.get_resource(services_file_path)
-    yaml_content = _render_template(
-        jinja_env,
-        template_content,
-        values
-    )
-
-    yaml_content_parts = \
-        yaml_content.split(SERVICES_FILE_PARTS_SEPARATOR)
-
-    for yaml_content_part in yaml_content_parts:
-        content = yaml.load(yaml_content_part)
-
-        kubernetes_plugin.resource_create(definition=content)
-        _save_deployment_result(
-            'service_{0}'.format(content['metadata']['name'])
-        )
-
-    ctx.logger.info('Services created successfully')
-
-
-if __name__ == '__main__':
-    yaml, kubernetes_plugin, jinja2 = _import_or_install()
-    jinja_env = _init_jinja(jinja2)
-    values = _retrieve_values(yaml)
-
-    _do_create_resources(kubernetes_plugin, yaml, jinja_env, values)
-    _do_create_services(kubernetes_plugin, yaml, jinja_env, values)
-
diff --git a/cloudify/scripts/onap/delete_init_pod.py b/cloudify/scripts/onap/delete_init_pod.py
deleted file mode 100644 (file)
index 1da805b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-import pip
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-SERVICES_FILE_PARTS_SEPARATOR = '---'
-
-
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
-
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
-
-    import yaml
-    import cloudify_kubernetes.tasks as kubernetes_plugin
-
-    return yaml, kubernetes_plugin
-
-
-def _retrieve_path():
-    return ctx.node.properties.get('init_pod', None)
-
-
-def _set_deployment_result(key):
-    result = ctx.instance.runtime_properties.pop(key)
-    ctx.instance.runtime_properties['kubernetes'] = result
-
-
-def _do_delete_init_pod(kubernetes_plugin, yaml):
-    ctx.logger.info('Deleting init pod')
-    init_pod_file_path = _retrieve_path()
-
-    if not init_pod_file_path:
-        raise NonRecoverableError('Init pod file is not defined.')
-
-    temp_file_path = ctx.download_resource_and_render(
-        init_pod_file_path
-    )
-
-    with open(temp_file_path) as temp_file:
-        init_pod_file_content = temp_file.read()
-        init_pod_yaml_content = yaml.load(init_pod_file_content)
-
-        _set_deployment_result('init_pod')
-        kubernetes_plugin.resource_delete(definition=init_pod_yaml_content)
-
-    ctx.logger.info('Init pod deleted successfully')
-
-
-if __name__ == '__main__':
-    yaml, kubernetes_plugin = _import_or_install()
-
-    _do_delete_init_pod(kubernetes_plugin, yaml)
-
diff --git a/cloudify/scripts/onap/delete_namespace.py b/cloudify/scripts/onap/delete_namespace.py
deleted file mode 100644 (file)
index 6973e59..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-import pip
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
-
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
-
-    import yaml
-    import cloudify_kubernetes.tasks as kubernetes_plugin
-
-    return yaml, kubernetes_plugin
-
-
-def _retrieve_namespace():
-    namespace = ctx.node.properties.get(
-        'namespace',
-        ctx.node.properties
-            .get('options', {})
-            .get('namespace', None)
-    )
-
-    if not namespace:
-        raise NonRecoverableError(
-            'Namespace is not defined (node={})'.format(ctx.node.name)
-        )
-
-    return namespace
-
-
-def _prepare_namespace_resource_template(name):
-    return {
-        'definition': {
-            'apiVersion': 'v1',
-            'kind': 'Namespace',
-            'metadata': {
-                'name': name,
-                'labels': {
-                    'name': name
-                },
-            },
-        },
-        'api_mapping': {
-            'create': {
-                'api': 'CoreV1Api',
-                'method': 'create_namespace',
-                'payload': 'V1Namespace'
-            },
-            'read': {
-                'api': 'CoreV1Api',
-                'method': 'read_namespace',
-            },
-            'delete': {
-                'api': 'CoreV1Api',
-                'method': 'delete_namespace',
-                'payload': 'V1DeleteOptions'
-            }
-        }
-    }
-
-
-def _set_deployment_result(key):
-    result = ctx.instance.runtime_properties.pop(key)
-    ctx.instance.runtime_properties['kubernetes'] = result
-
-
-def _do_delete_namespace(kubernetes_plugin):
-    namespace = _retrieve_namespace()
-    ctx.logger.info('Deleting namespace: {0}'.format(namespace))
-
-    namespace_resource_template = _prepare_namespace_resource_template(
-        namespace
-    )
-
-    ctx.logger.debug(
-        'Kubernetes object which will be deleted: {0}'
-            .format(namespace_resource_template)
-    )
-
-    _set_deployment_result('namespace')
-    kubernetes_plugin.custom_resource_delete(**namespace_resource_template)
-    ctx.logger.info('Namespace deleted successfully')
-
-
-if __name__ == '__main__':
-    _, kubernetes_plugin = _import_or_install()
-
-    _do_delete_namespace(kubernetes_plugin)
-
diff --git a/cloudify/scripts/onap/delete_resources_services.py b/cloudify/scripts/onap/delete_resources_services.py
deleted file mode 100644 (file)
index 305a748..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-import pip
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-SERVICES_FILE_PARTS_SEPARATOR = '---'
-
-
-def _import_or_install():
-    try:
-        import yaml
-    except ImportError:
-        pip.main(["install", "pyaml"])
-
-    try:
-        import cloudify_kubernetes.tasks as kubernetes_plugin
-    except ImportError:
-        pip.main([
-            "install",
-            "https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/archive/1.2.1rc1.zip"
-        ])
-
-    try:
-        import jinja2
-    except ImportError:
-        pip.main(["install", "jinja2"])
-
-    import yaml
-    import jinja2
-    import cloudify_kubernetes.tasks as kubernetes_plugin
-
-    return yaml, kubernetes_plugin, jinja2
-
-
-def _init_jinja(jinja2):
-    return jinja2.Environment(
-        loader=jinja2.BaseLoader()
-    )
-
-
-def _render_template(jinja_env, template_content, values):
-    template_content = template_content.replace('.Values', 'Values')
-
-    template = jinja_env.from_string(template_content)
-    rendered_template = template.render(Values=values)
-    return rendered_template
-
-
-def _retrieve_resources_paths():
-    return ctx.node.properties.get('resources', [])
-
-
-def _retrieve_services_paths():
-    return ctx.node.properties.get('services', None)
-
-
-def _retrieve_values(yaml):
-    values_file_path = ctx.node.properties.get('values', None)
-
-    if values_file_path:
-        return yaml.load(ctx.get_resource(values_file_path))
-
-    ctx.logger.warn('Values file not found')
-
-
-def _set_deployment_result(key):
-    result = ctx.instance.runtime_properties.pop(key)
-    ctx.instance.runtime_properties['kubernetes'] = result
-
-
-def _do_delete_resources(kubernetes_plugin, yaml, jinja_env, values):
-    for path in _retrieve_resources_paths():
-        ctx.logger.info('Deleting resource defined in: {0}'.format(path))
-
-        template_content = ctx.get_resource(path)
-        yaml_content = _render_template(
-            jinja_env,
-            template_content,
-            values
-        )
-        content = yaml.load(yaml_content)
-
-        _set_deployment_result(
-            'resource_{0}'.format(content['metadata']['name'])
-        )
-        kubernetes_plugin.resource_delete(definition=content)
-
-    ctx.logger.info('Resources deleted successfully')
-
-
-def _do_delete_services(kubernetes_plugin, yaml, jinja_env, values):
-    ctx.logger.info('Deleting services')
-    services_file_path = _retrieve_services_paths()
-
-    if not services_file_path:
-        ctx.logger.warn(
-            'Service file is not defined. Skipping services provisioning !'
-        )
-
-        return
-
-    template_content = ctx.get_resource(services_file_path)
-    yaml_content = _render_template(
-        jinja_env,
-        template_content,
-        values
-    )
-
-    yaml_content_parts = \
-        yaml_content.split(SERVICES_FILE_PARTS_SEPARATOR)
-
-    for yaml_content_part in yaml_content_parts:
-        content = yaml.load(yaml_content_part)
-
-        _set_deployment_result(
-            'service_{0}'.format(content['metadata']['name'])
-        )
-        kubernetes_plugin.resource_delete(definition=content)
-
-    ctx.logger.info('Services deleted successfully')
-
-
-if __name__ == '__main__':
-    yaml, kubernetes_plugin, jinja2 = _import_or_install()
-    jinja_env = _init_jinja(jinja2)
-    values = _retrieve_values(yaml)
-
-    _do_delete_services(kubernetes_plugin, yaml, jinja_env, values)
-    _do_delete_resources(kubernetes_plugin, yaml, jinja_env, values)
-
-
diff --git a/cloudify/scripts/tasks.py b/cloudify/scripts/tasks.py
deleted file mode 100644 (file)
index 035a780..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-
-from fabric.api import run
-
-
-def label_node(labels, hostname):
-    if labels:
-        label_list = []
-        for key, value in labels.items():
-            label_pair_string = '%s=%s' % (key, value)
-            label_list.append(label_pair_string)
-        label_string = ' '.join(label_list)
-        command = 'kubectl label nodes %s %s' % (hostname, label_string)
-        run(command)
-
-
-def stop_node(hostname):
-    command = 'kubectl drain %s' % (hostname)
-    run(command)
-
-
-def delete_node(hostname):
-    command = 'kubectl delete no %s' % (hostname)
-    run(command)
diff --git a/cloudify/types/kubernetes.yaml b/cloudify/types/kubernetes.yaml
deleted file mode 100644 (file)
index 1698aa2..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-inputs:
-
-  join_command:
-    type: string
-
-  labels:
-    default:
-      app: { get_input: app_name }
-
-  kubernetes_master_ip:
-    type: string
-
-  kubernetes_master_agent_user:
-    default: { get_input: agent_user }
-
-node_types:
-
-  cloudify.nodes.Kubernetes.Node:
-    derived_from: cloudify.nodes.Root
-    interfaces:
-      cloudify.interfaces.lifecycle:
-        create:
-          implementation: cloudify/scripts/create.py
-        configure:
-          implementation: cloudify/scripts/configure_node.py
-          inputs:
-            join_command:
-              default: { get_input: join_command }
-        start:
-          implementation: fabric.fabric_plugin.tasks.run_task
-          inputs:
-            tasks_file:
-              default: cloudify/scripts/tasks.py
-            task_name:
-              default: label_node
-            task_properties:
-              default:
-                hostname: { get_attribute: [ SELF, hostname ] }
-                labels: { get_input: labels }
-            fabric_env:
-              default:
-                host_string: { get_input: kubernetes_master_ip }
-                user: { get_input: kubernetes_master_agent_user }
-                key: { get_secret: agent_key_private }
-#        stop:
-#          implementation: fabric.fabric_plugin.tasks.run_task
-#          inputs:
-#            tasks_file:
-#              default: cloudify/scripts/tasks.py
-#            task_name:
-#              default: stop_node
-#            task_properties:
-#              default:
-#                hostname: { get_attribute: [ SELF, hostname ] }
-#            fabric_env:
-#              default:
-#                host_string: { get_input: kubernetes_master_ip }
-#                user: { get_input: kubernetes_master_agent_user }
-#                key: { get_secret: agent_key_private }
-        delete:
-          implementation: fabric.fabric_plugin.tasks.run_task
-          inputs:
-            tasks_file:
-              default: cloudify/scripts/tasks.py
-            task_name:
-              default: delete_node
-            task_properties:
-              default:
-                hostname: { get_attribute: [ SELF, hostname ] }
-            fabric_env:
-              default:
-                host_string: { get_input: kubernetes_master_ip }
-                user: { get_input: kubernetes_master_agent_user }
-                key: { get_secret: agent_key_private }
-
-  cloudify.kubernetes.resources.Namespace:
-    derived_from: cloudify.kubernetes.resources.Main
-    properties:
-      _api_mapping:
-        default:
-          create:
-            api: CoreV1Api
-            method: create_namespace
-            payload: V1Namespace
-          read:
-            api: CoreV1Api
-            method: read_namespace
-          delete:
-            api: CoreV1Api
-            method: delete_namespace
-            payload: V1DeleteOptions
diff --git a/cloudify/types/onap.yaml b/cloudify/types/onap.yaml
deleted file mode 100644 (file)
index 7e9b834..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-node_types:
-  cloudify.onap.kubernetes.Environment:
-    derived_from: cloudify.nodes.Root
-    properties:
-      namespace:
-        type: string
-      init_pod:
-        type: string
-        description: >
-          Path to init pod YAML file
-      options:
-        description: >
-          For compatibility with kubernetes plugin.
-          To be removed in the future.
-        default: {}
-    interfaces:
-      cloudify.interfaces.lifecycle:
-        create:
-          implementation: cloudify/scripts/onap/create_namespace.py
-          executor: central_deployment_agent
-        start:
-          implementation: cloudify/scripts/onap/create_init_pod.py
-          executor: central_deployment_agent
-        stop:
-          implementation: cloudify/scripts/onap/delete_init_pod.py
-          executor: central_deployment_agent
-        delete:
-          implementation: cloudify/scripts/onap/delete_namespace.py
-          executor: central_deployment_agent
-
-  cloudify.onap.kubernetes.App:
-    derived_from: cloudify.nodes.Root
-    properties:
-      name:
-        type: string
-        description: >
-          Name of ONAP app
-      values:
-        type: string
-        description: >
-          Paths (relative, blueprint prespective) to values.yaml file
-        required: false
-      resources:
-        description: >
-          List of paths (relative, blueprint prespective)
-          to all kubernetes resources YAML files definition
-        default: []
-      services:
-        type: string
-        description: >
-          Path (relative, blueprint prespective)
-          to kubernetes app services YAML file definition
-        default: []
-      inputs:
-        description: >
-          Parameters required to create kubernetes resources for each app
-        default: {}
-      options:
-        description: >
-          For compatibility with kubernetes plugin.
-          To be removed in the future.
-        default: {}
-    interfaces:
-      cloudify.interfaces.lifecycle:
-        create:
-          implementation: cloudify/scripts/onap/create_namespace.py
-          executor: central_deployment_agent
-        configure:
-          implementation: fabric.fabric_plugin.tasks.run_task
-          executor: central_deployment_agent
-          inputs:
-            tasks_file:
-              default: cloudify/scripts/onap/configure_docker_secret_workaround.py
-            task_name:
-              default: configure_secret
-            fabric_env:
-              default:
-                host_string: { get_secret: kubernetes_master_ip }
-                user: { get_secret: agent_user }
-                key: { get_secret: agent_key_private }
-        start:
-          implementation: cloudify/scripts/onap/create_resources_services.py
-          executor: central_deployment_agent
-        stop:
-          implementation: cloudify/scripts/onap/delete_resources_services.py
-          executor: central_deployment_agent
-        delete:
-          implementation: cloudify/scripts/onap/delete_namespace.py
-          executor: central_deployment_agent
index f240150..23968f9 100644 (file)
@@ -22,14 +22,14 @@ spec:
         name: "aaf-cs"
         volumeMounts:
         - mountPath: /data
-          name: aaf-data
+          name: aaf-cs-data
         readinessProbe:
           tcpSocket:
             port: 7000
           initialDelaySeconds: 5
           periodSeconds: 10
       volumes:
-        - name: aaf-data
+        - name: aaf-cs-data
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aaf/data
       imagePullSecrets:
index 20e21c4..5950b92 100644 (file)
@@ -47,11 +47,18 @@ spec:
           value: cassandra_container
         image: {{ .Values.image.aafImage }}:{{ .Values.image.aafVersion }}
         imagePullPolicy: {{ .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /data
+          name: aaf-data
         name: aaf
         readinessProbe:
           tcpSocket:
             port: 8101
           initialDelaySeconds: 5
           periodSeconds: 10
+      volumes:
+        - name: aaf-data
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aaf/data2
       imagePullSecrets:
       - name: {{ .Values.nsPrefix }}-docker-registry-key
index c874e39..6c78ca8 100644 (file)
@@ -54,11 +54,13 @@ spec:
           value: /var/chef/aai-data/environments
         - name: CHEF_GIT_URL
           value: http://gerrit.onap.org/r/aai
+        - name: LOCAL_USER_ID
+          value: "0"
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/aai/logroot/
+        - mountPath: /opt/aai/logroot/AAI-RES
           name: aai-resources-logs
         - mountPath: /var/chef/aai-data/
           name: aai-data
index d430479..a566080 100644 (file)
@@ -58,11 +58,13 @@ spec:
           value: http://gerrit.onap.org/r/aai
         - name: RESOURCES_HOSTNAME
           value: aai-resources.{{ .Values.nsPrefix }}-aai
+        - name: LOCAL_USER_ID
+          value: "0"
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/aai/logroot/
+        - mountPath: /opt/aai/logroot/AAI-GQ
           name: aai-traversal-logs
         - mountPath: /var/chef/aai-data/
           name: aai-data
index 1504b40..9c549c7 100644 (file)
@@ -5,8 +5,8 @@ image:
   readiness: oomk8s/readiness-check:1.0.0
   aaiProxy: aaionap/haproxy
   aaiProxyVersion: latest
-  aaiHbaseImage: harisekhon/hbase
-  aaiHbaseVersion: latest
+  aaiHbaseImage: aaionap/hbase
+  aaiHbaseVersion: 1.2.0
   modelLoaderImage: nexus3.onap.org:10001/openecomp/model-loader
   modelLoaderVersion: 1.1-STAGING-latest
   aaiResourcesImage: nexus3.onap.org:10001/openecomp/aai-resources
index 661980b..f320fee 100644 (file)
@@ -66,6 +66,10 @@ spec:
           name: sdnc-aaiclient-properties
         - mountPath: /opt/openecomp/sdnc/data/properties/admportal.json
           name: sdnc-admportal-json
+        - mountPath: /var/log/onap
+          name: appc-logs
+        - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
+          name: appc-log-config
         ports:
         - containerPort: 8181
         - containerPort: 1830
@@ -74,10 +78,30 @@ spec:
             port: 8181
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: appc-logs
+        - mountPath: /usr/share/filebeat/data
+          name: appc-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
+        - name: appc-log-config
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/appc/org.ops4j.pax.logging.cfg
+        - name: appc-logs
+          emptyDir: {}
+        - name: appc-data-filebeat
+          emptyDir: {}
         - name: appc-properties
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/appc/conf/appc.properties
index 7916b73..ea14b83 100644 (file)
@@ -6,3 +6,4 @@ image:
   appc: nexus3.onap.org:10001/openecomp/appc-image:1.1-STAGING-latest
   mysqlServer: mysql/mysql-server:5.6
   dgbuilderSdnc: nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
\ No newline at end of file
index 29167bf..e212971 100755 (executable)
@@ -71,6 +71,7 @@ chmod -R 777 /config-init/$NAMESPACE/aai/search-data-service/logs/
 chmod -R 777 /config-init/$NAMESPACE/aai/data-router/logs/
 chmod -R 777 /config-init/$NAMESPACE/policy/mariadb/
 chmod -R 777 /config-init/$NAMESPACE/log/elasticsearch
+chown -R root:root /config-init/$NAMESPACE/log
 
 echo "Substituting configuration parameters"
 
diff --git a/kubernetes/config/docker/init/src/config/aaf/data2/identities.dat b/kubernetes/config/docker/init/src/config/aaf/data2/identities.dat
new file mode 100644 (file)
index 0000000..95eb51d
--- /dev/null
@@ -0,0 +1,9 @@
+iowna|Ima D. Owner|Ima|Owner|314-123-2000|ima.d.owner@osaaf.com|e|
+mmanager|Mark D. Manager|Mark|Manager|314-123-1234|mark.d.manager@osaaf.com|e|iowna
+bdevl|Robert D. Developer|Bob|Developer|314-123-1235|bob.d.develper@osaaf.com|e|mmanager
+mmarket|Mary D. Marketer|Mary|Marketer|314-123-1236|mary.d.marketer@osaaf.com|e|mmanager
+ccontra|Clarice D. Contractor|Clarice|Contractor|314-123-1237|clarice.d.contractor@osaaf.com|c|mmanager
+iretired|Ira Lee M. Retired|Ira|Retired|314-123-1238|clarice.d.contractor@osaaf.com|n|mmanager
+osaaf|ID of AAF|||||a|bdevl
+m99751|ID of AAF|||||a|bdevl
+m99501|ID of AAF|||||a|bdevl
index fbd74d5..4f66294 100755 (executable)
 #
 # Certificate keystore and truststore
 #
-org.openecomp.sdnc.sli.aai.ssl.trust=/opt/openecomp/sdnc/data/stores/truststore.openecomp.client.jks
-org.openecomp.sdnc.sli.aai.ssl.trust.psswd=adminadmin
-org.openecomp.sdnc.sli.aai.host.certificate.ignore=true
+org.onap.ccsdk.sli.adaptors.aai.ssl.trust=/opt/onap/sdnc/data/stores/truststore.openecomp.client.jks
+org.onap.ccsdk.sli.adaptors.aai.ssl.trust.psswd=adminadmin
+org.onap.ccsdk.sli.adaptors.aai.host.certificate.ignore=true
 
-org.openecomp.sdnc.sli.aai.client.name=ONAP
-org.openecomp.sdnc.sli.aai.client.psswd=ONAP
+org.onap.ccsdk.sli.adaptors.aai.client.name=AAI
+org.onap.ccsdk.sli.adaptors.aai.client.psswd=AAI
 
-org.openecomp.sdnc.sli.aai.application=ONAP
+org.onap.ccsdk.sli.adaptors.aai.application=openECOMP
+#connection.timeout=1000
+#read.timeout=2000
 
 #
 # Configuration file for A&AI Client
 #
-org.openecomp.sdnc.sli.aai.uri=https://aai-service.onap-aai:8443
-connection.timeout=60000
-read.timeout=60000
+org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-service.onap-aai:8443
+
 
 # query
-org.openecomp.sdnc.sli.aai.path.query=/aai/v11/search/sdn-zone-query
-org.openecomp.sdnc.sli.aai.query.nodes=/aai/v11/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name}
-org.openecomp.sdnc.sli.aai.query.generic=/aai/v11/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3
+org.onap.ccsdk.sli.adaptors.aai.path.query=/aai/v11/search/sdn-zone-query
+org.onap.ccsdk.sli.adaptors.aai.query.nodes=/aai/v11/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name}
+org.onap.ccsdk.sli.adaptors.aai.query.generic=/aai/v11/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3
 
 # named query
-org.openecomp.sdnc.sli.aai.query.named=/aai/search/named-query
+org.onap.ccsdk.sli.adaptors.aai.query.named=/aai/search/named-query
+
 
 #update
-org.openecomp.sdnc.sli.aai.update=/aai/v11/actions/update
+org.onap.ccsdk.sli.adaptors.aai.update=/aai/v11/actions/update
 
-# UBB Notify
-org.openecomp.sdnc.sli.aai.path.notify=/aai/v11/actions/notify
-org.openecomp.sdnc.sli.aai.notify.selflink.fqdn=<%= @ubbUri %>/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
-org.openecomp.sdnc.sli.aai.notify.selflink.avpn=<%= @ubbUri %>/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
+# vce
+org.onap.ccsdk.sli.adaptors.aai.path.vce =/aai/v11/network/vces/vce/
+org.onap.ccsdk.sli.adaptors.aai.path.vces=/aai/v11/network/vces/
+
+# vpe
+org.onap.ccsdk.sli.adaptors.aai.path.vpe =/aai/v11/network/vpes/vpe/
+org.onap.ccsdk.sli.adaptors.aai.path.vpes=/aai/v11/network/vpes/
+
+# customer
+org.onap.ccsdk.sli.adaptors.aai.path.customer=/aai/v11/business/customers/customer/{customer-id}
+
+# service subscription
+org.onap.ccsdk.sli.adaptors.aai.path.service.subscription=/aai/v11/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}
+
+# service instance
+org.onap.ccsdk.sli.adaptors.aai.path.svcinst=/aai/v11/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
+org.onap.ccsdk.sli.adaptors.aai.path.svcinst.query=/aai/v11/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance
+org.onap.ccsdk.sli.adaptors.aai.path.service.instance=/aai/v11/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}
+
+# complex
+org.onap.ccsdk.sli.adaptors.aai.path.complexes=/aai/v11/cloud-infrastructure/complexes
+org.onap.ccsdk.sli.adaptors.aai.path.complex=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id}
+
+# tenant
+org.onap.ccsdk.sli.adaptors.aai.path.tenant=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}
+org.onap.ccsdk.sli.adaptors.aai.path.tenant.query=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant?tenant-name={tenant-name}
+
+# vservers
+org.onap.ccsdk.sli.adaptors.aai.path.vservers=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/
+org.onap.ccsdk.sli.adaptors.aai.path.vserver=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}
+
+# vpls-pe
+org.onap.ccsdk.sli.adaptors.aai.path.vpls.pes=/aai/v11/network/vpls-pes/
+org.onap.ccsdk.sli.adaptors.aai.path.vpls.pe =/aai/v11/network/vpls-pes/vpls-pe/
+
+# ctag-pool
+org.onap.ccsdk.sli.adaptors.aai.path.ctag.pools=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools
+org.onap.ccsdk.sli.adaptors.aai.path.ctag.pool=/aai/v11/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools/ctag-pool/{target-pe}/{availability-zone-name}
+
+#
+#-------------- 1510 ----------------------
+#
+
+# pservers
+org.onap.ccsdk.sli.adaptors.aai.path.pservers=/aai/v11/cloud-infrastructure/pservers
+org.onap.ccsdk.sli.adaptors.aai.path.pserver=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}
+
+# generic-vnf
+org.onap.ccsdk.sli.adaptors.aai.path.generic.vnfs=/aai/v11/network/generic-vnfs
+org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}
+
+# dvs-switch
+org.onap.ccsdk.sli.adaptors.aai.path.dvsswitches=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches
+org.onap.ccsdk.sli.adaptors.aai.path.dvsswitch=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches/dvs-switch/{switch-name}
+
+# L3 Networks
+org.onap.ccsdk.sli.adaptors.aai.path.l3networks=/aai/v11/network/l3-networks
+org.onap.ccsdk.sli.adaptors.aai.path.l3network=/aai/v11/network/l3-networks/l3-network/{network-id}
+org.onap.ccsdk.sli.adaptors.aai.path.l3network.query.name=/aai/v11/network/l3-networks/l3-network?network-name={network-name}
 
 # P-Interfaces
-org.openecomp.sdnc.sli.aai.path.pserver.pinterfaces=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces
-org.openecomp.sdnc.sli.aai.path.pserver.pinterface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}
+org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterfaces=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces
+org.onap.ccsdk.sli.adaptors.aai.path.pserver.pinterface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}
+
+# Physical Link
+org.onap.ccsdk.sli.adaptors.aai.path.physical.links=/aai/v11/network/physical-links
+org.onap.ccsdk.sli.adaptors.aai.path.physical.link=/aai/v11/network/physical-links/physical-link/{link-name}
+
+# VPN Bindings
+org.onap.ccsdk.sli.adaptors.aai.path.vpn.bindings=/aai/v11/network/vpn-bindings/
+org.onap.ccsdk.sli.adaptors.aai.path.vpn.binding=/aai/v11/network/vpn-bindings/vpn-binding/{vpn-id}
+
+# VNF IMAGES
+org.onap.ccsdk.sli.adaptors.aai.path.vnf.images=/aai/v11/service-design-and-creation/vnf-images
+org.onap.ccsdk.sli.adaptors.aai.path.vnf.image=/aai/v11/service-design-and-creation/vnf-images/vnf-image/{att-uuid}
+org.onap.ccsdk.sli.adaptors.aai.path.vnf.image.query=/aai/v11/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor}
+
+# UBB Notify
+org.onap.ccsdk.sli.adaptors.aai.path.notify=/aai/v11/actions/notify
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.fqdn=https://aai-service.onap-aai:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
+org.onap.ccsdk.sli.adaptors.aai.notify.selflink.avpn=https://aai-service.onap-aai:8543/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
 
 # Service
-org.openecomp.sdnc.sli.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id}
-org.openecomp.sdnc.sli.aai.path.services=/aai/v11/service-design-and-creation/services
+org.onap.ccsdk.sli.adaptors.aai.path.service=/aai/v11/service-design-and-creation/services/service/{service-id}
+org.onap.ccsdk.sli.adaptors.aai.path.services=/aai/v11/service-design-and-creation/services
 
-# service instance
-org.openecomp.sdnc.sli.aai.path.svcinst=/aai/v11/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
-org.openecomp.sdnc.sli.aai.path.svcinst.query=/aai/v11/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance
-org.openecomp.sdnc.sli.aai.path.service.instance=/aai/v11/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}
+
+#
+#-------------- 1604 ----------------------
+#
+
+# VNFC
+org.onap.ccsdk.sli.adaptors.aai.path.vnfc=/aai/v11/network/vnfcs/vnfc/{vnfc-name}
+
+# class-of-service
+org.onap.ccsdk.sli.adaptors.aai.path.class.of.service=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}/classes-of-service/class-of-service/{cos-id}
+
+# site-pair
+org.onap.ccsdk.sli.adaptors.aai.path.site.pair=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}
+
+# routing-instance
+org.onap.ccsdk.sli.adaptors.aai.path.routing.instance=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}
 
 # site-pair-set
-org.openecomp.sdnc.sli.aai.path.site.pair.set=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}
+org.onap.ccsdk.sli.adaptors.aai.path.site.pair.set=/aai/v11/network/site-pair-sets/site-pair-set/{site-pair-set-id}
 
-# VNF IMAGES QUERY
-org.openecomp.sdnc.sli.aai.path.vnf.image.query=/aai/v11/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor}
+# license key resource
+org.onap.ccsdk.sli.adaptors.aai.path.license.acquire=/aai/v11/actions/assignment/license-management/assignment-group-uuid/{assignment-group-uuid}
+org.onap.ccsdk.sli.adaptors.aai.path.license=/aai/v11/license-management/license-key-resources/license-key-resource/{att-uuid}
 
-# vservers
-org.openecomp.sdnc.sli.aai.path.vservers=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/
-org.openecomp.sdnc.sli.aai.path.vserver=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}
+# logical-link
+org.onap.ccsdk.sli.adaptors.aai.path.logical.link =/aai/v11/network/logical-links/logical-link/{link-name}
+
+# virtual-data-center
+org.onap.ccsdk.sli.adaptors.aai.path.virtual.data.center=/aai/v11/cloud-infrastructure/virtual-data-centers/virtual-data-center/{vdc-id}
+
+# wan-connector
+org.onap.ccsdk.sli.adaptors.aai.path.wan.connector=/aai/v11/business/connectors/connector/{resource-instance-id}
+
+# l-interface
+org.onap.ccsdk.sli.adaptors.aai.path.lag.interface.l.interface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.onap.ccsdk.sli.adaptors.aai.path.p.interface.l.interface=/aai/v11/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# l-interface pnf
+org.onap.ccsdk.sli.adaptors.aai.path.lag.interface.l.interface.pnf=/aai/v11/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.onap.ccsdk.sli.adaptors.aai.path.p.interface.l.interface.pnf=/aai/v11/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# subinterface
+org.onap.ccsdk.sli.adaptors.aai.path.pnf.lag.interface.subinterface=/aai/v11/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.onap.ccsdk.sli.adaptors.aai.path.pnf.p.interface.l.interface=/aai/v11/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# vlans
+org.onap.ccsdk.sli.adaptors.aai.path.vlan=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf.vlan=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+
+#  l3-interface-ipv4-address-list
+org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+org.onap.ccsdk.sli.adaptors.aai.path.vlan.l3.interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+#  l3-interface-ipv6-address-list
+org.onap.ccsdk.sli.adaptors.aai.path.l3.interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+org.onap.ccsdk.sli.adaptors.aai.path.vlan.l3.interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# ipsec-configuration
+org.onap.ccsdk.sli.adaptors.aai.path.ipsec.configuration=/aai/v11/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}
+
+# vig server
+org.onap.ccsdk.sli.adaptors.aai.path.vig.server=/aai/v11/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}/vig-servers/vig-server/{vig-address-type}
+
+# l3-network
+org.onap.ccsdk.sli.adaptors.aai.path.l3.network=/aai/v11/network/l3-networks/l3-network/{network-id}
+
+# subnet
+org.onap.ccsdk.sli.adaptors.aai.path.subnet=/aai/v11/network/l3-networks/l3-network/{network-id}/subnets/subnet/{subnet-id}
+
+# multicast-configuration
+org.onap.ccsdk.sli.adaptors.aai.path.multicast.configuration=/aai/v11/network/multicast-configurations/multicast-configuration/{multicast-configuration-id}
+
+# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.ipv4.address.list
+org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.vlan.ipv4.address.list
+org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.vlan.ipv4.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.onap.ccsdk.sli.adaptors.aai.path.l.interface.ipv6.address.list
+org.onap.ccsdk.sli.adaptors.aai.path.l3-interface.ipv6.address.list=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# volume.group
+org.onap.ccsdk.sli.adaptors.aai.path.volume.group=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/volume-groups/volume-group/{volume-group-id}
+
+#cloud region
+org.onap.ccsdk.sli.adaptors.aai.path.cloud.region=/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}
+
+# vf-module
+org.onap.ccsdk.sli.adaptors.aai.path.vf.module=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}
+
+# l-interface through generic-vnf
+org.onap.ccsdk.sli.adaptors.aai.path.generic.vnf.linterface=/aai/v11/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}
+
+# network-policy
+org.onap.ccsdk.sli.adaptors.aai.path.network.policy=/aai/v11/network/network-policies/network-policy/{network-policy-id}
+
+# pnf
+org.onap.ccsdk.sli.adaptors.aai.path.pnf=/aai/v11/network/pnfs/pnf/{pnf-name}
 
 #
 # Formatting
 #
-org.openecomp.sdnc.sli.aai.param.format=filter=%s:%s
-org.openecomp.sdnc.sli.aai.param.vnf_type=vnf-type
-org.openecomp.sdnc.sli.aai.param.physical.location.id=physical-location-id
-org.openecomp.sdnc.sli.aai.param.service.type=service-type
+org.onap.ccsdk.sli.adaptors.aai.param.format=filter=%s:%s
+org.onap.ccsdk.sli.adaptors.aai.param.vnf_type=vnf-type
+org.onap.ccsdk.sli.adaptors.aai.param.physical.location.id=physical-location-id
+org.onap.ccsdk.sli.adaptors.aai.param.service.type=service-type
index fc7f0e4..f6f59ae 100755 (executable)
@@ -25,7 +25,7 @@
     "docker0": "172.17.0.1",
     "virbr0": "192.168.122.1"
   },
-  "svclogicPropertiesDb01": "/opt/openecomp/sdnc/data/properties/svclogic.properties.sdnctldb01",
+  "svclogicPropertiesDb01": "/opt/onap/sdnc/data/properties/svclogic.properties.sdnctldb01",
   "databases": [
     "dbhost|sdnctldb01"
   ],
diff --git a/kubernetes/mock/Chart.yaml b/kubernetes/mock/Chart.yaml
new file mode 100644 (file)
index 0000000..baf2e3a
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: mock
+version: 0.1.0
diff --git a/kubernetes/mock/templates/all-services.yaml b/kubernetes/mock/templates/all-services.yaml
new file mode 100644 (file)
index 0000000..8920191
--- /dev/null
@@ -0,0 +1,17 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: sniro-emulator
+  namespace: "{{ .Values.nsPrefix }}-mock"
+  labels:
+    app: sniro-emulator
+spec:
+  type: NodePort
+  ports:
+  - port: 80
+    nodePort: {{ .Values.nodePortPrefix }}88
+    targetPort: 9999
+    protocol: TCP
+    name: http
+  selector:
+    app: sniro-emulator
diff --git a/kubernetes/mock/templates/sniroemulator-deployment.yaml b/kubernetes/mock/templates/sniroemulator-deployment.yaml
new file mode 100644 (file)
index 0000000..a0473c9
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: sniro-emulator
+  namespace: "{{ .Values.nsPrefix }}-mock"
+spec:
+  selector:
+    matchLabels:
+      app: sniro-emulator
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: sniro-emulator
+        name: sniro-emulator
+    spec:
+      containers:
+      - image: "{{ .Values.image.onapmock }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: sniro-emulator
+        ports:
+        - containerPort: 9999
+        args: ["--verbose"]
+      imagePullSecrets:
+      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
diff --git a/kubernetes/mock/values.yaml b/kubernetes/mock/values.yaml
new file mode 100644 (file)
index 0000000..bd56445
--- /dev/null
@@ -0,0 +1,6 @@
+nsPrefix: onap
+pullPolicy: Always
+nodePortPrefix: 302
+image:
+  onapmock: nexus3.onap.org:10001/onap/sniroemulator
+  tag: latest
index 862f572..bf350ae 100644 (file)
@@ -54,6 +54,26 @@ spec:
           name: mso
         - mountPath: /tmp/start-jboss-server.sh
           name: mso-docker-files
+        - mountPath: /var/log/onap
+          name: mso-logs
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-api-handler-infra-config/logback.apihandler-infra.xml
+          name: logback-apihandler-infra
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml
+          name: logback-network
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.tenant.xml
+          name: logback-tenant
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vnf.xml
+          name: logback-vnf
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-appc-adapter-config/logback.appc.xml
+          name: logback-appc
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-requests-db-adapter-config/logback.msorequestsdbadapter.xml
+          name: logback-msorequestsdbadapter
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-asdc-controller-config/logback.asdc.xml
+          name: logback-asdc
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-sdnc-adapter-config/logback.sdnc.xml
+          name: logback-sdnc
+        - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-bpmn-config/logback.bpmn.xml
+          name: logback-bpmn
         env:
         - name: JBOSS_DEBUG
           value: "false"
@@ -68,13 +88,57 @@ spec:
             port: 8080
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: mso-logs
+        - mountPath: /usr/share/filebeat/data
+          name: mso-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: logback-apihandler-infra
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.apihandler-infra.xml
+        - name: logback-network
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.network.xml
+        - name: logback-tenant
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.tenant.xml
+        - name: logback-vnf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.vnf.xml
+        - name: logback-appc
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.appc.xml
+        - name: logback-msorequestsdbadapter
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.msorequestsdbadapter.xml
+        - name: logback-asdc
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.asdc.xml
+        - name: logback-sdnc
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.sdnc.xml
+        - name: logback-bpmn
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.bpmn.xml
         - name: mso
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mso
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: mso-logs
+          emptyDir: {}
+        - name: mso-data-filebeat
+          emptyDir: {}
         - name: mso-docker-files
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/docker-files/scripts/start-jboss-server.sh
index 883db87..4584e73 100644 (file)
@@ -5,4 +5,4 @@ image:
   readiness: oomk8s/readiness-check:1.0.0
   mso: nexus3.onap.org:10001/openecomp/mso:1.1-STAGING-latest
   mariadb: nexus3.onap.org:10001/mariadb:10.1.11
-
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
diff --git a/kubernetes/oneclick/aaf.sh b/kubernetes/oneclick/aaf.sh
deleted file mode 100644 (file)
index 9a85300..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "AAF....\n"
-
-$KUBECTL_CMD/aaf-deployment.yaml
-$KUBECTL_CMD/aaf-cs-deployment.yaml
diff --git a/kubernetes/oneclick/aai.sh b/kubernetes/oneclick/aai.sh
deleted file mode 100755 (executable)
index 9a8e837..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "AAI....\n"
-$KUBECTL_CMD/hbase-deployment.yaml
-$KUBECTL_CMD/aai-deployment.yaml
-$KUBECTL_CMD/modelloader-deployment.yaml
diff --git a/kubernetes/oneclick/appc.sh b/kubernetes/oneclick/appc.sh
deleted file mode 100755 (executable)
index 2db7b21..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "App-c....\n"
-$KUBECTL_CMD/db-deployment.yaml
-$KUBECTL_CMD/appc-deployment.yaml
-$KUBECTL_CMD/dgbuilder-deployment.yaml
diff --git a/kubernetes/oneclick/clamp.sh b/kubernetes/oneclick/clamp.sh
deleted file mode 100644 (file)
index 2440ccc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "CLAMP....\n"
-
-$KUBECTL_CMD/clamp-maraidb-deployment.yaml
-$KUBECTL_CMD/clamp-deployment.yaml
diff --git a/kubernetes/oneclick/dcae.sh b/kubernetes/oneclick/dcae.sh
deleted file mode 100755 (executable)
index 5dd1a2f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-# manual deployment order is mentioned - but we need to specify dependencies in the service
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "dcae....\n"
-$KUBECTL_CMD/message-router/dcae-zookeeper.yaml
-$KUBECTL_CMD/message-router/dcae-kafka.yaml
-$KUBECTL_CMD/message-router/dcae-dmaap.yaml
-
-$KUBECTL_CMD/pgaas/pgaas.yaml
-
-$KUBECTL_CMD/dcae-collector-common-event.yaml
-$KUBECTL_CMD/dcae-collector-dmaapbc.yaml
-$KUBECTL_CMD/dcae-collector-pvs.yaml
-
-$KUBECTL_CMD/cdap/cdap0-dep.yaml
-$KUBECTL_CMD/cdap/cdap1-dep.yaml
-$KUBECTL_CMD/cdap/cdap2-dep.yaml
diff --git a/kubernetes/oneclick/message-router.sh b/kubernetes/oneclick/message-router.sh
deleted file mode 100755 (executable)
index 0369fd1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "Message Router....\n"
-$KUBECTL_CMD/message-router-zookeeper.yaml
-$KUBECTL_CMD/message-router-kafka.yaml
-$KUBECTL_CMD/message-router-dmaap.yaml
diff --git a/kubernetes/oneclick/mso.sh b/kubernetes/oneclick/mso.sh
deleted file mode 100755 (executable)
index 360f3b8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "MSO....\n"
-
-$KUBECTL_CMD/db-deployment.yaml
-$KUBECTL_CMD/mso-deployment.yaml
diff --git a/kubernetes/oneclick/policy.sh b/kubernetes/oneclick/policy.sh
deleted file mode 100755 (executable)
index 85e58f6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "Policy....\n"
-
-$KUBECTL_CMD/dep-maria.yaml
-$KUBECTL_CMD/dep-nexus.yaml
-$KUBECTL_CMD/dep-pap.yaml
-$KUBECTL_CMD/dep-pdp.yaml
-$KUBECTL_CMD/dep-brmsgw.yaml
-$KUBECTL_CMD/dep-pypdp.yaml
-$KUBECTL_CMD/dep-drools.yaml
diff --git a/kubernetes/oneclick/portal.sh b/kubernetes/oneclick/portal.sh
deleted file mode 100755 (executable)
index c148485..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "Portal....\n"
-$KUBECTL_CMD/portal-mariadb-deployment.yaml
-$KUBECTL_CMD/portal-apps-deployment.yaml
-$KUBECTL_CMD/portal-widgets-deployment.yaml
-$KUBECTL_CMD/portal-vnc-dep.yaml
diff --git a/kubernetes/oneclick/robot.sh b/kubernetes/oneclick/robot.sh
deleted file mode 100755 (executable)
index 99a5748..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "Robot....\n"
-$KUBECTL_CMD/robot-deployment.yaml
diff --git a/kubernetes/oneclick/sdc.sh b/kubernetes/oneclick/sdc.sh
deleted file mode 100755 (executable)
index 72a85cb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "SDC....\n"
-$KUBECTL_CMD/sdc-es.yaml
-$KUBECTL_CMD/sdc-cs.yaml
-$KUBECTL_CMD/sdc-kb.yaml
-$KUBECTL_CMD/sdc-be.yaml
-$KUBECTL_CMD/sdc-fe.yaml
diff --git a/kubernetes/oneclick/sdnc.sh b/kubernetes/oneclick/sdnc.sh
deleted file mode 100755 (executable)
index d7390ba..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "SDNC....\n"
-$KUBECTL_CMD/db-deployment.yaml
-$KUBECTL_CMD/sdnc-deployment.yaml
-$KUBECTL_CMD/dgbuilder-deployment.yaml
-$KUBECTL_CMD/web-deployment.yaml
index dde9ca1..785ebb6 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Deploying MSB first and kube2msb last will ensure all the ONAP services can be registered to MSB
-HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'kube2msb' 'aaf')
+HELM_APPS=('consul' 'msb' 'mso' 'message-router' 'sdnc' 'vid' 'robot' 'portal' 'policy' 'appc' 'aai' 'sdc' 'dcaegen2' 'log' 'cli' 'multicloud' 'clamp' 'vnfsdk' 'kube2msb' 'aaf' 'vfc')
 ONAP_DOCKER_REGISTRY=${ONAP_DOCKER_REGISTRY:-nexus3.onap.org:10001}
 ONAP_DOCKER_USER=${ONAP_DOCKER_USER:-docker}
 ONAP_DOCKER_PASS=${ONAP_DOCKER_PASS:-docker}
diff --git a/kubernetes/oneclick/vfc.sh b/kubernetes/oneclick/vfc.sh
deleted file mode 100755 (executable)
index 0199a2a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "vfc....\n"
-$KUBECTL_CMD/vfc-catalog-deployment.yaml
-$KUBECTL_CMD/vfc-emsdriver-deployment.yaml
-$KUBECTL_CMD/vfc-gvnfmdriver-deployment.yaml
-$KUBECTL_CMD/vfc-hwvnfmdriver-deployment.yaml
-$KUBECTL_CMD/vfc-jujudriver-deployment.yaml
-$KUBECTL_CMD/vfc-nslcm-deployment.yaml
-$KUBECTL_CMD/vfc-resmgr-deployment.yaml
-$KUBECTL_CMD/vfc-vnflcm-deployment.yaml
-$KUBECTL_CMD/vfc-vnfmgr-deployment.yaml
-$KUBECTL_CMD/vfc-vnfres-deployment.yaml
-$KUBECTL_CMD/vfc-workflow-deployment.yaml
-$KUBECTL_CMD/vfc-ztesdncdriver-deployment.yaml
-$KUBECTL_CMD/vfc-ztevmanagerdriver-deployment.yaml
diff --git a/kubernetes/oneclick/vid.sh b/kubernetes/oneclick/vid.sh
deleted file mode 100755 (executable)
index b88a3fb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "VID....\n"
-$KUBECTL_CMD/vid-mariadb-deployment.yaml
-$KUBECTL_CMD/vid-server-deployment.yaml
diff --git a/kubernetes/oneclick/vnfsdk.sh b/kubernetes/oneclick/vnfsdk.sh
deleted file mode 100644 (file)
index c2853f7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-KUBECTL_CMD="kubectl --namespace $1-$2 $3 -f ../$2"
-
-printf "VNFSDK....\n"
-
-$KUBECTL_CMD/postgres-deployment.yaml
-$KUBECTL_CMD/refrepo-deployment.yaml
index 9c3fc29..2f06a08 100644 (file)
@@ -71,10 +71,38 @@ spec:
           name: drools
         - mountPath: /usr/share/maven/conf/settings.xml
           name: drools-settingsxml
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath: /tmp/logback.xml
+          name: policy-logback
+        lifecycle:
+          postStart:
+            exec:
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/config/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath: /usr/share/filebeat/data
+          name: policy-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: policy-logs
+          emptyDir: {}
+        - name: policy-data-filebeat
+          emptyDir: {}
+        - name: policy-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml
         - name: drools-settingsxml
           hostPath:
             path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml
index 794c654..aeb3d6b 100644 (file)
@@ -86,10 +86,43 @@ spec:
           readOnly: true
         - mountPath: /tmp/policy-install/config/
           name: pe
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath: /tmp/policy-install/logback.xml
+          name: policy-sdk-logback
+        - mountPath: /tmp/logback.xml
+          name: policy-logback
+        lifecycle:
+          postStart:
+            exec:
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pap/webapps/pap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; export SRC=/tmp/policy-install/logback.xml; export DST=/opt/app/policy/servers/console/webapps/onap/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath: /usr/share/filebeat/data
+          name: policy-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: policy-logs
+          emptyDir: {}
+        - name: policy-data-filebeat
+          emptyDir: {}
+        - name: policy-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml
+        - name: policy-sdk-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml
         - name: pe
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
index d7d697d..841d55c 100644 (file)
@@ -65,10 +65,38 @@ spec:
           readOnly: true
         - mountPath: /tmp/policy-install/config
           name: pe
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath:  /tmp/logback.xml
+          name: policy-logback
+        lifecycle:
+          postStart:
+            exec:
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/servers/pdp/webapps/pdp/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: policy-logs
+        - mountPath: /usr/share/filebeat/data
+          name: policy-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: policy-logs
+          emptyDir: {}
+        - name: policy-data-filebeat
+          emptyDir: {}
+        - name: policy-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pdp-rest/logback.xml
         - name: pe
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
index 62e91f8..8119331 100644 (file)
@@ -13,3 +13,4 @@ image:
   policyNexus: nexus3.onap.org:10001/onap/policy/policy-nexus
   policyNexusVersion: 1.1-STAGING-latest
   ubuntu: ubuntu:16.04
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
\ No newline at end of file
index 2048a69..13cf570 100755 (executable)
@@ -95,6 +95,10 @@ spec:
           name: portal-root
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
           name: portal-logs
+        - mountPath: /var/log/onap
+          name: portal-logs2
+        - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP/WEB-INF/classes/logback.xml
+          name: portal-logback-be
         ports:
         - containerPort: 8005
         - containerPort: 8009
@@ -104,10 +108,30 @@ spec:
             port: 8080
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: portal-logs2
+        - mountPath: /usr/share/filebeat/data
+          name: portal-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: portal-logs2
+          emptyDir: {}
+        - name: portal-data-filebeat
+          emptyDir: {}
+        - name: portal-logback-be
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/portal-be/logback.xml
         - name: portal-fusion-properties
           hostPath:
             path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties
@@ -143,7 +167,7 @@ spec:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties
         - name: sdkapp-fusion-properties
           hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties            
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties
         - name: portal-mariadb-onboarding-sql
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
index f4e46ab..df38a2a 100755 (executable)
@@ -28,6 +28,10 @@ spec:
           readOnly: true
         - mountPath: /var/lib/mysql
           name: portal-mariadb-data
+        - mountPath: /var/log/onap
+          name: portal-logs
+        - mountPath: /tmp/logback.xml
+          name: portal-logback
         ports:
         - containerPort: 3306
           name: portaldb
@@ -36,6 +40,16 @@ spec:
             port: 3306
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: portal-logs
+        - mountPath: /usr/share/filebeat/data
+          name: portal-data-filebeat
       volumes:
       - name: localtime
         hostPath:
@@ -43,5 +57,15 @@ spec:
       - name: portal-mariadb-data
         persistentVolumeClaim:
           claimName: portal-db
+      - name: filebeat-conf
+        hostPath:
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+      - name: portal-logs
+        emptyDir: {}
+      - name: portal-data-filebeat
+        emptyDir: {}
+      - name: portal-logback
+        hostPath:
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/portal-db/logback.xml
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
index 4a3cbd1..757995a 100644 (file)
@@ -9,5 +9,6 @@ image:
   portalwms: nexus3.onap.org:10001/openecomp/portal-wms:1.1-STAGING-latest
   ubuntuInit: oomk8s/ubuntu-init:1.0.0
   ubuntuDesktop: dorowu/ubuntu-desktop-lxde-vnc
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
 onapPortal:
   webappsDir: "/opt/apache-tomcat-8.0.37/webapps"
index 77c7545..29f029f 100644 (file)
@@ -84,6 +84,10 @@ spec:
           readOnly: true
         - mountPath: /var/lib/jetty/logs
           name: sdc-logs
+        - mountPath: /var/log/onap
+          name: sdc-logs-2
+        - mountPath: /var/lib/jetty/config/catalog-be/logback.xml
+          name: sdc-logback
         ports:
         - containerPort: 8443
         - containerPort: 8080
@@ -92,7 +96,27 @@ spec:
             port: 8443
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: sdc-logs-2
+        - mountPath: /usr/share/filebeat/data
+          name: sdc-data-filebeat
       volumes:
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: sdc-logs-2
+          emptyDir: {}
+        - name: sdc-data-filebeat
+          emptyDir: {}
+        - name: sdc-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/be/logback.xml
         - name: sdc-sdc-es-es
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
index 0ca83ae..56d6296 100644 (file)
@@ -70,6 +70,12 @@ spec:
           name: sdc-logs
         - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
           name: sdc-fe-config
+        - mountPath: /tmp/logback.xml
+          name: sdc-logback
+        lifecycle:
+          postStart:
+            exec:
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         ports:
         - containerPort: 9443
         - containerPort: 8181
@@ -78,7 +84,27 @@ spec:
             port: 8181
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: sdc-logs-2
+        - mountPath: /usr/share/filebeat/data
+          name: sdc-data-filebeat
       volumes:
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: sdc-logs-2
+          emptyDir: {}
+        - name: sdc-data-filebeat
+          emptyDir: {}
+        - name: sdc-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/fe/logback.xml
         - name: sdc-sdc-es-es
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
index 58bcf1c..a9b7ca3 100644 (file)
@@ -8,3 +8,4 @@ image:
   sdcElasticsearch: nexus3.onap.org:10001/openecomp/sdc-elasticsearch:1.1-STAGING-latest
   sdcCassandra: nexus3.onap.org:10001/openecomp/sdc-cassandra:1.1-STAGING-latest
   sdcBackend: nexus3.onap.org:10001/openecomp/sdc-backend:1.1-STAGING-latest
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
\ No newline at end of file
index 7223dfd..687a6bb 100644 (file)
@@ -78,10 +78,13 @@ metadata:
       ]'
 spec:
   ports:
-  - name: "sdnc-port"
+  - name: "sdnc-port-8181"
     port: 8282
     targetPort: 8181
     nodePort: {{ .Values.nodePortPrefix }}02
+  - name: "sdnc-port-8101"
+    port: 8201
+    targetPort: 8101
   type: NodePort
   selector:
     app: sdnc
index ba2008a..0e2166e 100644 (file)
@@ -45,12 +45,12 @@ spec:
       - command:
         - /bin/bash
         - -c
-        - cd /opt/openecomp/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
+        - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
         env:
         - name: MYSQL_ROOT_PASSWORD
           value: openECOMP1.0
         - name: SDNC_CONFIG_DIR
-          value: /opt/openecomp/sdnc/data/properties
+          value: /opt/onap/sdnc/data/properties
         image: {{ .Values.image.dgbuilderSdnc }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: sdnc-dgbuilder-container
index 4b12390..95c282b 100644 (file)
@@ -41,12 +41,12 @@ spec:
     spec:
       containers:
       - command:
-        - /opt/openecomp/sdnc/bin/startODL.sh
+        - /opt/onap/sdnc/bin/startODL.sh
         env:
         - name: MYSQL_ROOT_PASSWORD
           value: openECOMP1.0
         - name: SDNC_CONFIG_DIR
-          value: /opt/openecomp/sdnc/data/properties
+          value: /opt/onap/sdnc/data/properties
         image: {{ .Values.image.sdnc }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: sdnc-controller-container
@@ -54,21 +54,46 @@ spec:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/openecomp/sdnc/data/properties/aaiclient.properties
+        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
           name: sdnc-aaiclient-properties
-        - mountPath: /opt/openecomp/sdnc/data/properties/admportal.json
-          name: sdnc-admportal-json          
+        - mountPath: /opt/onap/sdnc/data/properties/admportal.json
+          name: sdnc-admportal-json
+        - mountPath: /var/log/onap
+          name: sdnc-logs
+        - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
+          name: sdnc-log-config
         ports:
         - containerPort: 8181
+        - containerPort: 8101
         readinessProbe:
           tcpSocket:
             port: 8181
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: sdnc-logs
+        - mountPath: /usr/share/filebeat/data
+          name: sdnc-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
+        - name: sdnc-log-config
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdnc/org.ops4j.pax.logging.cfg
+        - name: sdnc-logs
+          emptyDir: {}
+        - name: sdnc-data-filebeat
+          emptyDir: {}
         - name: sdnc-aaiclient-properties
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
index 4f7886d..45e2e26 100644 (file)
@@ -45,12 +45,12 @@ spec:
       - command:
         - /bin/bash
         - -c
-        - cd /opt/openecomp/sdnc/admportal/shell && ./start_portal.sh
+        - cd /opt/onap/sdnc/admportal/shell && ./start_portal.sh
         env:
         - name: MYSQL_ROOT_PASSWORD
           value: openECOMP1.0
         - name: SDNC_CONFIG_DIR
-          value: /opt/openecomp/sdnc/data/properties
+          value: /opt/onap/sdnc/data/properties
         image: {{ .Values.image.admportalSdnc }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: sdnc-portal-container
@@ -60,6 +60,10 @@ spec:
         - name: localtime
           mountPath: /etc/localtime
           readOnly: true
+        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
+          name: sdnc-aaiclient-properties
+        - mountPath: /opt/onap/sdnc/data/properties/admportal.json
+          name: sdnc-admportal-json
         readinessProbe:
           tcpSocket:
             port: 8843
@@ -70,5 +74,11 @@ spec:
       - name: localtime
         hostPath:
           path: /etc/localtime
+      - name: sdnc-aaiclient-properties
+        hostPath:
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
+      - name: sdnc-admportal-json
+        hostPath:
+          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
index 0ccc357..f7cbeca 100644 (file)
@@ -4,6 +4,7 @@ nodePortPrefix: 302
 image:
   readiness: oomk8s/readiness-check:1.0.0
   mysqlServer: mysql/mysql-server:5.6
-  dgbuilderSdnc: nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest
-  sdnc: nexus3.onap.org:10001/openecomp/sdnc-image:1.1-STAGING-latest
-  admportalSdnc: nexus3.onap.org:10001/openecomp/admportal-sdnc-image:1.1-STAGING-latest
+  dgbuilderSdnc: nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:0.1-STAGING-latest
+  sdnc: nexus3.onap.org:10001/onap/sdnc-image:1.2-STAGING-latest
+  admportalSdnc: nexus3.onap.org:10001/onap/admportal-sdnc-image:1.2-STAGING-latest
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
\ No newline at end of file
index 69c0b57..ff34133 100644 (file)
@@ -86,20 +86,48 @@ spec:
         image: {{ .Values.image.vid }} 
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: vid-server
+        lifecycle:
+          postStart:
+            exec:
+              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/usr/local/tomcat/webapps/vid/WEB-INF/classes/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
         ports:
         - containerPort: 8080
         volumeMounts:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
+        - mountPath: /var/log/onap
+          name: vid-logs
+        - mountPath: /tmp/logback.xml
+          name: vid-logback
         readinessProbe:
           tcpSocket:
             port: 8080
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: vid-logs
+        - mountPath: /usr/share/filebeat/data
+          name: vid-data-filebeat
       volumes:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: vid-logs
+          emptyDir: {}
+        - name: vid-data-filebeat
+          emptyDir: {}
+        - name: vid-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/vid/logback.xml
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
index a7d494c..5d24d34 100644 (file)
@@ -1,7 +1,8 @@
 nsPrefix: onap
-pullPolicy: IfNotPresent
+pullPolicy: Always
 nodePortPrefix: 302
 image:
   readiness: oomk8s/readiness-check:1.0.0
   mariadb: nexus3.onap.org:10001/library/mariadb:10
   vid: nexus3.onap.org:10001/openecomp/vid:1.1-STAGING-latest
+  filebeat: docker.elastic.co/beats/filebeat:5.5.0
\ No newline at end of file
diff --git a/onap-blueprint.yaml b/onap-blueprint.yaml
deleted file mode 100644 (file)
index 699312b..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-tosca_definitions_version: cloudify_dsl_1_3
-
-description: >
-  Blueprint deploys all ONAP kubernetes resources defined in YAML files on existing kubernetes cluster
-  The following pre-setup steps are assumed, but not required:
-  - Create Cloudify Example Environment: https://github.com/cloudify-examples/cloudify-environment-setup.
-  - Create Kubernetes Cluster: https://github.com/cloudify-examples/simple-kubernetes-blueprint.
-
-imports:
-  - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.1/resources/rest-service/cloudify/types/types.yaml
-  # Plugin required: https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/releases/download/1.2.1rc1/cloudify_kubernetes_plugin-1.2.1rc1-py27-none-linux_x86_64-centos-Core.wgn
-  - https://raw.githubusercontent.com/cloudify-incubator/cloudify-kubernetes-plugin/1.2.1rc1/plugin.yaml
-  # Plugin required: http://repository.cloudifysource.org/cloudify/wagons/cloudify-fabric-plugin/1.4.2/cloudify_fabric_plugin-1.4.2-py27-none-linux_x86_64-centos-Core.wgn
-  - http://www.getcloudify.org/spec/fabric-plugin/1.4.2/plugin.yaml
-  - cloudify/types/onap.yaml
-
-inputs:
-  kubernetes_configuration_file_content:
-    description: >
-      File content of kubernetes master YAML configuration
-
-  namespace_prefix:
-    type: string
-    description: >
-      Kubernetes namespace name prefix which will be uese for all ONAP apps
-    default: onap
-
-dsl_definitions:
-  options: &app_options
-    namespace:
-      concat: [{ get_input: namespace_prefix }, '-', { get_property: [SELF, name] }]
-
-node_templates:
-  kubernetes_master:
-    type: cloudify.kubernetes.nodes.Master
-    properties:
-      configuration:
-        file_content: { get_input: kubernetes_configuration_file_content }
-
-  onap_environment:
-    type: cloudify.onap.kubernetes.Environment
-    properties:
-      namespace: { get_input: namespace_prefix }
-      init_pod: kubernetes/config/pod-config-init.yaml
-      options:
-        namespace: { get_input: namespace_prefix }
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-
-  mso_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: mso
-      values: kubernetes/mso/values.yaml
-      resources:
-        - kubernetes/mso/templates/mso-deployment.yaml
-        - kubernetes/mso/templates/db-deployment.yaml
-      services: kubernetes/mso/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  message_router_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: message-router
-      values: kubernetes/message-router/values.yaml
-      resources:
-          - kubernetes/message-router/templates/message-router-zookeeper.yaml
-          - kubernetes/message-router/templates/message-router-dmaap.yaml
-          - kubernetes/message-router/templates/message-router-kafka.yaml
-      services: kubernetes/message-router/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  sdc_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: sdc
-      values: kubernetes/sdc/values.yaml
-      resources:
-        - kubernetes/sdc/templates/sdc-es.yaml
-        - kubernetes/sdc/templates/sdc-fe.yaml
-        - kubernetes/sdc/templates/sdc-kb.yaml
-        - kubernetes/sdc/templates/sdc-cs.yaml
-        - kubernetes/sdc/templates/sdc-be.yaml
-      services: kubernetes/sdc/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  aai_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: aai
-      values: kubernetes/aai/values.yaml
-      resources:
-        - kubernetes/aai/templates/aai-deployment.yaml
-        - kubernetes/aai/templates/modelloader-deployment.yaml
-        - kubernetes/aai/templates/hbase-deployment.yaml
-      services: kubernetes/aai/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  robot_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: robot
-      values: kubernetes/robot/values.yaml
-      resources:
-        - kubernetes/robot/templates/robot-deployment.yaml
-      services: kubernetes/robot/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  vid_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: vid
-      values: kubernetes/vid/values.yaml
-      resources:
-        - kubernetes/templates/vid-mariadb-deployment.yaml
-        - kubernetes/templates/vid-server-deployment.yaml
-      services: kubernetes/vid/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  sdnc_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: sdnc
-      values: kubernetes/sdnc/values.yaml
-      resources:
-        - kubernetes/sdnc/templates/web-deployment.yaml
-        - kubernetes/sdnc/templates/sdnc-deployment.yaml
-        - kubernetes/sdnc/templates/dgbuilder-deployment.yaml
-        - kubernetes/sdnc/templates/db-deployment.yaml
-      services: kubernetes/sdnc/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  portal_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: portal
-      values: kubernetes/portal/values.yaml
-      resources:
-        - kubernetes/portal/templates/portal-widgets-deployment.yaml
-        - kubernetes/portal/templates/portal-apps-deployment.yaml
-        - kubernetes/portal/templates/portal-mariadb-deployment.yaml
-        - kubernetes/portal/templates/portal-vnc-dep.yaml
-      services: kubernetes/portal/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  policy_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: policy
-      values: kubernetes/policy/values.yaml
-      resources:
-        - kubernetes/policy/templates/dep-drools.yaml
-        - kubernetes/policy/templates/dep-nexus.yaml
-        - kubernetes/policy/templates/dep-brmsgw.yaml
-        - kubernetes/policy/templates/dep-pdp.yaml
-        - kubernetes/policy/templates/dep-pap.yaml
-        - kubernetes/policy/templates/dep-maria.yaml
-        - kubernetes/policy/templates/dep-pypdp.yaml
-      services: kubernetes/policy/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment
-
-  appc_app:
-    type: cloudify.onap.kubernetes.App
-    properties:
-      name: appc
-      values: kubernetes/appc/values.yaml
-      resources:
-        - kubernetes/appc/templates/appc-deployment.yaml
-        - kubernetes/appc/templates/dgbuilder-deployment.yaml
-        - kubernetes/appc/templates/db-deployment.yaml
-      services: kubernetes/appc/templates/all-services.yaml
-      options: *app_options
-    relationships:
-      - type: cloudify.kubernetes.relationships.managed_by_master
-        target: kubernetes_master
-      - type: cloudify.relationships.depends_on
-        target: onap_environment