Commit 383ede8a authored by Spiros Koulouzis's avatar Spiros Koulouzis

implemented delete

parent fb0fe2be
This diff is collapsed.
......@@ -30,7 +30,7 @@ public class Constants {
public static final String VM_TOPOLOGY = "tosca.nodes.ARTICONF.VM.topology";
public static final String CLOUD_STORM_INTERFACE = "tosca.interfaces.ARTICONF.CloudsStorm";
public static final String ENCODED_FILE_DATATYPE = "tosca.datatypes.ARTICONF.encodedFile";
public static final String CLOUD_STORM_FILES_ZIP_SUXIF = "-cloudStromFiles.zip";
public static final String CLOUD_STORM_FILES_ZIP_SUFIX = "cloudStromFiles.zip";
public static enum NODE_STATES {
DELETED, STARTED, STOPPED, H_SCALED, V_SCALED, CONFIGURED, RUNNING, FAILED
......
......@@ -16,6 +16,7 @@
package nl.uva.sne.drip.commons.utils;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
......@@ -131,22 +132,19 @@ public class Converter {
}
}
public static void unzipFolder(String zipFile) throws IOException {
public static void unzipFolder(String zipFile, String uncompressedDirectory) throws IOException {
try (ZipFile zipfile = new ZipFile(zipFile)) {
FileSystem fileSystem = FileSystems.getDefault();
Enumeration<? extends ZipEntry> zipEntries = zipfile.entries();
String uncompressedDirectory = "uncompressed/";
Files.createDirectory(fileSystem.getPath(uncompressedDirectory));
while (zipEntries.hasMoreElements()) {
ZipEntry entry = zipEntries.nextElement();
if (entry.isDirectory()) {
Files.createDirectories(fileSystem.getPath(uncompressedDirectory + entry.getName()));
Files.createDirectories(fileSystem.getPath(uncompressedDirectory + File.separator + entry.getName()));
} else {
InputStream is = zipfile.getInputStream(entry);
BufferedInputStream bis = new BufferedInputStream(is);
String uncompressedFileName = uncompressedDirectory + entry.getName();
String uncompressedFileName = uncompressedDirectory + File.separator + entry.getName();
Path uncompressedFilePath = fileSystem.getPath(uncompressedFileName);
Files.createFile(uncompressedFilePath);
try (FileOutputStream fileOutput = new FileOutputStream(uncompressedFileName)) {
......
......@@ -61,8 +61,6 @@ public class ToscaHelper {
private Integer id;
@Autowired
public ToscaHelper(String sureToscaBasePath) {
init(sureToscaBasePath);
......@@ -398,4 +396,16 @@ public class ToscaHelper {
}
public Map<String, Object> getNodeArtifacts(NodeTemplate nodeTemplate) {
return nodeTemplate.getArtifacts();
}
public Map<String, Object> getNodeArtifact(NodeTemplate nodeTemplate, String artifactName) {
Map<String, Object> artifacts = nodeTemplate.getArtifacts();
if (artifacts != null) {
return (Map<String, Object>) artifacts.get(artifactName);
}
return null;
}
}
{"owner":"user","creationDate":1584628085846,"toscaTemplate":{"tosca_definitions_version":"tosca_simple_yaml_1_0","tosca_default_namespace":null,"template_name":null,"topology_template":{"description":null,"inputs":null,"node_templates":{"compute":{"properties":{"disk_size":"10000 MB","mem_size":"1000 MB","num_cores":1,"os":"Ubuntu 18.04","user_name":"vm_user"},"interfaces":{"Standard":{"create":"dumy.yaml"}},"type":"tosca.nodes.ARTICONF.VM.Compute"},"compute_1":{"properties":{"disk_size":"10000 MB","mem_size":"1000 MB","num_cores":1,"os":"Ubuntu 18.04","user_name":"vm_user"},"interfaces":{"Standard":{"create":"dumy.yaml"}},"type":"tosca.nodes.ARTICONF.VM.Compute"},"kubernetes":{"requirements":[{"host":{"capability":"tosca.capabilities.ARTICONF.VM.topology","node":"topology","relationship":"tosca.relationships.HostedOn"}}],"interfaces":{"Kubernetes":{"configure":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/dashboard.yaml"}},"create":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/create_k8s.yml"}},"install":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/install_k8s.yml"}}}},"type":"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"},"topology":{"properties":{"domain":"Frankfurt","provider":"EC2"},"requirements":[{"vm":{"capability":"tosca.capabilities.ARTICONF.VM","node":"compute","relationship":"tosca.relationships.DependsOn"}},{"vm":{"capability":"tosca.capabilities.ARTICONF.VM","node":"compute_1","relationship":"tosca.relationships.DependsOn"}}],"interfaces":{"CloudsStorm":{"delete":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"hscale":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"provision":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"start":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"stop":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}}}},"type":"tosca.nodes.ARTICONF.VM.topology","attributes":{"credential":{"cloud_provider_name":"EC2","keys":{"aws_access_key_id":"XXXXXXXXXXXXXXX"},"token":"XXXXXXXXXXXXXXXXXX","token_type":"access_key"},"desired_state":"RUNNING"}},"ws-pema":{"properties":{"ports":["30001:8080"]},"requirements":[{"host":{"capability":"tosca.capabilities.ARTICONF.docker.Orchestrator","node":"kubernetes","relationship":"tosca.relationships.HostedOn"}}],"type":"tosca.nodes.ARTICONF.Container.Application.Docker","artifacts":{"image":{"file":"alogo53/ws-pema-lifewatch","repository":"docker_hub","type":"tosca.artifacts.Deployment.Image.Container.Docker"}}}},"relationship_templates":null,"outputs":null,"groups":null,"substitution_mappings":null,"policies":null},"template_author":null,"template_version":null,"description":"TOSCA example","imports":[{"nodes":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"},{"data":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"},{"capabilities":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"},{"policies":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"},{"interfaces":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"}],"dsl_definitions":null,"node_types":null,"relationship_types":null,"relationship_templates":null,"capability_types":null,"artifact_types":null,"data_types":null,"interface_types":null,"policy_types":null,"group_types":null,"repositories":null}}
{"owner":"user","creationDate":1584702876299,"toscaTemplate":{"tosca_definitions_version":"tosca_simple_yaml_1_0","topology_template":{"node_templates":{"compute":{"properties":{"disk_size":"10000 MB","mem_size":"1000 MB","num_cores":1,"os":"Ubuntu 18.04","user_name":"vm_user"},"interfaces":{"Standard":{"create":"dumy.yaml"}},"type":"tosca.nodes.ARTICONF.VM.Compute"},"compute_1":{"properties":{"disk_size":"10000 MB","mem_size":"1000 MB","num_cores":1,"os":"Ubuntu 18.04","user_name":"vm_user"},"interfaces":{"Standard":{"create":"dumy.yaml"}},"type":"tosca.nodes.ARTICONF.VM.Compute"},"kubernetes":{"requirements":[{"host":{"capability":"tosca.capabilities.ARTICONF.VM.topology","node":"topology","relationship":"tosca.relationships.HostedOn"}}],"interfaces":{"Kubernetes":{"configure":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/dashboard.yaml"}},"create":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/create_k8s.yml"}},"install":{"inputs":{"playbook":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/install_k8s.yml"}}}},"type":"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"},"topology":{"properties":{"domain":"Frankfurt","provider":"EC2"},"requirements":[{"vm":{"capability":"tosca.capabilities.ARTICONF.VM","node":"compute","relationship":"tosca.relationships.DependsOn"}},{"vm":{"capability":"tosca.capabilities.ARTICONF.VM","node":"compute_1","relationship":"tosca.relationships.DependsOn"}}],"interfaces":{"CloudsStorm":{"delete":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"hscale":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"provision":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"start":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}},"stop":{"inputs":{"code_type":"SEQ","object_type":"SubTopology"}}}},"type":"tosca.nodes.ARTICONF.VM.topology","attributes":{"credential":{"cloud_provider_name":"EC2","keys":{"aws_access_key_id":"XXXXXXXXXXXXXXX"},"token":"XXXXXXXXXXXXXXXXX","token_type":"access_key"},"desired_state":"RUNNING"}},"ws-pema":{"properties":{"ports":["30001:8080"]},"requirements":[{"host":{"capability":"tosca.capabilities.ARTICONF.docker.Orchestrator","node":"kubernetes","relationship":"tosca.relationships.HostedOn"}}],"type":"tosca.nodes.ARTICONF.Container.Application.Docker","artifacts":{"image":{"file":"alogo53/ws-pema-lifewatch","repository":"docker_hub","type":"tosca.artifacts.Deployment.Image.Container.Docker"}}}}},"description":"TOSCA example","imports":[{"nodes":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"},{"data":"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"},{"capabilities":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"},{"policies":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"},{"interfaces":"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"}]}}
This diff is collapsed.
......@@ -30,8 +30,7 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import nl.uva.sne.drip.commons.utils.Constants;
import static nl.uva.sne.drip.commons.utils.Constants.CLOUD_STORM_FILES_ZIP_SUXIF;
import static nl.uva.sne.drip.commons.utils.Constants.ENCODED_FILE_DATATYPE;
import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper;
import static nl.uva.sne.drip.commons.utils.ToscaHelper.cloudStormStatus2NodeState;
......@@ -115,41 +114,38 @@ class CloudStormService {
}
public ToscaTemplate execute(boolean dryRun) throws FileNotFoundException, JSchException, IOException, ApiException, Exception {
String tempInputDirPath = System.getProperty("java.io.tmpdir") + File.separator + "Input-" + Long.toString(System.nanoTime()) + File.separator;
File tempInputDir = new File(tempInputDirPath);
if (!(tempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + tempInputDir.getAbsolutePath());
}
String topologyTempInputDirPath = tempInputDirPath + TOPOLOGY_RELATIVE_PATH;
File topologyTempInputDir = new File(topologyTempInputDirPath);
if (!(topologyTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + topologyTempInputDir.getAbsolutePath());
}
Map<String, Object> subTopologiesAndVMs = writeCloudStormTopologyFiles(topologyTempInputDirPath);
String credentialsTempInputDirPath = tempInputDirPath + File.separator + INFS_FOLDER_NAME + File.separator + UC_FOLDER_NAME;
File credentialsTempInputDir = new File(credentialsTempInputDirPath);
if (!(credentialsTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + credentialsTempInputDir.getAbsolutePath());
}
writeCloudStormCredentialsFiles(credentialsTempInputDirPath);
String providersDBTempInputDirPath = tempInputDirPath + File.separator + INFS_FOLDER_NAME + File.separator + UD_FOLDER_NAME;
File providersDBTempInputDir = new File(providersDBTempInputDirPath);
if (!(providersDBTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + providersDBTempInputDir.getAbsolutePath());
boolean hasArtifacts = false;
for (NodeTemplateMap vmTopologyMap : helper.getVMTopologyTemplates()) {
Map<String, Object> provisionedFiles = helper.getNodeArtifact(vmTopologyMap.getNodeTemplate(), "provisioned_files");
if (provisionedFiles != null) {
String fileContentsBase64 = (String) provisionedFiles.get("file_contents");
if (fileContentsBase64 != null) {
File zipFile = new File(tempInputDir.getParent() + File.separator + Long.toString(System.nanoTime()) + "-" + CLOUD_STORM_FILES_ZIP_SUFIX);
Converter.decodeBase64BToFile(fileContentsBase64, zipFile.getAbsolutePath());
Converter.unzipFolder(zipFile.getAbsolutePath(), tempInputDir.getAbsolutePath());
String infrasCodeTempInputDirPath = tempInputDirPath + File.separator + APP_FOLDER_NAME;
File infrasCodeFile = new File(infrasCodeTempInputDirPath + File.separator + INFRASTUCTURE_CODE_FILE_NAME);
CloudsStormInfrasCode cloudsStormInfrasCode = objectMapper.readValue(infrasCodeFile, CloudsStormInfrasCode.class);
Constants.NODE_STATES nodeDesiredState = getHelper().getNodeDesiredState(vmTopologyMap);
OpCode.OperationEnum operation = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
cloudsStormInfrasCode.getInfrasCodes().get(0).getOpCode().setOperation(operation);
objectMapper.writeValue(infrasCodeFile, cloudsStormInfrasCode);
hasArtifacts = true;
break;
}
}
}
writeCloudStormProvidersDBFiles(providersDBTempInputDirPath);
String infrasCodeTempInputDirPath = tempInputDirPath + File.separator + APP_FOLDER_NAME;
File infrasCodeTempInputDir = new File(infrasCodeTempInputDirPath);
if (!(infrasCodeTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + topologyTempInputDir.getAbsolutePath());
if (!hasArtifacts) {
initCloudStormFiles(tempInputDirPath);
}
List<CloudsStormSubTopology> cloudStormSubtopologies = (List<CloudsStormSubTopology>) subTopologiesAndVMs.get("cloud_storm_subtopologies");
writeCloudStormInfrasCodeFiles(infrasCodeTempInputDirPath, cloudStormSubtopologies);
ToscaTemplate newToscaTemplate = runCloudStorm(tempInputDirPath, dryRun);
getHelper().uploadToscaTemplate(newToscaTemplate);
......@@ -407,7 +403,7 @@ class CloudStormService {
Map<String, String> provisionedFiles = new HashMap<>();
provisionedFiles.put("type", ENCODED_FILE_DATATYPE);
File tempInputDirFile = new File(tempInputDirPath);
String zipPath = (tempInputDirFile.getAbsolutePath() + CLOUD_STORM_FILES_ZIP_SUXIF);
String zipPath = (tempInputDirFile.getAbsolutePath() + CLOUD_STORM_FILES_ZIP_SUFIX);
String sourceFolderPath = tempInputDirPath;
Converter.zipFolder(sourceFolderPath, zipPath);
Logger.getLogger(CloudStormService.class.getName()).log(Level.FINE, "Created zip at: {0}", zipPath);
......@@ -489,4 +485,37 @@ class CloudStormService {
i++;
}
private void initCloudStormFiles(String tempInputDirPath) throws FileNotFoundException, IOException, Exception {
String topologyTempInputDirPath = tempInputDirPath + TOPOLOGY_RELATIVE_PATH;
File topologyTempInputDir = new File(topologyTempInputDirPath);
if (!(topologyTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + topologyTempInputDir.getAbsolutePath());
}
Map<String, Object> subTopologiesAndVMs = writeCloudStormTopologyFiles(topologyTempInputDirPath);
String credentialsTempInputDirPath = tempInputDirPath + File.separator + INFS_FOLDER_NAME + File.separator + UC_FOLDER_NAME;
File credentialsTempInputDir = new File(credentialsTempInputDirPath);
if (!(credentialsTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + credentialsTempInputDir.getAbsolutePath());
}
writeCloudStormCredentialsFiles(credentialsTempInputDirPath);
String providersDBTempInputDirPath = tempInputDirPath + File.separator + INFS_FOLDER_NAME + File.separator + UD_FOLDER_NAME;
File providersDBTempInputDir = new File(providersDBTempInputDirPath);
if (!(providersDBTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + providersDBTempInputDir.getAbsolutePath());
}
writeCloudStormProvidersDBFiles(providersDBTempInputDirPath);
String infrasCodeTempInputDirPath = tempInputDirPath + File.separator + APP_FOLDER_NAME;
File infrasCodeTempInputDir = new File(infrasCodeTempInputDirPath);
if (!(infrasCodeTempInputDir.mkdirs())) {
throw new FileNotFoundException("Could not create input directory: " + topologyTempInputDir.getAbsolutePath());
}
List<CloudsStormSubTopology> cloudStormSubtopologies = (List<CloudsStormSubTopology>) subTopologiesAndVMs.get("cloud_storm_subtopologies");
writeCloudStormInfrasCodeFiles(infrasCodeTempInputDirPath, cloudStormSubtopologies);
}
}
......@@ -19,7 +19,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import static nl.uva.sne.drip.commons.utils.Constants.CLOUD_STORM_FILES_ZIP_SUXIF;
import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.model.Message;
......@@ -262,7 +262,7 @@ public class CloudStormServiceTest {
vmTopologyMap = instance.addCloudStromArtifacts(vmTopologyMap, tempInputDirPath);
File tempInputDirFile = new File(tempInputDirPath);
String zipPath = (tempInputDirFile.getAbsolutePath() + CLOUD_STORM_FILES_ZIP_SUXIF);
String zipPath = (tempInputDirFile.getAbsolutePath() + CLOUD_STORM_FILES_ZIP_SUFIX);
File zipFile = new File(zipPath);
assertTrue(zipFile.exists());
......
Mode: "LOCAL"
InfrasCodes:
- CodeType: "SEQ"
OpCode:
Operation: "provision"
ObjectType: "SubTopology"
Objects: "subTopology0"
Log: false
---
userName: "vm_user"
publicKeyPath: "name@id_rsa.pub"
topologies:
- topology: "subTopology0"
cloudProvider: "EC2"
subTopologyClass: null
domain: "Frankfurt"
status: "running"
logsInfo:
vm1#provision: "46122@1584711324847"
subTopology0#Network: "8@1584711392902"
vm1#network: "1@1584711392903"
subTopology0#Provision: "73562@1584711319326"
vm1#deploy: "0@1584711389663"
vm0#deploy: "0@1584711392875"
vm0#network: "0@1584711392903"
vm0#provision: "47480@1584711324847"
sshKeyPairId: "ec2-frankfurt"
scaledFrom: null
connections: null
subnets: null
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQCNt08F5AgExcfuV+jiKGVxw/5mOdfv8JXe/ApEnHZvmUADx5oc
PZxjV3REja3eKVwDeMyMpyGveWRS4gUYcMoQK7rljJ10kVWwG9CWbB7FtruKfuvd
7kPCQKnZ7hysXQuQKFQ9iuh6eVkEbgfkWswSvJ/K3Wc5sKaIbrLlDIdpMwIDAQAB
AoGAadDxEX32OtIPejlr68qsDKmDAIO6aC+lSI27gQWvLZ8pfGkC+olKh6baawG7
TIJncTQ2z+NPtL2YmoantVsqlItn+0iI/iGj7yN5zzi/jKjBPpp2xMnA3iGa8t7i
T41e5v4GCNtcINlG1a8/E04dFOEmq8qr/yPLJQXF5fCNYpECQQDsYecd92Yh6e4w
i/3PVyNr2khZbKZLwo7eMEKv3hcNFGOVlK1hkwA96eO+Powg28Je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SzxYnQI8
IQAgc4agvV/kfKFcC2nINnzo/lEK9gB/ouIglPucArNZc1oFXLbM8amiWsuKmCC1/dIgpyeuH0UI
07hFdfqRoZBFWaxyzbpI14VHZzVvAzI56iCu9nyTY9WmofdRYr8KxyIQHWtjzijyaTjs/WY=
-----END RSA PRIVATE KEY-----
\ No newline at end of file
publicKey-51f85b81-05de-4c84-ae8e-8234ff81d0c9
\ No newline at end of file
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCjchIvD7aRMOPWqvpBEr2Tj9UtZQGjNL8alwRDlwERFB7rEbiQ
ImBBnrCBBLTS2XM/AM9oyG1RAiT+ZSXdCvdElhrfzmWu/wYnyfoQOKU+BV3tqLbm
MLd4/8uqo4LI/7gRqGn+Qc8rmAyXaaEA4ZIe8Nl9Y1jXFeZpD8+42vOUuQIDAQAB
AoGAK46FrAb69zxZK2cLI/ZTkRR+kgdd5Vl0KCjgmQaP4TZEew6Q6dBPaI1aqjdP
3PTYEo0ruNfY0gLJSwY3je2TMUQ40yUAHis/QRwzQapcD2a5v8JdLiXiEgt3QATD
kKckYDQM6OyP5VLjCDQe41XZm8Qb2/7kApYjkTeJGyjy59ECQQD0DUyzKE4AjeRy
5s0kEyDyhjABHG0xwaN8ZSqdcr63oNFtzJ6rvMQ8rJ9sV8in6pkaH5gXxin2xrjV
C/j4+bf9AkEAq3KIZOCMSb8ZcPSoiIEGpnIJjTSXwwzgljd/8z9/DPXibUkPxGD4
wG+QOVaJdotIXiQmMHhugDrjYlJRDbqWbQJALPg2ZdzLYrbCnZmBu1/69jVbqxi9
1ilEIqvRimmWUufDL2RA6IxD7JoyVhhm1OoZhALGV7sgCGTdsgQewGHjUQJBAJSv
a2Iw6vk55dJ0G4TmgOHwnB/9sG/TxyH/V9OZCZIv3AJzDl18y734Atf3GJfaCxS5
vPTkPNCwQWqPgQOrAbECQB+xedIyI2BKUJq8/blHDznDm0d5jytmtxXunmg625EB
fXKn1GWohmWiJcnSV/ZuCgMIUcvxN/gCjqSix3yVpEw=
-----END RSA PRIVATE KEY-----
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCjchIvD7aRMOPWqvpBEr2Tj9UtZQGjNL8alwRDlwERFB7rEbiQImBBnrCBBLTS2XM/AM9oyG1RAiT+ZSXdCvdElhrfzmWu/wYnyfoQOKU+BV3tqLbmMLd4/8uqo4LI/7gRqGn+Qc8rmAyXaaEA4ZIe8Nl9Y1jXFeZpD8+42vOUuQ== generated user accees keys
---
SEngineClass: null
extraInfo: null
WhetherCreateVPC: "true"
VMs:
- name: "vm0"
type: null
diskSize: null
script: null
publicAddress: "3.127.210.184"
selfEthAddresses: null
VEngineClass: null
extraInfo:
AMI: "ami-0b418580298265d5c"
VNFType: null
scaledFrom: null
fake: null
IOPS: "0"
vpcId: "vpc-026d1328c70ed94c8"
subnetId: "subnet-0d30ffac014e1e444"
securityGroupId: "sg-0d80e81c7539de200"
instanceId: "i-04ceeccfb470d5e43"
volumeId: null
routeTableId: "rtb-04d347fa8a98df9ba"
internetGatewayId: "igw-0213d68f2bc6efabd"
nodeType: "t2.micro"
CPU: "1"
mem: "1"
OStype: "Ubuntu 18.04"
DefaultSSHAccount: "ubuntu"
Price: "0.0116"
availability: null
OS_URL: null
OS_GUID: null
- name: "vm1"
type: null
diskSize: null
script: null
publicAddress: "3.120.175.137"
selfEthAddresses: null
VEngineClass: null
extraInfo:
AMI: "ami-0b418580298265d5c"
VNFType: null
scaledFrom: null
fake: null
IOPS: "0"
vpcId: "vpc-026d1328c70ed94c8"
subnetId: "subnet-0d30ffac014e1e444"
securityGroupId: "sg-0d80e81c7539de200"
instanceId: "i-0e1ab567301fe1ec7"
volumeId: null
routeTableId: "rtb-04d347fa8a98df9ba"
internetGatewayId: "igw-0213d68f2bc6efabd"
nodeType: "t2.micro"
CPU: "1"
mem: "1"
OStype: "Ubuntu 18.04"
DefaultSSHAccount: "ubuntu"
Price: "0.0116"
availability: null
OS_URL: null
OS_GUID: null
accessKey: "AKIAILQXXSSEQGQ46KWA"
secretKey: "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"
cloudCreds:
- cloudProvider: "EC2"
credInfoFile: "EC20.yml"
DCMetaInfo:
- domain: "Virginia"
endpoint: "ec2.us-east-1.amazonaws.com"
country: USA
longitude: "78.65 W"
latitude: "37.43 N"
availability: null
VMMetaInfo:
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0058
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-33e4bc49"
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-33e4bc49"
- OS: "Ubuntu 14.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-33e4bc49"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0058
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-41e0b93b"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
- OS: "Ubuntu 16.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-41e0b93b"
- domain: "California"
endpoint: "ec2.us-west-1.amazonaws.com"
country: USA
longitude: "119.42 W"
latitude: "36.78 N"
availability: null
VMMetaInfo:
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0069
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-915f5cf1"
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0138
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-915f5cf1"
- OS: "Ubuntu 14.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0552
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-915f5cf1"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0069
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-79aeae19"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0138
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-79aeae19"
- OS: "Ubuntu 16.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0552
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-79aeae19"
- domain: "Ohio"
endpoint: "ec2.us-east-2.amazonaws.com"
country: USA
longitude: "82.90 W"
latitude: "40.42 N"
availability: null
VMMetaInfo:
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0058
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-f0f8d695"
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-f0f8d695"
- OS: "Ubuntu 14.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-f0f8d695"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0058
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-2581aa40"
- OS: "Ubuntu 16.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-2581aa40"
- OS: "Ubuntu 16.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-2581aa40"
- domain: "Frankfurt"
endpoint: "ec2.eu-central-1.amazonaws.com"
country: Germany
longitude: "50.1109"
latitude: "8.68213"
availability: null
VMMetaInfo:
- OS: "Ubuntu 18.04"
CPU: 1
MEM: 0.5
VMType: "t2.nano"
Price: 0.0058
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
- OS: "Ubuntu 18.04"
CPU: 1
MEM: 1
VMType: "t2.micro"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
- OS: "Ubuntu 18.04"
CPU: 1
MEM: 2
VMType: "t2.small"
Price: 0.0116
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
- OS: "Ubuntu 18.04"
CPU: 2
MEM: 4
VMType: "t2.medium"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
- OS: "Ubuntu 18.04"
CPU: 2
MEM: 8
VMType: "t2.large"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
- OS: "Ubuntu 18.04"
CPU: 4
MEM: 16
VMType: "t2.xlarge"
Price: 0.0464
DefaultSSHAccount: "ubuntu"
extraInfo:
AMI: "ami-0b418580298265d5c"
DCMetaInfo:
- domain: "CESNET"
endpoint: "https://carach5.ics.muni.cz:11443"
country: CZE
longitude: "15.47 E"
latitude: "49.82 N"
availability: null
VMMetaInfo:
- OS: "Ubuntu 14.04"
CPU: 2
MEM: 2
VMType: "medium"
Price: null
DefaultSSHAccount: "ubuntu"
extraInfo:
OS_OCCI_ID: "http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_38d42ca1_f4e9_5b5c_98de_37eb2d26301a_warg_default_shared_218"
RES_OCCI_ID: "http://fedcloud.egi.eu/occi/compute/flavour/1.0#medium"
- OS: "Ubuntu 14.04"
CPU: 8
MEM: 8
VMType: "extra_large"
Price: null
DefaultSSHAccount: "ubuntu"
extraInfo:
OS_OCCI_ID: "http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_38d42ca1_f4e9_5b5c_98de_37eb2d26301a_warg_default_shared_218"
RES_OCCI_ID: "http://schemas.fedcloud.egi.eu/occi/infrastructure/resource_tpl#extra_large"
- OS: "Ubuntu 14.04"
CPU: 1
MEM: 1
VMType: "small"
Price: null
DefaultSSHAccount: "ubuntu"
extraInfo:
OS_OCCI_ID: "http://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#uuid_38d42ca1_f4e9_5b5c_98de_37eb2d26301a_warg_default_shared_218"
RES_OCCI_ID: "http://fedcloud.egi.eu/occi/compute/flavour/1.0#small"
This diff is collapsed.
cloudDBs:
- cloudProvider: "EC2"
dbInfoFile: EC2.yml
- cloudProvider: "ExoGENI"
dbInfoFile: ExoGENI.yml
- cloudProvider: "EGI"
dbInfoFile: EGI.yml
2020-03-20 14:35:19,077 [INFO ] [lambdaExprs.infrasCode.main.ICYAML.loadInfrasCodes] Infrastructure code from /tmp/Input-256701871377403/App/infrasCode.yml is loaded successfully!
2020-03-20 14:35:19,078 [INFO ] [lambdaInfrs.engine.SEngine.EC2SEngine.createAccessSSHKey] There is no ssh key pair for sub-topology 'subTopology0'! Generating!
2020-03-20 14:35:31,298 [INFO ] [lambdaInfrs.engine.VEngine.EC2.EC2VEngine.provision] Get 'i-04ceeccfb470d5e43' <-> 3.127.210.184
2020-03-20 14:35:31,307 [INFO ] [lambdaInfrs.engine.VEngine.EC2.EC2VEngine.provision] Get 'i-0e1ab567301fe1ec7' <-> 3.120.175.137
2020-03-20 14:36:10,962 [INFO ] [lambdaInfrs.engine.VEngine.EC2.EC2VEngine.provision] vm1 (3.120.175.137) is activated!
2020-03-20 14:36:12,326 [INFO ] [lambdaInfrs.engine.VEngine.EC2.EC2VEngine.provision] vm0 (3.127.210.184) is activated!
2020-03-20 14:36:13,597 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > user.pub exitCode: 0
2020-03-20 14:36:14,935 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > user.pub exitCode: 0
2020-03-20 14:36:15,464 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa.pub exitCode: 0
2020-03-20 14:36:17,108 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa.pub exitCode: 0
2020-03-20 14:36:17,240 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa exitCode: 0
2020-03-20 14:36:19,153 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > sshconf.sh && sudo bash sshconf.sh exitCode: 0
2020-03-20 14:36:19,375 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa exitCode: 0
2020-03-20 14:36:21,405 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: rm sshconf.sh exitCode: 0
2020-03-20 14:36:21,917 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > sshconf.sh && sudo bash sshconf.sh exitCode: 0
2020-03-20 14:36:23,028 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > user.pub exitCode: 0
2020-03-20 14:36:24,060 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: rm sshconf.sh exitCode: 0
2020-03-20 14:36:24,686 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa.pub exitCode: 0
2020-03-20 14:36:26,208 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > user.pub exitCode: 0
2020-03-20 14:36:26,408 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa exitCode: 0
2020-03-20 14:36:27,837 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa.pub exitCode: 0
2020-03-20 14:36:28,032 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > sshconf.sh && sudo bash sshconf.sh exitCode: 0
2020-03-20 14:36:29,485 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > id_rsa exitCode: 0
2020-03-20 14:36:29,662 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: rm sshconf.sh exitCode: 0
2020-03-20 14:36:29,663 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.confENV] There is no script needed for 'vm1' to run!
2020-03-20 14:36:31,130 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: cat > sshconf.sh && sudo bash sshconf.sh exitCode: 0
2020-03-20 14:36:32,874 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.execShell] Command: rm sshconf.sh exitCode: 0
2020-03-20 14:36:32,875 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.confENV] There is no script needed for 'vm0' to run!
2020-03-20 14:36:32,886 [INFO ] [lambdaInfrs.engine.SEngine.adapter.SEngine_provision.run] Sub-topology 'subTopology0' has been provisioned!
2020-03-20 14:36:32,899 [INFO ] [topology.description.actual.SubTopology.saveSSHKeys] The key pair 'ec2-frankfurt' has already been stored!
2020-03-20 14:36:32,900 [INFO ] [lambdaInfrs.engine.TEngine.TEngine.connectionConf] Connecting sub-topology 'subTopology0' from 'EC2'
2020-03-20 14:36:32,903 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.confVNF] There is no connection need to be configured for vm0
2020-03-20 14:36:32,903 [INFO ] [lambdaInfrs.engine.VEngine.OS.ubuntu.VEngineUbuntu.confVNF] There is no connection need to be configured for vm1
2020-03-20 14:36:32,910 [INFO ] [topology.description.actual.SubTopology.saveSSHKeys] The key pair 'ec2-frankfurt' has already been stored!
2020-03-20 14:36:32,910 [INFO ] [lambdaInfrs.engine.TEngine.TEngine.provision] All the running sub-topologies have been connected!
2020-03-20 14:36:32,916 [WARN ] [standalone.MainAsTool.main] Finished!
LOGs:
- Time: "1584711392914"
Overhead: "73837"
Event:
Operation: "provision"
Command: null
Options: null
Log: "false"
LogString: null
ObjectType: "SubTopology"
Objects: "subTopology0"
LOG:
vm1#provision: "46122@1584711324847"
subTopology0#Network: "8@1584711392902"
vm1#network: "1@1584711392903"
subTopology0#Provision: "73562@1584711319326"
vm1#deploy: "0@1584711389663"
vm0#deploy: "0@1584711392875"
vm0#network: "0@1584711392903"
vm0#pubIP: "3.127.210.184"
vm0#provision: "47480@1584711324847"
vm1#pubIP: "3.120.175.137"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment