Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salt_cloud_module_kamatera-0.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file salt_cloud_module_kamatera-0.0.2.tar.gz.

File metadata

  • Download URL: salt_cloud_module_kamatera-0.0.2.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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for salt_cloud_module_kamatera-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b0c1051298d555260052df86a97226e99bb0db14ad1dcf034f29ccc7a9a1c94f
MD5 03a4430c331cff251a9fbed4a75448e7
BLAKE2b-256 16f9926bb67006c6ca9b90677fe23723fef8fe328a1a3f42984221977ab24216

See more details on using hashes here.

File details

Details for the file salt_cloud_module_kamatera-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: salt_cloud_module_kamatera-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for salt_cloud_module_kamatera-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d6e5ae55b005e7a4f15f8ffb33fec3a5f33724f2ac03ac2c5679a17ffcbbf3
MD5 d1ce48cfe4ae428d9c1a69fe7013505d
BLAKE2b-256 4f87a490611949edcdf0b4da3db4d447915e50b35e4b03b47162acf4b5551d31

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page