diff --git a/controller/Orchestrator.py b/controller/Orchestrator.py index 6dfb25598f1a9c96b14fefef6360cd6d19e061c7..609daef1cd5ad9468f9a5cb41c338bdd06ee08cc 100644 --- a/controller/Orchestrator.py +++ b/controller/Orchestrator.py @@ -65,7 +65,7 @@ def choose_plugin(parameters, template_generated_folder): ### IMPORTANT, TO SOLVE ### ADDED EXPLICIT EXCEPTION FOR SIMPA UC ### - if step["step_name"] == "security_monitoring" or step["step_name"] == "performance_monitoring": + if step["step_name"] == "security_monitoring" or step["step_name"] == "performance_monitoring" or step["step_name"] == "self_healing_monitoring": logging.info("Ansible Plugin chosen") step_name = step[get_ir_key_name(ModelResources.STEP_NAME)] metadata_root_folder["iac"].append(step_name) diff --git a/icgparser/DomlParserUtilities.py b/icgparser/DomlParserUtilities.py index 01d391a6b7725c11438aaaf776b7b93e705eb2c7..3cd65c3509f9ea74f829de6b93b4a61b33626642 100644 --- a/icgparser/DomlParserUtilities.py +++ b/icgparser/DomlParserUtilities.py @@ -28,6 +28,21 @@ doml_layers = { "active_infrastructure_layer": "activeInfrastructure", } +def remove_from_navigated_references(resource): + if(resource in NAVIGATED_REFERENCES): + NAVIGATED_REFERENCES.remove(resource) + +def remove_from_navigated_references_all_refs_under(resource): + # same way to access all references of the given object as in save_references_link() + refs = resource.eClass.eAllReferences() + for ref in refs: + reference_object_list = get_reference_list_if_exists(resource, ref) + if reference_object_list: + for reference_object in reference_object_list: + if(reference_object in NAVIGATED_REFERENCES): + NAVIGATED_REFERENCES.remove(reference_object) + + def extract_value_from(ecore_object_value): if isinstance(ecore_object_value, EOrderedSet): @@ -153,7 +168,7 @@ def update_missing_parsed_resources(resource, reference, is_to_be_parsed): print(f'update_missing_parsed_resources: skipping {resource_name}') -def save_references_info(from_object, to_object): +def save_references_info(from_object, to_object, recursive=True): logging.info(f"Searching references from {from_object}") refs = from_object.eClass.eReferences for ref in refs: @@ -168,11 +183,12 @@ def save_references_info(from_object, to_object): object_representation = save_annotations(reference_object, object_representation) object_representation = save_attributes(reference_object, object_representation) object_representation = save_references_link(reference_object, object_representation) - save_references_info(reference_object, object_representation) + #object_representation_list.append(object_representation) + if(recursive): + save_references_info(reference_object, object_representation, False) object_representation_list.append(object_representation) to_object[ref.name] = object_representation_list logging.info(f"References added: {to_object}") - # save_references_info(reference_object, to_object) elif from_object.eGet(ref.name): logging.info(f'Adding object info "{ref.name}"') reference_object = from_object.eGet(ref.name) @@ -199,9 +215,18 @@ def save_references_link(from_object, to_object): ## TODO refactoring object_representation = save_attributes(reference_object, object_representation) if not reference_object in NAVIGATED_REFERENCES: NAVIGATED_REFERENCES.append(reference_object) + if hasattr(reference_object, "name"): + logging.info(f'Added {reference_object.name} to NAVIGATED_REFERENCES list') + else: + logging.info(f'Added {reference_object} to NAVIGATED_REFERENCES list') object_representation = save_annotations(reference_object, object_representation) object_representation = save_references_link(reference_object, object_representation) #save_references_info(reference_object, object_representation) + else: + if hasattr(reference_object, "name"): + logging.info(f'Skipping {reference_object.name} as already in NAVIGATED_REFERENCES list') + else: + logging.info(f'Skipping {reference_object} as already in NAVIGATED_REFERENCES list') #save_references_info(reference_object, object_representation) object_representation_list.append(object_representation) #update_missing_parsed_list_resources(reference_object, reference=ref, is_to_be_parsed=True) diff --git a/icgparser/ModelParser.py b/icgparser/ModelParser.py index 2f66dafd57aa0370b9d355e59c5d672ab3dba181..8fac90e7c1ce364dd8b6b0a1324e1dff04bb0cef 100644 --- a/icgparser/ModelParser.py +++ b/icgparser/ModelParser.py @@ -29,7 +29,8 @@ import logging import re from icgparser import DomlParserUtilities, IntermediateRepresentationUtility from icgparser.DomlParserUtilities import get_reference_list_if_exists, get_resources_from_concrete_layer, \ - get_infrastructure_element_from, get_external_references, save_references_info, update_missing_parsed_resources + get_infrastructure_element_from, get_external_references, remove_from_navigated_references, \ + remove_from_navigated_references_all_refs_under, save_references_info, update_missing_parsed_resources from icgparser.ModelResourcesUtilities import ModelResourcesUtilities, ModelResources from plugin.PluginUtility import find_external_plugins_name, find_resources_names_for_plugin @@ -227,8 +228,13 @@ def add_external_plugin_steps(model_loaded): logging.info(f"Searching link to infra element for concrete resource {res_name}") infra_elem = get_infrastructure_element_from(res) logging.info(f"Infra element found: {infra_elem}") + # Remove the container generated by the current ContainerImage from the NAVIGATED_REFERENCES list + cont = infra_elem.generatedContainers.items[0] + logging.info(f"Removing {cont.name} and all its references from NAVIGATED_REFERENCES list") + remove_from_navigated_references(cont) + remove_from_navigated_references_all_refs_under(cont) logging.info(f"Searching references from infra {infra_elem.name}") - object_representation = save_references_info(infra_elem, object_representation) + object_representation = save_references_info(infra_elem, object_representation, False) object_list_representation.append(object_representation) plugin_object_step["data"][res_name] = object_list_representation plugin_steps.append(plugin_object_step) diff --git a/icgparser/PiacereInternalToolsIntegrator.py b/icgparser/PiacereInternalToolsIntegrator.py index 4a4ee7532fb32384410bb40384c334d46a631aea..a973dc2b74e16e2117138fc14eb0ec586576160d 100644 --- a/icgparser/PiacereInternalToolsIntegrator.py +++ b/icgparser/PiacereInternalToolsIntegrator.py @@ -44,6 +44,12 @@ def extract_infor_for_security_agents(intermediate_representation): return security_object_step +def extract_info_for_self_healing(intermediate_representation): + logging.info("Adding info for self healing step") + self_healing_object_step = create_piacere_agents_ansible_step("self_healing", intermediate_representation) + return self_healing_object_step + + def add_internal_tool_information(intermediate_representation): performance_monitoring_directory_path = "templates/ansible/cross-platform/performance_monitoring" security_monitoring_directory_path = "templates/ansible/cross-platform/security_monitoring" @@ -51,6 +57,7 @@ def add_internal_tool_information(intermediate_representation): logging.warning(f"add_internal_tool_information: {performance_monitoring_directory_path} " f"or {security_monitoring_directory_path} is empty.") return intermediate_representation + self_healing_step = extract_info_for_self_healing(intermediate_representation) monitoring_step = extract_info_for_monitoring_agents(intermediate_representation) security_step = extract_infor_for_security_agents(intermediate_representation) intermediate_representation_with_monitoring = IntermediateRepresentationUtility.add_step(monitoring_step, @@ -58,7 +65,9 @@ def add_internal_tool_information(intermediate_representation): 1) intermediate_representation_with_security_monitoring = IntermediateRepresentationUtility \ .add_step(security_step, intermediate_representation_with_monitoring, 2) - return intermediate_representation_with_security_monitoring + intermediate_representation_with_self_healing = IntermediateRepresentationUtility \ + .add_step(self_healing_step, intermediate_representation_with_security_monitoring, 3) + return intermediate_representation_with_self_healing def add_files_for_monitoring_agents(template_generated_folder_path): diff --git a/input_file_generated/ir.json b/input_file_generated/ir.json index 34a451371ea3f4371c8d852ed5279d87b43e98d6..61a2474e32e7321bb5a89d97a17e46cb438b2994 100644 --- a/input_file_generated/ir.json +++ b/input_file_generated/ir.json @@ -1,3335 +1,421 @@ { - "output_path": "output_files_generated/uc3_openstack/", + "output_path": "output_files_generated/wordpress/", "steps": [ { "data": { - "computingNode": [ - { - "BProperty_config_drive": true, - "NetworkInterface_ewcf_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - "NetworkInterface_ewcf_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - }, - "NetworkInterface_ewcf_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "ewcf_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "ewcf_vm", - "os": "CentOS-7-2111", - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_igw_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - "NetworkInterface_igw_vm_net2": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - "NetworkInterface_igw_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "igw_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" - } - ], - "infra_element_name": "igw_vm", - "os": "CentOS-7-2111", - "sizeDescription": "small-centos" - } - ], - "containerImage": [ - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_kafka" - } - ], - "infra_element_name": "cont_kafka_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/kafka:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_zookeeper" - } - ], - "infra_element_name": "cont_zookeeper_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/zookeeper:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_test_consumer_4_kafka" - } - ], - "infra_element_name": "test_consumer_4_kafka_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-consumer_4_kafka:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_test_producer_4_kafka" - } - ], - "infra_element_name": "test_producer_4_kafka_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-producer_4_kafka:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_go_poster" - } - ], - "infra_element_name": "go_poster_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/go_poster:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ewcf_rest" - } - ], - "infra_element_name": "ewcf_rest_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/restapi:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_mongodb" - } - ], - "infra_element_name": "mongodb_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/mongo:4.2" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_tis" - } - ], - "infra_element_name": "tis_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tis:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_tia" - } - ], - "infra_element_name": "tia_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tia:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_twr" - } - ], - "infra_element_name": "twr_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/twr:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_web" - } - ], - "infra_element_name": "ivre_web_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/web:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_db" - } - ], - "infra_element_name": "ivre_db_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/db:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_client" - } - ], - "infra_element_name": "ivre_client_img", - "kind": "IMAGE", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/client:latest" - } - ], - "containerImages": [ - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "cont_kafka_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 9092, - "iface": "ewcf_vm_oam", - "vm_port": 9092 - } - ], - "environment_variables": [ - { - "key": "KAFKA_ADVERTISED_HOST_NAME", - "value": "kafka" - }, - { - "key": "KAFKA_CREATE_TOPICS", - "value": "stats:1:1" - }, - { - "key": "KAFKA_AUTO_CREATE_TOPICS_ENABLE", - "value": "true" - }, - { - "key": "KAFKA_ZOOKEEPER_CONNECT", - "value": "zookeeper:2181" - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "cont_kafka_img", - "kind": "IMAGE", - "maps": "cont_kafka_img", - "name": "concrete_cont_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/kafka:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "cont_zookeeper_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 2181, - "iface": "ewcf_vm_oam", - "vm_port": 2181 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_zookeeper", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "cont_zookeeper_img", - "kind": "IMAGE", - "maps": "cont_zookeeper_img", - "name": "concrete_cont_zookeeper_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/zookeeper:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": "python_img", - "hostConfigs": [ - { - "host": "ewcf_vm" - } - ], - "name": "cont_python" - }, - { - "disabledMonitorings": [], - "name": "cont_kafka" - }, - { - "disabledMonitorings": [], - "name": "cont_zookeeper" - } - ], - "disabledMonitorings": [], - "generatedFrom": "test_consumer_4_kafka_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5012, - "iface": "ewcf_vm_oam", - "vm_port": 5013 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_test_consumer_4_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "test_consumer_4_kafka_img", - "kind": "IMAGE", - "maps": "test_consumer_4_kafka_img", - "name": "concrete_test_consumer_4_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-consumer_4_kafka:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "name": "cont_python" - } - ], - "disabledMonitorings": [], - "generatedFrom": "test_producer_4_kafka_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5014, - "iface": "ewcf_vm_oam", - "vm_port": 5015 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_test_producer_4_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "test_producer_4_kafka_img", - "kind": "IMAGE", - "maps": "test_producer_4_kafka_img", - "name": "concrete_test_producer_4_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-producer_4_kafka:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": "golang_img", - "hostConfigs": [ - { - "host": "ewcf_vm" - } - ], - "name": "cont_golang" - } - ], - "disabledMonitorings": [], - "generatedFrom": "go_poster_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5009, - "iface": "ewcf_vm_oam", - "vm_port": 5008 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_go_poster" - } - ], - "infra_element_name": "go_poster_img", - "kind": "IMAGE", - "maps": "go_poster_img", - "name": "concrete_go_poster_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/go_poster:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": "hello_mongo_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5003, - "iface": "ewcf_vm_oam", - "vm_port": 5002 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_hello_mongo" - }, - { - "disabledMonitorings": [], - "generatedFrom": "node_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5005, - "iface": "ewcf_vm_oam", - "vm_port": 5004 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_node" - } - ], - "disabledMonitorings": [], - "generatedFrom": "ewcf_rest_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 5007, - "iface": "ewcf_vm_net1", - "vm_port": 5006 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_ewcf_rest" - } - ], - "infra_element_name": "ewcf_rest_img", - "kind": "IMAGE", - "maps": "ewcf_rest_img", - "name": "concrete_ewct_rest_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/restapi:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_hello_mongo" - } - ], - "infra_element_name": "hello_mongo_img", - "kind": "IMAGE", - "maps": "hello_mongo_img", - "name": "concrete_hello_mondo_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/hello-mongo:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_node" - } - ], - "infra_element_name": "node_img", - "kind": "IMAGE", - "maps": "node_img", - "name": "concrete_node_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/node:18.12.1" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_golang" - } - ], - "infra_element_name": "golang_img", - "kind": "IMAGE", - "maps": "golang_img", - "name": "concrete_golang_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/golang:1.16-alpine" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "mongodb_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 85, - "iface": "ewcf_vm_oam", - "vm_port": 8085 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_mongodb" - } - ], - "infra_element_name": "mongodb_img", - "kind": "IMAGE", - "maps": "mongodb_img", - "name": "concrete_mongodb_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/mongo:4.2" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "tis_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 90, - "iface": "osint_vm_oam", - "vm_port": 8090 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_tis" - } - ], - "infra_element_name": "tis_img", - "kind": "IMAGE", - "maps": "tis_img", - "name": "concrete_tis_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tis:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "tia_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 91, - "iface": "osint_vm_oam", - "vm_port": 8091 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_tia" - } - ], - "infra_element_name": "tia_img", - "kind": "IMAGE", - "maps": "tia_img", - "name": "tia_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tia:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "twr_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 92, - "iface": "osint_vm_oam", - "vm_port": 8092 - } - ], - "host": "ewcf_vm" - } - ], - "name": "cont_twr" - } - ], - "infra_element_name": "twr_img", - "kind": "IMAGE", - "maps": "twr_img", - "name": "concrete_twr_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/twr:1.0" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_python" - } - ], - "infra_element_name": "python_img", - "kind": "IMAGE", - "maps": "python_img", - "name": "concrete_python_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/python:3.7" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "ivre_web_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 85, - "iface": "igw_vm_oam", - "vm_port": 8085 - } - ], - "host": "igw_vm" - } - ], - "name": "cont_ivre_web" - } - ], - "infra_element_name": "ivre_web_img", - "kind": "IMAGE", - "maps": "ivre_web_img", - "name": "concrete_ivre_web_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/web:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "name": "cont_mongodb" - } - ], - "disabledMonitorings": [], - "generatedFrom": "ivre_db_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 86, - "iface": "igw_vm_oam", - "vm_port": 8086 - } - ], - "host": "igw_vm" - } - ], - "name": "cont_ivre_db" - } - ], - "infra_element_name": "ivre_db_img", - "kind": "IMAGE", - "maps": "ivre_db_img", - "name": "concrete_ivre_db_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/db:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": "ivre_client_img", - "hostConfigs": [ - { - "configurations": [ - { - "container_port": 87, - "iface": "igw_vm_oam", - "vm_port": 8087 - } - ], - "host": "igw_vm" - } - ], - "name": "cont_ivre_client" - } - ], - "infra_element_name": "ivre_client_img", - "kind": "IMAGE", - "maps": "ivre_client_img", - "name": "concrete_ivre_client_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/client:latest" - } - ], - "credentials": [ - { - "algorithm": "RSA", - "bits": 4096, - "infra_element_name": "ssh_key", - "key": "/home/ubuntu/.ssh/ssh_key_aws.pub", - "user": "ubuntu" - } - ], - "network": [ - { - "connectedIfaces": [ - { - "name": "igw_vm_oam" - } - ], - "infra_element_name": "subnet_oam_igw", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "igw_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "infra_element_name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "igw_vm_net2" - } - ], - "infra_element_name": "subnet_net2_igw", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "osint_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - { - "name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - } - ], - "infra_element_name": "subnet_net1_osint", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "osint_vm_net3" - } - ], - "infra_element_name": "subnet_net3_osint", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_oam" - } - ], - "infra_element_name": "subnet_oam_ewcf", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "infra_element_name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "subnet_net3_ewcf", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "osint_vm_oam" - } - ], - "infra_element_name": "subnet_oam_osint", - "protocol": "TCP/IP" - } - ], - "networkInterface": [ - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_osint", - "infra_element_name": "osint_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "infra_element_name": "igw_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "infra_element_name": "ewcf_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "infra_element_name": "ewcf_vm_net1" - } - ], - "networks": [ - { - "Subnet_subnet_oam_ewcf": { - "connectedIfaces": [ - { - "name": "ewcf_vm_oam" - } - ], - "name": "subnet_oam_ewcf", - "protocol": "TCP/IP" - }, - "Subnet_subnet_oam_igw": { - "connectedIfaces": [ - { - "name": "igw_vm_oam" - } - ], - "name": "subnet_oam_igw", - "protocol": "TCP/IP" - }, - "Subnet_subnet_oam_osint": { - "connectedIfaces": [ - { - "name": "osint_vm_oam" - } - ], - "name": "subnet_oam_osint", - "protocol": "TCP/IP" - }, - "infra_element_name": "oam", - "infra_sgs": [ - "icmp", - "http", - "https", - "ssh" - ], - "infra_subnets": [ - { - "connectedIfaces": [ - { - "name": "igw_vm_oam" - } - ], - "name": "subnet_oam_igw", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "osint_vm_oam" - } - ], - "name": "subnet_oam_osint", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_oam" - } - ], - "name": "subnet_oam_ewcf", - "protocol": "TCP/IP" - } - ], - "maps": "oam", - "name": "concrete_oam", - "preexisting": true, - "protocol": "TCP/IP", - "resourceName": "external", - "subnets": [ - { - "maps": "subnet_oam_igw", - "name": "concrete_subnet_oam_igw", - "preexisting": true, - "resourceName": "external" - }, - { - "maps": "subnet_oam_osint", - "name": "concrete_subnet_oam_osint", - "preexisting": true, - "resourceName": "external" - }, - { - "maps": "subnet_oam_ewcf", - "name": "concrete_subnet_oam_ewcf", - "preexisting": true, - "resourceName": "external" - } - ] - }, - { - "Subnet_subnet_net1_ewcf": { - "connectedIfaces": [ - { - "name": "ewcf_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - }, - "Subnet_subnet_net1_igw": { - "connectedIfaces": [ - { - "name": "igw_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - "Subnet_subnet_net1_osint": { - "connectedIfaces": [ - { - "name": "osint_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - { - "name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - }, - "addressRange": "16.0.2.0/24", - "infra_element_name": "net1", - "infra_sgs": [ - "icmp", - "http", - "https", - "ssh" - ], - "infra_subnets": [ - { - "connectedIfaces": [ - { - "name": "igw_vm_net1" - } - ], - "connectedTo": [ - { - "connectedIfaces": [ - { - "name": "osint_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_net1" - } - ], - "connectedTo": [ - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - } - ], - "name": "subnet_net1_igw", - "protocol": "TCP/IP" - }, - { - "name": "subnet_net1_osint", - "protocol": "TCP/IP" - }, - { - "name": "subnet_net1_ewcf", - "protocol": "TCP/IP" - } - ], - "maps": "net1", - "name": "concrete_net1", - "preexisting": false, - "protocol": "TCP/IP", - "subnets": [ - { - "addressRange": "16.0.2.0/26", - "maps": "subnet_net1_igw", - "name": "concrete_subnet_net1_igw", - "preexisting": false - }, - { - "addressRange": "16.0.2.64/26", - "maps": "subnet_net1_osint", - "name": "concrete_subnet_net1_osint", - "preexisting": false - }, - { - "addressRange": "16.0.2.128/26", - "maps": "subnet_net1_ewcf", - "name": "concrete_subnet_net1_ewcf", - "preexisting": false - } - ] - }, - { - "Subnet_subnet_net2_igw": { - "connectedIfaces": [ - { - "name": "igw_vm_net2" - } - ], - "name": "subnet_net2_igw", - "protocol": "TCP/IP" - }, - "addressRange": "16.0.3.0/24", - "infra_element_name": "net2", - "infra_sgs": [ - "icmp", - "http", - "https", - "ssh" - ], - "infra_subnets": [ - { - "connectedIfaces": [ - { - "name": "igw_vm_net2" - } - ], - "name": "subnet_net2_igw", - "protocol": "TCP/IP" - } - ], - "maps": "net2", - "name": "concrete_net2", - "preexisting": false, - "protocol": "TCP/IP", - "subnets": [ - { - "addressRange": "16.0.3.0/25", - "name": "subnet_net2_igw", - "preexisting": false - } - ] - }, - { - "Subnet_subnet_net3_ewcf": { - "connectedIfaces": [ - { - "name": "ewcf_vm_net3" - } - ], - "name": "subnet_net3_ewcf", - "protocol": "TCP/IP" - }, - "Subnet_subnet_net3_osint": { - "connectedIfaces": [ - { - "name": "osint_vm_net3" - } - ], - "name": "subnet_net3_osint", - "protocol": "TCP/IP" - }, - "addressRange": "16.0.4.0/24", - "infra_element_name": "net3", - "infra_sgs": [ - "icmp", - "http", - "https", - "ssh" - ], - "infra_subnets": [ - { - "connectedIfaces": [ - { - "name": "osint_vm_net3" - } - ], - "name": "subnet_net3_osint", - "protocol": "TCP/IP" - }, - { - "connectedIfaces": [ - { - "name": "ewcf_vm_net3" - } - ], - "name": "subnet_net3_ewcf", - "protocol": "TCP/IP" - } - ], - "maps": "net3", - "name": "concrete_net3", - "preexisting": false, - "protocol": "TCP/IP", - "subnets": [ - { - "addressRange": "16.0.4.0/25", - "name": "subnet_net3_osint", - "preexisting": false - }, - { - "addressRange": "16.0.4.128/25", - "name": "subnet_net3_ewcf", - "preexisting": false - } - ] - } - ], - "provider_info": [ - { - "provider_name": "openstack" - } - ], - "securityGroup": [ - { - "Rule_http": { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - "Rule_https": { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - "Rule_icmp": { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - "Rule_ssh": { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - }, - "ifaces": [ - { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" - }, - { - "name": "osint_vm_oam" - }, - { - "name": "osint_vm_net1" - }, - { - "name": "osint_vm_net3" - }, - { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "sg", - "rules": [ - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - } - ] - } - ], - "storages": [ - { - "concrete_igw_vm": { - "maps": "igw_vm", - "name": "concrete_igw_vm", - "preexisting": false - }, - "infra_element_name": "ext_sto_1", - "label": "vm_storage", - "maps": "ext_sto_1", - "name": "concrete_ext_sto_mongo1", - "preexisting": false, - "refs": [ - { - "maps": "igw_vm", - "name": "concrete_igw_vm", - "preexisting": false - } - ], - "size_gb": 512 - }, - { - "concrete_ewcf_vm": { - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "preexisting": false - }, - "infra_element_name": "ext_sto_2", - "label": "vm_storage", - "maps": "ext_sto_2", - "name": "concrete_ext_sto_mongo2", - "preexisting": false, - "refs": [ - { - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "preexisting": false - } - ], - "size_gb": 512 - } - ], - "vms": [ - { - "BProperty_config_drive": true, - "NetworkInterface_osint_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - "NetworkInterface_osint_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - "NetworkInterface_osint_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "osint_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "associated": [ - { - "ifaces": [ - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - { - "name": "osint_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - } - ], - "name": "sg", - "rules": [ - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - } - ] - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - { - "name": "osint_vm_net1" - }, - { - "name": "osint_vm_net3" - } - ], - "infra_element_name": "osint_vm", - "maps": "osint_vm", - "name": "concrete_osint_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_igw_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - "NetworkInterface_igw_vm_net2": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - "NetworkInterface_igw_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "igw_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" - } - ], - "infra_element_name": "igw_vm", - "maps": "igw_vm", - "name": "concrete_igw_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_ewcf_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - "NetworkInterface_ewcf_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - }, - "NetworkInterface_ewcf_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "ewcf_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "ewcf_vm", - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - } - ] - }, - "programming_language": "terraform" - }, - { - "data": { - "performance_monitoring": { - "name": "performance_monitoring", - "nodes": [ - { - "BProperty_config_drive": true, - "NetworkInterface_osint_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - "NetworkInterface_osint_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - "NetworkInterface_osint_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "osint_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "associated": [ - { - "ifaces": [ - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - { - "name": "osint_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - } - ], - "name": "sg", - "rules": [ - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - } - ] - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - { - "name": "osint_vm_net1" - }, - { - "name": "osint_vm_net3" - } - ], - "infra_element_name": "osint_vm", - "maps": "osint_vm", - "name": "concrete_osint_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_igw_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - "NetworkInterface_igw_vm_net2": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - "NetworkInterface_igw_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "igw_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" - } - ], - "infra_element_name": "igw_vm", - "maps": "igw_vm", - "name": "concrete_igw_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_ewcf_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - "NetworkInterface_ewcf_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - }, - "NetworkInterface_ewcf_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "ewcf_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "ewcf_vm", - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - } - ] - } - }, - "programming_language": "ansible", - "step_name": "performance_monitoring", - "step_type": "SoftwareComponent" - }, - { - "data": { - "security_monitoring": { - "name": "security_monitoring", - "nodes": [ - { - "BProperty_config_drive": true, - "NetworkInterface_osint_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - "NetworkInterface_osint_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - "NetworkInterface_osint_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "osint_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "associated": [ - { - "ifaces": [ - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - { - "name": "osint_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - } - ], - "name": "sg", - "rules": [ - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - } - ] - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, - { - "name": "osint_vm_net1" - }, - { - "name": "osint_vm_net3" - } - ], - "infra_element_name": "osint_vm", - "maps": "osint_vm", - "name": "concrete_osint_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_igw_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - "NetworkInterface_igw_vm_net2": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - "NetworkInterface_igw_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "igw_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" - } - ], - "infra_element_name": "igw_vm", - "maps": "igw_vm", - "name": "concrete_igw_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - }, - { - "BProperty_config_drive": true, - "NetworkInterface_ewcf_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - "NetworkInterface_ewcf_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - }, - "NetworkInterface_ewcf_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - "annotations": [ - { - "key": "config_drive", - "value": true - } - ], - "configInterface": "ewcf_vm_oam", - "credentials": "ssh_key", - "disabledMonitorings": [], - "ifaces": [ - { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" - } - ], - "infra_element_name": "ewcf_vm", - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "os": "CentOS-7-2111", - "preexisting": false, - "sizeDescription": "small-centos" - } - ] - } - }, - "programming_language": "ansible", - "step_name": "security_monitoring", - "step_type": "SoftwareComponent" - }, - { - "data": { - "containerImages": [ - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_kafka" - } - ], - "kind": "IMAGE", - "name": "cont_kafka_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/kafka:latest" - }, - "hostConfigs": [], - "name": "cont_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "cont_kafka_img", - "kind": "IMAGE", - "maps": "cont_kafka_img", - "name": "concrete_cont_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/kafka:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_zookeeper" - } - ], - "kind": "IMAGE", - "name": "cont_zookeeper_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/zookeeper:latest" - }, - "hostConfigs": [], - "name": "cont_zookeeper", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "cont_zookeeper_img", - "kind": "IMAGE", - "maps": "cont_zookeeper_img", - "name": "concrete_cont_zookeeper_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/zookeeper:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_python" - } - ], - "kind": "IMAGE", - "name": "python_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/python:3.7" - }, - "hostConfigs": [], - "name": "cont_python" - }, - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_kafka" - } - ], - "kind": "IMAGE", - "name": "cont_kafka_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/kafka:latest" - }, - "hostConfigs": [], - "name": "cont_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - }, - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_zookeeper" - } - ], - "kind": "IMAGE", - "name": "cont_zookeeper_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/wurstmeister/zookeeper:latest" - }, - "hostConfigs": [], - "name": "cont_zookeeper", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_test_consumer_4_kafka" - } - ], - "kind": "IMAGE", - "name": "test_consumer_4_kafka_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-consumer_4_kafka:latest" - }, - "hostConfigs": [], - "name": "cont_test_consumer_4_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "test_consumer_4_kafka_img", - "kind": "IMAGE", - "maps": "test_consumer_4_kafka_img", - "name": "concrete_test_consumer_4_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-consumer_4_kafka:latest" - }, - { - "generatedContainers": [ - { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_python" - } - ], - "kind": "IMAGE", - "name": "python_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/python:3.7" - }, - "hostConfigs": [], - "name": "cont_python" - } - ], - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_test_producer_4_kafka" - } - ], - "kind": "IMAGE", - "name": "test_producer_4_kafka_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-producer_4_kafka:latest" - }, - "hostConfigs": [], - "name": "cont_test_producer_4_kafka", - "networks": [ - { - "containerNetworkName": "kafka_net", - "name": "kafka_net" - } - ] - } - ], - "infra_element_name": "test_producer_4_kafka_img", - "kind": "IMAGE", - "maps": "test_producer_4_kafka_img", - "name": "concrete_test_producer_4_kafka_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/piacere/piacere/test-producer_4_kafka:latest" - }, + "credentials": [ { - "generatedContainers": [ + "infra_element_name": "ssh_key", + "key": "local path to ssh key", + "user": "myuser" + } + ], + "network": [ + { + "connectedIfaces": [ { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_golang" - } - ], - "kind": "IMAGE", - "name": "golang_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/golang:1.16-alpine" - }, - "hostConfigs": [], - "name": "cont_golang" - } - ], - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_go_poster" - } - ], - "kind": "IMAGE", - "name": "go_poster_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/go_poster:latest" - }, - "hostConfigs": [], - "name": "cont_go_poster" + "name": "i1" + }, + { + "name": "i2" } ], - "infra_element_name": "go_poster_img", - "kind": "IMAGE", - "maps": "go_poster_img", - "name": "concrete_go_poster_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/go_poster:latest" - }, + "infra_element_name": "subnet1", + "protocol": "TCP/IP" + } + ], + "networks": [ { - "generatedContainers": [ + "Subnet_subnet1": { + "connectedIfaces": [ + { + "name": "i1" + }, + { + "name": "i2" + } + ], + "name": "subnet1", + "protocol": "TCP/IP" + }, + "addressRange": "10.10.10.0/24", + "infra_element_name": "net1", + "infra_subnets": [ { - "dependsOn": [ + "connectedIfaces": [ { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_hello_mongo" - } - ], - "kind": "IMAGE", - "name": "hello_mongo_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/hello-mongo:latest" - }, - "hostConfigs": [], - "name": "cont_hello_mongo" + "name": "i1" }, { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_node" - } - ], - "kind": "IMAGE", - "name": "node_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/node:18.12.1" - }, - "hostConfigs": [], - "name": "cont_node" + "name": "i2" } ], - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ewcf_rest" - } - ], - "kind": "IMAGE", - "name": "ewcf_rest_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/restapi:latest" - }, - "hostConfigs": [], - "name": "cont_ewcf_rest" - } - ], - "infra_element_name": "ewcf_rest_img", - "kind": "IMAGE", - "maps": "ewcf_rest_img", - "name": "concrete_ewct_rest_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/restapi:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_hello_mongo" - } - ], - "kind": "IMAGE", - "name": "hello_mongo_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/hello-mongo:latest" - }, - "hostConfigs": [], - "name": "cont_hello_mongo" - } - ], - "infra_element_name": "hello_mongo_img", - "kind": "IMAGE", - "maps": "hello_mongo_img", - "name": "concrete_hello_mondo_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/hello-mongo:latest" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_node" - } - ], - "kind": "IMAGE", - "name": "node_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/node:18.12.1" - }, - "hostConfigs": [], - "name": "cont_node" - } - ], - "infra_element_name": "node_img", - "kind": "IMAGE", - "maps": "node_img", - "name": "concrete_node_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/node:18.12.1" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_golang" - } - ], - "kind": "IMAGE", - "name": "golang_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/golang:1.16-alpine" - }, - "hostConfigs": [], - "name": "cont_golang" - } - ], - "infra_element_name": "golang_img", - "kind": "IMAGE", - "maps": "golang_img", - "name": "concrete_golang_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/golang:1.16-alpine" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_mongodb" - } - ], - "kind": "IMAGE", - "name": "mongodb_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/mongo:4.2" - }, - "hostConfigs": [], - "name": "cont_mongodb" - } - ], - "infra_element_name": "mongodb_img", - "kind": "IMAGE", - "maps": "mongodb_img", - "name": "concrete_mongodb_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/mongo:4.2" - }, - { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_tis" - } - ], - "kind": "IMAGE", - "name": "tis_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tis:1.0" - }, - "hostConfigs": [], - "name": "cont_tis" + "name": "subnet1", + "protocol": "TCP/IP" } ], - "infra_element_name": "tis_img", - "kind": "IMAGE", - "maps": "tis_img", - "name": "concrete_tis_img", + "maps": "net1", + "name": "concrete_net", "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tis:1.0" - }, - { - "generatedContainers": [ + "protocol": "tcp/ip", + "subnets": [ { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_tia" - } - ], - "kind": "IMAGE", - "name": "tia_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tia:1.0" - }, - "hostConfigs": [], - "name": "cont_tia" + "addressRange": "10.100.1.0/24", + "maps": "subnet1", + "name": "concrete_subnet", + "preexisting": false } - ], - "infra_element_name": "tia_img", - "kind": "IMAGE", - "maps": "tia_img", - "name": "tia_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/tia:1.0" - }, + ] + } + ], + "provider_info": [ { - "generatedContainers": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_twr" - } - ], - "kind": "IMAGE", - "name": "twr_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/twr:1.0" - }, - "hostConfigs": [], - "name": "cont_twr" - } - ], - "infra_element_name": "twr_img", - "kind": "IMAGE", - "maps": "twr_img", - "name": "concrete_twr_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/twr:1.0" - }, + "provider_name": "aws" + } + ], + "vms": [ { - "generatedContainers": [ + "NetworkInterface_i1": { + "belongsTo": "subnet1", + "name": "i1" + }, + "annotations": [ { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_python" - } - ], - "kind": "IMAGE", - "name": "python_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/python:3.7" - }, - "hostConfigs": [], - "name": "cont_python" + "key": "vm_flavor", + "value": "t2.micro" } ], - "infra_element_name": "python_img", - "kind": "IMAGE", - "maps": "python_img", - "name": "concrete_python_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/python:3.7" - }, - { - "generatedContainers": [ + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_web" - } - ], - "kind": "IMAGE", - "name": "ivre_web_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/web:latest" - }, - "hostConfigs": [], - "name": "cont_ivre_web" + "belongsTo": "subnet1", + "name": "i1" } ], - "infra_element_name": "ivre_web_img", - "kind": "IMAGE", - "maps": "ivre_web_img", - "name": "concrete_ivre_web_img", + "infra_element_name": "vm1", + "maps": "vm1", + "name": "concrete_vm1", + "os": "ubuntu-20.04.3", "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/web:latest" + "vm_flavor": "t2.micro" }, { - "generatedContainers": [ + "NetworkInterface_i2": { + "belongsTo": "subnet1", + "name": "i2" + }, + "annotations": [ { - "dependsOn": [ - { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_mongodb" - } - ], - "kind": "IMAGE", - "name": "mongodb_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/mongo:4.2" - }, - "hostConfigs": [], - "name": "cont_mongodb" - } - ], - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_db" - } - ], - "kind": "IMAGE", - "name": "ivre_db_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/db:latest" - }, - "hostConfigs": [], - "name": "cont_ivre_db" + "key": "vm_flavor", + "value": "t2.micro" } ], - "infra_element_name": "ivre_db_img", - "kind": "IMAGE", - "maps": "ivre_db_img", - "name": "concrete_ivre_db_img", - "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/db:latest" - }, - { - "generatedContainers": [ + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ { - "disabledMonitorings": [], - "generatedFrom": { - "generatedContainers": [ - { - "disabledMonitorings": [], - "name": "cont_ivre_client" - } - ], - "kind": "IMAGE", - "name": "ivre_client_img", - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/client:latest" - }, - "hostConfigs": [], - "name": "cont_ivre_client" + "belongsTo": "subnet1", + "name": "i2" } ], - "infra_element_name": "ivre_client_img", - "kind": "IMAGE", - "maps": "ivre_client_img", - "name": "concrete_ivre_client_img", + "infra_element_name": "vm2", + "maps": "vm2", + "name": "concrete_vm2", + "os": "ubuntu-20.04.3", "preexisting": false, - "uri": "optima-piacere-docker-dev.artifact.tecnalia.com/wp7/ericsson/ivre/client:latest" + "vm_flavor": "t2.micro" } ] }, - "programming_language": "docker-compose" + "programming_language": "terraform" }, { "data": { - "osint": { - "consumedInterfaces": [ - { - "name": "net_info" - }, + "performance_monitoring": { + "name": "performance_monitoring", + "nodes": [ { - "endPoint": "https://twitter_api/get", - "name": "get_twitter" + "NetworkInterface_i1": { + "belongsTo": "subnet1", + "name": "i1" + }, + "annotations": [ + { + "key": "vm_flavor", + "value": "t2.micro" + } + ], + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ + { + "belongsTo": "subnet1", + "name": "i1" + } + ], + "infra_element_name": "vm1", + "maps": "vm1", + "name": "concrete_vm1", + "os": "ubuntu-20.04.3", + "preexisting": false, + "vm_flavor": "t2.micro" }, { - "name": "ewcf_kafka_if" - } - ], - "exposedInterfaces": [ - { - "name": "osint_info" + "NetworkInterface_i2": { + "belongsTo": "subnet1", + "name": "i2" + }, + "annotations": [ + { + "key": "vm_flavor", + "value": "t2.micro" + } + ], + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ + { + "belongsTo": "subnet1", + "name": "i2" + } + ], + "infra_element_name": "vm2", + "maps": "vm2", + "name": "concrete_vm2", + "os": "ubuntu-20.04.3", + "preexisting": false, + "vm_flavor": "t2.micro" } - ], - "isPersistent": false, - "name": "osint", + ] + } + }, + "programming_language": "ansible", + "step_name": "performance_monitoring", + "step_type": "SoftwareComponent" + }, + { + "data": { + "security_monitoring": { + "name": "security_monitoring", "nodes": [ { - "BProperty_config_drive": true, - "NetworkInterface_osint_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" + "NetworkInterface_i1": { + "belongsTo": "subnet1", + "name": "i1" }, - "NetworkInterface_osint_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" + "annotations": [ + { + "key": "vm_flavor", + "value": "t2.micro" + } + ], + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ + { + "belongsTo": "subnet1", + "name": "i1" + } + ], + "infra_element_name": "vm1", + "maps": "vm1", + "name": "concrete_vm1", + "os": "ubuntu-20.04.3", + "preexisting": false, + "vm_flavor": "t2.micro" + }, + { + "NetworkInterface_i2": { + "belongsTo": "subnet1", + "name": "i2" }, - "NetworkInterface_osint_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" + "annotations": [ + { + "key": "vm_flavor", + "value": "t2.micro" + } + ], + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ + { + "belongsTo": "subnet1", + "name": "i2" + } + ], + "infra_element_name": "vm2", + "maps": "vm2", + "name": "concrete_vm2", + "os": "ubuntu-20.04.3", + "preexisting": false, + "vm_flavor": "t2.micro" + } + ] + } + }, + "programming_language": "ansible", + "step_name": "security_monitoring", + "step_type": "SoftwareComponent" + }, + { + "data": { + "self_healing_monitoring": { + "name": "self_healing_monitoring", + "nodes": [ + { + "NetworkInterface_i1": { + "belongsTo": "subnet1", + "name": "i1" }, "annotations": [ { - "key": "config_drive", - "value": true + "key": "vm_flavor", + "value": "t2.micro" } ], - "configInterface": "osint_vm_oam", "credentials": "ssh_key", "disabledMonitorings": [], "ifaces": [ { - "associated": [ - { - "ifaces": [ - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - { - "name": "osint_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_osint", - "name": "osint_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_osint", - "name": "osint_vm_net3" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - } - ], - "name": "sg", - "rules": [ - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": -1, - "kind": "EGRESS", - "name": "icmp", - "protocol": "ICMP", - "toPort": -1 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 80, - "kind": "INGRESS", - "name": "http", - "protocol": "TCP", - "toPort": 80 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 443, - "kind": "INGRESS", - "name": "https", - "protocol": "TCP", - "toPort": 443 - }, - { - "cidr": [ - "0.0.0.0/0" - ], - "fromPort": 22, - "kind": "INGRESS", - "name": "ssh", - "protocol": "TCP", - "toPort": 22 - } - ] - } - ], - "belongsTo": "subnet_oam_osint", - "name": "osint_vm_oam" - }, + "belongsTo": "subnet1", + "name": "i1" + } + ], + "infra_element_name": "vm1", + "maps": "vm1", + "name": "concrete_vm1", + "os": "ubuntu-20.04.3", + "preexisting": false, + "vm_flavor": "t2.micro" + }, + { + "NetworkInterface_i2": { + "belongsTo": "subnet1", + "name": "i2" + }, + "annotations": [ { - "name": "osint_vm_net1" - }, + "key": "vm_flavor", + "value": "t2.micro" + } + ], + "credentials": "ssh_key", + "disabledMonitorings": [], + "ifaces": [ { - "name": "osint_vm_net3" + "belongsTo": "subnet1", + "name": "i2" } ], - "infra_element_name": "osint_vm", - "maps": "osint_vm", - "name": "concrete_osint_vm", - "os": "CentOS-7-2111", + "infra_element_name": "vm2", + "maps": "vm2", + "name": "concrete_vm2", + "os": "ubuntu-20.04.3", "preexisting": false, - "sizeDescription": "small-centos" + "vm_flavor": "t2.micro" } ] } }, "programming_language": "ansible", - "step_name": "osint", + "step_name": "self_healing_monitoring", "step_type": "SoftwareComponent" }, { "data": { - "iwg": { + "mysql": { + "db_name": "app1", + "db_password": "app1user", + "db_user": "app1user", "exposedInterfaces": [ { - "name": "net_info" + "name": "DB_interface" } ], "isPersistent": false, - "name": "iwg", + "name": "mysql", "nodes": [ { - "BProperty_config_drive": true, - "NetworkInterface_igw_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_igw", - "name": "igw_vm_net1" - }, - "NetworkInterface_igw_vm_net2": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net2_igw", - "name": "igw_vm_net2" - }, - "NetworkInterface_igw_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_igw", - "name": "igw_vm_oam" + "NetworkInterface_i1": { + "belongsTo": "subnet1", + "name": "i1" }, "annotations": [ { - "key": "config_drive", - "value": true + "key": "vm_flavor", + "value": "t2.micro" } ], - "configInterface": "igw_vm_oam", "credentials": "ssh_key", "disabledMonitorings": [], "ifaces": [ { - "name": "igw_vm_oam" - }, - { - "name": "igw_vm_net1" - }, - { - "name": "igw_vm_net2" + "belongsTo": "subnet1", + "name": "i1" } ], - "infra_element_name": "igw_vm", - "maps": "igw_vm", - "name": "concrete_igw_vm", - "os": "CentOS-7-2111", + "infra_element_name": "vm1", + "maps": "vm1", + "name": "concrete_vm1", + "os": "ubuntu-20.04.3", "preexisting": false, - "sizeDescription": "small-centos" + "vm_flavor": "t2.micro" } ] } }, "programming_language": "ansible", - "step_name": "iwg", + "step_name": "mysql", "step_type": "SoftwareComponent" }, { "data": { - "ewcf": { + "wordpress": { "consumedInterfaces": [ { - "endPoint": "https://firebase_api/get", - "name": "get_firebase" - } - ], - "exposedInterfaces": [ - { - "name": "ewcf_restapi_if" - }, - { - "name": "ewcf_kafka_if" + "name": "DB_interface" } ], "isPersistent": false, - "name": "ewcf", + "name": "wordpress", "nodes": [ { - "BProperty_config_drive": true, - "NetworkInterface_ewcf_vm_net1": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net1_ewcf", - "name": "ewcf_vm_net1" - }, - "NetworkInterface_ewcf_vm_net3": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_net3_ewcf", - "name": "ewcf_vm_net3" - }, - "NetworkInterface_ewcf_vm_oam": { - "associated": [ - { - "name": "sg" - } - ], - "belongsTo": "subnet_oam_ewcf", - "name": "ewcf_vm_oam" + "NetworkInterface_i2": { + "belongsTo": "subnet1", + "name": "i2" }, "annotations": [ { - "key": "config_drive", - "value": true + "key": "vm_flavor", + "value": "t2.micro" } ], - "configInterface": "ewcf_vm_oam", "credentials": "ssh_key", "disabledMonitorings": [], "ifaces": [ { - "name": "ewcf_vm_oam" - }, - { - "name": "ewcf_vm_net1" - }, - { - "name": "ewcf_vm_net3" + "belongsTo": "subnet1", + "name": "i2" } ], - "infra_element_name": "ewcf_vm", - "maps": "ewcf_vm", - "name": "concrete_ewcf_vm", - "os": "CentOS-7-2111", + "infra_element_name": "vm2", + "maps": "vm2", + "name": "concrete_vm2", + "os": "ubuntu-20.04.3", "preexisting": false, - "sizeDescription": "small-centos" + "vm_flavor": "t2.micro" } - ] + ], + "wordpress_db_host": "db_host", + "wordpress_db_name": "app1", + "wordpress_db_password": "app1user", + "wordpress_db_user": "app1user", + "wordpress_table_prefix": "wp" } }, "programming_language": "ansible", - "step_name": "ewcf", + "step_name": "wordpress", "step_type": "SoftwareComponent" } ] diff --git a/template-location.properties b/template-location.properties index daf93f4b91c4129848b12acff37502e20cea5705..d7edcde76e69d9ba53c0484aef79293871b1e375 100644 --- a/template-location.properties +++ b/template-location.properties @@ -72,6 +72,7 @@ elasticsearch = templates/ansible/ubuntu/elasticsearch_main.tpl,templates/ansibl postgres = templates/ansible/ubuntu/postgres.tpl performance_monitoring = templates/ansible/ubuntu/performance_monitoring_main.tpl security_monitoring = templates/ansible/ubuntu/security_monitoring_main.tpl +self_healing_monitoring = templates/ansible/ubuntu/self_healing_monitoring_main.tpl external_iac = templates/ansible/ubuntu/external_code_main.tpl [ansible.centos] @@ -81,6 +82,7 @@ wordpress = templates/ansible/centos/wordpress.tpl elasticsearch = templates/ansible/centos/elasticsearch_main.tpl,templates/ansible/centos/elasticsearch.tpl performance_monitoring = templates/ansible/centos/performance_monitoring_main.tpl security_monitoring = templates/ansible/centos/security_monitoring_main.tpl +self_healing_monitoring = templates/ansible/centos/self_healing_monitoring_main.tpl inventory = templates/ansible/centos/inventory.tpl config = templates/ansible/centos/config.tpl ssh_key = templates/ansible/centos/ssh_key.tpl diff --git a/templates/ansible/centos/self_healing_monitoring_main.tpl b/templates/ansible/centos/self_healing_monitoring_main.tpl new file mode 100644 index 0000000000000000000000000000000000000000..800f52511939052e7c9388ca1a25f723a7f8cfcf --- /dev/null +++ b/templates/ansible/centos/self_healing_monitoring_main.tpl @@ -0,0 +1,4 @@ +--- +- hosts: localhost + tasks: + - meta: noop \ No newline at end of file diff --git a/templates/ansible/cross-platform/performance_monitoring/vars/main.yaml b/templates/ansible/cross-platform/performance_monitoring/vars/main.yaml index 98d1f1089df429cbd1d74726306f3b0b2c38c132..4da4e1c4993fffd0eb3836a065eca3c107a65e8e 100644 --- a/templates/ansible/cross-platform/performance_monitoring/vars/main.yaml +++ b/templates/ansible/cross-platform/performance_monitoring/vars/main.yaml @@ -21,7 +21,7 @@ telegraf_global_tags: - tag_name: doml_element_name tag_value: "{{ doml_element_name }}" - tag_name: doml_element_type - tag_value: "vm" + tag_value: "{{ doml_element_type | default('vm') }}" telegraf_plugins_default: - plugin: cpu diff --git a/templates/ansible/ubuntu/self_healing_monitoring_main.tpl b/templates/ansible/ubuntu/self_healing_monitoring_main.tpl new file mode 100644 index 0000000000000000000000000000000000000000..ed97d539c095cf1413af30cc23dea272095b97dd --- /dev/null +++ b/templates/ansible/ubuntu/self_healing_monitoring_main.tpl @@ -0,0 +1 @@ +--- diff --git a/templates/docker_compose/docker_compose.tpl b/templates/docker_compose/docker_compose.tpl index 477d6583dc2c43f76f3af6377e8c32dcd44f930c..231ef32808ce21cc659952bf9fcd323dd98fea5e 100644 --- a/templates/docker_compose/docker_compose.tpl +++ b/templates/docker_compose/docker_compose.tpl @@ -1,19 +1,20 @@ version: '3' services: {{ name }}: - image: {{ generatedFrom.uri }} + {%- for image in extra_parameters %}{% if image.maps is sameas generatedFrom %} + image: {{ image.uri }} + {% endif %}{%- endfor %} restart: on-failure - {%- for image in extra_parameters %}{% if image["maps"] is sameas generatedFrom["name"] %}{% for cont in image["generatedContainers"] %}{% if cont["name"] is sameas name %}{% if "hostConfigs" in cont %} ports: - {%- for config in cont["hostConfigs"][0]["configurations"] %} + {%- for config in hostConfigs[0]["configurations"] %} - "{{ config.container_port }}:{{ config.vm_port }}" {%- endfor %} - {%- if cont["hostConfigs"][0]["environment_variables"] is defined %} + {%- if hostConfigs[0]["environment_variables"] is defined %} environment: - {%- for environ in cont["hostConfigs"][0]["environment_variables"] %} - {{ environ.key }}: "{{ environ.value }}" - {%- endfor %}{% endif %} - {%- endif %}{% endif %}{% endfor %}{% endif %}{%- endfor %} + {%- for variable in hostConfigs[0]["environment_variables"] %} + - {{ variable.key }}="{{ variable.value }}" + {%- endfor %} + {%- endif %} {%- if networks is defined %} networks: - {{ networks.0.name }} @@ -21,4 +22,4 @@ services: networks: {{ networks.0.name }}: name: {{ networks.0.containerNetworkName }} -{%- endif %} \ No newline at end of file +{%- endif %}