Skip to content

maurogonzalez/cloudformation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible + AWSCloudformation Examples

This project tries to cover some AWS management through AWSCloudformation using Ansible as automation tool.

Table of contents

  1. Requirements
  2. Getting ready
  3. Roles
    1. deployment
    2. docker
    3. ecr
    4. eks
    5. host_dependencies
    6. iam
    7. s3
    8. vpc
  4. Author

Requirements

  • ansible

  • boto3: Follow the AWS Credentials setup to use a particular profile in the playbooks.

Getting ready

Clone this repo:

# Move to your working path
$ git clone https://github.com/maurogonzalez/cloudformation.git
$ cd cloudformation

Roles

The general playbook is playbook.yml. It receives the role variable to set which role is going to be played. Each role needs an environment variable which is already set in inventory/dev.yml but it can be overridden in the command (I suggest to use inventory as it is easier to set variables/values corresponding to a given scope).

The command to run each implemented role is as follows:

$  ansible-playbook -i dev.yml -e "role=$ROLE" playbook.yml

For become root access use ask-become-pass like:

$  ansible-playbook --ask-become-pass -i dev.yml -e "role=host_dependencies" playbook.yml

EKS

Manages an EKS Cluster.

Requires:

  • iam role played
  • network role played

Creates:

  • AWS::EKS::Cluster
  • AWS::EKS::NodeGroup

IAM

Manages IAM resources.

Creates roles for:

  • AWS::EKS::Cluster
  • AWS::EKS::NodeGroup

VPC

Manages VPC resources such.

Creates:

  • AWS::EC2::VPC with 2 AZs.
  • 2 Public AWS::EC2::Subnet
  • 2 Private AWS::EC2::Subnet
  • 2 AWS::EC2::SecurityGroup

Author

If you have any questions regarding to this project contact:
Mauro González jmajma8@gmail.com

Releases

No releases published

Packages

No packages published