Commit 02c5d3a9 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Fixed typos and added deprecated to old api. Added Frankfurt region

parent 3c7bf5b1
...@@ -292,7 +292,7 @@ public class PlannerService { ...@@ -292,7 +292,7 @@ public class PlannerService {
private String getBestDomain(String cloudProvider) { private String getBestDomain(String cloudProvider) {
switch (cloudProvider.trim().toLowerCase()) { switch (cloudProvider.trim().toLowerCase()) {
case "ec2": case "ec2":
return "Virginia"; return "Frankfurt";
case "egi": case "egi":
return "CESNET"; return "CESNET";
} }
......
...@@ -455,7 +455,6 @@ public class ProvisionService { ...@@ -455,7 +455,6 @@ public class ProvisionService {
logger.info("Got provisioner response"); logger.info("Got provisioner response");
return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true); return parseCreateResourcesResponse(response.getParameters(), provisionRequest, null, true, true);
} }
} }
private ProvisionResponse callProvisioner1(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception { private ProvisionResponse callProvisioner1(ProvisionRequest provisionRequest) throws IOException, TimeoutException, JSONException, InterruptedException, Exception {
......
...@@ -51,6 +51,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -51,6 +51,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController @RestController
@RequestMapping("/user/v0.0/switch/account/configure") @RequestMapping("/user/v0.0/switch/account/configure")
@Component @Component
@Deprecated
public class CloudConfigurationController0 { public class CloudConfigurationController0 {
@Autowired @Autowired
......
...@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component; ...@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/** /**
* This controller is responsible for deploying a cluster on provisoned * This controller is responsible for deploying a cluster on provisioned
* resources. * resources.
* *
* @author S. Koulouzis * @author S. Koulouzis
...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RequestMapping("/user/v0.0/switch/deploy") @RequestMapping("/user/v0.0/switch/deploy")
@Component @Component
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@Deprecated
public class DeployController0 { public class DeployController0 {
@Autowired @Autowired
......
...@@ -41,14 +41,15 @@ import org.springframework.http.MediaType; ...@@ -41,14 +41,15 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/** /**
* This controller is responsible for planing the type of resources to be * This controller is responsible for planning the type of resources to be
* provisopned based on a TOSCA description. * provisioned based on a TOSCA description.
* *
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@RestController @RestController
@RequestMapping("/user/v0.0/switch/plan") @RequestMapping("/user/v0.0/switch/plan")
@Component @Component
@Deprecated
public class PlannerController0 { public class PlannerController0 {
@Autowired @Autowired
......
...@@ -61,6 +61,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -61,6 +61,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RequestMapping("/user/v0.0/switch/provision") @RequestMapping("/user/v0.0/switch/provision")
@Component @Component
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@Deprecated
public class ProvisionController0 { public class ProvisionController0 {
@Autowired @Autowired
......
...@@ -43,6 +43,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -43,6 +43,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController @RestController
@RequestMapping("/manager/v0.0/switch/account") @RequestMapping("/manager/v0.0/switch/account")
@Component @Component
@Deprecated
public class UserController0 { public class UserController0 {
@Autowired @Autowired
......
...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController @RestController
@RequestMapping("/user/v0.0/switch/provision") @RequestMapping("/user/v0.0/switch/provision")
@Component @Component
@Deprecated
public class UserPublicKeysController0 { public class UserPublicKeysController0 {
@Autowired @Autowired
......
...@@ -33,13 +33,14 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -33,13 +33,14 @@ import org.springframework.web.bind.annotation.ResponseBody;
/** /**
* This controller is responsible for handling user scripts. These user can be * This controller is responsible for handling user scripts. These user can be
* used by the provisoner to run on the created VMs. * used by the provisioner to run on the created VMs.
* *
* @author S. Koulouzis * @author S. Koulouzis
*/ */
@RestController @RestController
@RequestMapping("/user/v0.0/switch/provision") @RequestMapping("/user/v0.0/switch/provision")
@Component @Component
@Deprecated
public class UserScriptController0 { public class UserScriptController0 {
@Autowired @Autowired
......
...@@ -45,7 +45,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -45,7 +45,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/** /**
* This controller is responsible for deploying a cluster on provisoned * This controller is responsible for deploying a cluster on provisioned
* resources. * resources.
* *
* @author S. Koulouzis * @author S. Koulouzis
......
...@@ -42,8 +42,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -42,8 +42,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/** /**
* This controller is responsible for planing the type of resources to be * This controller is responsible for planning the type of resources to be
* provisopned based on a TOSCA description. * provisioned based on a TOSCA description.
* *
* @author S. Koulouzis * @author S. Koulouzis
*/ */
......
...@@ -72,12 +72,14 @@ def install_prerequisites(vm,return_dict): ...@@ -72,12 +72,14 @@ def install_prerequisites(vm,return_dict):
sftp.chdir('/tmp/') sftp.chdir('/tmp/')
install_script = file_path + "/" + "ansible_setup.sh" install_script = file_path + "/" + "ansible_setup.sh"
sftp.put(install_script, "ansible_setup.sh") sftp.put(install_script, "ansible_setup.sh")
stdin, stdout, stderr = ssh.exec_command("sudo hostname ip-%s" % (vm.ip.replace('.','-'))) stdin, stdout, stderr = ssh.exec_command("sudo hostname ip-%s" % (vm.ip.replace('.','-')))
sshout = stdout.read() sshout = stdout.read()
logger.info("stdout: " + sshout)
logger.info("stderr: " + stderr.read())
stdin, stdout, stderr = ssh.exec_command("sudo sh /tmp/ansible_setup.sh") stdin, stdout, stderr = ssh.exec_command("sudo sh /tmp/ansible_setup.sh")
stdout.read() logger.info("stdout: " + stdout.read())
logger.info("stderr: " + stderr.read())
logger.info("Ansible prerequisites installed on: " + (vm.ip)) logger.info("Ansible prerequisites installed on: " + (vm.ip))
except Exception as e: except Exception as e:
......
...@@ -3,6 +3,8 @@ killall apt ...@@ -3,6 +3,8 @@ killall apt
rm /var/lib/dpkg/lock rm /var/lib/dpkg/lock
dpkg --configure -a dpkg --configure -a
apt-get update apt-get update
apt-get -y upgrade export DEBIAN_FRONTEND=noninteractive
apt-get -o Dpkg::Options::="--force-confold" upgrade -q -y --force-yes
apt-get -y install software-properties-common python openssh-server sudo apt-get -y install software-properties-common python openssh-server sudo
service ssh restart service ssh restart
\ No newline at end of file
...@@ -3,4 +3,7 @@ Ubuntu 14.04&&California&&ami-915f5cf1 ...@@ -3,4 +3,7 @@ Ubuntu 14.04&&California&&ami-915f5cf1
Ubuntu 16.04&&Virginia&&ami-41e0b93b Ubuntu 16.04&&Virginia&&ami-41e0b93b
Ubuntu 16.04&&California&&ami-79aeae19 Ubuntu 16.04&&California&&ami-79aeae19
Ubuntu 16.04&&Ohio&&ami-2581aa40 Ubuntu 16.04&&Ohio&&ami-2581aa40
Ubuntu 14.04&&Ohio&&ami-f0f8d695 Ubuntu 14.04&&Ohio&&ami-f0f8d695
\ No newline at end of file Ubuntu 16.04&&Frankfurt&&ami-af79ebc0
File added
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