Created
June 28, 2013 19:30
-
-
Save tamirko/5887406 to your computer and use it in GitHub Desktop.
Cloudify: openstack cloud driver ( for Cloudify 2.6 )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloud { | |
// Mandatory. The name of the cloud, as it will appear in the Cloudify UI. | |
name = CLOUD_DISPLAY_NAME | |
/******** | |
* General configuration information about the cloud driver implementation. | |
*/ | |
configuration { | |
// Optional. The cloud implementation class. Defaults to the build in jclouds-based provisioning driver. | |
className "org.cloudifysource.esc.driver.provisioning.jclouds.DefaultProvisioningDriver" | |
// Optional. The template name for the management machines. Defaults to the first template in the templates section below. | |
managementMachineTemplate "SMALL_LINUX" | |
// Optional. Indicates whether internal cluster communications should use the machine private IP. Defaults to true. | |
connectToPrivateIp true | |
bootstrapManagementOnPublicIp true | |
// Optional. Path to folder where management state will be written. Null indicates state will not be written. | |
persistentStoragePath persistencePath | |
} | |
/************* | |
* Provider specific information. | |
*/ | |
provider { | |
// Mandatory. The name of the provider. | |
// When using the default cloud driver, maps to the Compute Service Context provider name. | |
provider "openstack-nova" | |
// Optional. The HTTP/S URL where cloudify can be downloaded from by newly started machines. Defaults to downloading the | |
// cloudify version matching that of the client from the cloudify CDN. | |
// Change this if your compute nodes do not have access to an internet connection, or if you prefer to use a | |
// different HTTP server instead. | |
// IMPORTANT: the default linux bootstrap script appends '.tar.gz' to the url whereas the default windows script appends '.zip'. | |
// Therefore, if setting a custom URL, make sure to leave out the suffix. | |
//cloudifyUrl "http://repository.cloudifysource.org/org/cloudifysource/2.6.0-M3/gigaspaces-cloudify-2.6.0-m3-b4983" | |
// Mandatory. The prefix for new machines started for servies. | |
machineNamePrefix AGENT_PREFIX | |
// Optional. Defaults to true. Specifies whether cloudify should try to deploy services on the management machine. | |
// Do not change this unless you know EXACTLY what you are doing. | |
// | |
managementOnlyFiles ([]) | |
// Optional. Logging level for the intenal cloud provider logger. Defaults to INFO. | |
sshLoggingLevel "WARNING" | |
// Mandatory. Name of the new machine/s started as cloudify management machines. Names are case-insensitive. | |
managementGroup MANAGEMENT_PREFIX | |
// Mandatory. Number of management machines to start on bootstrap-cloud. In production, should be 2. Can be 1 for dev. | |
numberOfManagementMachines 1 | |
reservedMemoryCapacityPerMachineInMB 1024 | |
} | |
/************* | |
* Cloud authentication information | |
*/ | |
user { | |
// Optional. Identity used to access cloud. | |
// When used with the default driver, maps to the identity used to create the ComputeServiceContext. | |
user "${tenant}:${user}" | |
// Optional. Key used to access cloud. | |
// When used with the default driver, maps to the credential used to create the ComputeServiceContext. | |
apiKey apiKey | |
} | |
cloudCompute { | |
/*********** | |
* Cloud machine templates available with this cloud. | |
*/ | |
templates ([ | |
// Mandatory. Template Name. | |
SMALL_LINUX : computeTemplate{ | |
// Mandatory. Image ID. | |
imageId currentImageId | |
locationId currLocation | |
// Mandatory. Files from the local directory will be copied to this directory on the remote machine. | |
remoteDirectory "/home/${sshUser}/gs-files" | |
// Mandatory. Amount of RAM available to machine. | |
machineMemoryMB 1600 | |
// Mandatory. Hardware ID. | |
hardwareId hardwareId | |
// 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 | |
//fileTransfer "SCP" | |
username sshUser | |
// 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 ([ | |
"securityGroupNames" : [securityGroup]as String[], | |
"keyPairName" : keyPair, | |
"generateKeyPair": false , | |
"autoAssignFloatingIp" : true | |
]) | |
// 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.endpoint": openstackUrl | |
]) | |
// enable sudo. | |
privileged true | |
/* Disable iptables: Uncomment one of the following if required */ | |
//initializationCommand "sudo service ufw stop" | |
//initializationCommand "sudo service iptables stop" | |
//initializationCommand "/sbin/SuSEfirewall2 off" | |
custom ( | |
/* 192.168.1.170-190 */ | |
["org.cloudifysource.default-cloud-driver.public-ip-cidr": "192.168.1.1/24" , | |
"org.cloudifysource.default-cloud-driver.private-ip-cidr": "10.0.0.0/24" ] | |
) | |
} | |
]) | |
} | |
/***************** | |
* Optional. Custom properties used to extend existing drivers or create new ones. | |
*/ | |
custom ( [:] ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment