The Packet cloud module is used to control access to the Packet VPS system.
Use of this module only requires the token
parameter.
Set up the cloud configuration at /etc/salt/cloud.providers
or /etc/salt/cloud.providers.d/packet.conf
:
The Packet profile requires size
, image
, location
, project_id
Optional profile parameters:
storage_size
- min value is 10, defines Gigabytes of storage that will be attached to device.
storage_tier
- storage_1 - Standard Plan, storage_2 - Performance Plan
snapshot_count
- int
snapshot_frequency
- string - possible values:
1min
15min
1hour
1day
1week
1month
1year
This driver requires Packet's client library: https://pypi.python.org/pypi/packet-python
packet-provider:
minion:
master: 192.168.50.10
driver: packet
token: ewr23rdf35wC8oNjJrhmHa87rjSXzJyi
private_key: /root/.ssh/id_rsa
packet-profile:
provider: packet-provider
size: baremetal_0
image: ubuntu_16_04_image
location: ewr1
project_id: a64d000b-d47c-4d26-9870-46aac43010a6
storage_size: 10
storage_tier: storage_1
storage_snapshot_count: 1
storage_snapshot_frequency: 15min
Return available Packet os images.
CLI Example:
salt-cloud --list-images packet-provider
salt-cloud -f avail_images packet-provider
Return available Packet datacenter locations.
CLI Example:
salt-cloud --list-locations packet-provider
salt-cloud -f avail_locations packet-provider
Return available Packet projects.
CLI Example:
salt-cloud -f avail_projects packet-provider
Return available Packet sizes.
CLI Example:
salt-cloud --list-sizes packet-provider
salt-cloud -f avail_sizes packet-provider
Create a single Packet VM.
Destroys a Packet device by name.
The hostname of VM to be be destroyed.
CLI Example:
salt-cloud -d name
Return the first configured instance.
Return the image object to use
Return the VM's size object
Returns a list of devices, keeping only a brief listing.
CLI Example:
salt-cloud -Q
salt-cloud --query
salt-cloud -f list_nodes packet-provider
List devices, with all available information.
CLI Example:
salt-cloud -F
salt-cloud --full-query
salt-cloud -f list_nodes_full packet-provider
Return a list of the VMs that are on the provider. Only a list of VM names and their state is returned. This is the minimum amount of information needed to check for existing VMs.
New in version 2015.8.0.
CLI Example:
salt-cloud -f list_nodes_min packet-provider
salt-cloud --function list_nodes_min packet-provider
Return a list of the VMs that are on the provider, with select fields.
Return the script deployment object
Show the details from the provider concerning an instance
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 3004