| layout | bt_wiki |
|---|---|
| title | Bootstrapping on Openstack |
| category | Installation |
| publish | true |
| abstract | Tutorial for bootstrapping on Openstack |
| pageord | 300 |
{%summary%} Bootstrapping Cloudify on Openstack is done via Cloudify CLI in the same fashion as any other environment. This section will detail the various parameters appearing in the Openstack-specific configuration file. {%endsummary%}
Run this in a shell from an empty directory:
{% highlight sh %} cfy init openstack {%endhighlight%}
This command will initialize the Cloudify CLI for the current directory, as well as create a Openstack-specific configuration file named cloudify-config.yaml.
Open the configuration file in your favorite editor. This is what you'll see:
{% togglecloak id=1 %}Configuration file template{% endtogglecloak %} {% gcloak 1 %} {% highlight yaml %}
If this field is set to true (default) in any of the components,Cloudify will attempt to use the component if it already exists, and will create it if it does not.
If this field is set to false, Cloudify will only use an existing resource. If it does not exist, bootstrapping will fail.
If using environment variables, you can delete the appropriate entry here, or leave the value empty.
keystone: username: Enter-Openstack-Username-Here password: Enter-Openstack-Password-Here tenant_name: Enter-Openstack-Tenant-Name-Here auth_url: Enter-Openstack-Auth-Url-Here
#######################
#networking:
# URL of the neutron service. If not specified or left empty, the first neutron service available in keystone will be used.
######################## #compute:
# username on management machine which Cloudify will use to bootstrap. The user must already exist on the image.
# An openstack Image ID is usually a hexadecimal string like this one: 8c096c29-a666-4b82-99c4-c77dc70cfb40
##################################
{%endhighlight%} {% endgcloak %}
{%tip title=Tip%}
Most of the parameters don't require changing and are there for flexibility and robustness purposes only. To bootstrap as quickly and easily as possible, You only have to set the following fields:
keystone configuration section (credentials and authentication endpoint)compute configuration sectionimage and flavor fields under the nested computer.management_server.instance configuration sectionFinally, you should verify that the default value of the `networking.ext_network.name` nested field is the name of the external network in the provided region, or change this value accordingly. {%endtip%}
{%note title=Note%}All resources which need to be provisioned on the cloud have a name field in their configuration section. Before a resource is provisioned, There's a check for whether it already exists or not, which is done by name using the value of that name field. If the resource does exist, it'll be used as is, regardless of other definitions under that resource's configuration section which may or may not be true for the existing resource.
For example, if the subnet resource already exists, it'll be used as is even if the cidr field value in the configuration file is not the same as defined in the actual resource in the cloud.{%endnote%}
Information on each individual configuration parameter is provided below, separated according to the configuration sections:
{% togglecloak id=2 %}keystone{% endtogglecloak %} {% gcloak 2 %}
usernameThe username to be used for authenticationpasswordThe password to be used for authenticationtenant_nameThe name of the tenant to useauth_urlThe Openstack Identity ('Keystone') service endpoint URL {% endgcloak %}
{% togglecloak id=3 %}networking{% endtogglecloak %} {% gcloak 3 %}
neutron_supported_regionA flag for whether Neutron (networking) is available in the given Region. If set to False, the rest of the definitions under the 'networking' section will be ignored, and a flat network will be used (this option exists to support legacy Openstack versions e.g. Folsom) (Default:True)neutron_urlThe Openstack Networking ('Neutron') service endpoint URL. If not provided, the first Neutron service available in Keystone will be used.int_networkcreate_if_missingA flag for whether to create the internal management network or raise an error if it doesn't yet exist (Default:True)nameThe name of the internal management network (Default:cloudify-admin-network)
subnetcreate_if_missingA flag for whether to create the subnet on the internal management network or raise an error if it doesn't yet exist (Default:True)nameThe name of the subnet on the internal management network (Default:cloudify-admin-network-subnet)ip_versionThe IP version for the subnet (Default:4)cidrthe subnet's address range (Default:10.67.79.0/24)dns_nameserversA list of DNS servers (Default:[])
ext_networkcreate_if_missingA flag for whether to create the external network or raise an error if it doesn't yet exist (Default:False) Note: Currently, creating the external network is only possible by the cloud admin, meaning it has to be created manually prior to bootstrapping. It is therefore also recommended this property is set to FalsenameThe name of the external network (Default:Ext-Net)
routercreate_if_missingA flag for whether to create the management network router or raise an error if it doesn't yet exist (Default:True)nameThe name of the management network router (Default:cloudify-router)
agents_security_groupcreate_if_missingA flag for whether to create the agents security group or raise an error if it doesn't yet exist (Default:True)nameThe name of the agents security group. This security group will be used by default for all agent machines (Default:cloudify-sg-agents)
management_security_groupcreate_if_missingA flag for whether to create the management security group or raise an error if it doesn't yet exist (Default:True)nameThe name of the management security group. This security group will be used for the management server (Default:cloudify-sg-management)cidrThe address range for the rules of the management security group. The management server will only be available for addresses within this range (Default:0.0.0.0/0) Note: The local machine's address must be within this address range for the bootstrap process to work {% endgcloak %}
{% togglecloak id=4 %}compute{% endtogglecloak %} {% gcloak 4 %}
regionThe region where resources will be provisioned (Default:RegionOne)management_serverfloating_ipA pre-allocated floating IP on the cloud which will be used for the management server. If not provided, a floating IP will be automatically allocated and useduser_on_managementThe username Cloudify will use to bootstrap the management server. The user must already exist on the image (Default:Ubuntu)userhome_on_managementThe home directory of the username provided on the management server (Default:/home/ubuntu)creation_timeoutTimeout (in seconds) for the provisioning of the management server (Default:300)instancenameThe name of the management server (Default:cloudify-management-server)imageThe image ID on the cloud. This is the image for the management serverflavorThe flavor ID on the cloud. This is the flavor for the management server (Default:102) Note: Make sure the flavor used satisfies the minimum requirements for the management server as specified here
management_keypaircreate_if_missingA flag for whether to create the management keypair or raise an error if it doesn't yet exist on Openstack (Default:True)nameThe name of the management keypair. This keypair will be used to authenticate with the management server (Default:cloudify-management-kp)private_key_pathThe local path where the private key file is at or where it will be saved if automatically created. Note: If the key is to be created, this file path must not already exist (Default:~/.ssh/cloudify-management-kp.pem)
agent_serversagents_keypaircreate_if_missingA flag for whether to create the agents keypair or raise an error if it doesn't yet exist on Openstack (Default:True)nameThe name of the agents keypair. This keypair will be used by the management server to authenticate with the agent machines (Default:cloudify-agents-kp)private_key_pathThe local path where the private key file is at or where it will be saved if automatically created. Note: If the key is to be created, this file path must not already exist (Default:~/.ssh/cloudify-agents-kp.pem)
{% endgcloak %}
{% togglecloak id=5 %}cloudify{% endtogglecloak %} {% gcloak 5 %} Since this section is for generic CLI parameters, documentation for these parameters can be found in the CLI guide {% endgcloak %}
Once you're done editing the configuration, run this from within the shell, in the same directory as before:
{% highlight sh %} cfy bootstrap {%endhighlight%}