Skip to main content

No project description provided

Project description

cloud_instance

Usage:

cloud_instance <deployment_id> <present/absent> <deployment> <defaults>

Example:

$ cloud_instance \
    fabio1 \
    present \
    '[
        {
            "cluster_name": "fabio1",
            "copies": 1,
            "inventory_groups": ["haproxy"],
            "exact_count": 1,
            "instance": {"cpu": 4},
            "volumes": {"os": {"size": 20, "type": "standard_ssd"}, "data": []},
            "tags": {"Name": "fabio1-lb"},
            "project": "my-team",
            "groups": [
                {
                    "user": "ubuntu",
                    "public_ip": true,
                    "public_key_id": "workshop",
                    "tags": {"owner": "fabio"},
                    "cloud": "gcp",
                    "image": "projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts",
                    "region": "us-east4",
                    "vpc_id": "default",
                    "security_groups": ["cockroachdb"],
                    "zone": "a",
                    "subnet": "default"
                }
            ]
        }
    ]' \
    '{
        "instances": {
            "aws": {
                "4": {
                    "default": "m6i.xlarge",
                    "16": "m6i.xlarge",
                    "32": "r5.xlarge"
                },
                "8": {
                    "default": "m6i.2xlarge",
                    "32": "m6i.2xlarge",
                    "64": "r5.2xlarge"
                }
            },
            "azure": {
                "4": {
                    "16": "Standard_D4s_v3",
                    "32": "Standard_E4s_v3",
                    "default": "Standard_D4s_v3"
                },
                "8": {
                    "32": "Standard_D8s_v3",
                    "64": "Standard_E8s_v3",
                    "default": "Standard_D8s_v3"
                }
            },
            "gcp": {
                "4": {
                    "default": "n2-standard-4",
                    "8": "n2-standard-4",
                    "16": "n2-highmem-4"
                },
                "8": {
                    "default": "n2-standard-8",
                    "16": "n2-standard-8",
                    "64": "n2-highmem-8"
                }
            }
        }
    }' | jq

Output, formatted thanks to jq:

[
  {
    "id": "fabio1-7141637722071383",
    "cloud": "gcp",
    "region": "us-east4",
    "zone": "a",
    "public_ip": "35.245.214.0",
    "public_hostname": "0.214.245.35.bc.googleusercontent.com",
    "private_ip": "10.150.15.208",
    "private_hostname": "fabio1-7141637722071383.c.my-team.internal",
    "ansible_user": "ubuntu",
    "inventory_groups": [
      "haproxy",
      "fabio1-0"
    ],
    "cluster_name": "fabio1-0",
    "group_name": "haproxy",
    "extra_vars": "{}"
  }
]

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

cloud_instance-0.1.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloud_instance-0.1.1-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file cloud_instance-0.1.1.tar.gz.

File metadata

  • Download URL: cloud_instance-0.1.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.3 Darwin/24.4.0

File hashes

Hashes for cloud_instance-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6151798f434f786d8bf4f4114932b8fb7e2bd712d1907df1b4a34a2f9ea2403a
MD5 451f210a1cd1907dc51494390135ba43
BLAKE2b-256 53eacb8dbce7d36d1637e3a5c5c8289827e95501ba3fd9c0933f52d8a19b9753

See more details on using hashes here.

File details

Details for the file cloud_instance-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cloud_instance-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.11.3 Darwin/24.4.0

File hashes

Hashes for cloud_instance-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6d3f3ab5e9f821dca379f8af0898820cff4d0256f51836d3d8badab80a2e128
MD5 c859d651c03ee2ba52e7819741709bff
BLAKE2b-256 31a2873f943714ef6c385f66d5a09f8f11aafcf662b082320672551b9aa7cc3a

See more details on using hashes here.

Supported by

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