OpenStack is one the most popular cloud projects. It's an open source project to build public and/or private clouds. You can use Salt Cloud to launch OpenStack instances.
my-openstack-config: # Set the location of the salt-master # minion: master: saltmaster.example.com # Configure the OpenStack driver # identity_url: http://identity.youopenstack.com/v2.0/tokens compute_name: nova protocol: ipv4 compute_region: RegionOne # Configure Openstack authentication credentials # user: myname password: 123456 # tenant is the project name tenant: myproject driver: openstack # skip SSL certificate validation (default false) insecure: false
Changed in version 2015.8.0.
provider parameter in cloud provider definitions was renamed to
change was made to avoid confusion with the
provider parameter that is used in cloud profile
definitions. Cloud provider definitions now use
driver to refer to the Salt cloud module that
provides the underlying functionality to connect to a cloud host, while cloud profiles continue
provider to refer to provider configurations that you define.
One of the best ways to get information about OpenStack is using the novaclient python package (available in pypi as python-novaclient). The client configuration is a set of environment variables that you can get from the Dashboard. Log in and then go to Project -> Access & security -> API Access and download the "OpenStack RC file". Then:
source /path/to/your/rcfile nova credentials nova endpoints
nova endpoints output you can see the information about
It depends on the OpenStack cluster that you are using. Please, have a look at the previous sections.
password is the same user as is used to log into the
Here is an example of a profile:
openstack_512: provider: my-openstack-config size: m1.tiny image: cirros-0.3.1-x86_64-uec ssh_key_file: /tmp/test.pem ssh_key_name: test ssh_interface: private_ips
The following list explains some of the important properties.
For more information concerning cloud profiles, see here.
If no ssh_key_file is provided, and the server already exists, change_password will use the api to change the root password of the server so that it can be bootstrapped.
Use userdata_file to specify the userdata file to upload for use with cloud-init if available.
my-openstack-config: # Pass userdata to the instance to be created userdata_file: /etc/salt/cloud-init/packages.yml
As of the 2016.11.4 release, this file can be templated. To use templating,
simply specify a
userdata_template option in the cloud profile:
my-openstack-config: # Pass userdata to the instance to be created userdata_file: /etc/salt/cloud-init/packages.yml userdata_template: jinja
userdata_template is set in the cloud profile, then the master
configuration will be checked for a
If this is not set, then no templating will be performed on the
To disable templating in a cloud profile when a
userdata_template has been set in the master configuration
file, simply set
False in the cloud profile:
my-openstack-config: # Pass userdata to the instance to be created userdata_file: /etc/salt/cloud-init/packages.yml userdata_template: False