neulab/tldr huggingface dataset:
media_link This is the URL of the container that will store the disk that this VM uses.  Currently, this container must already exist. If a VM has previously been created in the associated account, a container should already exist. In the web interface, go into the Storage area and click one of the available storage selections. Click the Containers link, and then copy the URL from the container that will be used. It generally looks like:
http://portalvhdabcdefghijklmn.blob.core.windows.net/vhds
service_name The name of the service in which to create the VM. If this is not specified, then a service will be created with the same name as the VM.
virtual_network_name Optional. The name of the virtual network for the VM to join. If this is not specified, then no virtual network will be joined.
subnet_name Optional. The name of the subnet in the virtual network for the VM to join.  Requires that a virtual_network_name is specified.
Show Instance This action is a thin wrapper around --full-query, which displays details on a single instance only. In an environment with several machines, this will save a user from having to sort through all instance data, just to examine a single instance.
salt-cloud -a show_instance myinstance
Destroying VMs There are certain options which can be specified in the global cloud configuration file (usually /etc/salt/cloud) which affect Salt Cloud's behavior when a VM is destroyed.
cleanup_disks New in version 2015.8.0.
Default is False. When set to True, Salt Cloud will wait for the VM to be destroyed, then attempt to destroy the main disk that is associated with the VM.
cleanup_vhds New in version 2015.8.0.
Default is False. Requires cleanup_disks to be set to True. When also set to True, Salt Cloud will ask Azure to delete the VHD associated with the disk that is also destroyed.
cleanup_services New in version 2015.8.0.
Default is False. Requires cleanup_disks to be set to True. When also set to True, Salt Cloud will wait for the disk to be destroyed, then attempt to remove the service that is associated with the VM. Because the disk belongs to the service, the disk must be destroyed before the service can be.
Managing Hosted Services New in version 2015.8.0.
An account can have one or more hosted services. A hosted service is required in order to create a VM. However, as mentioned above, if a hosted service is not specified when a VM is created, then one will automatically be created with the name of the name. The following functions are also available.
create_service Create a hosted service. The following options are available.
name Required. The name of the hosted service to create.
label Required. A label to apply to the hosted service.
description Optional. A longer description of the hosted service.
location Required, if affinity_group is not set. The location in which to create the hosted service. Either the location or the affinity_group must be set, but not both.
affinity_group Required, if location is not set. The affinity group in which to create the hosted service. Either the location or the affinity_group must be set, but not both.
extended_properties Optional. Dictionary containing name/value pairs of hosted service properties.  You can have a maximum of 50 extended property name/value pairs. The maximum length of the Name element is 64 characters, only alphanumeric characters and underscores are valid in the Name, and the name must start with a letter.  The value has a maximum length of 255 characters.
CLI Example The following example illustrates creating a hosted service.
salt-cloud -f create_service my-azure name=my-service label=my-service location='West US'
show_service Return details about a specific hosted service. Can also be called with get_service.
salt-cloud -f show_storage my-azure name=my-service
list_services List all hosted services associates with the subscription.
salt-cloud -f list_services my-azure-config
delete_service Delete a specific hosted service.
salt-cloud -f delete_service my-azure name=my-service
Managing Storage Accounts New in version 2015.8.0.
Salt Cloud can manage storage accounts associated with the account. The following functions are available. Deprecated marked as deprecated are marked as such as per the SDK documentation, but are still included for completeness with the SDK.
create_storage Create a storage account. The following options are supported.
name Required. The name of the storage account to create.
label Required. A label to apply to the storage account.
description Optional. A longer description of the storage account.
location Required, if affinity_group is not set. The location in which to create the storage account. Either the location or the affinity_group must be set, but not both.
affinity_group Required, if location is not set. The affinity group in which to create the storage account. Either the location or the affinity_group must be set, but not both.
extended_properties Optional. Dictionary containing name/value pairs of storage account properties.  You can have a maximum of 50 extended property name/value pairs. The maximum length of the Name element is 64 characters, only alphanumeric characters and underscores are valid in the Name, and the name must start with a letter. The value has a maximum length of 255 characters.
geo_replication_enabled Deprecated. Replaced by the account_type parameter.
account_type Specifies whether the account supports locally-redundant storage, geo-redundant storage, zone-redundant storage, or read access geo-redundant storage. Possible values are:
• Standard_LRS
• Standard_ZRS
• Standard_GRS
• Standard_RAGRS
CLI Example The following example illustrates creating a storage account.
salt-cloud -f create_storage my-azure name=my-storage label=my-storage location='West US'
list_storage List all storage accounts associates with the subscription.
salt-cloud -f list_storage my-azure-config
show_storage Return details about a specific storage account. Can also be called with get_storage.
salt-cloud -f show_storage my-azure name=my-storage
update_storage Update details concerning a storage account. Any of the options available in create_storage can be used, but the name cannot be changed.
salt-cloud -f update_storage my-azure name=my-storage label=my-storage
delete_storage Delete a specific storage account.
salt-cloud -f delete_storage my-azure name=my-storage
show_storage_keys Returns the primary and secondary access keys for the specified storage account.
salt-cloud -f show_storage_keys my-azure name=my-storage
regenerate_storage_keys Regenerate storage account keys. Requires a key_type ("primary" or "secondary") to be specified.
salt-cloud -f regenerate_storage_keys my-azure name=my-storage key_type=primary
Managing Disks New in version 2015.8.0.
When a VM is created, a disk will also be created for it. The following functions are available for managing disks. Deprecated marked as deprecated are marked as such as per the SDK documentation, but are still included for completeness with the SDK.
show_disk Return details about a specific disk. Can also be called with get_disk.
salt-cloud -f show_disk my-azure name=my-disk
list_disks List all disks associates with the account.
salt-cloud -f list_disks my-azure
update_disk Update details for a disk. The following options are available.
name Required. The name of the disk to update.
has_operating_system Deprecated.
label Required. The label for the disk.
media_link Deprecated. The location of the disk in the account, including the storage container that it is in. This should not need to be changed.
new_name Deprecated. If renaming the disk, the new name.
os Deprecated.
CLI Example The following example illustrates updating a disk.
salt-cloud -f update_disk my-azure name=my-disk label=my-disk
delete_disk Delete a specific disk.
salt-cloud -f delete_disk my-azure name=my-disk
Managing Service Certificates New in version 2015.8.0.
Stored at the cloud service level, these certificates are used by your deployed services. For more information on service certificates, see the following link:
• Manage Certificates
The following functions are available.
list_service_certificates List service certificates associated with the account.
salt-cloud -f list_service_certificates my-azure
show_service_certificate Show the data for a specific service certificate associated with the account.  The name, thumbprint, and thumbalgorithm can be obtained from list_service_certificates. Can also be called with get_service_certificate.
salt-cloud -f show_service_certificate my-azure name=my_service_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
add_service_certificate Add a service certificate to the account. This requires that a certificate already exists, which is then added to the account. For more information on creating the certificate itself, see:
• Create a Service Certificate for Azure
The following options are available.
name Required. The name of the hosted service that the certificate will belong to.
data Required. The base-64 encoded form of the pfx file.
certificate_format Required. The service certificate format. The only supported value is pfx.
password The certificate password.
salt-cloud -f add_service_certificate my-azure name=my-cert \ data='...CERT_DATA...' certificate_format=pfx password=verybadpass
delete_service_certificate Delete a service certificate from the account. The name, thumbprint, and thumbalgorithm can be obtained from list_service_certificates.
salt-cloud -f delete_service_certificate my-azure \ name=my_service_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
Managing Management Certificates New in version 2015.8.0.
A Azure management certificate is an X.509 v3 certificate used to authenticate an agent, such as Visual Studio Tools for Windows Azure or a client application that uses the Service Management API, acting on behalf of the subscription owner to manage subscription resources. Azure management certificates are uploaded to Azure and stored at the subscription level. The management certificate store can hold up to 100 certificates per subscription. These certificates are used to authenticate your Windows Azure deployment.
For more information on management certificates, see the following link.
list_management_certificates List management certificates associated with the account.
salt-cloud -f list_management_certificates my-azure
show_management_certificate Show the data for a specific management certificate associated with the account.  The name, thumbprint, and thumbalgorithm can be obtained from list_management_certificates. Can also be called with get_management_certificate.
salt-cloud -f show_management_certificate my-azure name=my_management_certificate \ thumbalgorithm=sha1 thumbprint=0123456789ABCDEF
add_management_certificate Management certificates must have a key length of at least 2048 bits and should reside in the Personal certificate store. When the certificate is installed on the client, it should contain the private key of the certificate. To upload to the certificate to the Microsoft Azure Management Portal, you must export it as a .cer format file that does not contain the private key. For more information on creating management certificates, see the following link:
• Create and Upload a Management Certificate for Azure
public_key A base64 representation of the management certificate public key.
thumbprint The thumb print that uniquely identifies the management certificate.
data The certificate's raw data in base-64 encoded .cer format.
salt-cloud -f add_management_certificate my-azure public_key='...PUBKEY...' \ thumbprint=0123456789ABCDEF data='...CERT_DATA...'
delete_management_certificate Delete a management certificate from the account. The thumbprint can be obtained from list_management_certificates.
salt-cloud -f delete_management_certificate my-azure thumbprint=0123456789ABCDEF
Virtual Network Management New in version 2015.8.0.
The following are functions for managing virtual networks.
list_virtual_networks List input endpoints associated with the deployment.
salt-cloud -f list_virtual_networks my-azure service=myservice deployment=mydeployment
Managing Input Endpoints New in version 2015.8.0.
Input endpoints are used to manage port access for roles. Because endpoints cannot be managed by the Azure Python SDK, Salt Cloud uses the API directly.  With versions of Python before 2.7.9, the requests-python package needs to be installed in order for this to work. Additionally, the following needs to be set in the master's configuration file:
list_input_endpoints List input endpoints associated with the deployment
salt-cloud -f list_input_endpoints my-azure service=myservice deployment=mydeployment
show_input_endpoint Show an input endpoint associated with the deployment
salt-cloud -f show_input_endpoint my-azure service=myservice \ deployment=mydeployment name=SSH
add_input_endpoint Add an input endpoint to the deployment. Please note that there may be a delay before the changes show up. The following options are available.
service Required. The name of the hosted service which the VM belongs to.
deployment Required. The name of the deployment that the VM belongs to. If the VM was created with Salt Cloud, the deployment name probably matches the VM name.
role Required. The name of the role that the VM belongs to. If the VM was created with Salt Cloud, the role name probably matches the VM name.
name Required. The name of the input endpoint. This typically matches the port that the endpoint is set to. For instance, port 22 would be called SSH.
port Required. The public (Internet-facing) port that is used for the endpoint.
local_port Optional. The private port on the VM itself that will be matched with the port.  This is typically the same as the port. If this value is not specified, it will be copied from port.
protocol Required. Either tcp or udp.
enable_direct_server_return Optional. If an internal load balancer exists in the account, it can be used with a direct server return. The default value is False. Please see the following article for an explanation of this option.
• Load Balancing for Azure Infrastructure Services
timeout_for_tcp_idle_connection Optional. The default value is 4. Please see the following article for an explanation of this option.
• Configurable Idle Timeout for Azure Load Balancer
CLI Example The following example illustrates adding an input endpoint.
salt-cloud -f add_input_endpoint my-azure service=myservice \ deployment=mydeployment role=myrole name=HTTP local_port=80 \ port=80 protocol=tcp enable_direct_server_return=False \ timeout_for_tcp_idle_connection=4
update_input_endpoint Updates the details for a specific input endpoint. All options from add_input_endpoint are supported.
salt-cloud -f update_input_endpoint my-azure service=myservice \ deployment=mydeployment role=myrole name=HTTP local_port=80 \ port=80 protocol=tcp enable_direct_server_return=False \ timeout_for_tcp_idle_connection=4
delete_input_endpoint Delete an input endpoint from the deployment. Please note that there may be a delay before the changes show up.  The following items are required.
CLI Example The following example illustrates deleting an input endpoint.
service The name of the hosted service which the VM belongs to.
deployment The name of the deployment that the VM belongs to. If the VM was created with Salt Cloud, the deployment name probably matches the VM name.
role The name of the role that the VM belongs to. If the VM was created with Salt Cloud, the role name probably matches the VM name.
name The name of the input endpoint. This typically matches the port that the endpoint is set to. For instance, port 22 would be called SSH.
salt-cloud -f delete_input_endpoint my-azure service=myservice \ deployment=mydeployment role=myrole name=HTTP
Managing Affinity Groups New in version 2015.8.0.
Affinity groups allow you to group your Azure services to optimize performance.  All services and VMs within an affinity group will be located in the same region. For more information on Affinity groups, see the following link:
• Create an Affinity Group in the Management Portal
list_affinity_groups List input endpoints associated with the account
salt-cloud -f list_affinity_groups my-azure
show_affinity_group Show an affinity group associated with the account
salt-cloud -f show_affinity_group my-azure service=myservice \ deployment=mydeployment name=SSH
create_affinity_group Create a new affinity group. The following options are supported.
name Required. The name of the new affinity group.
location Required. The region in which the affinity group lives.
label Required. A label describing the new affinity group.
description Optional. A longer description of the affinity group.
salt-cloud -f create_affinity_group my-azure name=my_affinity_group \ label=my-affinity-group location='West US'
update_affinity_group Update an affinity group's properties
salt-cloud -f update_affinity_group my-azure name=my_group label=my_group
delete_affinity_group Delete a specific affinity group associated with the account
salt-cloud -f delete_affinity_group my-azure name=my_affinity_group
Managing Blob Storage New in version 2015.8.0.
Azure storage containers and their contents can be managed with Salt Cloud. This is not as elegant as using one of the other available clients in Windows, but it benefits Linux and Unix users, as there are fewer options available on those platforms.
Blob Storage Configuration Blob storage must be configured differently than the standard Azure configuration. Both a storage_account and a storage_key must be specified either through the Azure provider configuration (in addition to the other Azure configuration) or via the command line.
storage_account: mystorage storage_key: ffhj334fDSGFEGDFGFDewr34fwfsFSDFwe==
storage_account This is one of the storage accounts that is available via the list_storage function.
storage_key Both a primary and a secondary storage_key can be obtained by running the show_storage_keys function. Either key may be used.
Blob Functions The following functions are made available through Salt Cloud for managing blog storage.
make_blob_url Creates the URL to access a blob
salt-cloud -f make_blob_url my-azure container=mycontainer blob=myblob
container Name of the container.
blob Name of the blob.
account Name of the storage account. If not specified, derives the host base from the provider configuration.
protocol Protocol to use: 'http' or 'https'. If not specified, derives the host base from the provider configuration.
host_base Live host base URL.  If not specified, derives the host base from the provider configuration.
list_storage_containers List containers associated with the storage account
salt-cloud -f list_storage_containers my-azure
create_storage_container Create a storage container
salt-cloud -f create_storage_container my-azure name=mycontainer
name Name of container to create.
meta_name_values Optional. A dict with name_value pairs to associate with the container as metadata. Example:{'Category':'test'}
blob_public_access Optional. Possible values include: container, blob
fail_on_exist Specify whether to throw an exception when the container exists.
show_storage_container Show a container associated with the storage account
salt-cloud -f show_storage_container my-azure name=myservice
name Name of container to show.
show_storage_container_metadata Show a storage container's metadata
salt-cloud -f show_storage_container_metadata my-azure name=myservice
lease_id If specified, show_storage_container_metadata only succeeds if the container's lease is active and matches this ID.
set_storage_container_metadata Set a storage container's metadata
salt-cloud -f set_storage_container my-azure name=mycontainer \ x_ms_meta_name_values='{"my_name": "my_value"}'
name Name of existing container.  meta_name_values ```````````` A dict containing name, value for metadata.  Example: {'category':'test'} lease_id ```` If specified, set_storage_container_metadata only succeeds if the container's lease is active and matches this ID.
show_storage_container_acl Show a storage container's acl
salt-cloud -f show_storage_container_acl my-azure name=myservice
name Name of existing container.
lease_id If specified, show_storage_container_acl only succeeds if the container's lease is active and matches this ID.
set_storage_container_acl Set a storage container's acl
salt-cloud -f set_storage_container my-azure name=mycontainer
signed_identifiers SignedIdentifers instance
lease_id If specified, set_storage_container_acl only succeeds if the container's lease is active and matches this ID.
delete_storage_container Delete a container associated with the storage account
salt-cloud -f delete_storage_container my-azure name=mycontainer
fail_not_exist Specify whether to throw an exception when the container exists.
lease_id If specified, delete_storage_container only succeeds if the container's lease is active and matches this ID.
lease_storage_container Lease a container associated with the storage account
salt-cloud -f lease_storage_container my-azure name=mycontainer
lease_action Required. Possible values: acquire|renew|release|break|change
lease_id Required if the container has an active lease.
lease_duration Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. For backwards compatibility, the default is 60, and the value is only used on an acquire operation.
lease_break_period Optional. For a break operation, this is the proposed duration of seconds that the lease should continue before it is broken, between 0 and 60 seconds. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately.
proposed_lease_id Optional for acquire, required for change. Proposed lease ID, in a GUID string format.
list_blobs List blobs associated with the container
salt-cloud -f list_blobs my-azure container=mycontainer
container The name of the storage container
prefix Optional. Filters the results to return only blobs whose names begin with the specified prefix.
marker Optional. A string value that identifies the portion of the list to be returned with the next list operation. The operation returns a marker value within the response body if the list returned was not complete. The marker value may then be used in a subsequent call to request the next set of list items. The marker value is opaque to the client.
maxresults Optional. Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not specify maxresults or specifies a value greater than 5,000, the server will return up to 5,000 items. Setting maxresults to a value less than or equal to zero results in error response code 400 (Bad Request).
include Optional. Specifies one or more datasets to include in the response. To specify more than one of these options on the URI, you must separate each option with a comma. Valid values are:
snapshots: Specifies that snapshots should be included in the enumeration. Snapshots are listed from oldest to newest in the response. metadata: Specifies that blob metadata be returned in the response. uncommittedblobs: Specifies that blobs for which blocks have been uploaded, but which have not been committed using Put Block List (REST API), be included in the response. copy: Version 2012-02-12 and newer. Specifies that metadata related to any current or previous Copy Blob operation should be included in the response.
delimiter Optional. When the request includes this parameter, the operation returns a BlobPrefix element in the response body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the delimiter character. The delimiter may be a single character or a string.
show_blob_service_properties Show a blob's service properties
salt-cloud -f show_blob_service_properties my-azure
set_blob_service_properties Sets the properties of a storage account's Blob service, including Windows Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.
salt-cloud -f set_blob_service_properties my-azure
properties a StorageServiceProperties object.
timeout Optional. The timeout parameter is expressed in seconds.
show_blob_properties Returns all user-defined metadata, standard HTTP properties, and system properties for the blob.
salt-cloud -f show_blob_properties my-azure container=mycontainer blob=myblob
container Name of existing container.
blob Name of existing blob.
lease_id Required if the blob has an active lease.
set_blob_properties Set a blob's properties
salt-cloud -f set_blob_properties my-azure
blob_cache_control Optional. Modifies the cache control string for the blob.
blob_content_type Optional. Sets the blob's content type.
blob_content_md5 Optional. Sets the blob's MD5 hash.
blob_content_encoding Optional. Sets the blob's content encoding.
blob_content_language Optional. Sets the blob's content language.
blob_content_disposition Optional. Sets the blob's Content-Disposition header.  The Content-Disposition response header field conveys additional information about how to process the response payload, and also can be used to attach additional metadata. For example, if set to attachment, it indicates that the user-agent should not display the response, but instead show a Save As dialog with a filename other than the blob name specified.
put_blob Upload a blob
salt-cloud -f put_blob my-azure container=base name=top.sls blob_path=/srv/salt/top.sls salt-cloud -f put_blob my-azure container=base name=content.txt blob_content='Some content'
name Name of existing blob.
blob_path The path on the local machine of the file to upload as a blob. Either this or blob_content must be specified.
blob_content The actual content to be uploaded as a blob. Either this or blob_path must me specified.
cache_control Optional. The Blob service stores this value but does not use or modify it.
content_language Optional. Specifies the natural languages used by this resource.
content_md5 Optional. An MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport. When this header is specified, the storage service checks the hash that has arrived with the one that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request).
blob_content_type Optional. Set the blob's content type.
blob_content_encoding Optional. Set the blob's content encoding.
blob_content_language Optional. Set the blob's content language.
blob_content_md5 Optional. Set the blob's MD5 hash.
blob_cache_control Optional. Sets the blob's cache control.
meta_name_values A dict containing name, value for metadata.
get_blob Download a blob
salt-cloud -f get_blob my-azure container=base name=top.sls local_path=/srv/salt/top.sls salt-cloud -f get_blob my-azure container=base name=content.txt return_content=True
local_path The path on the local machine to download the blob to. Either this or return_content must be specified.
return_content Whether or not to return the content directly from the blob. If specified, must be True or False. Either this or the local_path must be specified.
snapshot Optional. The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.
progress_callback callback for progress with signature function(current, total) where current is the number of bytes transferred so far, and total is the size of the blob.
max_connections Maximum number of parallel connections to use when the blob size exceeds 64MB.  Set to 1 to download the blob chunks sequentially.  Set to 2 or more to download the blob chunks in parallel. This uses more system resources but will download faster.
max_retries Number of times to retry download of blob chunk if an error occurs.
retry_wait Sleep time in secs between retries.
Getting Started With Azure ARM New in version 2016.11.0.
Azure is a cloud service by Microsoft providing virtual machines, SQL services, media services, and more. Azure ARM (aka, the Azure Resource Manager) is a next generation version of the Azure portal and API. This document describes how to use Salt Cloud to create a virtual machine on Azure ARM, with Salt installed.
Dependencies • azure >= 2.0.0rc6
• azure-common >= 1.1.4
• azure-mgmt >= 0.30.0rc6
• azure-mgmt-compute >= 0.33.0
• azure-mgmt-network >= 0.30.0rc6
• azure-mgmt-resource >= 0.30.0
• azure-mgmt-storage >= 0.30.0rc6
• azure-mgmt-web >= 0.30.0rc6
• azure-storage >= 0.32.0
• msrestazure >= 0.4.21
Installation Tips Because the azure library requires the cryptography library, which is compiled on-the-fly by pip, you may need to install the development tools for your operating system.
Before you install azure with pip, you should make sure that the required libraries are installed.
Debian For Debian and Ubuntu, the following command will ensure that the required dependencies are installed:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
Red Hat For Fedora and RHEL-derivatives, the following command will ensure that the required dependencies are installed:
sudo yum install gcc libffi-devel python-devel openssl-devel
Configuration Set up the provider config at /etc/salt/cloud.providers.d/azurearm.conf:
# Note: This example is for /etc/salt/cloud.providers.d/azurearm.conf
my-azurearm-config: driver: azurearm master: salt.example.com subscription_id: 01234567-890a-bcde-f012-34567890abdc
# https://apps.dev.microsoft.com/#/appList username: <username>@<subdomain>.onmicrosoft.com password: verybadpass location: westus resource_group: my_rg
# Optional network_resource_group: my_net_rg cleanup_disks: True cleanup_vhds: True cleanup_data_disks: True cleanup_interfaces: True custom_data: 'This is custom data' expire_publisher_cache: 604800  # 7 days expire_offer_cache: 518400  # 6 days expire_sku_cache: 432000  # 5 days expire_version_cache: 345600  # 4 days expire_group_cache: 14400  # 4 hours expire_interface_cache: 3600  # 1 hour expire_network_cache: 3600  # 1 hour
azure-ubuntu-pass: provider: my-azure-config image: Canonical|UbuntuServer|14.04.5-LTS|14.04.201612050 size: Standard_D1_v2 location: eastus ssh_username: azureuser ssh_password: verybadpass
azure-ubuntu-key: provider: my-azure-config image: Canonical|UbuntuServer|14.04.5-LTS|14.04.201612050 size: Standard_D1_v2 location: eastus ssh_username: azureuser ssh_publickeyfile: /path/to/ssh_public_key.pub
azure-win2012: provider: my-azure-config image: MicrosoftWindowsServer|WindowsServer|2012-R2-Datacenter|latest size: Standard_D1_v2 location: westus win_username: azureuser win_password: verybadpass
Profile Options The following options are currently available for Azure ARM.
image Required. The name of the image to use to create a VM. Available images can be viewed using the following command:
As you will see in --list-images, image names are comprised of the following fields, separated by the pipe (|) character:
publisher: For example, Canonical or MicrosoftWindowsServer offer: For example, UbuntuServer or WindowsServer sku: Such as 14.04.5-LTS or 2012-R2-Datacenter version: Such as 14.04.201612050 or latest
It is possible to specify the URL or resource ID path of a custom image that you have access to, such as:
https://<mystorage>.blob.core.windows.net/system/Microsoft.Compute/Images/<mystorage>/template-osDisk.01234567-890a-bcdef0123-4567890abcde.vhd
/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/myRG/providers/Microsoft.Compute/images/myImage
size Required. The name of the size to use to create a VM. Available sizes can be viewed using the following command:
location Required. The name of the location to create a VM in. Available locations can be viewed using the following command:
ssh_username Required for Linux. The admin user to add on the instance. It is also used to log into the newly-created VM to install Salt.
ssh_keyfile Required if using SSH key authentication. The path on the Salt master to the SSH private key used during the minion bootstrap process.
ssh_publickeyfile Use either ssh_publickeyfile or ssh_password. The path on the Salt master to the SSH public key which will be pushed to the Linux VM.
ssh_password Use either ssh_publickeyfile or ssh_password. The password for the admin user on the newly-created Linux virtual machine.
win_username Required for Windows. The user to use to log into the newly-created Windows VM to install Salt.
win_password Required for Windows. The password to use to log into the newly-created Windows VM to install Salt.
win_installer Required for Windows. The path to the Salt installer to be uploaded.
resource_group Required. The resource group that all VM resources (VM, network interfaces, etc) will be created in.
network_resource_group Optional. If specified, then the VM will be connected to the virtual network in this resource group, rather than the parent resource group of the instance.  The VM interfaces and IPs will remain in the configured resource_group with the VM.
network Required. The virtual network that the VM will be spun up in.
subnet Optional. The subnet inside the virtual network that the VM will be spun up in.  Default is default.
allocate_public_ip Optional. Default is False. If set to True, a public IP will be created and assigned to the VM.
load_balancer Optional. The load-balancer for the VM's network interface to join. If specified the backend_pool option need to be set.
backend_pool Optional. Required if the load_balancer option is set. The load-balancer's Backend Pool the VM's network interface will join.
iface_name Optional. The name to apply to the VM's network interface. If not supplied, the value will be set to <VM name>-iface0.
dns_servers Optional. A list of the DNS servers to configure for the network interface (will be set on the VM by the DHCP of the VNET).
my-azurearm-profile: provider: azurearm-provider network: mynetwork dns_servers: - 10.1.1.4 - 10.1.1.5
availability_set Optional. If set, the VM will be added to the specified availability set.
volumes Optional. A list of dictionaries describing data disks to attach to the instance can be specified using this setting. The data disk dictionaries are passed entirely to the Azure DataDisk object, so ad-hoc options can be handled as long as they are valid properties of the object.
volumes: - disk_size_gb: 50 caching: ReadWrite - disk_size_gb: 100 caching: ReadWrite managed_disk: storage_account_type: Standard_LRS
cleanup_disks Optional. Default is False. If set to True, disks will be cleaned up when the VM that they belong to is deleted.
cleanup_vhds Optional. Default is False. If set to True, VHDs will be cleaned up when the VM and disk that they belong to are deleted. Requires cleanup_disks to be set to True.
cleanup_data_disks Optional. Default is False. If set to True, data disks (non-root volumes) will be cleaned up whtn the VM that they are attached to is deleted. Requires cleanup_disks to be set to True.
cleanup_interfaces Optional. Default is False. Normally when a VM is deleted, its associated interfaces and IPs are retained. This is useful if you expect the deleted VM to be recreated with the same name and network settings. If you would like interfaces and IPs to be deleted when their associated VM is deleted, set this to True.
userdata Optional. Any custom cloud data that needs to be specified. How this data is used depends on the operating system and image that is used. For instance, Linux images that use cloud-init will import this data for use with that program. Some Windows images will create a file with a copy of this data, and others will ignore it. If a Windows image creates a file, then the location will depend upon the version of Windows. This will be ignored if the userdata_file is specified.
userdata_file Optional. The path to a file to be read and submitted to Azure as user data.  How this is used depends on the operating system that is being deployed. If used, any userdata setting will be ignored.
userdata_sendkeys Optional. Set to True in order to generate salt minion keys and provide them as variables to the userdata script when running it through the template renderer. The keys can be referenced as {{opts['priv_key']}} and {{opts['pub_key']}}.
userdata_template Optional. Enter the renderer, such as jinja, to be used for the userdata script template.
wait_for_ip_timeout Optional. Default is 600. When waiting for a VM to be created, Salt Cloud will attempt to connect to the VM's IP address until it starts responding. This setting specifies the maximum time to wait for a response.
wait_for_ip_interval Optional. Default is 10. How long to wait between attempts to connect to the VM's IP.
wait_for_ip_interval_multiplier Optional. Default is 1. Increase the interval by this multiplier after each request; helps with throttling.
expire_publisher_cache Optional. Default is 604800. When fetching image data using --list-images, a number of web calls need to be made to the Azure ARM API.  This is normally very fast when performed using a VM that exists inside Azure itself, but can be very slow when made from an external connection.
By default, the publisher data will be cached, and only updated every 604800 seconds (7 days). If you need the publisher cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the publisher cache.
expire_offer_cache Optional. Default is 518400. See expire_publisher_cache for details on why this exists.
By default, the offer data will be cached, and only updated every 518400 seconds (6 days). If you need the offer cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the publiser cache.
expire_sku_cache Optional. Default is 432000. See expire_publisher_cache for details on why this exists.
By default, the sku data will be cached, and only updated every 432000 seconds (5 days). If you need the sku cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the sku cache.
expire_version_cache Optional. Default is 345600. See expire_publisher_cache for details on why this exists.
By default, the version data will be cached, and only updated every 345600 seconds (4 days). If you need the version cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the version cache.
expire_group_cache Optional. Default is 14400. See expire_publisher_cache for details on why this exists.
By default, the resource group data will be cached, and only updated every 14400 seconds (4 hours). If you need the resource group cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the resource group cache.
expire_interface_cache Optional. Default is 3600. See expire_publisher_cache for details on why this exists.
By default, the interface data will be cached, and only updated every 3600 seconds (1 hour). If you need the interface cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the interface cache.
expire_network_cache Optional. Default is 3600. See expire_publisher_cache for details on why this exists.
By default, the network data will be cached, and only updated every 3600 seconds (1 hour). If you need the network cache to be updated at a different frequency, change this setting. Setting it to 0 will turn off the network cache.
Other Options Other options relevant to Azure ARM.
storage_account Required for actions involving an Azure storage account.
storage_key Required for actions involving an Azure storage account.
Getting Started with CloudStack CloudStack 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 CloudStack instances.
Dependencies • Libcloud >= 0.13.2
Configuration Using Salt for CloudStack, requires an API key and a secret key along with the API address endpoint information.
exoscale: driver: cloudstack host: api.exoscale.com path: /compute apikey: EXOAPIKEY secretkey: EXOSECRETKEYINYOURACCOUNT
exoscale-ubuntu: provider: exoscale-config image: Linux Ubuntu 18.04 size: Small location: ch-gva-2 ssh_username: ubuntu
# salt-cloud --list-locations exoscale-config exoscale: ---------- cloudstack: ---------- ch-dk-2: ---------- country: Unknown driver: id: 91e5e9e4-c9ed-4b76-bee4-427004b3baf9 name: ch-dk-2 ch-gva-2: ---------- country: Unknown driver: id: 1128bd56-b4d9-4ac6-a7b9-c715b187ce11 name: ch-gva-2
# salt-cloud --list-sizes exoscale exoscale: ---------- cloudstack: ---------- Extra-large: ---------- bandwidth: 0 disk: 0 driver: extra: ---------- cpu: 4 get_uuid: id: 350dc5ea-fe6d-42ba-b6c0-efb8b75617ad name: Extra-large price: 0 ram: 16384 uuid: edb4cd4ae14bbf152d451b30c4b417ab095a5bfe ...SNIP...
# salt-cloud --list-images exoscale exoscale: ---------- cloudstack: ---------- Linux CentOS 6.6 64-bit: ---------- driver: extra: ---------- displaytext: Linux CentOS 6.6 64-bit 10G Disk (2014-12-01-bac8e0) format: QCOW2 hypervisor: KVM os: Other PV (64-bit) size: 10737418240 get_uuid: id: aa69ae64-1ea9-40af-8824-c2c3344e8d7c name: Linux CentOS 6.6 64-bit uuid: f26b4f54ec8591abdb6b5feb3b58f720aa438fee ...SNIP...
CloudStack specific settings securitygroup New in version 2017.7.0.
You can specify a list of security groups (by name or id) that should be assigned to the VM:
exoscale: provider: cloudstack securitygroup: - default - salt-master
Getting Started With DigitalOcean DigitalOcean is a public cloud host that specializes in Linux instances.
Configuration Using Salt for DigitalOcean requires a personal_access_token, an ssh_key_file, and at least one SSH key name in ssh_key_names. More ssh_key_names can be added by separating each key with a comma. The personal_access_token can be found in the DigitalOcean web interface in the "Apps & API" section. The SSH key name can be found under the "SSH Keys" section.
my-digitalocean-config: driver: digitalocean personal_access_token: xxx ssh_key_file: /path/to/ssh/key/file ssh_key_names: my-key-name,my-key-name-2 location: New York 1
digitalocean-ubuntu: provider: my-digitalocean-config image: 14.04 x64 size: 512MB location: New York 1 private_networking: True backups_enabled: True ipv6: True create_dns_record: True userdata_file: /etc/salt/cloud.userdata.d/setup tags: - tag1 - tag2 - tag3
# salt-cloud --list-locations my-digitalocean-config my-digitalocean-config: ---------- digitalocean: ---------- Amsterdam 1: ---------- available: False features: [u'backups'] name: Amsterdam 1 sizes: [] slug: ams1 ...SNIP...
# salt-cloud --list-sizes my-digitalocean-config my-digitalocean-config: ---------- digitalocean: ---------- 512MB: ---------- cost_per_hour: 0.00744 cost_per_month: 5.0 cpu: 1 disk: 20 id: 66 memory: 512 name: 512MB slug: None ...SNIP...
# salt-cloud --list-images my-digitalocean-config my-digitalocean-config: ---------- digitalocean: ---------- 10.1: ---------- created_at: 2015-01-20T20:04:34Z distribution: FreeBSD id: 10144573 min_disk_size: 20 name: 10.1 public: True ...SNIP...
Profile Specifics: ssh_username If using a FreeBSD image from DigitalOcean, you'll need to set the ssh_username setting to freebsd in your profile configuration.
digitalocean-freebsd: provider: my-digitalocean-config image: 10.2 size: 512MB ssh_username: freebsd
userdata_file New in version 2016.11.6.
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
my-do-config: # Pass userdata to the instance to be created userdata_file: /etc/salt/cloud-init/packages.yml userdata_template: jinja
my-do-config: # Pass userdata to the instance to be created userdata_file: /etc/salt/cloud-init/packages.yml userdata_template: False
Miscellaneous Information NOTE: DigitalOcean's concept of Applications is nothing more than a pre-configured instance (same as a normal Droplet). You will find examples such Docker 0.7 Ubuntu 13.04 x64 and Wordpress on Ubuntu 12.10 when using the --list-images option. These names can be used just like the rest of the standard instances when specifying an image in the cloud profile configuration.
NOTE: If your domain's DNS is managed with DigitalOcean, and your minion name matches your DigitalOcean managed DNS domain, you can automatically create A and AAA records for newly created droplets. Use create_dns_record: True in your config to enable this. Adding delete_dns_record: True to also delete records when a droplet is destroyed is optional. Due to limitations in salt-cloud design, the destroy code does not have access to the VM config data. WHETHER YOU ADD create_dns_record: True OR NOT, salt-cloud WILL attempt to delete your DNS records if the minion name matches. This will prevent advertising any recycled IP addresses for destroyed minions.
NOTE: If you need to perform the bootstrap using the local interface for droplets, this can be done by setting ssh_interface: private in your config. By default the salt-cloud script would run on the public interface however if firewall is preventing the connection to the Droplet over the public interface you might need to set this option to connect via private interface. Also, to use this feature private_networking: True must be set in the config.
NOTE: Additional documentation is available from DigitalOcean.
Getting Started With Dimension Data Cloud Dimension Data are a global IT Services company and form part of the NTT Group.  Dimension Data provide IT-as-a-Service to customers around the globe on their cloud platform (Compute as a Service). The CaaS service is available either on one of the public cloud instances or as a private instance on premises.
http://cloud.dimensiondata.com/
CaaS has its own non-standard API , SaltStack provides a wrapper on top of this API with common methods with other IaaS solutions and Public cloud providers.  Therefore, you can use the Dimension Data module to communicate with both the public and private clouds.
Dependencies This driver requires the Python apache-libcloud and netaddr library to be installed.
Configuration When you instantiate a driver you need to pass the following arguments to the driver constructor:
• user_id - Your Dimension Data Cloud username
• key - Your Dimension Data Cloud password
• region - The region key, one of the possible region keys
Possible regions:
• dd-na : Dimension Data North America (USA)
• dd-eu : Dimension Data Europe
• dd-af : Dimension Data Africa
• dd-au : Dimension Data Australia
• dd-latam : Dimension Data Latin America
• dd-ap : Dimension Data Asia Pacific
• dd-canada : Dimension Data Canada region
my-dimensiondata-config: user_id: my_username key: myPassword! region: dd-na driver: dimensiondata
NOTE: In version 2015.8.0, the provider parameter in cloud provider definitions was renamed to driver. This 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 to use provider to refer to provider configurations that you define.
Profiles Cloud Profiles Dimension Data images have an inbuilt size configuration, there is no list of sizes (although, if the command --list-sizes is run a default will be returned).