{"id":15645050,"url":"https://github.com/bregman-arie/infraform","last_synced_at":"2025-04-30T11:09:25.894Z","repository":{"id":39486834,"uuid":"187839718","full_name":"bregman-arie/infraform","owner":"bregman-arie","description":"Creating infrastructure and running applications using different platforms","archived":false,"fork":false,"pushed_at":"2022-06-24T10:29:55.000Z","size":902,"stargazers_count":56,"open_issues_count":7,"forks_count":46,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T00:42:04.921Z","etag":null,"topics":["devops","docker","docker-compose","elk","infra","infrastructure","podman","python","terraform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bregman-arie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-21T13:09:44.000Z","updated_at":"2025-04-15T19:46:57.000Z","dependencies_parsed_at":"2022-08-29T07:41:21.890Z","dependency_job_id":null,"html_url":"https://github.com/bregman-arie/infraform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bregman-arie%2Finfraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bregman-arie%2Finfraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bregman-arie%2Finfraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bregman-arie%2Finfraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bregman-arie","download_url":"https://codeload.github.com/bregman-arie/infraform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251686987,"owners_count":21627508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","docker","docker-compose","elk","infra","infrastructure","podman","python","terraform"],"created_at":"2024-10-03T12:04:12.967Z","updated_at":"2025-04-30T11:09:25.843Z","avatar_url":"https://github.com/bregman-arie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfraForm\n\n[![Build Status](https://travis-ci.org/bregman-arie/infraform.svg?branch=master)](https://travis-ci.org/bregman-arie/infraform)\n\nUnified interface for automation cross different technologies and platforms. Infraform allows you to:\n\n* Run common built-in operations (aka scenarios) or write/provide your own and let Infraform handle the execution\n* Use templated scenarios - one scenario, many ways to render it\n* Execute scenarios locally or on remote host(s)\n* Make use of different technologies to run the scenarios - Ansible, Python, Terraform, Podman, Docker, ...\n* Adjusts the host accordingly it it isn't ready to run the chosen technology (Ansible, Terraform ...)\n\nWith Infraform it's really all about ease of use. Infraform not only let's you use the same interface to run all these different technologies but it also supports templating which allows you to re-use the same scenarios for different purposes (e.g. staging and prod environments)\n\nHope you'll enjoy using it and if not, let us know and open an issue :)\n\n\u003cdiv align=\"center\"\u003e\u003cimg src=\"./images/infraform.png\"\u003e\u003c/div\u003e\u003chr/\u003e\n\n## Requirements\n\n* Linux (developed and tested on Fedora)\n* Python\u003e=3.7\n\n## Installation\n\n    git clone https://github.com/bregman-arie/infraform \u0026\u0026 cd infraform\n    virtualenv ~/ifr_venv \u0026\u0026 source ~/ifr_venv/bin/activate\n    pip install .\n\n## Usage Examples\n\n### List Scenarios\n\n    ifr list\n\n## Scenarios\n\nScenario file is one that ends with `.ifr` or `ifr.j2` suffix. It uses the YAML format with the following directives:\n\n```\ndescription:  # the description of the scenario\nplatform:     # the platform or tool to use (e.g. terraform, ansible, shell, python, etc.)\nfiles:        # the files to copy to the workspace to be used during the execution of the scenario\n - file1\n - file2\n - directory1\nvars:         # variables which will be used for executing the scenario\n  x: 2\n  y: 'value'\ndockerfile: | # used for building an image and running a container using that image\n ...\n```\n\nInfraform provides you with a couple of built-in scenarios you can list with `ifr list`\u003cbr\u003e\nTo see the content of scenario, run `infraform show \u003cscenario_name\u003e`\n\nRead more about \"Scenarios\" [here](docs/scenarios.md)\n\n## Supported platforms and tooling\n\nInfraForm is able to execute using the following technologies\n\nName | Comments \n:------ |:------:\nTerraform | Provision infrastucture using Terraform HCL files\nPodman | Run containers using Podman\nDocker | Run containers using Docker\n\n### Possibly too detailed workflow\n\nThe following is a description of what InfraForm does when you run a scenario\n\n1. Validates the scenario you've specified exists (the .ifr file)\n2. If a workspace already exists (.infraform/\u003cSCENARIO_NAME\u003e) it removes it. A new workspace is then created\n2. Iterates over the hosts specified (if not specific, then it uses localhost)\n  1. Checks if a workspace (.infraform/\u003cSCENARIO_NAME\u003e) directory exists already on the remote host. If it exists, it removes the entire directory\n  2. Creates a workspace (.infraform/\u003cSCENARIO_NAME\u003e) directory on the remote host\n4. Copies the scenario file (.ifr) and all the related content to the directory on the remote/local host\n5. Checks the host is ready for executing the scenario by running chosen platform check command(s)\n  1. If check command fails, it will ask the user whether to run commands to fix the check result\n    1. If user replied with 'y', it will start executing installation commands based on the chosen platform\n    2. If user replied with 'n', it will exit with return code different than 0\n6. Runs possible pre-commands. This depends highly on the platform used\n   - Terraform -\u003e terraform init\n   - Podman -\u003e Possibly build an image before running container\n7. Executes the scenario using the platform default run command (e.g. Terraform -\u003e terraform apply)\n\n## Contributions\n\nTo contribute to the project, use GitHub pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbregman-arie%2Finfraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbregman-arie%2Finfraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbregman-arie%2Finfraform/lists"}