diff options
38 files changed, 894 insertions, 191 deletions
diff --git a/cloudify/scripts/onap/configure_docker_secret_workaround.py b/cloudify/scripts/onap/configure_docker_secret_workaround.py new file mode 100644 index 0000000000..6e9deff059 --- /dev/null +++ b/cloudify/scripts/onap/configure_docker_secret_workaround.py @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000000..c82172d15f --- /dev/null +++ b/cloudify/scripts/onap/create_init_pod.py @@ -0,0 +1,65 @@ +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_namespace.py b/cloudify/scripts/onap/create_namespace.py new file mode 100644 index 0000000000..c0f1f19680 --- /dev/null +++ b/cloudify/scripts/onap/create_namespace.py @@ -0,0 +1,101 @@ +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 _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/scripts/onap/create_resources_services.py b/cloudify/scripts/onap/create_resources_services.py new file mode 100644 index 0000000000..8548e29b70 --- /dev/null +++ b/cloudify/scripts/onap/create_resources_services.py @@ -0,0 +1,131 @@ +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 new file mode 100644 index 0000000000..1da805b959 --- /dev/null +++ b/cloudify/scripts/onap/delete_init_pod.py @@ -0,0 +1,64 @@ +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 new file mode 100644 index 0000000000..6973e59944 --- /dev/null +++ b/cloudify/scripts/onap/delete_namespace.py @@ -0,0 +1,101 @@ +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 new file mode 100644 index 0000000000..305a7484bd --- /dev/null +++ b/cloudify/scripts/onap/delete_resources_services.py @@ -0,0 +1,132 @@ +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/onap/patch_definitions.py b/cloudify/scripts/onap/patch_definitions.py deleted file mode 100644 index d43e921593..0000000000 --- a/cloudify/scripts/onap/patch_definitions.py +++ /dev/null @@ -1 +0,0 @@ -from cloudify import ctx diff --git a/cloudify/scripts/onap/provision_definitions.py b/cloudify/scripts/onap/provision_definitions.py deleted file mode 100644 index d43e921593..0000000000 --- a/cloudify/scripts/onap/provision_definitions.py +++ /dev/null @@ -1 +0,0 @@ -from cloudify import ctx diff --git a/cloudify/scripts/onap/read_definitions.py b/cloudify/scripts/onap/read_definitions.py deleted file mode 100644 index d43e921593..0000000000 --- a/cloudify/scripts/onap/read_definitions.py +++ /dev/null @@ -1 +0,0 @@ -from cloudify import ctx diff --git a/cloudify/types/onap.yaml b/cloudify/types/onap.yaml index 20ef33f2f3..7e9b83425e 100644 --- a/cloudify/types/onap.yaml +++ b/cloudify/types/onap.yaml @@ -1,4 +1,33 @@ 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: @@ -6,6 +35,11 @@ node_types: 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) @@ -21,14 +55,35 @@ node_types: 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/read_definitions.py + implementation: cloudify/scripts/onap/create_namespace.py executor: central_deployment_agent configure: - implementation: cloudify/scripts/onap/patch_definitions.py + 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/provision_definitions.py + 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 diff --git a/kubernetes/aai/templates/all-services.yaml b/kubernetes/aai/templates/all-services.yaml index ac709d997b..63b9b005b9 100644 --- a/kubernetes/aai/templates/all-services.yaml +++ b/kubernetes/aai/templates/all-services.yaml @@ -38,114 +38,114 @@ metadata: "serviceName": "aai-cloudInfrastructure", "version": "v1", "url": "/cloud-infrastructure", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-cloudInfrastructure-deprecated", "version": "v1", "url": "/cloud-infrastructure", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/cloud-infrastructure" }, { "serviceName": "aai-business", "version": "v1", "url": "/business", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-business-deprecated", "version": "v1", "url": "/business", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/business" }, { "serviceName": "aai-search", "version": "v1", "url": "/search", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-search-deprecated", "version": "v1", "url": "/search", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/search" }, { "serviceName": "aai-actions", "version": "v1", "url": "/actions", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-actions-deprecated", "version": "v1", "url": "/actions", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/actions" }, { "serviceName": "aai-service-design-and-creation", "version": "v1", "url": "/service-design-and-creation", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-service-design-and-creation-deprecated", "version": "v1", "url": "/service-design-and-creation", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/service-design-and-creation" }, { "serviceName": "aai-network", "version": "v1", "url": "/network", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" + "enable_ssl":"True", "visualRange":"1" }, { "serviceName": "aai-network-deprecated", "version": "v1", "url": "/network", - "protocol": "REST" + "protocol": "REST", "port": "8443", - "enable_ssl":"True" - "visualRange":"1" + "enable_ssl":"True", + "visualRange":"1", "path":"/network" } ]' @@ -154,11 +154,11 @@ spec: - name: "aai-service-port-8443" port: 8443 targetPort: 8443 - nodePort: 30233 + nodePort: {{ .Values.nodePortPrefix }}33 - name: "aai-service-port-8080" port: 8080 targetPort: 8080 - nodePort: 30232 + nodePort: {{ .Values.nodePortPrefix }}32 type: NodePort selector: app: aai-service @@ -174,10 +174,10 @@ spec: ports: - name: "model-loader-service-port-8443" port: 8443 - nodePort: 30229 + nodePort: {{ .Values.nodePortPrefix }}29 - name: "model-loader-service-port-8080" port: 8080 - nodePort: 30210 + nodePort: {{ .Values.nodePortPrefix }}10 type: NodePort selector: app: model-loader-service diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml index c0715382e6..290ffc5c21 100644 --- a/kubernetes/aai/values.yaml +++ b/kubernetes/aai/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 aaiProxy: aaionap/haproxy diff --git a/kubernetes/appc/templates/all-services.yaml b/kubernetes/appc/templates/all-services.yaml index 95472319ed..5c42d72a01 100644 --- a/kubernetes/appc/templates/all-services.yaml +++ b/kubernetes/appc/templates/all-services.yaml @@ -53,10 +53,10 @@ spec: - name: "appc-port-8282" port: 8282 targetPort: 8181 - nodePort: 30230 + nodePort: {{ .Values.nodePortPrefix }}30 - name: "appc-port-1830" port: 1830 - nodePort: 30231 + nodePort: {{ .Values.nodePortPrefix }}31 type: NodePort selector: app: appc @@ -73,7 +73,7 @@ spec: - name: "appc-dgbuilder-port" port: 3000 targetPort: 3100 - nodePort: 30228 + nodePort: {{ .Values.nodePortPrefix }}28 type: NodePort selector: app: appc-dgbuilder diff --git a/kubernetes/appc/values.yaml b/kubernetes/appc/values.yaml index 74b189f371..7916b734aa 100644 --- a/kubernetes/appc/values.yaml +++ b/kubernetes/appc/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 appc: nexus3.onap.org:10001/openecomp/appc-image:1.1-STAGING-latest diff --git a/kubernetes/message-router/templates/all-services.yaml b/kubernetes/message-router/templates/all-services.yaml index f190b862aa..85c4f010cf 100644 --- a/kubernetes/message-router/templates/all-services.yaml +++ b/kubernetes/message-router/templates/all-services.yaml @@ -40,10 +40,10 @@ spec: ports: - name: mr1 port: 3904 - nodePort: 30227 + nodePort: {{ .Values.nodePortPrefix }}27 - name: mr2 port: 3905 - nodePort: 30226 + nodePort: {{ .Values.nodePortPrefix }}26 selector: app: dmaap type: NodePort diff --git a/kubernetes/message-router/values.yaml b/kubernetes/message-router/values.yaml index a3210c29c1..92067294f8 100644 --- a/kubernetes/message-router/values.yaml +++ b/kubernetes/message-router/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 dmaap: attos/dmaap:latest diff --git a/kubernetes/mso/templates/all-services.yaml b/kubernetes/mso/templates/all-services.yaml index a674adb35e..96c7fd79e8 100644 --- a/kubernetes/mso/templates/all-services.yaml +++ b/kubernetes/mso/templates/all-services.yaml @@ -8,7 +8,7 @@ metadata: spec: ports: - port: 3306 - nodePort: 30252 + nodePort: {{ .Values.nodePortPrefix }}52 selector: app: mariadb type: NodePort @@ -46,17 +46,17 @@ spec: ports: - name: mso1 port: 8080 - nodePort: 30223 + nodePort: {{ .Values.nodePortPrefix }}23 - name: mso2 port: 3904 - nodePort: 30225 + nodePort: {{ .Values.nodePortPrefix }}25 - name: mso3 port: 3905 - nodePort: 30224 + nodePort: {{ .Values.nodePortPrefix }}24 - name: mso4 port: 9990 - nodePort: 30222 + nodePort: {{ .Values.nodePortPrefix }}22 - name: mso5 port: 8787 - nodePort: 30250 + nodePort: {{ .Values.nodePortPrefix }}50 type: NodePort diff --git a/kubernetes/mso/values.yaml b/kubernetes/mso/values.yaml index a7eed4797d..883db87a8d 100644 --- a/kubernetes/mso/values.yaml +++ b/kubernetes/mso/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 mso: nexus3.onap.org:10001/openecomp/mso:1.1-STAGING-latest diff --git a/kubernetes/oneclick/createAll.bash b/kubernetes/oneclick/createAll.bash index 829f27a4df..e408d67477 100755 --- a/kubernetes/oneclick/createAll.bash +++ b/kubernetes/oneclick/createAll.bash @@ -25,21 +25,7 @@ create_registry_key() { } create_onap_helm() { - helm install ../$2/ --name $2 --namespace $1 --set nsPrefix=$1 -} - -configure_app() { - # if previous configuration exists put back original template file - for file in $3/*.yaml; do - if [ -e "$file-template" ]; then - mv "$file-template" "${file%}" - fi - done - - if [ -e "$2/Chart.yaml" ]; then - sed -i-- 's/nodePort: [0-9]\{2\}[02468]\{1\}/nodePort: '"$4"'/g' $3/all-services.yaml - sed -i-- 's/nodePort: [0-9]\{2\}[13579]\{1\}/nodePort: '"$5"'/g' $3/all-services.yaml - fi + helm install ../$2/ --name $1-$2 --namespace $1 --set nsPrefix=$1 --set nodePortPrefix=$3 } @@ -51,6 +37,7 @@ INSTANCE=1 MAX_INSTANCE=5 DU=$ONAP_DOCKER_USER DP=$ONAP_DOCKER_PASS +_FILES_PATH=$(echo ../$i/templates) while getopts ":n:u:s:i:a:du:dp:" PARAM; do case $PARAM in @@ -119,9 +106,7 @@ for i in ${HELM_APPS[@]}; do create_registry_key $NS $i ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL printf "\nCreating deployments and services **********\n" - _FILES_PATH=$(echo ../$i/templates) - configure_app $NS $i $_FILES_PATH $start $end - create_onap_helm $NS $i + create_onap_helm $NS $i $start printf "\n" done diff --git a/kubernetes/oneclick/deleteAll.bash b/kubernetes/oneclick/deleteAll.bash index 33ecb320e5..40d070124a 100755 --- a/kubernetes/oneclick/deleteAll.bash +++ b/kubernetes/oneclick/deleteAll.bash @@ -17,7 +17,7 @@ delete_registry_key() { } delete_app_helm() { - helm delete $1 --purge + helm delete $1-$2 --purge } usage() { @@ -74,7 +74,7 @@ printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n" for i in ${HELM_APPS[@]}; do - delete_app_helm $i + delete_app_helm $NS $i delete_namespace $NS $i done diff --git a/kubernetes/oom/Chart.yaml b/kubernetes/oom/Chart.yaml new file mode 100644 index 0000000000..0c62d86b31 --- /dev/null +++ b/kubernetes/oom/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: oom-registrator +version: 0.1.0 diff --git a/kubernetes/oom/templates/oom-registrator-deployment.yaml b/kubernetes/oom/templates/oom-registrator-deployment.yaml new file mode 100644 index 0000000000..77f71f424e --- /dev/null +++ b/kubernetes/oom/templates/oom-registrator-deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: oom-registrator + namespace: "{{ .Values.nsPrefix }}-oom" +spec: + replicas: 1 + selector: + matchLabels: + app: oom-registrator + template: + metadata: + labels: + app: oom-registrator + name: oom-registrator + spec: + hostname: oom-registrator + containers: + - args: + image: {{ .Values.image.kube2msb }} + name: oom-registrator + env: + - name: KUBE_MASTER_URL + value: {{ .Values.kubeMasterUrl }} + - name: MSB_URL + value: {{ .Values.discoveryUrl }} + imagePullPolicy: {{ .Values.pullPolicy }} diff --git a/kubernetes/oom/values.yaml b/kubernetes/oom/values.yaml new file mode 100644 index 0000000000..aa8d771a71 --- /dev/null +++ b/kubernetes/oom/values.yaml @@ -0,0 +1,8 @@ +nsPrefix: onap +pullPolicy: IfNotPresent +image: + #need help from LF to build and push image to nexus3.onap.org + #kube2msb: nexus3.onap.org:10001/onap/msb/kube2msb + kube2msb: zhaohuabing/kube2msb:latest +kubeMasterUrl: http://10.96.33.43:8080/r/projects/1a7/kubernetes:6443 +discoveryUrl: http://10.43.6.205:10081
\ No newline at end of file diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml index eb524edfc4..cd01b54ee8 100644 --- a/kubernetes/policy/templates/all-services.yaml +++ b/kubernetes/policy/templates/all-services.yaml @@ -39,7 +39,7 @@ spec: ports: - name: "drools-port" port: 6969 - nodePort: 30217 + nodePort: {{ .Values.nodePortPrefix }}17 selector: app: drools type: NodePort @@ -55,10 +55,10 @@ spec: ports: - name: 8443-port port: 8443 - nodePort: 30219 + nodePort: {{ .Values.nodePortPrefix }}19 - name: 9091-port port: 9091 - nodePort: 30218 + nodePort: {{ .Values.nodePortPrefix }}18 selector: app: pap type: NodePort @@ -94,7 +94,7 @@ spec: ports: - name: 8081-port port: 8081 - nodePort: 30220 + nodePort: {{ .Values.nodePortPrefix }}20 selector: app: pdp type: NodePort @@ -110,7 +110,7 @@ spec: ports: - name: tcp-31032-8480-bm91k port: 8480 - nodePort: 30221 + nodePort: {{ .Values.nodePortPrefix }}21 selector: app: pypdp type: NodePort @@ -126,7 +126,7 @@ spec: ports: - name: 9989-port port: 9989 - nodePort: 30216 + nodePort: {{ .Values.nodePortPrefix }}16 selector: app: brmsgw type: NodePort diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml index 0f990c94ff..25823b0969 100644 --- a/kubernetes/policy/values.yaml +++ b/kubernetes/policy/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 policyPe: nexus3.onap.org:10001/openecomp/policy/policy-pe:1.0-STAGING-latest diff --git a/kubernetes/portal/templates/all-services.yaml b/kubernetes/portal/templates/all-services.yaml index 2107e2a30b..b3fabb2932 100644 --- a/kubernetes/portal/templates/all-services.yaml +++ b/kubernetes/portal/templates/all-services.yaml @@ -23,15 +23,15 @@ metadata: spec: ports: - name: portal-1 - nodePort: 30213 + nodePort: {{ .Values.nodePortPrefix }}13 port: 8006 targetPort: 8005 - name: portal-2 - nodePort: 30214 + nodePort: {{ .Values.nodePortPrefix }}14 port: 8010 targetPort: 8009 - name: portal-3 - nodePort: 30215 + nodePort: {{ .Values.nodePortPrefix }}15 port: 8989 targetPort: 8080 selector: @@ -50,11 +50,11 @@ spec: - name: tcp-1 port: 6080 targetPort: 80 - nodePort: 30211 + nodePort: {{ .Values.nodePortPrefix }}11 - name: tcp-2 port: 5900 targetPort: 5900 - nodePort: 30212 + nodePort: {{ .Values.nodePortPrefix }}12 selector: app: vnc-portal type: NodePort diff --git a/kubernetes/portal/values.yaml b/kubernetes/portal/values.yaml index ae9479e03a..f4d1919904 100644 --- a/kubernetes/portal/values.yaml +++ b/kubernetes/portal/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 portalapps: nexus3.onap.org:10001/openecomp/portalapps:1.1-STAGING-latest diff --git a/kubernetes/robot/all-services.yaml b/kubernetes/robot/all-services.yaml index b152454125..1fbabe2df6 100644 --- a/kubernetes/robot/all-services.yaml +++ b/kubernetes/robot/all-services.yaml @@ -7,7 +7,7 @@ metadata: spec: ports: - port: 88 - nodePort: 30209 + nodePort: {{ .Values.nodePortPrefix }}09 selector: app: robot type: NodePort diff --git a/kubernetes/robot/templates/all-services.yaml b/kubernetes/robot/templates/all-services.yaml index a14dae777c..f126bc9b74 100644 --- a/kubernetes/robot/templates/all-services.yaml +++ b/kubernetes/robot/templates/all-services.yaml @@ -8,7 +8,7 @@ metadata: spec: ports: - port: 88 - nodePort: 30209 + nodePort: {{ .Values.nodePortPrefix }}09 selector: app: robot type: NodePort diff --git a/kubernetes/robot/values.yaml b/kubernetes/robot/values.yaml index 90566c4dd8..221b572264 100644 --- a/kubernetes/robot/values.yaml +++ b/kubernetes/robot/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: testsuite: nexus3.onap.org:10001/openecomp/testsuite:1.1-STAGING-latest diff --git a/kubernetes/sdc/templates/all-services.yaml b/kubernetes/sdc/templates/all-services.yaml index 93febccbed..88cbe8eeb8 100644 --- a/kubernetes/sdc/templates/all-services.yaml +++ b/kubernetes/sdc/templates/all-services.yaml @@ -57,10 +57,10 @@ metadata: spec: ports: - name: sdc-be-port-8443 - nodePort: 30204 + nodePort: {{ .Values.nodePortPrefix }}04 port: 8443 - name: sdc-be-port-8080 - nodePort: 30205 + nodePort: {{ .Values.nodePortPrefix }}05 port: 8080 selector: app: sdc-be @@ -76,10 +76,10 @@ metadata: spec: ports: - name: sdc-fe-port-9443 - nodePort: 30207 + nodePort: {{ .Values.nodePortPrefix }}07 port: 9443 - name: sdc-fe-port-8181 - nodePort: 30206 + nodePort: {{ .Values.nodePortPrefix }}06 port: 8181 selector: app: sdc-fe diff --git a/kubernetes/sdc/values.yaml b/kubernetes/sdc/values.yaml index 139f08c4f3..58bcf1c3f3 100644 --- a/kubernetes/sdc/values.yaml +++ b/kubernetes/sdc/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 sdcKibana: nexus3.onap.org:10001/openecomp/sdc-kibana:1.1-STAGING-latest diff --git a/kubernetes/sdnc/templates/all-services.yaml b/kubernetes/sdnc/templates/all-services.yaml index 311bd7b407..4a24947544 100644 --- a/kubernetes/sdnc/templates/all-services.yaml +++ b/kubernetes/sdnc/templates/all-services.yaml @@ -52,7 +52,7 @@ spec: - name: "sdnc-dgbuilder-port" port: 3000 targetPort: 3100 - nodePort: 30203 + nodePort: {{ .Values.nodePortPrefix }}03 type: NodePort selector: app: sdnc-dgbuilder @@ -69,7 +69,7 @@ spec: - name: "sdnc-port" port: 8282 targetPort: 8181 - nodePort: 30202 + nodePort: {{ .Values.nodePortPrefix }}02 type: NodePort selector: app: sdnc @@ -85,7 +85,7 @@ spec: ports: - name: "sdnc-portal-port" port: 8843 - nodePort: 30201 + nodePort: {{ .Values.nodePortPrefix }}01 type: NodePort selector: app: sdnc-portal diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 5e17a96a5d..0ccc357526 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: Always +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 mysqlServer: mysql/mysql-server:5.6 diff --git a/kubernetes/vid/templates/all-services.yaml b/kubernetes/vid/templates/all-services.yaml index c0856711bb..270aab9fc1 100644 --- a/kubernetes/vid/templates/all-services.yaml +++ b/kubernetes/vid/templates/all-services.yaml @@ -21,7 +21,7 @@ metadata: spec: ports: - name: vid-server - nodePort: 30200 + nodePort: {{ .Values.nodePortPrefix }}00 port: 8080 selector: app: vid-server diff --git a/kubernetes/vid/values.yaml b/kubernetes/vid/values.yaml index ed9e12dd0b..a7d494c73c 100644 --- a/kubernetes/vid/values.yaml +++ b/kubernetes/vid/values.yaml @@ -1,5 +1,6 @@ nsPrefix: onap pullPolicy: IfNotPresent +nodePortPrefix: 302 image: readiness: oomk8s/readiness-check:1.0.0 mariadb: nexus3.onap.org:10001/library/mariadb:10 diff --git a/onap-blueprint.yaml b/onap-blueprint.yaml index 50ac29b997..699312bea8 100644 --- a/onap-blueprint.yaml +++ b/onap-blueprint.yaml @@ -8,8 +8,10 @@ description: > 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 + # 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: @@ -17,46 +19,16 @@ inputs: 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 } + options: &app_options + namespace: + concat: [{ get_input: namespace_prefix }, '-', { get_property: [SELF, name] }] node_templates: kubernetes_master: @@ -65,12 +37,13 @@ node_templates: configuration: file_content: { get_input: kubernetes_configuration_file_content } - init_pod: - type: cloudify.kubernetes.resources.Pod + onap_environment: + type: cloudify.onap.kubernetes.Environment properties: - definition: - file: - resource_path: kubernetes/config/pod-config-init.yaml + 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 @@ -79,162 +52,172 @@ node_templates: 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 + - kubernetes/mso/templates/mso-deployment.yaml + - kubernetes/mso/templates/db-deployment.yaml services: kubernetes/mso/templates/all-services.yaml - inputs: *app_inputs + options: *app_options relationships: - type: cloudify.kubernetes.relationships.managed_by_master target: kubernetes_master - type: cloudify.relationships.depends_on - target: init_pod + 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 - inputs: *app_inputs + options: *app_options relationships: - type: cloudify.kubernetes.relationships.managed_by_master target: kubernetes_master - type: cloudify.relationships.depends_on - target: init_pod + target: onap_environment sdc_app: type: cloudify.onap.kubernetes.App properties: name: sdc + values: kubernetes/sdc/values.yaml 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 + - 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: init_pod + target: onap_environment aai_app: type: cloudify.onap.kubernetes.App properties: name: aai + values: kubernetes/aai/values.yaml 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 + - 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: init_pod + target: onap_environment robot_app: type: cloudify.onap.kubernetes.App properties: name: robot + values: kubernetes/robot/values.yaml resources: - - kubernetes/robot/robot-deployment.yaml - services: kubernetes/robot/all-services.yaml - inputs: *app_inputs + - 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: init_pod + target: onap_environment vid_app: type: cloudify.onap.kubernetes.App properties: name: vid + values: kubernetes/vid/values.yaml resources: - - kubernetes/vid/vid-mariadb-deployment.yaml - - kubernetes/vid/vid-server-deployment.yaml - services: kubernetes/vid/all-services.yaml - inputs: *app_inputs + - 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: init_pod + target: onap_environment sdnc_app: type: cloudify.onap.kubernetes.App properties: name: sdnc + values: kubernetes/sdnc/values.yaml 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 + - 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: init_pod + target: onap_environment portal_app: type: cloudify.onap.kubernetes.App properties: name: portal + values: kubernetes/portal/values.yaml 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 + - 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: init_pod + target: onap_environment policy_app: type: cloudify.onap.kubernetes.App properties: name: policy + values: kubernetes/policy/values.yaml 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 + - 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: init_pod + target: onap_environment appc_app: type: cloudify.onap.kubernetes.App properties: name: appc + values: kubernetes/appc/values.yaml 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 + - 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: init_pod + target: onap_environment |