2012-07-13 07:26:16 +00:00
|
|
|
==================
|
|
|
|
Core Configuration
|
|
|
|
==================
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
A number of core configuration options and some options that are global to the
|
|
|
|
VM profiles can be set in the cloud configuration file. By default this file is
|
2012-07-14 12:38:51 +00:00
|
|
|
located at ``/etc/salt/cloud``.
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2014-01-10 18:16:51 +00:00
|
|
|
Thread Pool Size
|
|
|
|
====================
|
|
|
|
|
|
|
|
When salt cloud is operating in parallel mode via the ``-P`` argument, you can
|
2014-01-10 20:26:40 +00:00
|
|
|
control the thread pool size by specifying the ``pool_size`` parameter with
|
2014-01-10 18:16:51 +00:00
|
|
|
a positive integer value.
|
|
|
|
|
|
|
|
By default, the thread pool size will be set to the number of VMs that salt
|
|
|
|
cloud is operating on.
|
|
|
|
|
2014-01-10 18:38:02 +00:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
pool_size: 10
|
|
|
|
|
2013-03-07 21:11:38 +00:00
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
Minion Configuration
|
|
|
|
====================
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
The default minion configuration is set up in this file. This is where the
|
|
|
|
minions that are created derive their configuration from.
|
2012-07-13 07:26:16 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
minion:
|
2013-03-07 21:11:38 +00:00
|
|
|
master: saltmaster.example.com
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
In particular, this is the location to specify the location of the salt master.
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2013-03-07 21:11:38 +00:00
|
|
|
|
2013-04-08 22:01:58 +00:00
|
|
|
New Cloud Configuration Syntax
|
|
|
|
==============================
|
2012-07-13 07:26:16 +00:00
|
|
|
|
|
|
|
The data specific to interacting with public clouds is set up here.
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**ATTENTION**: Since version 0.8.7 a new cloud provider configuration syntax
|
|
|
|
was implemented. It will allow for multiple configurations of the same cloud
|
|
|
|
provider where only minor details can change, for example, the region for an
|
|
|
|
EC2 instance. While the old format is still supported and automatically
|
|
|
|
migrated every time salt-cloud configuration is parsed, a choice was made to
|
2013-04-02 18:25:45 +00:00
|
|
|
warn the user or even exit with an error if both formats are mixed.
|
|
|
|
|
2013-04-08 13:33:28 +00:00
|
|
|
|
|
|
|
Migrating Configurations
|
|
|
|
------------------------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
If you wish to migrate, there are several alternatives. Since the old syntax
|
|
|
|
was mainly done on the main cloud configuration file, see the next before and
|
2013-04-08 13:33:28 +00:00
|
|
|
after migration example.
|
|
|
|
|
|
|
|
* Before migration in ``/etc/salt/cloud``:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
AWS.id: HJGRYCILJLKJYG
|
|
|
|
AWS.key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
AWS.keyname: test
|
|
|
|
AWS.securitygroup: quick-start
|
|
|
|
AWS.private_key: /root/test.pem
|
|
|
|
|
|
|
|
|
|
|
|
* After migration in ``/etc/salt/cloud``:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
providers:
|
|
|
|
my-aws-migrated-config:
|
|
|
|
id: HJGRYCILJLKJYG
|
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: quick-start
|
|
|
|
private_key: /root/test.pem
|
|
|
|
provider: aws
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Notice that it's no longer required to name a cloud provider's configuration
|
|
|
|
after its provider; it can be an alias, though an additional configuration
|
|
|
|
key is added, ``provider``. This allows for multiple configuration for the same
|
2013-04-08 13:33:28 +00:00
|
|
|
cloud provider to coexist.
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
While moving towards an improved and extensible configuration handling
|
|
|
|
regarding the cloud providers, ``--providers-config``, which defaults to
|
|
|
|
``/etc/salt/cloud.providers``, was added to the cli parser. It allows for the
|
|
|
|
cloud providers configuration to be provided in a different file, and/or even
|
|
|
|
any matching file on a sub-directory, ``cloud.providers.d/*.conf`` which is
|
|
|
|
relative to the providers configuration file(with the above configuration file
|
2013-04-02 18:25:45 +00:00
|
|
|
as an example, ``/etc/salt/cloud.providers.d/*.conf``).
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
So, using the example configuration above, after migration in
|
|
|
|
``/etc/salt/cloud.providers`` or
|
2013-04-08 22:01:58 +00:00
|
|
|
``/etc/salt/cloud.providers.d/aws-migrated.conf``:
|
2013-04-08 13:33:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
my-aws-migrated-config:
|
|
|
|
id: HJGRYCILJLKJYG
|
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: quick-start
|
|
|
|
private_key: /root/test.pem
|
|
|
|
provider: aws
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Notice that on this last migrated example, it **no longer** includes the
|
2013-04-08 13:33:28 +00:00
|
|
|
``providers`` starting key.
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
While migrating the cloud providers configuration, if the provider alias (from
|
|
|
|
the above example ``my-aws-migrated-config``) changes from what you had (from
|
|
|
|
the above example ``aws``), you will also need to change the ``provider``
|
2013-04-08 13:33:28 +00:00
|
|
|
configuration key in the defined profiles.
|
|
|
|
|
|
|
|
* From:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
rhel_aws:
|
2013-04-08 22:01:58 +00:00
|
|
|
provider: aws
|
|
|
|
image: ami-e565ba8c
|
|
|
|
size: Micro Instance
|
2013-04-08 13:33:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
* To:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
rhel_aws:
|
2013-04-08 22:01:58 +00:00
|
|
|
provider: my-aws-migrated-config
|
|
|
|
image: ami-e565ba8c
|
|
|
|
size: Micro Instance
|
2013-04-08 13:33:28 +00:00
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
This new configuration syntax even allows you to have multiple cloud
|
2013-04-08 13:33:28 +00:00
|
|
|
configurations under the same alias, for example:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
production-config:
|
|
|
|
- id: HJGRYCILJLKJYG
|
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: quick-start
|
|
|
|
private_key: /root/test.pem
|
|
|
|
|
|
|
|
- user: example_user
|
|
|
|
apikey: 123984bjjas87034
|
|
|
|
provider: rackspace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Notice the dash and indentation on the above example.**
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Having multiple entries for a configuration alias also makes the ``provider``
|
2013-04-08 13:33:28 +00:00
|
|
|
key on any defined profile to change, see the example:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
rhel_aws_dev:
|
|
|
|
provider: production-config:aws
|
|
|
|
image: ami-e565ba8c
|
|
|
|
size: Micro Instance
|
|
|
|
|
|
|
|
rhel_aws_prod:
|
|
|
|
provider: production-config:aws
|
|
|
|
image: ami-e565ba8c
|
|
|
|
size: High-CPU Extra Large Instance
|
|
|
|
|
|
|
|
|
|
|
|
database_prod:
|
|
|
|
provider: production-config:rackspace
|
|
|
|
image: Ubuntu 12.04 LTS
|
|
|
|
size: 256 server
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Notice that because of the multiple entries, one has to be explicit about the
|
2013-04-08 13:33:28 +00:00
|
|
|
provider alias and name, from the above example, ``production-config:aws``.
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
This new syntax also changes the interaction with the ``salt-cloud`` binary.
|
|
|
|
``--list-location``, ``--list-images`` and ``--list-sizes`` which needs a cloud
|
|
|
|
provider as an argument. Since 0.8.7 the argument used should be the configured
|
|
|
|
cloud provider alias. If the provider alias only has a single entry, use
|
|
|
|
``<provider-alias>``. If it has multiple entries,
|
2013-04-08 13:33:28 +00:00
|
|
|
``<provider-alias>:<provider-name>`` should be used.
|
|
|
|
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2013-04-08 22:01:58 +00:00
|
|
|
Cloud Configurations
|
|
|
|
====================
|
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
Rackspace
|
|
|
|
---------
|
|
|
|
|
|
|
|
Rackspace cloud requires two configuration options:
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
* Using the old format:
|
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
RACKSPACE.user: example_user
|
2012-08-02 03:22:38 +00:00
|
|
|
RACKSPACE.apikey: 123984bjjas87034
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-rackspace-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
user: example_user
|
|
|
|
apikey: 123984bjjas87034
|
|
|
|
provider: rackspace
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have ``provider:
|
|
|
|
rackspace-config`` instead of ``provider: rackspace`` on a profile
|
2013-04-02 18:25:45 +00:00
|
|
|
configuration.
|
|
|
|
|
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
Amazon AWS
|
|
|
|
----------
|
|
|
|
|
2012-08-02 03:37:52 +00:00
|
|
|
A number of configuration options are required for Amazon AWS:
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
* Using the old format:
|
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
2012-08-02 03:37:52 +00:00
|
|
|
AWS.id: HJGRYCILJLKJYG
|
2013-01-10 00:22:55 +00:00
|
|
|
AWS.key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
AWS.keyname: test
|
|
|
|
AWS.securitygroup: quick-start
|
|
|
|
AWS.private_key: /root/test.pem
|
2012-07-13 07:26:16 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-aws-quick-start:
|
2013-04-02 18:25:45 +00:00
|
|
|
id: HJGRYCILJLKJYG
|
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: quick-start
|
|
|
|
private_key: /root/test.pem
|
|
|
|
provider: aws
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-aws-default:
|
2013-04-02 18:25:45 +00:00
|
|
|
id: HJGRYCILJLKJYG
|
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: default
|
|
|
|
private_key: /root/test.pem
|
|
|
|
provider: aws
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-aws-quick-start`` or ``provider: my-aws-default`` instead of
|
2013-04-02 18:25:45 +00:00
|
|
|
``provider: aws`` on a profile configuration.
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
|
2012-07-13 07:26:16 +00:00
|
|
|
Linode
|
|
|
|
------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Linode requires a single API key, but the default root password also needs to
|
2013-04-02 18:25:45 +00:00
|
|
|
be set:
|
|
|
|
|
|
|
|
* Using the old format:
|
2012-07-13 07:26:16 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
LINODE.apikey: asldkgfakl;sdfjsjaslfjaklsdjf;askldjfaaklsjdfhasldsadfghdkf
|
|
|
|
LINODE.password: F00barbaz
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-linode-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
apikey: asldkgfakl;sdfjsjaslfjaklsdjf;askldjfaaklsjdfhasldsadfghdkf
|
|
|
|
password: F00barbaz
|
|
|
|
provider: linode
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-linode-config`` instead of ``provider: linode`` on a profile
|
2013-04-06 14:08:24 +00:00
|
|
|
configuration.
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
The password needs to be 8 characters and contain lowercase, uppercase and
|
2012-07-13 07:26:16 +00:00
|
|
|
numbers.
|
2012-08-01 15:25:26 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2012-08-01 15:25:26 +00:00
|
|
|
Joyent Cloud
|
|
|
|
------------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
The Joyent cloud requires three configuration parameters. The username and
|
|
|
|
password that are used to log into the Joyent system, and the location of the
|
|
|
|
private SSH key associated with the Joyent account. The SSH key is needed to
|
|
|
|
send the provisioning commands up to the freshly created virtual machine.
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the old format:
|
2012-08-01 15:25:26 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
JOYENT.user: fred
|
|
|
|
JOYENT.password: saltybacon
|
|
|
|
JOYENT.private_key: /root/joyent.pem
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-joyent-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
user: fred
|
|
|
|
password: saltybacon
|
|
|
|
private_key: /root/joyent.pem
|
|
|
|
provider: joyent
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-joyent-config`` instead of ``provider: joyent`` on a profile
|
2013-04-06 14:08:24 +00:00
|
|
|
configuration.
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
|
2012-08-01 15:25:26 +00:00
|
|
|
GoGrid
|
|
|
|
------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
To use Salt Cloud with GoGrid log into the GoGrid web interface and create an
|
|
|
|
API key. Do this by clicking on "My Account" and then going to the API Keys
|
2013-04-02 18:25:45 +00:00
|
|
|
tab.
|
|
|
|
|
|
|
|
The GOGRID.apikey and the GOGRID.sharedsecret configuration parameters need to
|
|
|
|
be set in the configuration file to enable interfacing with GoGrid:
|
2012-08-01 15:25:26 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
* Using the old format:
|
2012-08-01 15:25:26 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
GOGRID.apikey: asdff7896asdh789
|
|
|
|
GOGRID.sharedsecret: saltybacon
|
2012-11-16 21:50:51 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-gogrid-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
apikey: asdff7896asdh789
|
|
|
|
sharedsecret: saltybacon
|
|
|
|
provider: gogrid
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-gogrid-config`` instead of ``provider: gogrid`` on a profile
|
2013-04-02 18:25:45 +00:00
|
|
|
configuration.
|
|
|
|
|
|
|
|
|
2012-11-16 21:50:51 +00:00
|
|
|
OpenStack
|
|
|
|
---------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
OpenStack configuration differs between providers, and at the moment several
|
|
|
|
options need to be specified. This module has been officially tested against
|
|
|
|
the HP and the Rackspace implementations, and some examples are provided for
|
2012-11-16 21:50:51 +00:00
|
|
|
both.
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
* Using the old format:
|
|
|
|
|
2012-11-16 21:50:51 +00:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# For HP
|
|
|
|
OPENSTACK.identity_url: 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
|
|
|
|
OPENSTACK.compute_name: Compute
|
|
|
|
OPENSTACK.compute_region: 'az-1.region-a.geo-1'
|
|
|
|
OPENSTACK.tenant: myuser-tenant1
|
|
|
|
OPENSTACK.user: myuser
|
|
|
|
OPENSTACK.ssh_key_name: mykey
|
|
|
|
OPENSTACK.ssh_key_file: '/etc/salt/hpcloud/mykey.pem'
|
|
|
|
OPENSTACK.password: mypass
|
|
|
|
|
|
|
|
# For Rackspace
|
|
|
|
OPENSTACK.identity_url: 'https://identity.api.rackspacecloud.com/v2.0/tokens'
|
|
|
|
OPENSTACK.compute_name: cloudServersOpenStack
|
2013-02-28 07:58:11 +00:00
|
|
|
OPENSTACK.protocol: ipv4
|
2012-11-16 21:50:51 +00:00
|
|
|
OPENSTACK.compute_region: DFW
|
2013-02-28 07:58:11 +00:00
|
|
|
OPENSTACK.protocol: ipv4
|
2012-11-16 21:50:51 +00:00
|
|
|
OPENSTACK.user: myuser
|
2013-02-28 07:58:11 +00:00
|
|
|
OPENSTACK.tenant: 5555555
|
2012-11-16 21:50:51 +00:00
|
|
|
OPENSTACK.password: mypass
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
If you have an API key for your provider, it may be specified instead of a
|
2012-11-26 21:14:30 +00:00
|
|
|
password:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
OPENSTACK.apikey: 901d3f579h23c8v73q9
|
2012-11-16 21:50:51 +00:00
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# For HP
|
2013-04-06 14:08:24 +00:00
|
|
|
my-openstack-hp-config:
|
2014-01-10 20:26:40 +00:00
|
|
|
identity_url:
|
2013-04-02 18:25:45 +00:00
|
|
|
'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
|
|
|
|
compute_name: Compute
|
|
|
|
compute_region: 'az-1.region-a.geo-1'
|
|
|
|
tenant: myuser-tenant1
|
|
|
|
user: myuser
|
|
|
|
ssh_key_name: mykey
|
|
|
|
ssh_key_file: '/etc/salt/hpcloud/mykey.pem'
|
|
|
|
password: mypass
|
|
|
|
provider: openstack
|
|
|
|
|
|
|
|
# For Rackspace
|
2013-04-06 14:08:24 +00:00
|
|
|
my-openstack-rackspace-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
identity_url: 'https://identity.api.rackspacecloud.com/v2.0/tokens'
|
|
|
|
compute_name: cloudServersOpenStack
|
|
|
|
protocol: ipv4
|
|
|
|
compute_region: DFW
|
|
|
|
protocol: ipv4
|
|
|
|
user: myuser
|
|
|
|
tenant: 5555555
|
|
|
|
password: mypass
|
|
|
|
provider: openstack
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
If you have an API key for your provider, it may be specified instead of a
|
2013-04-02 18:25:45 +00:00
|
|
|
password:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-openstack-hp-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
apikey: 901d3f579h23c8v73q9
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-openstack-rackspace-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
apikey: 901d3f579h23c8v73q9
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-openstack-hp-config`` or ``provider:
|
|
|
|
my-openstack-rackspace-config`` instead of ``provider: openstack`` on a profile
|
2013-04-06 14:08:24 +00:00
|
|
|
configuration.
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
You will certainly need to configure the ``user``, ``tenant`` and either
|
2013-02-28 07:58:11 +00:00
|
|
|
``password`` or ``apikey``.
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
2013-03-18 08:12:28 +00:00
|
|
|
If your OpenStack instances only have private IP addresses and a CIDR range of
|
|
|
|
private addresses are not reachable from the salt-master, you may set your
|
2013-04-02 18:25:45 +00:00
|
|
|
preference to have Salt ignore it. Using the old could configurations syntax:
|
2013-03-18 08:12:28 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
OPENSTACK.ignore_cidr: 192.168.0.0/16
|
|
|
|
|
|
|
|
|
|
|
|
Using the new syntax:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-openstack-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
ignore_cidr: 192.168.0.0/16
|
|
|
|
|
2013-03-18 08:12:28 +00:00
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
For in-house OpenStack Essex installation, libcloud needs the service_type :
|
2013-09-17 09:49:03 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
my-openstack-config:
|
|
|
|
identity_url: 'http://control.openstack.example.org:5000/v2.0/'
|
|
|
|
compute_name : Compute Service
|
|
|
|
service_type : compute
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-08 23:28:44 +00:00
|
|
|
Digital Ocean
|
|
|
|
-------------
|
|
|
|
|
|
|
|
Using Salt for Digital Ocean requires a client_key and an api_key. These can be
|
|
|
|
found in the Digital Ocean web interface, in the "My Settings" section, under
|
|
|
|
the API Access tab.
|
|
|
|
|
|
|
|
* Using the old format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
DIGITAL_OCEAN.client_key: wFGEwgregeqw3435gDger
|
|
|
|
DIGITAL_OCEAN.api_key: GDE43t43REGTrkilg43934t34qT43t4dgegerGEgg
|
|
|
|
|
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
my-digitalocean-config:
|
2013-11-23 02:57:39 +00:00
|
|
|
provider: digital_ocean
|
2013-04-08 23:28:44 +00:00
|
|
|
client_key: wFGEwgregeqw3435gDger
|
|
|
|
api_key: GDE43t43REGTrkilg43934t34qT43t4dgegerGEgg
|
2013-06-01 20:36:32 +00:00
|
|
|
location: New York 1
|
2013-04-08 23:28:44 +00:00
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
2013-04-08 23:28:44 +00:00
|
|
|
``provider: my-digitalocean-config`` instead of ``provider: digital_ocean`` on a
|
|
|
|
profile configuration.
|
|
|
|
|
|
|
|
|
|
|
|
Parallels
|
|
|
|
---------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Using Salt with Parallels requires a user, password and URL. These can be
|
2013-04-08 23:28:44 +00:00
|
|
|
obtained from your cloud provider.
|
|
|
|
|
|
|
|
* Using the old format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
PARALLELS.user: myuser
|
|
|
|
PARALLELS.password: xyzzy
|
|
|
|
PARALLELS.url: https://api.cloud.xmission.com:4465/paci/v1.0/
|
|
|
|
|
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
my-parallels-config:
|
|
|
|
user: myuser
|
|
|
|
password: xyzzy
|
|
|
|
url: https://api.cloud.xmission.com:4465/paci/v1.0/
|
|
|
|
provider: parallels
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
2013-04-08 23:28:44 +00:00
|
|
|
``provider: my-parallels-config`` instead of ``provider: parallels`` on a
|
|
|
|
profile configuration.
|
|
|
|
|
|
|
|
|
2012-11-16 21:50:51 +00:00
|
|
|
IBM SmartCloud Enterprise
|
|
|
|
-------------------------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
In addition to a username and password, the IBM SCE module requires an SSH key,
|
|
|
|
which is currently configured inside IBM's web interface. A location is also
|
|
|
|
required to create instances, but not to query their cloud. This is important,
|
|
|
|
because you need to use salt-cloud --list-locations (with the other options
|
2012-11-16 21:50:51 +00:00
|
|
|
already set) in order to find the name of the location that you want to use.
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
* Using the old format:
|
|
|
|
|
2012-11-16 21:50:51 +00:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
IBMSCE.user: myuser@mycorp.com
|
|
|
|
IBMSCE.password: mypass
|
|
|
|
IBMSCE.ssh_key_name: mykey
|
|
|
|
IBMSCE.ssh_key_file: '/etc/salt/ibm/mykey.pem'
|
|
|
|
IBMSCE.location: Raleigh
|
|
|
|
|
|
|
|
|
2013-04-02 18:25:45 +00:00
|
|
|
|
|
|
|
* Using the new configuration format:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-ibmsce-config:
|
2013-04-02 18:25:45 +00:00
|
|
|
user: myuser@mycorp.com
|
|
|
|
password: mypass
|
|
|
|
ssh_key_name: mykey
|
|
|
|
ssh_key_file: '/etc/salt/ibm/mykey.pem'
|
|
|
|
location: Raleigh
|
|
|
|
provider: ibmsce
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
**NOTE**: With the new providers configuration syntax you would have
|
|
|
|
``provider: my-imbsce-config`` instead of ``provider: ibmsce`` on a profile
|
2013-04-02 18:25:45 +00:00
|
|
|
configuration.
|
2013-04-05 17:00:30 +00:00
|
|
|
|
|
|
|
|
2013-11-19 19:09:23 +00:00
|
|
|
.. _config_saltify:
|
|
|
|
|
2013-04-08 23:28:44 +00:00
|
|
|
Saltify
|
|
|
|
-------
|
|
|
|
|
|
|
|
The Saltify driver is a new, experimental driver for installing Salt on
|
|
|
|
existing machines (virtual or bare metal). Because it does not use an actual
|
|
|
|
cloud provider, it needs no configuration in the main cloud config file.
|
|
|
|
However, it does still require a profile to be set up, and is most useful when
|
|
|
|
used inside a map file. The key parameters to be set are ``ssh_host``,
|
|
|
|
``ssh_username`` and either ``ssh_keyfile`` or ``ssh_password``. These may all
|
|
|
|
be set in either the profile or the map. An example configuration might use the
|
|
|
|
following in cloud.profiles:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
make_salty:
|
|
|
|
provider: saltify
|
|
|
|
|
|
|
|
And in the map file:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
make_salty:
|
|
|
|
- myinstance:
|
|
|
|
ssh_host: 54.262.11.38
|
|
|
|
ssh_username: ubuntu
|
|
|
|
ssh_keyfile: '/etc/salt/mysshkey.pem'
|
|
|
|
sudo: True
|
|
|
|
|
|
|
|
|
2013-04-05 17:00:30 +00:00
|
|
|
Extending Profiles and Cloud Providers Configuration
|
|
|
|
====================================================
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
As of 0.8.7, the option to extend both the profiles and cloud providers
|
|
|
|
configuration and avoid duplication was added. The extends feature works on the
|
|
|
|
current profiles configuration, but, regarding the cloud providers
|
|
|
|
configuration, **only** works in the new syntax and respective configuration
|
|
|
|
files, i.e. ``/etc/salt/salt/cloud.providers`` or
|
2013-04-05 17:00:30 +00:00
|
|
|
``/etc/salt/cloud.providers.d/*.conf``.
|
|
|
|
|
|
|
|
|
|
|
|
Extending Profiles
|
|
|
|
------------------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Some example usage on how to use ``extends`` with profiles. Consider
|
2013-04-05 17:00:30 +00:00
|
|
|
``/etc/salt/salt/cloud.profiles`` containing:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
development-instances:
|
2013-04-06 14:08:24 +00:00
|
|
|
provider: my-ec2-config
|
2013-04-05 17:00:30 +00:00
|
|
|
size: Micro Instance
|
|
|
|
ssh_username: ec2_user
|
|
|
|
securitygroup:
|
|
|
|
- default
|
|
|
|
deploy: False
|
|
|
|
|
|
|
|
Amazon-Linux-AMI-2012.09-64bit:
|
|
|
|
image: ami-54cf5c3d
|
|
|
|
extends: development-instances
|
|
|
|
|
|
|
|
Fedora-17:
|
|
|
|
image: ami-08d97e61
|
|
|
|
extends: development-instances
|
|
|
|
|
|
|
|
CentOS-5:
|
2013-04-06 14:08:24 +00:00
|
|
|
provider: my-aws-config
|
2013-04-05 17:00:30 +00:00
|
|
|
image: ami-09b61d60
|
|
|
|
extends: development-instances
|
|
|
|
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
The above configuration, once parsed would generate the following profiles
|
2013-04-05 17:00:30 +00:00
|
|
|
data:
|
|
|
|
|
2013-04-06 14:50:20 +00:00
|
|
|
.. code-block:: python
|
2013-04-05 17:00:30 +00:00
|
|
|
|
|
|
|
[{'deploy': False,
|
|
|
|
'image': 'ami-08d97e61',
|
|
|
|
'profile': 'Fedora-17',
|
2013-04-06 14:08:24 +00:00
|
|
|
'provider': 'my-ec2-config',
|
2013-04-05 17:00:30 +00:00
|
|
|
'securitygroup': ['default'],
|
|
|
|
'size': 'Micro Instance',
|
|
|
|
'ssh_username': 'ec2_user'},
|
|
|
|
{'deploy': False,
|
|
|
|
'image': 'ami-09b61d60',
|
|
|
|
'profile': 'CentOS-5',
|
2013-04-06 14:08:24 +00:00
|
|
|
'provider': 'my-aws-config',
|
2013-04-05 17:00:30 +00:00
|
|
|
'securitygroup': ['default'],
|
|
|
|
'size': 'Micro Instance',
|
|
|
|
'ssh_username': 'ec2_user'},
|
|
|
|
{'deploy': False,
|
|
|
|
'image': 'ami-54cf5c3d',
|
|
|
|
'profile': 'Amazon-Linux-AMI-2012.09-64bit',
|
2013-04-06 14:08:24 +00:00
|
|
|
'provider': 'my-ec2-config',
|
2013-04-05 17:00:30 +00:00
|
|
|
'securitygroup': ['default'],
|
|
|
|
'size': 'Micro Instance',
|
|
|
|
'ssh_username': 'ec2_user'},
|
|
|
|
{'deploy': False,
|
|
|
|
'profile': 'development-instances',
|
2013-04-06 14:08:24 +00:00
|
|
|
'provider': 'my-ec2-config',
|
2013-04-05 17:00:30 +00:00
|
|
|
'securitygroup': ['default'],
|
|
|
|
'size': 'Micro Instance',
|
|
|
|
'ssh_username': 'ec2_user'}]
|
|
|
|
|
|
|
|
Pretty cool right?
|
2013-04-05 23:00:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
Extending Providers
|
|
|
|
-------------------
|
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
Some example usage on how to use ``extends`` within the cloud providers
|
2013-04-05 23:00:47 +00:00
|
|
|
configuration. Consider ``/etc/salt/salt/cloud.providers`` containing:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-develop-envs:
|
2013-04-05 23:00:47 +00:00
|
|
|
- id: HJGRYCILJLKJYG
|
2013-04-06 16:21:59 +00:00
|
|
|
key: 'kdjgfsgm;woormgl/aserigjksjdhasdfgn'
|
|
|
|
keyname: test
|
|
|
|
securitygroup: quick-start
|
|
|
|
private_key: /root/test.pem
|
|
|
|
location: ap-southeast-1
|
|
|
|
availability_zone: ap-southeast-1b
|
|
|
|
provider: aws
|
2013-04-05 23:00:47 +00:00
|
|
|
|
|
|
|
- user: myuser@mycorp.com
|
2013-04-06 16:21:59 +00:00
|
|
|
password: mypass
|
|
|
|
ssh_key_name: mykey
|
|
|
|
ssh_key_file: '/etc/salt/ibm/mykey.pem'
|
|
|
|
location: Raleigh
|
|
|
|
provider: ibmsce
|
2013-04-05 23:00:47 +00:00
|
|
|
|
|
|
|
|
2013-04-06 14:08:24 +00:00
|
|
|
my-productions-envs:
|
2013-04-06 14:50:20 +00:00
|
|
|
- extends: my-develop-envs:ibmsce
|
2013-04-05 23:00:47 +00:00
|
|
|
user: my-production-user@mycorp.com
|
|
|
|
location: us-east-1
|
|
|
|
availability_zone: us-east-1
|
|
|
|
|
2013-04-06 14:50:20 +00:00
|
|
|
|
2014-01-10 20:26:40 +00:00
|
|
|
The above configuration, once parsed would generate the following providers
|
2013-04-06 14:50:20 +00:00
|
|
|
data:
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
'providers': {
|
|
|
|
'my-develop-envs': [
|
|
|
|
{'availability_zone': 'ap-southeast-1b',
|
|
|
|
'id': 'HJGRYCILJLKJYG',
|
|
|
|
'key': 'kdjgfsgm;woormgl/aserigjksjdhasdfgn',
|
|
|
|
'keyname': 'test',
|
|
|
|
'location': 'ap-southeast-1',
|
|
|
|
'private_key': '/root/test.pem',
|
|
|
|
'provider': 'aws',
|
|
|
|
'securitygroup': 'quick-start'
|
|
|
|
},
|
|
|
|
{'location': 'Raleigh',
|
|
|
|
'password': 'mypass',
|
|
|
|
'provider': 'ibmsce',
|
|
|
|
'ssh_key_file': '/etc/salt/ibm/mykey.pem',
|
|
|
|
'ssh_key_name': 'mykey',
|
|
|
|
'user': 'myuser@mycorp.com'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
'my-productions-envs': [
|
|
|
|
{'availability_zone': 'us-east-1',
|
|
|
|
'location': 'us-east-1',
|
|
|
|
'password': 'mypass',
|
|
|
|
'provider': 'ibmsce',
|
|
|
|
'ssh_key_file': '/etc/salt/ibm/mykey.pem',
|
|
|
|
'ssh_key_name': 'mykey',
|
|
|
|
'user': 'my-production-user@mycorp.com'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|