Skip to main content

snfinv

snfinv is a a simplistic virtual machine provision and dynamic ansible inventory tool to be used on Synnefo IaaS deployments.

Install

Install using pip:

$ pip install snfinv

Provisioning

Create an inventory.yml and define your nodes configuration:

provision:
    networks:
        priv1:
            type: MAC_FILTERED
            cidr: 10.12.21.0/24

    coreos_node1:
        project: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
        flavour:
            cpu: 2
            ram: 1024
            disk: 10
        image: b9236d02-0904-4d00-8967-3279f0053d18 // CoreOS image
        floating_ips: [auto, 83.212.221.53]
        groups: ['sql']
        keys: ['/home/user/.ssh/id_rsa.pub']
        users: ['core']
        networks:
            priv1:
                ip: 10.12.21.1
        vars:
            ansible_var1: 'value'

    coreos_node2:
        project: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
        flavour:
            cpu: 2
            ram: 1024
            disk: 10
        image: b9236d02-0904-4d00-8967-3279f0053d18 // CoreOS image
        floating_ips: [auto]
        groups: ['web']
        keys: ['/home/user/.ssh/id_rsa.pub']
        users: ['core']
        networks:
            priv1:
                ip: 10.12.21.1
        vars:
            ansible_var1: 'value'

You can then provision the above specification by running within the directory the file above was created:

$ snfinv --provision

Provision script is reentrant and it won’t try to recreate existing resources but it is not smart enough to delicately re-assemble flimsy configuration changes such as changes of vm flavor/ips/keys etc.

Ansible inventory

snfinv tool provides the required command line interface to be able to use is as a dynamic ansible inventory:

$ ansible `which snfinv` "coreos_node2" -m shell -a ls

Additional arguments

  • –dry

    Used in conjuction with –provision. If set no calls will be sent to the synnefo api endpoints.

  • –list-hosts

    Outputs /etc/hosts friendly list of the available nodes.

  • –config=<path-to-inventory.yml>

    Provide a custom inventory.yml file. By default ./inventory.yml is used. SNFINV_CONFIG environment variable may also be used to declare the path to the provision configuration file.

  • –kamaki-config

    Use a custom location for the kamaki config file.

Metadata

Release files for snfinv 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snfinv 0.1.2
File Size Uploaded Provenance Actions
snfinv-0.1.2.tar.gz 7.8 kB Without provenance Details for snfinv-0.1.2.tar.gz

Release files / snfinv-0.1.2.tar.gz

Download URL snfinv-0.1.2.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49013741cd1c3daa03f848183de8127f4c535483fa2540a43925b09a469e31c3
BLAKE2b-256 checksum
How to use checksums
403a57091bf86e59368fa4a1e553b6ad54059d6596787478ca723edadc007407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for snfinv 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page