Code Monkey home page Code Monkey logo

Comments (7)

phahulin avatar phahulin commented on July 17, 2024

Maybe reference them as a git submodule? Did playbooks require any changes to be adapted for terraform?

from deployment-terraform.

lexsys27 avatar lexsys27 commented on July 17, 2024

Playbooks contained AWS resources - I deleted them.

Also it is possible to generate playbooks group variables from Terraform templates.

In all other cases the playbooks are identical to ones used for configuration management on other cloud providers.

from deployment-terraform.

phahulin avatar phahulin commented on July 17, 2024

When we use playbooks to install on aws, we do it in two steps:

  1. ansible-playbook bootnodes.yml - this step creates a ec2 instance
  2. ansible-playbook -i hosts site.yml - this step configures the instance

maybe we can keep aws-related files, but just don't use them (only use site.yml)?

from deployment-terraform.

lexsys27 avatar lexsys27 commented on July 17, 2024
  1. AWS variables are inside the node template
  2. Some roles configure AWS resources

We can look at this issue from two viewpoints - workaround and long-term fix. As quick fix manual sync will do. As long-term solution I would suggest keeping all the deployment automation in the single repo. This includes Terraform scripts for the cloud providers (Azure, AWS, GCP), Ansible playbooks for node configuration, Jenkins pipelines, integration and unit tests for deployment automation.

Ansible playbooks should assume the hosts and cloud resources are already provisioned. It may be separate ansible script for the near future and Terraform script at the next stage.

Terraform must template only the inventory and group_vars files. This way ansible playbooks will be usable without Terraform e.g. when deploying on the bare metal. Developer can specify configuration in a single place - Terraform vars while provisioning with Terraform or group_vars without it.

from deployment-terraform.

lexsys27 avatar lexsys27 commented on July 17, 2024

My idea is to create a parallel branch in deployment-playbooks called terraform. In this branch I will delete AWS-related code and do some cloud-related changes. For example, I don't need to run update_system task as I start from Ubuntu:latest image. This image is upgraded by its maintainer so I get the fresh version each time I run provisioning.

This setup will allow me to cherry-pick commits from the master branch. In case I do changes that are useful for all the playbooks I will do PR against master.

from deployment-terraform.

phahulin avatar phahulin commented on July 17, 2024

Great, I think that's a good idea

from deployment-terraform.

phahulin avatar phahulin commented on July 17, 2024

Closed via #26

from deployment-terraform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.