|
|
@@ -3,7 +3,7 @@ Setup
|
|
|
To initialize a connection to a cloud and get a provider object, you will
|
|
|
need to provide the cloud's access credentials to CloudBridge. For more
|
|
|
details on how to create and find these credentials, see `Procuring Access
|
|
|
-Credentials <procuring_credentials.html>`. Once available, these may be
|
|
|
+Credentials <procuring_credentials.html>`_. Once available, these may be
|
|
|
provided in one of following ways:
|
|
|
|
|
|
1. Environment variables
|
|
|
@@ -18,35 +18,44 @@ The following environment variables must be set, depending on the provider in us
|
|
|
|
|
|
**Amazon**
|
|
|
|
|
|
-===================
|
|
|
-Mandatory variables
|
|
|
-===================
|
|
|
-AWS_ACCESS_KEY
|
|
|
-AWS_SECRET_KEY
|
|
|
-===================
|
|
|
++---------------------+
|
|
|
+| Mandatory variables |
|
|
|
++=====================+
|
|
|
+| AWS_ACCESS_KEY |
|
|
|
++---------------------+
|
|
|
+| AWS_SECRET_KEY |
|
|
|
++---------------------+
|
|
|
|
|
|
|
|
|
**Openstack**
|
|
|
|
|
|
-===================
|
|
|
-Mandatory variables
|
|
|
-===================
|
|
|
-OS_AUTH_URL
|
|
|
-OS_USERNAME
|
|
|
-OS_PASSWORD
|
|
|
-OS_PROJECT_NAME
|
|
|
-OS_REGION_NAME
|
|
|
-===================
|
|
|
-
|
|
|
-=======================
|
|
|
-Optional Variables
|
|
|
-=======================
|
|
|
-NOVA_SERVICE_NAME
|
|
|
-OS_COMPUTE_API_VERSION
|
|
|
-OS_VOLUME_API_VERSION
|
|
|
-OS_STORAGE_URL
|
|
|
-OS_AUTH_TOKEN
|
|
|
-=======================
|
|
|
++---------------------+
|
|
|
+| Mandatory variables |
|
|
|
++=====================+
|
|
|
+| OS_AUTH_URL |
|
|
|
++---------------------+
|
|
|
+| OS_USERNAME |
|
|
|
++---------------------+
|
|
|
+| OS_PASSWORD |
|
|
|
++---------------------+
|
|
|
+| OS_PROJECT_NAME |
|
|
|
++---------------------+
|
|
|
+| OS_REGION_NAME |
|
|
|
++---------------------+
|
|
|
+
|
|
|
++------------------------+
|
|
|
+| Optional Variables |
|
|
|
++========================+
|
|
|
+| NOVA_SERVICE_NAME |
|
|
|
++------------------------+
|
|
|
+| OS_COMPUTE_API_VERSION |
|
|
|
++------------------------+
|
|
|
+| OS_VOLUME_API_VERSION |
|
|
|
++------------------------+
|
|
|
+| OS_STORAGE_URL |
|
|
|
++------------------------+
|
|
|
+| OS_AUTH_TOKEN |
|
|
|
++------------------------+
|
|
|
|
|
|
|
|
|
**Microsoft Azure**
|
|
|
@@ -63,44 +72,52 @@ when initializing the relevant services. This operation similarly requires a
|
|
|
"contributor" or "owner" role.
|
|
|
For more information on roles, see: https://docs.microsoft.com/en-us/azure/role-based-access-control/overview
|
|
|
|
|
|
-======================
|
|
|
-Mandatory variables
|
|
|
-======================
|
|
|
-AZURE_SUBSCRIPTION_ID
|
|
|
-AZURE_CLIENT_ID
|
|
|
-AZURE_SECRET
|
|
|
-AZURE_TENANT
|
|
|
-======================
|
|
|
-
|
|
|
-====================================
|
|
|
-Optional Variables
|
|
|
-====================================
|
|
|
-AZURE_REGION_NAME
|
|
|
-AZURE_RESOURCE_GROUP
|
|
|
-AZURE_STORAGE_ACCOUNT
|
|
|
-AZURE_VM_DEFAULT_USER_NAME
|
|
|
-AZURE_PUBLIC_KEY_STORAGE_TABLE_NAME
|
|
|
-====================================
|
|
|
++-----------------------+
|
|
|
+| Mandatory variables |
|
|
|
++=======================+
|
|
|
+| AZURE_SUBSCRIPTION_ID |
|
|
|
++-----------------------+
|
|
|
+| AZURE_CLIENT_ID |
|
|
|
++-----------------------+
|
|
|
+| AZURE_SECRET |
|
|
|
++-----------------------+
|
|
|
+| AZURE_TENANT |
|
|
|
++-----------------------+
|
|
|
+
|
|
|
++-------------------------------------+
|
|
|
+| Optional Variables |
|
|
|
++=====================================+
|
|
|
+| AZURE_REGION_NAME |
|
|
|
++-------------------------------------+
|
|
|
+| AZURE_RESOURCE_GROUP |
|
|
|
++-------------------------------------+
|
|
|
+| AZURE_STORAGE_ACCOUNT |
|
|
|
++-------------------------------------+
|
|
|
+| AZURE_VM_DEFAULT_USER_NAME |
|
|
|
++-------------------------------------+
|
|
|
+| AZURE_PUBLIC_KEY_STORAGE_TABLE_NAME |
|
|
|
++-------------------------------------+
|
|
|
|
|
|
|
|
|
**Google**
|
|
|
|
|
|
-=======================
|
|
|
-Mandatory variables
|
|
|
-=======================
|
|
|
-GCE_SERVICE_CREDS_FILE
|
|
|
-or
|
|
|
-GCE_SERVICE_CREDS_DICT
|
|
|
-=======================
|
|
|
-
|
|
|
-==================
|
|
|
-Optional Variables
|
|
|
-==================
|
|
|
-GCE_PROJECT_NAME
|
|
|
-GCE_DEFAULT_ZONE
|
|
|
-GCE_REGION_NAME
|
|
|
-==================
|
|
|
-
|
|
|
++------------------------+
|
|
|
+| Mandatory variables |
|
|
|
++========================+
|
|
|
+| GCE_SERVICE_CREDS_FILE |
|
|
|
+| or |
|
|
|
+| GCE_SERVICE_CREDS_DICT |
|
|
|
++------------------------+
|
|
|
+
|
|
|
++--------------------+
|
|
|
+| Optional Variables |
|
|
|
++====================+
|
|
|
+| GCE_PROJECT_NAME |
|
|
|
++--------------------+
|
|
|
+| GCE_DEFAULT_ZONE |
|
|
|
++--------------------+
|
|
|
+| GCE_REGION_NAME |
|
|
|
++--------------------+
|
|
|
|
|
|
Once the environment variables are set, you can create a connection as follows:
|
|
|
|
|
|
@@ -140,37 +157,48 @@ dictionary. These are listed below for each provider.
|
|
|
|
|
|
**CloudBridge**
|
|
|
|
|
|
-==================== ==================
|
|
|
-Variable Description
|
|
|
-==================== ==================
|
|
|
-default_result_limit Number of results that a ``.list()`` method should return.
|
|
|
- Defaults to 50.
|
|
|
-==================== ==================
|
|
|
++----------------------+------------------------------------------------------------+
|
|
|
+| Variable | Description |
|
|
|
++======================+============================================================+
|
|
|
+| default_result_limit | Number of results that a ``.list()`` method should return. |
|
|
|
+| | Defaults to 50. |
|
|
|
++----------------------+------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
**Amazon**
|
|
|
|
|
|
-==================== ==================
|
|
|
-Variable Description
|
|
|
-==================== ==================
|
|
|
-aws_session_token Session key for your AWS account (if using temporary
|
|
|
- credentials).
|
|
|
-ec2_is_secure True to use an SSL connection. Default is ``True``.
|
|
|
-ec2_region_name Default region name. Defaults to ``us-east-1``.
|
|
|
-ec2_region_endpoint Endpoint to use. Default is ``ec2.us-east-1.amazonaws.com``.
|
|
|
-ec2_port EC2 connection port. Does not need to be specified unless
|
|
|
- EC2 service is running on an alternative port.
|
|
|
-ec2_conn_path Connection path. Defaults to ``/``.
|
|
|
-ec2_validate_certs Whether to use SSL certificate verification. Default is
|
|
|
- ``False``.
|
|
|
-s3_is_secure True to use an SSL connection. Default is ``True``.
|
|
|
-s3_host Host connection endpoint. Default is ``s3.amazonaws.com``.
|
|
|
-s3_port Host connection port. Does not need to be specified unless
|
|
|
- S3 service is running on an alternative port.
|
|
|
-s3_conn_path Connection path. Defaults to ``/``.
|
|
|
-s3_validate_certs Whether to use SSL certificate verification. Default is
|
|
|
- ``False``.
|
|
|
-==================== ==================
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| Variable | Description |
|
|
|
++=====================+==============================================================+
|
|
|
+| aws_session_token | Session key for your AWS account (if using temporary |
|
|
|
+| | credentials). |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_is_secure | True to use an SSL connection. Default is ``True``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_region_name | Default region name. Defaults to ``us-east-1``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_region_endpoint | Endpoint to use. Default is ``ec2.us-east-1.amazonaws.com``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_port | EC2 connection port. Does not need to be specified unless |
|
|
|
+| | EC2 service is running on an alternative port. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_conn_path | Connection path. Defaults to ``/``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| ec2_validate_certs | Whether to use SSL certificate verification. Default is |
|
|
|
+| | ``False``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| s3_is_secure | True to use an SSL connection. Default is ``True``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| s3_host | Host connection endpoint. Default is ``s3.amazonaws.com``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| s3_port | Host connection port. Does not need to be specified unless |
|
|
|
+| | S3 service is running on an alternative port. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| s3_conn_path | Connection path. Defaults to ``/``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
+| s3_validate_certs | Whether to use SSL certificate verification. Default is |
|
|
|
+| | ``False``. |
|
|
|
++---------------------+--------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
Providing access credentials in a file
|
|
|
@@ -205,29 +233,35 @@ In addition to the provider specific configuration variables above, there are
|
|
|
some general configuration environment variables that apply to CloudBridge as
|
|
|
a whole
|
|
|
|
|
|
-=========================== ===================================================
|
|
|
-Variable Description
|
|
|
-=========================== ===================================================
|
|
|
-CB_DEBUG Setting ``CB_DEBUG=True`` will cause detailed debug
|
|
|
- output to be printed for each provider (including
|
|
|
- HTTP traces).
|
|
|
-CB_USE_MOCK_PROVIDERS Setting this to ``True`` will cause the CloudBridge
|
|
|
- test suite to use mock drivers when available.
|
|
|
-CB_TEST_PROVIDER Set this value to a valid :class:`.ProviderList`
|
|
|
- value such as ``aws``, to limit tests to that
|
|
|
- provider only.
|
|
|
-CB_DEFAULT_SUBNET_LABEL Name to be used for a subnet that will be
|
|
|
- considered the 'default' by the library. This
|
|
|
- default will be used only in cases there is no
|
|
|
- subnet marked as the default by the provider.
|
|
|
-CB_DEFAULT_NETWORK_LABEL Name to be used for a network that will be
|
|
|
- considered the 'default' by the library. This
|
|
|
- default will be used only in cases there is no
|
|
|
- network marked as the default by the provider.
|
|
|
-CB_DEFAULT_IPV4RANGE The default IPv4 range when creating networks if
|
|
|
- one is not provided. This value is also used in
|
|
|
- tests.
|
|
|
-CB_DEFAULT_SUBNET_IPV4RANGE The default subnet IPv4 range used by CloudBridge
|
|
|
- if one is not specified by the user. Tests do not
|
|
|
- respect this variable.
|
|
|
-=========================== ===================================================
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| Variable | Description |
|
|
|
++=============================+======================================================+
|
|
|
+| CB_DEBUG | Setting ``CB_DEBUG=True`` will cause detailed |
|
|
|
+| | debugoutput to be printed for each provider |
|
|
|
+| | (including HTTP traces). |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_USE_MOCK_PROVIDERS | Setting this to ``True`` will cause the CloudBridge |
|
|
|
+| | test suite to use mock drivers when available. |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_TEST_PROVIDER | Set this value to a valid :class:`.ProviderList` |
|
|
|
+| | value such as ``aws``, to limit tests to that |
|
|
|
+| | provider only. |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_DEFAULT_SUBNET_LABEL | Name to be used for a subnet that will be |
|
|
|
+| | considered the 'default' by the library. This |
|
|
|
+| | default will be used only in cases there is no |
|
|
|
+| | subnet marked as the default by the provider. |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_DEFAULT_NETWORK_LABEL | Name to be used for a network that will be |
|
|
|
+| | considered the 'default' by the library. This |
|
|
|
+| | default will be used only in cases there is no |
|
|
|
+| | network marked as the default by the provider. |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_DEFAULT_IPV4RANGE | The default IPv4 range when creating networks if |
|
|
|
+| | one is not provided. This value is also used in |
|
|
|
+| | tests. |
|
|
|
++-----------------------------+------------------------------------------------------+
|
|
|
+| CB_DEFAULT_SUBNET_IPV4RANGE | The default subnet IPv4 range used by CloudBridge |
|
|
|
+| | if one is not specified by the user. Tests do not |
|
|
|
+| | respect this variable. |
|
|
|
++-----------------------------+------------------------------------------------------+
|