Giter Club home page Giter Club logo

terraform-teamcity-aws's Introduction

Terraform-Terraform-AWS

Terraform to setup TeamCity on AWS resources

Introduction

This code sets up a single TeamCity Server to run on Amazon ECS (running in fargate).
This works by specifying an official JetBrains Teamcity docker image, and running it in a Cluster on ECS. This runs only one task in ECS running in the cluster. ECS gives us the nice benefit of automatically rebooting the server if the health checks determine the server is unhealthy.

Terraform code

The terraform code creates all the necessary infrastructure for the server to run safely and reliably. For instance it sets up

  1. VPC networks
  2. IAM roles and policies
  3. Persistent storage using EFS (So in case of a reboot, all settings are not lost)
  4. RDS postgres database

There are quite a few required inputs for terraform that can be passed in various ways. These ways are:

  1. Type in the variables using the command line when executing terraform apply. But really this is very tedious, who does this anymore?
  2. Create a *.tfvars file and pass it in when doing apply: terraform apply -var-file="file.tfvars"
  3. Create a file with a standard name called terraform.tfvars. Terraform will automatically look for it when executing terraform apply.

Jetbrains TeamCity requires a database for it's internal operations. Jetbrains does supply its own internal database if you want to use it. But it is not recommended, since when the docker image gets shut down all data will be lost. This is definitely not good. Therefore Jetbrains recommends using an external Database. This terraform code specifies an RDS database running postgres. Currently the RDS database has no redundancy, but in that future I will change that since presently I want to keep costs down.

The file variables.tf lists the required variables to input into the system. I don't recommend putting the postgres username and password into a terraform *.tfvars file. Just enter those in manually when running terraform apply. (And don't forget them!!)

terraform-teamcity-aws's People

Contributors

chris1248 avatar

Stargazers

 avatar

Watchers

 avatar  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.