Git Product home page Git Product logo

crypto_bot_infra's Introduction

Crypto Bot Infrastructure

This repository contains the infrastructure for the Crypto Bot project. The infrastructure is built using Terraform and is hosted on AWS.

Prerequisites

  • Terraform
  • AWS CLI
  • AWS Account

Setup

  1. Clone the repository
  2. Create a .env file in the root directory of the repository and add the following environment variables:
    TF_VAR_aws_access_key=your_aws_access_key
    TF_VAR_aws_secret_key=your_aws_secret_key
    TF_VAR_aws_region=your_aws_region
    TF_VAR_instance_type=your_instance_type
    TF_VAR_ami=your_ami
    TF_STATE_BUCKET=your_state_bucket
    AWS_PROFILE=your_aws_profile
    
    • TF_STATE_BUCKET: The name of the S3 bucket to store the Terraform state file
    • AWS_PROFILE: The name of the AWS profile to use in the case of multiple profiles locally
  3. Run make init to initialize the Terraform configuration
  4. Run make plan to see the changes that will be applied
  5. Run make apply to apply the changes

Destroy

To destroy the infrastructure, run make destroy.

Connect to the EC2 instance

To connect to the EC2 instance, run make connect. It will SSH into the instance using the key pair created on make apply.

Makefile

The Makefile contains the following commands:

  • load_env: Loads the environment variables from the .env file
  • init: Initializes the Terraform configuration and loads the environment variables using load_env
  • plan: Shows the changes that will be applied
  • apply: Applies the changes to the infrastructure and creates the key pair on ~/.ssh/ directory
  • destroy: Destroys the infrastructure
  • connect: Connects to the EC2 instance by retrieving the public dns and using the key pair created on ~/.ssh/ directory

crypto_bot_infra's People

Contributors

etorralba avatar

Watchers

 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.