Skip to main content

MAASTA (MAAS Terraform Ansible)

GitHub last commit GitHub license GitHub stars GitHub forks GitHub issues

Twitter LinkedIn

Stargaze GitHub Repo stars if you find it useful.

MAASTA is a wrapper to create an Ansible inventory for MAAS instances that are provisioned by Terraform.

This script is used to build an end to end automation DevOps lifecycle.

What is MAAS?

MAAS (Metal as a Service) is a tool to turns real servers into bare-metal cloud. With MAAS, you can automate server provisioning and installing OS remotely on both physical and virtual servers. MAAS.io for more information.

What is Terraform?

Terraform is an infrastructure as code tool which is used originally for provisioning cloud instances on various cloud providers. With Terraform and the aid of the IaC, we can provision machines and cloud instances with codes and without direct human interactions. Terraform is responsible for provisioning systems, usually Immutable ones. Terraform.io for more information.

What is Ansible?

Ansible is another IaC tool but for configuration management. With the aid of Ansible, we can configure a multitude of systems without direct human interactions. Ansible is responsible for configuring existing systems, usually mutable ones. Ansible.com for more information.

Why do we need MAASTA?

Imagine you want to create the DevOps lifecycle for your on-premises infrastructure. In such a scenario, You need the MAAS to interact with your real infrastructure and bring your bare-metal or virtual machines into cloud-like infrastructure. After that, to achieve automation, you need the Terraform tool to interact with the MAAS to provisioning instances and managing them without direct human interactions. When the instances, machines, were provisioned by the Terraform, the time to configuring them comes. For configuring instances, you need the Ansible tool, but how Ansible can discover targets that are provisioned by the Terraform. The answer is MAASTA! MAASTA is used to discover Terraform provisioned MAAS instances and create an Ansible inventory file for them. With the aid of the MAASTA, you can create an end to end automation and integrate MAAS, Terraform, and Ansible together.

See /examples/README.md to get started with brief examples.

Get started guide:

MAASTA accepts two environment variables, MAAS_API_URL and MAAS_API_KEY, and reads the output of the terraform show -json command from stdin. The output of the Terraform is used to find the MAAS machines that are provisioned by the Terraform. MAASTA connects to the MAAS server and reads information (fqdn, hostname, ipaddr) of machines and creates an Ansible inventory for them. The inventory will write into inventory.yaml file.

Installation:

pip install maasta

Usage:

terraform show -json | python -m maasta

How to contribute:

Currently, MAASTA can create inventory for machines that are provisioned with Ubuntu distribution. The script is tested with minimum viable tests and may break in some situations.

Don't hesitate to contribute. In the case of a bug, please file an issue.

Copyright 2021-2022 Saeid Bostandoust ssbostan@linuxmail.org

Metadata

Release files for maasta 1.0.0

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

Source distribution (sdist)

Source distribution for maasta 1.0.0
File Size Uploaded Provenance Actions
maasta-1.0.0.tar.gz 8.6 kB Without provenance Details for maasta-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maasta 1.0.0
File Interpreter ABI Platform Actions
maasta-1.0.0-py3-none-any.whl Python 3 none any Details for maasta-1.0.0-py3-none-any.whl

Total release size: 18.0 kB

Release files / maasta-1.0.0.tar.gz

Download URL maasta-1.0.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
92582557a9d18935e69a40315f47940203b88c3981152fcb836a8af3aa8ddc33
BLAKE2b-256 checksum
How to use checksums
5c7ce6f6216dbca3fb919ac8c622607558ea6cbde3de3a79eadcb72d00d7ed85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / maasta-1.0.0-py3-none-any.whl

Download URL maasta-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0842caa070de5a4daf7869fb997e83340655b56d34bdd1ab77d3f02ef1d73799
BLAKE2b-256 checksum
How to use checksums
961aec6b28aaaeb855b762f08313b2b6a1277087a09399592042e3a025d95d26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for maasta 1.0.0

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

1.0.0 This release

2 release files 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