Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
308 changes: 173 additions & 135 deletions esc/src/main/resources/clouds/ec2/ec2-cloud.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ cloud {
managementMachineTemplate "SMALL_LINUX"
// Optional. Indicates whether internal cluster communications should use the machine private IP. Defaults to true.
connectToPrivateIp true

// Optional. Path to folder where management state will be written. Null indicates state will not be written.
persistentStoragePath persistencePath


}

/*************
Expand Down Expand Up @@ -78,151 +78,189 @@ cloud {
// When used with the default driver, maps to the credential used to create the ComputeServiceContext.
apiKey apiKey
}

cloudStorage {
templates ([
SMALL_BLOCK : storageTemplate{
deleteOnExit true
size 5
path "/storage"
namePrefix "cloudify-storage-volume"
deviceName "/dev/sdc"
fileSystemType "ext4"
custom ([:])
}
])

templates ([

SMALL_BLOCK : storageTemplate{
deleteOnExit true
size 5
path "/storage"
namePrefix "cloudify-storage-volume"
deviceName "/dev/sdc"
fileSystemType "ext4"
custom ([:])
}
])
}

cloudCompute {

/***********
* Cloud machine templates available with this cloud.
*/
templates ([
// Mandatory. Template Name.
SMALL_LINUX : computeTemplate{
// Mandatory. Image ID.
imageId linuxImageId
// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ec2-user/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 1600
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ec2-user"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true



},
SMALL_UBUNTU : computeTemplate{
// Mandatory. Image ID.
imageId ubuntuImageId

// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ubuntu/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 1600
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ubuntu"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true



},

MEDIUM_UBUNTU : computeTemplate{
// Mandatory. Image ID.
imageId ubuntuImageId

// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ubuntu/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 3500
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ubuntu"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true
}


// Mandatory. Template Name.
SMALL_LINUX : computeTemplate{
// Mandatory. Image ID.
imageId linuxImageId
// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ec2-user/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 1600
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ec2-user"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true



},

MEDIUM_LINUX : computeTemplate{
// Mandatory. Image ID.
imageId linuxImageId
// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ec2-user/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 3500
// Mandatory. Hardware ID.
hardwareId "m1.medium"
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ec2-user"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true


},

SMALL_UBUNTU : computeTemplate{
// Mandatory. Image ID.
imageId ubuntuImageId

// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ubuntu/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 1600
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ubuntu"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])

// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true



},

MEDIUM_UBUNTU : computeTemplate{
// Mandatory. Image ID.
imageId ubuntuImageId

// Mandatory. Files from the local directory will be copied to this directory on the remote machine.
remoteDirectory "/home/ubuntu/gs-files"
// Mandatory. Amount of RAM available to machine.
machineMemoryMB 3500
// Mandatory. Hardware ID.
hardwareId hardwareId
// Optional. Location ID.
locationId locationId
// Mandatory. All files from this LOCAL directory will be copied to the remote machine directory.
localDirectory "upload"
// Optional. Name of key file to use for authenticating to the remot machine. Remove this line if key files
// are not used.
keyFile keyFile

username "ubuntu"
// Additional template options.
// When used with the default driver, the option names are considered
// method names invoked on the TemplateOptions object with the value as the parameter.
options ([
"securityGroups" : ["default"]as String[],
"keyPair" : keyPair
])


// Optional. Overrides to default cloud driver behavior.
// When used with the default driver, maps to the overrides properties passed to the ComputeServiceContext a
overrides (["jclouds.ec2.ami-query":"",
"jclouds.ec2.cc-ami-query":""])

// enable sudo.
privileged true
}


])

}

/*****************
* Optional. Custom properties used to extend existing drivers or create new ones.
*/
custom ([
"org.cloudifysource.clearRemoteDirectoryOnStart" : true
"org.cloudifysource.clearRemoteDirectoryOnStart" : true
])
}
}
Loading