summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cloudify/scripts/onap/patch_definitions.py1
-rw-r--r--cloudify/scripts/onap/provision_definitions.py1
-rw-r--r--cloudify/scripts/onap/read_definitions.py1
-rw-r--r--cloudify/types/onap.yaml34
-rw-r--r--kubernetes/msb/Chart.yaml4
-rw-r--r--kubernetes/msb/templates/all-services.yaml59
-rw-r--r--kubernetes/msb/templates/msb-consul-deployment.yaml29
-rw-r--r--kubernetes/msb/templates/msb-discovery-deployment.yaml34
-rw-r--r--kubernetes/msb/templates/msb-eag-deployment.yaml38
-rw-r--r--kubernetes/msb/templates/msb-iag-deployment.yaml38
-rw-r--r--kubernetes/msb/values.yaml20
-rw-r--r--onap-blueprint.yaml240
12 files changed, 499 insertions, 0 deletions
diff --git a/cloudify/scripts/onap/patch_definitions.py b/cloudify/scripts/onap/patch_definitions.py
new file mode 100644
index 0000000000..d43e921593
--- /dev/null
+++ b/cloudify/scripts/onap/patch_definitions.py
@@ -0,0 +1 @@
+from cloudify import ctx
diff --git a/cloudify/scripts/onap/provision_definitions.py b/cloudify/scripts/onap/provision_definitions.py
new file mode 100644
index 0000000000..d43e921593
--- /dev/null
+++ b/cloudify/scripts/onap/provision_definitions.py
@@ -0,0 +1 @@
+from cloudify import ctx
diff --git a/cloudify/scripts/onap/read_definitions.py b/cloudify/scripts/onap/read_definitions.py
new file mode 100644
index 0000000000..d43e921593
--- /dev/null
+++ b/cloudify/scripts/onap/read_definitions.py
@@ -0,0 +1 @@
+from cloudify import ctx
diff --git a/cloudify/types/onap.yaml b/cloudify/types/onap.yaml
new file mode 100644
index 0000000000..20ef33f2f3
--- /dev/null
+++ b/cloudify/types/onap.yaml
@@ -0,0 +1,34 @@
+node_types:
+ cloudify.onap.kubernetes.App:
+ derived_from: cloudify.nodes.Root
+ properties:
+ name:
+ type: string
+ description: >
+ Name of ONAP app
+ 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: {}
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ implementation: cloudify/scripts/onap/read_definitions.py
+ executor: central_deployment_agent
+ configure:
+ implementation: cloudify/scripts/onap/patch_definitions.py
+ executor: central_deployment_agent
+ start:
+ implementation: cloudify/scripts/onap/provision_definitions.py
+ executor: central_deployment_agent
diff --git a/kubernetes/msb/Chart.yaml b/kubernetes/msb/Chart.yaml
new file mode 100644
index 0000000000..7e2ba04fd0
--- /dev/null
+++ b/kubernetes/msb/Chart.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: msb
+version: 0.1.0
diff --git a/kubernetes/msb/templates/all-services.yaml b/kubernetes/msb/templates/all-services.yaml
new file mode 100644
index 0000000000..b67808d2da
--- /dev/null
+++ b/kubernetes/msb/templates/all-services.yaml
@@ -0,0 +1,59 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: msb-consul
+ labels:
+ app: msb-consul
+spec:
+ clusterIP: "{{ .Values.consulClusterIP }}"
+ ports:
+ - port: {{ .Values.consulPort }}
+ nodePort: {{ .Values.consulNodePort }}
+ selector:
+ app: msb-consul
+ type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: msb-discovery
+ labels:
+ app: msb-discovery
+spec:
+ clusterIP: "{{ .Values.discoveryClusterIP }}"
+ ports:
+ - port: {{ .Values.discoveryPort }}
+ nodePort: {{ .Values.discoveryNodePort }}
+ selector:
+ app: msb-discovery
+ type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: msb-iag
+ labels:
+ app: msb-iag
+spec:
+ clusterIP: "{{ .Values.iagClusterIP }}"
+ ports:
+ - port: {{ .Values.iagPort }}
+ nodePort: {{ .Values.iagNodePort }}
+ selector:
+ app: msb-iag
+ type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: msb-eag
+ labels:
+ app: msb-eag
+spec:
+ clusterIP: "{{ .Values.eagClusterIP }}"
+ ports:
+ - port: {{ .Values.eagPort }}
+ nodePort: {{ .Values.eagNodePort }}
+ selector:
+ app: msb-eag
+ type: NodePort \ No newline at end of file
diff --git a/kubernetes/msb/templates/msb-consul-deployment.yaml b/kubernetes/msb/templates/msb-consul-deployment.yaml
new file mode 100644
index 0000000000..1dbbe8fb1b
--- /dev/null
+++ b/kubernetes/msb/templates/msb-consul-deployment.yaml
@@ -0,0 +1,29 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: msb-consul
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: msb-consul
+ template:
+ metadata:
+ labels:
+ app: msb-consul
+ name: msb-consul
+ spec:
+ hostname: msb-consul
+ containers:
+ - args:
+ image: consul
+ name: "msb-consul"
+ ports:
+ - containerPort: {{ .Values.consulPort }}
+ name: msb-consul
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.consulPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ imagePullPolicy: "{{ .Values.pullPolicy }}" \ No newline at end of file
diff --git a/kubernetes/msb/templates/msb-discovery-deployment.yaml b/kubernetes/msb/templates/msb-discovery-deployment.yaml
new file mode 100644
index 0000000000..0fcd2f9ba9
--- /dev/null
+++ b/kubernetes/msb/templates/msb-discovery-deployment.yaml
@@ -0,0 +1,34 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: msb-discovery
+spec:
+ replicas: {{ .Values.discoveryReplicas }}
+ selector:
+ matchLabels:
+ app: msb-discovery
+ template:
+ metadata:
+ labels:
+ app: msb-discovery
+ name: msb-discovery
+ spec:
+ hostname: msb-discovery
+ containers:
+ - args:
+ image: nexus3.onap.org:10001/onap/msb/msb_discovery
+ name: "msb-discovery"
+ env:
+ - name: CONSUL_IP
+ value: "{{ .Values.consulClusterIP }}"
+ ports:
+ - containerPort: {{ .Values.discoveryPort }}
+ name: msb-discovery
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.discoveryPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+
+
diff --git a/kubernetes/msb/templates/msb-eag-deployment.yaml b/kubernetes/msb/templates/msb-eag-deployment.yaml
new file mode 100644
index 0000000000..eb75cd9e42
--- /dev/null
+++ b/kubernetes/msb/templates/msb-eag-deployment.yaml
@@ -0,0 +1,38 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: msb-eag
+spec:
+ replicas: {{ .Values.eagReplicas }}
+ selector:
+ matchLabels:
+ app: msb-eag
+ template:
+ metadata:
+ labels:
+ app: msb-eag
+ name: msb-eag
+ spec:
+ hostname: msb-eag
+ containers:
+ - args:
+ image: nexus3.onap.org:10001/onap/msb/msb_apigateway
+ name: "msb-eag"
+ env:
+ - name: CONSUL_IP
+ value: "{{ .Values.consulClusterIP}}"
+ - name: SDCLIENT_IP
+ value: "{{ .Values.discoveryClusterIP}}"
+ - name: ROUTE_LABELS
+ value: "visualRange:0"
+ ports:
+ - containerPort: {{ .Values.eagPort }}
+ name: msb-eag
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.eagPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ imagePullPolicy: "{{ .Values.pullPolicy}}"
+
+
diff --git a/kubernetes/msb/templates/msb-iag-deployment.yaml b/kubernetes/msb/templates/msb-iag-deployment.yaml
new file mode 100644
index 0000000000..d83951a415
--- /dev/null
+++ b/kubernetes/msb/templates/msb-iag-deployment.yaml
@@ -0,0 +1,38 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: msb-iag
+spec:
+ replicas: {{ .Values.iagReplicas }}
+ selector:
+ matchLabels:
+ app: msb-iag
+ template:
+ metadata:
+ labels:
+ app: msb-iag
+ name: msb-iag
+ spec:
+ hostname: msb-iag
+ containers:
+ - args:
+ image: nexus3.onap.org:10001/onap/msb/msb_apigateway
+ name: "msb-iag"
+ env:
+ - name: CONSUL_IP
+ value: "{{ .Values.consulClusterIP}}"
+ - name: SDCLIENT_IP
+ value: "{{ .Values.discoveryClusterIP}}"
+ - name: ROUTE_LABELS
+ value: "visualRange:1"
+ ports:
+ - containerPort: {{ .Values.iagPort }}
+ name: msb-iag
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.iagPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ imagePullPolicy: "{{ .Values.pullPolicy}}"
+
+
diff --git a/kubernetes/msb/values.yaml b/kubernetes/msb/values.yaml
new file mode 100644
index 0000000000..38059e1458
--- /dev/null
+++ b/kubernetes/msb/values.yaml
@@ -0,0 +1,20 @@
+consulClusterIP: 10.43.6.204
+consulPort: 8500
+consulNodePort: 30500
+
+discoveryClusterIP: 10.43.6.205
+discoveryPort: 10081
+discoveryNodePort: 30081
+discoveryReplicas: 1
+
+iagClusterIP: 10.43.6.206
+iagPort: 80
+iagNodePort: 30080
+iagReplicas: 1
+
+eagClusterIP: 10.43.6.207
+eagPort: 80
+eagNodePort: 30082
+eagReplicas: 1
+
+pullPolicy: IfNotPresent \ No newline at end of file
diff --git a/onap-blueprint.yaml b/onap-blueprint.yaml
new file mode 100644
index 0000000000..50ac29b997
--- /dev/null
+++ b/onap-blueprint.yaml
@@ -0,0 +1,240 @@
+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.0/cloudify_kubernetes_plugin-1.2.0-py27-none-linux_x86_64-centos-Core.wgn
+ - https://raw.githubusercontent.com/cloudify-incubator/cloudify-kubernetes-plugin/1.2.0/plugin.yaml
+ - cloudify/types/onap.yaml
+
+inputs:
+ kubernetes_configuration_file_content:
+ description: >
+ File content of kubernetes master YAML configuration
+
+ apps:
+ description: >
+ List of ONAP apps names to be deployed.
+ Default empty array (deploy all available apps).
+ default: []
+
+ namespace_prefix:
+ type: string
+ description: >
+ Kubernetes namespace name prefix which will be uese for all ONAP apps
+ default: onap
+
+ docker_registry:
+ type: string
+ default: regsecret
+
+ docker_server:
+ type: string
+ default: nexus3.onap.org:10001
+
+ docker_username:
+ type: string
+ default: docker
+
+ docker_password:
+ type: string
+ default: docker
+
+ docker_email:
+ type: string
+ default: email@email.com
+
+dsl_definitions:
+ inputs: &app_inputs
+ namespace_prefix: { get_input: namespace_prefix }
+ docker_registry: { get_input: docker_registry }
+ docker_server: { get_input: docker_server }
+ docker_username: { get_input: docker_username }
+ docker_password: { get_input: docker_password }
+ docker_email: { get_input: docker_email }
+
+node_templates:
+ kubernetes_master:
+ type: cloudify.kubernetes.nodes.Master
+ properties:
+ configuration:
+ file_content: { get_input: kubernetes_configuration_file_content }
+
+ init_pod:
+ type: cloudify.kubernetes.resources.Pod
+ properties:
+ definition:
+ file:
+ resource_path: kubernetes/config/pod-config-init.yaml
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+
+ mso_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: mso
+ resources:
+ - kubernetes/mso/templates/mso-deployment.yaml
+ - kubernetes/mso/templates/db-deployment.yaml
+ services: kubernetes/mso/templates/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ message_router_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: message-router
+ 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
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ sdc_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: sdc
+ resources:
+ - kubernetes/sdc/sdc-es.yaml
+ - kubernetes/sdc/sdc-fe.yaml
+ - kubernetes/sdc/sdc-kb.yaml
+ - kubernetes/sdc/sdc-cs.yaml
+ - kubernetes/sdc/sdc-be.yaml
+ services: kubernetes/sdc/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ aai_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: aai
+ resources:
+ - kubernetes/aai/aai-deployment.yaml
+ - kubernetes/aai/modelloader-deployment.yaml
+ - kubernetes/aai/hbase-deployment.yaml
+ services: kubernetes/aai/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ robot_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: robot
+ resources:
+ - kubernetes/robot/robot-deployment.yaml
+ services: kubernetes/robot/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ vid_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: vid
+ resources:
+ - kubernetes/vid/vid-mariadb-deployment.yaml
+ - kubernetes/vid/vid-server-deployment.yaml
+ services: kubernetes/vid/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ sdnc_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: sdnc
+ resources:
+ - kubernetes/sdnc/web-deployment.yaml
+ - kubernetes/sdnc/sdnc-deployment.yaml
+ - kubernetes/sdnc/dgbuilder-deployment.yaml
+ - kubernetes/sdnc/db-deployment.yaml
+ services: kubernetes/sdnc/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ portal_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: portal
+ resources:
+ - kubernetes/portal/portal-widgets-deployment.yaml
+ - kubernetes/portal/portal-apps-deployment.yaml
+ - kubernetes/portal/portal-mariadb-deployment.yaml
+ - kubernetes/portal/portal-vnc-dep.yaml
+ services: kubernetes/portal/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ policy_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: policy
+ resources:
+ - kubernetes/policy/dep-drools.yaml
+ - kubernetes/policy/dep-nexus.yaml
+ - kubernetes/policy/dep-brmsgw.yaml
+ - kubernetes/policy/dep-pdp.yaml
+ - kubernetes/policy/dep-pap.yaml
+ - kubernetes/policy/dep-maria.yaml
+ - kubernetes/policy/dep-pypdp.yaml
+ services: kubernetes/policy/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod
+
+ appc_app:
+ type: cloudify.onap.kubernetes.App
+ properties:
+ name: appc
+ resources:
+ - kubernetes/appc/appc-deployment.yaml
+ - kubernetes/appc/dgbuilder-deployment.yaml
+ - kubernetes/appc/db-deployment.yaml
+ services: kubernetes/appc/all-services.yaml
+ inputs: *app_inputs
+ relationships:
+ - type: cloudify.kubernetes.relationships.managed_by_master
+ target: kubernetes_master
+ - type: cloudify.relationships.depends_on
+ target: init_pod