All Projects → bregman-arie → infraform

bregman-arie / infraform

Licence: Apache-2.0 license
Creating infrastructure and running applications using different platforms

Programming Languages

python
139335 projects - #7 most used programming language
Jinja
831 projects

Projects that are alternatives of or similar to infraform

infra
🚀 INFRA: your infrastructure as a GraphQL service
Stars: ✭ 48 (+54.84%)
Mutual labels:  infrastructure, infra
punic
Punic is a remote cache CLI built for Carthage and Apple .xcframework
Stars: ✭ 25 (-19.35%)
Mutual labels:  infrastructure, infra
alchemy
Experiments logging & visualization
Stars: ✭ 49 (+58.06%)
Mutual labels:  infrastructure
kibana-multitenant-proxy
A proxy behind nginx while before kibana (4.x, 5.x) to provide data isolation for different users
Stars: ✭ 25 (-19.35%)
Mutual labels:  elk
headless-wordpress
Headless Wordpress - AWS - Easy Setup
Stars: ✭ 42 (+35.48%)
Mutual labels:  infrastructure
elastic-stack
A complete documentation on how to install Elastic Stack on Ubuntu 16.04 Server ASAP 😎
Stars: ✭ 12 (-61.29%)
Mutual labels:  elk
Spatio-Temporal-papers
This project is a collection of recent research in areas such as new infrastructure and urban computing, including white papers, academic papers, AI lab and dataset etc.
Stars: ✭ 180 (+480.65%)
Mutual labels:  infrastructure
infra
Infrastructure configuration for pyca projects (mostly dockerfiles)
Stars: ✭ 13 (-58.06%)
Mutual labels:  infrastructure
robert
基于SpringCloud的企业级微服务多租户系统、多语言的脚手架, 代码组件化、高内聚低耦合,代码简介,注释丰富容易上手,该项目包括用于开发分布式应用程序服务的必要组件,支持多应用程序访问,并使开发人员可以轻松地使用Spring Cloud编程模型来开发分布式应用程序服务。
Stars: ✭ 45 (+45.16%)
Mutual labels:  elk
ansible-aws-infra-services
Manage your AWS infrastructure and ECS tasks with two separate ansible playbooks
Stars: ✭ 23 (-25.81%)
Mutual labels:  infrastructure
servpeek
Introspective peek into your server guts
Stars: ✭ 30 (-3.23%)
Mutual labels:  infrastructure
lede-dockerbuilder
A (container based) LEDE/OpenWrt image builder.
Stars: ✭ 53 (+70.97%)
Mutual labels:  podman
terraform-aws-concourse
Terraform Module for a distributed concourse cluster on AWS
Stars: ✭ 12 (-61.29%)
Mutual labels:  infrastructure
funsies
funsies is a lightweight workflow engine 🔧
Stars: ✭ 37 (+19.35%)
Mutual labels:  infrastructure
ansible
Ansible playbook automation for pfelk
Stars: ✭ 23 (-25.81%)
Mutual labels:  elk
terraform-openvpn
A sample terraform setup for OpenVPN using Let's Encrypt and Certbot to generate certificates
Stars: ✭ 43 (+38.71%)
Mutual labels:  infrastructure
lambda.service.skeleton
A skeleton for deploying python microservices on AWS Lambda.
Stars: ✭ 73 (+135.48%)
Mutual labels:  infrastructure
devops-book
运维开发
Stars: ✭ 29 (-6.45%)
Mutual labels:  infrastructure
kube-applier
kube-applier enables automated deployment and declarative configuration for your Kubernetes cluster.
Stars: ✭ 27 (-12.9%)
Mutual labels:  infrastructure
awsdtc
AWS Data Transfer Cost Explorer
Stars: ✭ 90 (+190.32%)
Mutual labels:  infrastructure

InfraForm

Build Status

Unified interface for automation cross different technologies and platforms. Infraform allows you to:

  • Run common built-in operations (aka scenarios) or write/provide your own and let Infraform handle the execution
  • Use templated scenarios - one scenario, many ways to render it
  • Execute scenarios locally or on remote host(s)
  • Make use of different technologies to run the scenarios - Ansible, Python, Terraform, Podman, Docker, ...
  • Adjusts the host accordingly it it isn't ready to run the chosen technology (Ansible, Terraform ...)

With 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)

Hope you'll enjoy using it and if not, let us know and open an issue :)


Requirements

  • Linux (developed and tested on Fedora)
  • Python>=3.7

Installation

git clone https://github.com/bregman-arie/infraform && cd infraform
virtualenv ~/ifr_venv && source ~/ifr_venv/bin/activate
pip install .

Usage Examples

List Scenarios

ifr list

Scenarios

Scenario file is one that ends with .ifr or ifr.j2 suffix. It uses the YAML format with the following directives:

description:  # the description of the scenario
platform:     # the platform or tool to use (e.g. terraform, ansible, shell, python, etc.)
files:        # the files to copy to the workspace to be used during the execution of the scenario
 - file1
 - file2
 - directory1
vars:         # variables which will be used for executing the scenario
  x: 2
  y: 'value'
dockerfile: | # used for building an image and running a container using that image
 ...

Infraform provides you with a couple of built-in scenarios you can list with ifr list
To see the content of scenario, run infraform show <scenario_name>

Read more about "Scenarios" here

Supported platforms and tooling

InfraForm is able to execute using the following technologies

Name Comments
Terraform Provision infrastucture using Terraform HCL files
Podman Run containers using Podman
Docker Run containers using Docker

Possibly too detailed workflow

The following is a description of what InfraForm does when you run a scenario

  1. Validates the scenario you've specified exists (the .ifr file)
  2. If a workspace already exists (.infraform/<SCENARIO_NAME>) it removes it. A new workspace is then created
  3. Iterates over the hosts specified (if not specific, then it uses localhost)
  4. Checks if a workspace (.infraform/<SCENARIO_NAME>) directory exists already on the remote host. If it exists, it removes the entire directory
  5. Creates a workspace (.infraform/<SCENARIO_NAME>) directory on the remote host
  6. Copies the scenario file (.ifr) and all the related content to the directory on the remote/local host
  7. Checks the host is ready for executing the scenario by running chosen platform check command(s)
  8. If check command fails, it will ask the user whether to run commands to fix the check result 1. If user replied with 'y', it will start executing installation commands based on the chosen platform 2. If user replied with 'n', it will exit with return code different than 0
  9. Runs possible pre-commands. This depends highly on the platform used
    • Terraform -> terraform init
    • Podman -> Possibly build an image before running container
  10. Executes the scenario using the platform default run command (e.g. Terraform -> terraform apply)

Contributions

To contribute to the project, use GitHub pull requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].