IBM SCE is gone, let's get it out of Salt Cloud

This commit is contained in:
Joseph Hall 2014-03-06 19:23:46 -07:00
parent 8c93e21dec
commit e8655a28ad
4 changed files with 132 additions and 530 deletions

View File

@ -553,44 +553,6 @@ obtained from your cloud provider.
profile configuration.
IBM SmartCloud Enterprise
-------------------------
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
already set) in order to find the name of the location that you want to use.
* Using the old format:
.. 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
* Using the new configuration format:
.. code-block:: yaml
my-ibmsce-config:
user: myuser@mycorp.com
password: mypass
ssh_key_name: mykey
ssh_key_file: '/etc/salt/ibm/mykey.pem'
location: Raleigh
provider: ibmsce
**NOTE**: With the new providers configuration syntax you would have
``provider: my-imbsce-config`` instead of ``provider: ibmsce`` on a profile
configuration.
.. _config_lxc:
lxc

View File

@ -34,26 +34,26 @@ Standard Features
=================
These are features that are available for almost every provider.
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
| |AWS |CloudStack|Digital|EC2|GoGrid|IBM|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | |SCE| | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+===+======+======+=========+=========+=========+=======+=========+=========+
|Query |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|Full Query |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|Selective Query |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|List Sizes |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|List Images |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|List Locations |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|create |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|destroy |Yes |Yes |Yes |Yes|Yes |Yes|Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
| |AWS |CloudStack|Digital|EC2|GoGrid|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | | | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+======+======+=========+=========+=========+=======+=========+=========+
|Query |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|Full Query |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|Selective Query |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|List Sizes |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|List Images |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|List Locations |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|create |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes |Yes |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|destroy |Yes |Yes |Yes |Yes|Yes |Yes |Yes |Yes |Yes |Yes | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
Actions
=======
@ -64,46 +64,46 @@ instance name to be passed in. For example:
# salt-cloud -a attach_volume ami.example.com
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|Actions |AWS |CloudStack|Digital|EC2|GoGrid|IBM|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | |SCE| | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+===+======+======+=========+=========+=========+=======+=========+=========+
|attach_volume | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|create_attach_volumes |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|del_tags |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|delvol_on_destroy | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|detach_volume | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|disable_term_protect |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|enable_term_protect |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_tags |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|keepvol_on_destroy | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|list_keypairs | | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|rename |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|set_tags |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_delvol_on_destroy | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_instance | | |Yes |Yes| | | | | |Yes | | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_term_protect | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|start |Yes | | |Yes| | |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|stop |Yes | | |Yes| | |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|take_action | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|Actions |AWS |CloudStack|Digital|EC2|GoGrid|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | | | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+======+======+=========+=========+=========+=======+=========+=========+
|attach_volume | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|create_attach_volumes |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|del_tags |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|delvol_on_destroy | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|detach_volume | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|disable_term_protect |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|enable_term_protect |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_tags |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|keepvol_on_destroy | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|list_keypairs | | |Yes | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|rename |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|set_tags |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_delvol_on_destroy | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_instance | | |Yes |Yes| | | | |Yes | | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_term_protect | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|start |Yes | | |Yes| |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|stop |Yes | | |Yes| |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|take_action | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
Functions
=========
@ -114,76 +114,76 @@ require the name of the provider to be passed in. For example:
# salt-cloud -f list_images my_digitalocean
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|Functions |AWS |CloudStack|Digital|EC2|GoGrid|IBM|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | |SCE| | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+===+======+======+=========+=========+=========+=======+=========+=========+
|block_device_mappings |Yes | | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|create_keypair | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|create_volume | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|delete_key | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|delete_keypair | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|delete_volume | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_image | | |Yes | | | |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_ip | |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_key | |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_keyid | | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_keypair | |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_networkid | |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_node | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_password | |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_size | | |Yes | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_spot_config | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|get_subnetid | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|iam_profile |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|import_key | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|key_list | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|keyname |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|list_availability_zones| | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|list_custom_images | | | | | | | | | | | | |Yes | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|list_keys | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|list_vlans | | | | | | | | | | | | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|rackconnect | | | | | | | | |Yes | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|reboot | | | |Yes| | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|reformat_node | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|securitygroup |Yes | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|securitygroupid | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_image | | | |Yes| | | | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_key | | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_keypair | | |Yes |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
|show_volume | | | |Yes| | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+---+------+------+---------+---------+---------+-------+---------+---------+
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|Functions |AWS |CloudStack|Digital|EC2|GoGrid|JoyEnt|Linode|OpenStack|Parallels|Rackspace|Saltify|Softlayer|Softlayer|
| |(Legacy)| |Ocean | | | | | | |(Legacy) | | |Hardware |
+=======================+========+==========+=======+===+======+======+======+=========+=========+=========+=======+=========+=========+
|block_device_mappings |Yes | | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|create_keypair | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|create_volume | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|delete_key | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|delete_keypair | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|delete_volume | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_image | | |Yes | | |Yes | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_ip | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_key | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_keyid | | |Yes | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_keypair | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_networkid | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_node | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_password | |Yes | | | | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_size | | |Yes | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_spot_config | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|get_subnetid | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|iam_profile |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|import_key | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|key_list | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|keyname |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|list_availability_zones| | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|list_custom_images | | | | | | | | | | | |Yes | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|list_keys | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|list_vlans | | | | | | | | | | | |Yes |Yes |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|rackconnect | | | | | | | |Yes | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|reboot | | | |Yes| |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|reformat_node | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|securitygroup |Yes | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|securitygroupid | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_image | | | |Yes| | | | |Yes | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_key | | | | | |Yes | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_keypair | | |Yes |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+
|show_volume | | | |Yes| | | | | | | | | |
+-----------------------+--------+----------+-------+---+------+------+------+---------+---------+---------+-------+---------+---------+

View File

@ -1,352 +0,0 @@
# -*- coding: utf-8 -*-
'''
IBM SCE Cloud Module
====================
The IBM SCE cloud module. This module interfaces with the IBM SCE public cloud
service. To use Salt Cloud with IBM SCE log into the IBM SCE web interface and
create an SSH key.
Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
``/etc/salt/cloud.providers.d/ibmsce.conf``:
.. code-block:: yaml
my-imbsce-config:
# The generated api key to use
user: myuser@mycompany.com
# The user's password
password: saltybacon
# The name of the ssh key to use
ssh_key_name: mykey
# The ID of the datacenter to use
location: Raleigh
provider: ibmsce
'''
# The import section is mostly libcloud boilerplate
# Import python libs
import copy
import time
import pprint
import logging
# Import libcloud
from libcloud.compute.base import NodeAuthSSHKey
# Import generic libcloud functions
from salt.cloud.libcloudfuncs import * # pylint: disable=W0614,W0401
# Import salt.cloud libs
import salt.config as config
from salt.utils import namespaced_function
from salt.cloud.exceptions import (
SaltCloudConfigError,
SaltCloudSystemExit,
SaltCloudExecutionTimeout,
SaltCloudExecutionFailure
)
# Get logging started
log = logging.getLogger(__name__)
# Some of the libcloud functions need to be in the same namespace as the
# functions defined in the module, so we create new function objects inside
# this module namespace
get_size = namespaced_function(get_size, globals())
get_image = namespaced_function(get_image, globals())
get_location = namespaced_function(get_location, globals())
avail_images = namespaced_function(avail_images, globals())
avail_sizes = namespaced_function(avail_sizes, globals())
avail_locations = namespaced_function(avail_locations, globals())
script = namespaced_function(script, globals())
destroy = namespaced_function(destroy, globals())
list_nodes = namespaced_function(list_nodes, globals())
list_nodes_full = namespaced_function(list_nodes_full, globals())
list_nodes_select = namespaced_function(list_nodes_select, globals())
show_instance = namespaced_function(show_instance, globals())
# Only load in this module is the IBMSCE configurations are in place
def __virtual__():
'''
Set up the libcloud functions and check for RACKSPACE configs
'''
if get_configured_provider() is False:
log.debug(
'There is no IBM SCE cloud provider configuration available. Not '
'loading module.'
)
return False
log.debug('Loading IBM SCE cloud module')
return True
def get_configured_provider():
'''
Return the first configured instance.
'''
return config.is_provider_configured(
__opts__,
__active_provider_name__ or 'ibmsce',
('user', 'password')
)
def get_conn():
'''
Return a conn object for the passed VM data
'''
vm_ = get_configured_provider()
driver = get_driver(Provider.IBM)
return driver(
config.get_cloud_config_value('user', vm_, __opts__, search_global=False),
config.get_cloud_config_value('password', vm_, __opts__, search_global=False)
)
def ssh_interface(vm_):
'''
Return the ssh_interface type to connect to. Either 'public_ips' (default)
or 'private_ips'.
'''
return config.get_cloud_config_value(
'ssh_interface', vm_, __opts__, default='public_ips',
search_global=False
)
def create(vm_):
'''
Create a single VM from a data dict
'''
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
key_filename = config.get_cloud_config_value(
'ssh_key_file', vm_, __opts__, search_global=False, default=None
)
if key_filename is not None and not os.path.isfile(key_filename):
raise SaltCloudConfigError(
'The defined ssh_key_file {0!r} does not exist'.format(
key_filename
)
)
if deploy is True and key_filename is None and \
salt.utils.which('sshpass') is None:
raise SaltCloudSystemExit(
'Cannot deploy salt in a VM if the \'ssh_key_file\' setting '
'is not set and \'sshpass\' binary is not present on the '
'system for the password.'
)
salt.utils.cloud.fire_event(
'event',
'starting create',
'salt/cloud/{0}/creating'.format(vm_['name']),
{
'name': vm_['name'],
'profile': vm_['profile'],
'provider': vm_['provider'],
},
)
log.info('Creating Cloud VM {0}'.format(vm_['name']))
conn = get_conn()
vm_['location'] = config.get_cloud_config_value('location', vm_, __opts__)
kwargs = {
'name': vm_['name'],
'image': get_image(conn, vm_),
'size': get_size(conn, vm_),
'location': get_location(conn, vm_),
'auth': NodeAuthSSHKey(
config.get_cloud_config_value('ssh_key_name', vm_, __opts__)
)
}
log.debug(
'Creating instance on {0} at {1}'.format(
time.strftime('%Y-%m-%d'),
time.strftime('%H:%M:%S')
)
)
salt.utils.cloud.fire_event(
'event',
'requesting instance',
'salt/cloud/{0}/requesting'.format(vm_['name']),
{'kwargs': {'name': kwargs['name'],
'image': kwargs['image'].name,
'size': kwargs['size'].name,
'location': kwargs['location'].name}},
)
try:
data = conn.create_node(**kwargs)
except Exception as exc:
log.error(
'Error creating {0} on IBMSCE\n\n'
'The following exception was thrown by libcloud when trying to '
'run the initial deployment: \n{1}'.format(
vm_['name'], exc
),
# Show the traceback if the debug logging level is enabled
exc_info=log.isEnabledFor(logging.DEBUG)
)
return False
def __query_node_data(vm_name, data):
nodelist = list_nodes()
public_ips = nodelist[vm_name]['public_ips']
private_ips = nodelist[vm_name]['private_ips']
if private_ips:
data.private_ips = private_ips
if public_ips:
data.public_ips = public_ips
if ssh_interface(vm_) == 'private_ips' and private_ips:
return data
if ssh_interface(vm_) == 'public_ips' and public_ips:
return data
try:
data = salt.utils.cloud.wait_for_ip(
__query_node_data,
update_args=(vm_['name'], data),
timeout=config.get_cloud_config_value(
'wait_for_ip_timeout', vm_, __opts__, default=25 * 60),
interval=config.get_cloud_config_value(
'wait_for_ip_interval', vm_, __opts__, default=15),
)
except (SaltCloudExecutionTimeout, SaltCloudExecutionFailure) as exc:
try:
# It might be already up, let's destroy it!
destroy(vm_['name'])
except SaltCloudSystemExit:
pass
finally:
raise SaltCloudSystemExit(exc.message)
ret = {}
if config.get_cloud_config_value('deploy', vm_, __opts__) is True:
deploy_script = script(vm_)
log.debug(
'Deploying {0} using IP address {1}'.format(
vm_['name'],
data.public_ips[0]
)
)
deploy_kwargs = {
'host': data.public_ips[0],
'username': 'idcuser',
'provider': 'ibmsce',
'password': data.extra['password'],
'key_filename': key_filename,
'script': deploy_script.script,
'name': vm_['name'],
'sudo': True,
'start_action': __opts__['start_action'],
'parallel': __opts__['parallel'],
'sock_dir': __opts__['sock_dir'],
'conf_file': __opts__['conf_file'],
'minion_pem': vm_['priv_key'],
'minion_pub': vm_['pub_key'],
'keep_tmp': __opts__['keep_tmp'],
'preseed_minion_keys': vm_.get('preseed_minion_keys', None),
'display_ssh_output': config.get_cloud_config_value(
'display_ssh_output', vm_, __opts__, default=True
),
'script_args': config.get_cloud_config_value(
'script_args', vm_, __opts__
),
'script_env': config.get_cloud_config_value('script_env', vm_, __opts__),
'minion_conf': salt.utils.cloud.minion_config(__opts__, vm_)
}
# Deploy salt-master files, if necessary
if config.get_cloud_config_value('make_master', vm_, __opts__) is True:
deploy_kwargs['make_master'] = True
deploy_kwargs['master_pub'] = vm_['master_pub']
deploy_kwargs['master_pem'] = vm_['master_pem']
master_conf = salt.utils.cloud.master_config(__opts__, vm_)
deploy_kwargs['master_conf'] = master_conf
if master_conf.get('syndic_master', None):
deploy_kwargs['make_syndic'] = True
deploy_kwargs['make_minion'] = config.get_cloud_config_value(
'make_minion', vm_, __opts__, default=True
)
# Check for Windows install params
win_installer = config.get_cloud_config_value('win_installer', vm_, __opts__)
if win_installer:
deploy_kwargs['win_installer'] = win_installer
minion = salt.utils.cloud.minion_config(__opts__, vm_)
deploy_kwargs['master'] = minion['master']
deploy_kwargs['username'] = config.get_cloud_config_value(
'win_username', vm_, __opts__, default='Administrator'
)
deploy_kwargs['password'] = config.get_cloud_config_value(
'win_password', vm_, __opts__, default=''
)
# Store what was used to the deploy the VM
event_kwargs = copy.deepcopy(deploy_kwargs)
del event_kwargs['minion_pem']
del event_kwargs['minion_pub']
if 'password' in event_kwargs:
del event_kwargs['password']
ret['deploy_kwargs'] = event_kwargs
salt.utils.cloud.fire_event(
'event',
'executing deploy script',
'salt/cloud/{0}/deploying'.format(vm_['name']),
{'kwargs': event_kwargs},
)
deployed = False
if win_installer:
deployed = salt.utils.cloud.deploy_windows(**deploy_kwargs)
else:
deployed = salt.utils.cloud.deploy_script(**deploy_kwargs)
if deployed:
log.info('Salt installed on {0}'.format(vm_['name']))
else:
log.error(
'Failed to start Salt on Cloud VM {0}'.format(vm_['name'])
)
ret.update(data)
if 'password' in data.extra:
del data.extra['password']
log.info('Created Cloud VM {0[name]!r}'.format(vm_))
log.debug(
'{0[name]!r} VM creation details:\n{1}'.format(
vm_, pprint.pformat(data.__dict__)
)
)
salt.utils.cloud.fire_event(
'event',
'created instance',
'salt/cloud/{0}/created'.format(vm_['name']),
{
'name': vm_['name'],
'profile': vm_['profile'],
'provider': vm_['provider'],
},
)
return ret

View File

@ -720,14 +720,6 @@ def deploy_script(host, port=22, timeout=900, username='root',
log.debug('Using {0} as the password'.format(password))
kwargs['password'] = password
if provider == 'ibmsce':
subsys_command = (
'sed -i "s/#Subsystem/Subsystem/" '
'/etc/ssh/sshd_config'
)
root_cmd(subsys_command, tty, sudo, **kwargs)
root_cmd('service sshd restart', tty, sudo, **kwargs)
if not remote_exists(tmp_dir):
ret = root_cmd(('sh -c "( mkdir -p \\"{0}\\" &&'
' chmod 700 \\"{0}\\" )"').format(tmp_dir),