GithubHelp home page GithubHelp logo

playing_with_aws's Introduction

Playing with AWS

This repository contains various playgrounds I use with AWS.

1. Auto Scaling Infra with Jenkins


I am an iOS developer, so my main focus is on macOS infrastructure. However, before using Mac instances, I opted to set up two Linux infrastructures, which are cheaper, before moving to Mac.

This repository offers three Auto Scaling Infrastructure setups:

  • Linux Virtual Instances Infra (free tier eligible)
  • Linux Dedicated Hosts Infra
  • Mac Dedicated Hosts Infra

You should first read this article that explains how to set everything up.

https://medium.com/@omarlagunas/ios-auto-scaling-infra-w-aws-jenkins-terraform-packer-and-bazel-4c189893b329

1.1 Linux Virtual instances Infra


AWS offers t2.micro instances in their free tier.

Terraform

Run this command to set up the infrastructure:

terraform -chdir=linux-infra apply
Jenkins

The differences between the configuration of a macOS infra and this one are these parameters:

  • Max Idle Minutes Before Scaledown: 5 (Because these instances are easy to terminate, they can scale down quickly)
  • Maximum Init Connection Timeout in sec: 180 (I used the default value since they connect quickly)

The label should be ec2-linux-fleet so the Jenkinsfile located in jenkins/linux/Jenkinsfile works out of the box.

1.2 Linux Dedicated Hosts Infra


I used a1 host family and a1.medium instances. Similar to macOS instances, it is required to request a limit increase for these dedicated hosts to use them.

Packer

Run this command to create the AMI with Packer:

packer build -var-file=config/linux.pkrvars.hcl .
Terraform

Run this command to set up the infrastructure:

terraform -chdir=linux-dh-infra apply
Jenkins

I used the same configuration as in Linux Virtual instances Infra

The label should be ec2-dh-linux-fleet so the Jenkinsfile located in jenkins/dh-linux/Jenkinsfile works out of the box.

1.3 Mac Dedicated Hosts Infra


I used mac2 host family and mac2 .metal instances. It is required to request a limit increase for these dedicated hosts to use them.

Packer

Run this command to create the AMI with Packer:

packer build -var-file=config/macos.pkrvars.hcl .
Terraform

Run this command to set up the infrastructure:

terraform -chdir=macos-dh-infra apply
Jenkins

The configuration can be found in the article.

The label should be ec2-dh-mac-fleet so the Jenkinsfile located in jenkins/mac/Jenkinsfile works out of the box.

playing_with_aws's People

Contributors

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