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