SaltStack Cloud module for managing Kamatera compute resources
Project description
Salt Cloud Kamatera Module
Installation
- Install Salt (version 2019.2.0 or greater)
- Install the module, using the same Python interpreter that Salt was installed with:
pip install salt-cloud-module-kamatera
Usage
See the Salt Cloud documentation to get a general understanding of how Salt and Salt Cloud work.
Configuration
Using Salt for Kamatera requires an API key and secret which you can get by visiting Kamatera Console and adding a new key under API Keys. Use the created key ID and Secret in the configuration:
# Note: This example is for /etc/salt/cloud.providers or any file in the
# /etc/salt/cloud.providers.d/ directory.
my-kamatera-config:
driver: kamatera
api_client_id: xxxxxxxxxxxxx
api_secret: yyyyyyyyyyyyyyyyyyyyyy
minion:
master: saltmaster.example.com
Server Options
Locations
# salt-cloud --list-locations my-kamatera-config
my-kamatera-config:
----------
kamatera:
----------
AS:
Hong Kong, China (Asia)
CA-TR:
Toronto, Canada (North America)
EU:
Amsterdam, The Netherlands (Europe)
...SNIP...
CPU types
# salt-cloud --location=EU --list-sizes my-kamatera-config
my-kamatera-config:
----------
kamatera:
----------
A:
----------
cpuCores:
[1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32]
description:
Server CPUs are assigned to a non-dedicated physical CPU thread with no resources guaranteed.
name:
Type A - Availability
ramMB:
[256, 512, 1024, 2048, 3072, 4096, 6144, 8192, 10240, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072]
B:
----------
cpuCores:
[1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 88, 104]
...SNIP...
Additional server options
# salt-cloud --location=EU -f avail_server_options my-kamatera-config
my-kamatera-config:
----------
kamatera:
----------
A:
----------
cpuCores:
[1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32]
description:
Server CPUs are assigned to a non-dedicated physical CPU thread with no resources guaranteed.
name:
Type A - Availability
ramMB:
[256, 512, 1024, 2048, 3072, 4096, 6144, 8192, 10240, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072]
B:
----------
cpuCores:
[1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, 88, 104]
...SNIP...
Images
# salt-cloud --location=EU --list-images my-kamatera-config
my-kamatera-config:
----------
kamatera:
----------
EU:6000C2901a61dff371f4d1d34bd9548b:
Ubuntu Server version 16.04 LTS (xenial) 32-bit
EU:6000C29040fd67b51a229d7e641fba22:
Ubuntu Server version 18.04 LTS (bionic) 64-bit.
Optimized for best performance and with minimal OS services (OS use only 80MB RAM).
EU:6000C2904fc6d8295d2b6d9687ed955e:
Ubuntu Server version 18.04 LTS (bionic) 64-bit,
...SNIP...
Create a server
Set up a cloud profile at /etc/salt/cloud.profiles
or under /etc/salt/cloud.profiles.d/
directory:
my-kamatera-profile:
size: "my-size" # this is meaningless, required due to limitations in Salt Cloud
provider: my-kamatera-config
# salt-cloud --list-locations my-kamatera-config
location: EU
# salt-cloud --location EU --list-sizes my-kamatera-config
cpu_type: B
cpu_cores: 2
ram_mb: 2048
# primary disk size
# salt-cloud --location EU -f avail_server_options my-kamatera-config
disk_size_gb: 50
# up to 3 additional disks
extra_disk_sizes_gb:
- 100
- 200
# hourly / monthly
billing_cycle: monthly
# traffic package is only relevant for monthly billing cycle
# salt-cloud --location EU -f avail_server_options my-kamatera-config
monthly_traffic_package: t5000
# salt-cloud --location EU --list-images my-kamatera-config
image: EU:6000C29a5a7220dcf84716e7bba74215
# up to 4 network interfaces can be attached
# network name 'wan' provides a public IP
# you can add additional private networks in the Kamatera web-ui
networks:
- name: wan
ip: auto
# - name: my-lan-id
# ip: auto
# whether to enable daily backups for the created server
daily_backup: false
# whether to provide managed support service
managed: false
Create the server:
salt-cloud -p my-kamatera-profile my-server
Execute salt commands on the server (requires a Salt master + properly configured networking):
salt my-server test.version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file salt_cloud_module_kamatera-0.0.3.tar.gz
.
File metadata
- Download URL: salt_cloud_module_kamatera-0.0.3.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95cb9f992ec77d715624747db6889e59d9ff765819e1d346e5086c611ba80a3f |
|
MD5 | c3aec1050bf34109017989c62abf9cc8 |
|
BLAKE2b-256 | 0e094eabb55ca1ebd6317d2821d5f634ff26d2999c1371bcf45fbab8e623537a |
File details
Details for the file salt_cloud_module_kamatera-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: salt_cloud_module_kamatera-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 862c66c02ee883f06bcafed6ebd3d18a0dd334089ced8402e58c46c4d0b19c46 |
|
MD5 | 57ea620bc0d0332d420c31c4b39d8c18 |
|
BLAKE2b-256 | a8a1a7e33f504bcd8e6b466874bd61750004950d32772e90ddb4f9c84ea40bee |