Git Product home page Git Product logo

ibr-iac's Introduction

Disclaimer

Note that this is work in progress. Scripts and infrastructure as code will become more robust, simple, elegant, better written and modularized over time.

Instructions

  1. Set the environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) accordingly. Note that the account must have the proper permissions to interact with IAM, EC2 and S3. Keep these variables inside a .env file in order to source it when needed if you are going to develop on top of this codebase;
  2. Terraform state file is stored centrally in an S3 bucket, this is configured in backend.tf. Note that this bucket must already exist beforehand. If you don't want a remote state file, delete the backend.tf file from here, but be aware that resources present in an existing remote state file will cause conflicts if Terraform tries to create the same existing resources when starting with a local state file;
  3. Run terraform init to download the dependencies and initialize Terraform;
  4. Run terraform apply to see the Terraform provisioning plan and enter "yes" to apply (or run with --auto-approve right away). The terraform plan command can also be used to view specifically the provisioning plan;
  5. For now, run terraform output -raw private_key > ec2_spot_private_key && chmod 400 ec2_spot_private_key to output the SSH private key;
  6. For now, obtain the instances' public IPs from the EC2 dashboard. Note that the working SSH port is 65535;
  7. SSH into the alpine@IP_ADDRESS when needed.

Glossary

  • Terraform state: "Terraform must store state about your managed infrastructure and configuration. This state is used by Terraform to map real world resources to your configuration, keep track of metadata, and to improve performance for large infrastructures.";

ibr-iac's People

Stargazers

Richard Eitz avatar

Watchers

Lucas Beiler avatar

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.