Coder Social home page Coder Social logo

drone-terraform-in-aws's Introduction

drone-terraform

Drone CI/CD infrastructure using Terraform in AWS.

Requirement

AWS Fargate with Amazon ECS is currently only available in the following regions:

Region Name Region
US East (N. Virginia) us-east-1
US East (Ohio) us-east-2
US West (Oregon) us-west-2
EU (Ireland) eu-west-1
EU (London) eu-west-2
EU (Frankfurt) eu-central-1
Asia Pacific (Tokyo) ap-northeast-1
Asia Pacific (Singapore) ap-southeast-1
Asia Pacific (Sydney) ap-southeast-2

See AWS Fargate on Amazon ECS to get more detail information. Service discovery is available in the following AWS Regions:

Region Name Region
US East (N. Virginia) us-east-1
US East (Ohio) us-east-2
US West (N. California) us-west-1
US West (Oregon) us-west-2
Asia Pacific (Mumbai) ap-south-1
Asia Pacific (Seoul) ap-northeast-2
Asia Pacific (Singapore) ap-southeast-1
Asia Pacific (Sydney) ap-southeast-2
Asia Pacific (Tokyo) ap-northeast-1
EU (Frankfurt) eu-central-1
EU (Ireland) eu-west-1
EU (London) eu-west-2
EU (Paris) eu-west-3
South America (São Paulo) sa-east-1
Canada (Central) ca-central-1

See AWS Service Discovery to get more detail information. Before you begin, make sure you've read the limition.

Configuration

create new file with terraform.tfvars filename and put the following variable:

aws_access_key = "xxx"
aws_secret_key = "xxx"
drone_github_client = "xxxx"
drone_github_secret = "xxxx"
ssh_public_key = "ssh-rsa xxxxxx appleboy@xxxx"

Build Infrastructure

The first command to run for a new configuration

$ terraform init
Initializing the backend...
Initializing provider plugins...
- downloading plugin for provider "aws"...

Apply Changes

$ terraform apply

You will see the output:

Outputs:

alb_hostname = http://drone-front-alb-xxxxxxx.us-east-1.elb.amazonaws.com
database_root_password = <sensitive>
region = us-east-1

How to testing

$ go test -timeout 30m -v .

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.