GithubHelp home page GithubHelp logo

puppetlabs-aws-examples's Introduction

Puppet AWS Module Examples

Prerequsite

  1. puppetlabs-aws module installed.(https://github.com/puppetlabs/puppetlabs-aws)

Usage

Creating VPC:

Below Example will create a vpc in us-east region with 4 public subnets.

aws_vpc::vpcdetails:
    vpcname: "example"
    ensure: present
    cidr_block: "10.20.0.0/16"
    region: "us-east-1" 
    domainname: "example.in"
    domainname-servers: "AmazonProvidedDNS"
    sg-cidr: "0.0.0.0/0"
    public-subnets: 
        public-us-east-1b:
            cidr_block: "10.20.2.0/24"
            availability_zone: "us-east-1b"
            route_table: "public_example"
            map_public_ip_on_launch: "true"
        public-us-east-1c:
            cidr_block: "10.20.3.0/24"
            availability_zone: "us-east-1c"
            route_table: "public_example"
            map_public_ip_on_launch: "true"
        public-us-east-1d:
            cidr_block: "10.20.4.0/24"
            availability_zone: "us-east-1d"
            route_table: "public_example"
            map_public_ip_on_launch: "true"
        public-us-east-1e:
            cidr_block: "10.20.5.0/24"
            availability_zone: "us-east-1e"
            route_table: "public_example"
            map_public_ip_on_launch: "true"
    private-subnets:
        private-us-east-1b:
            cidr_block: "10.20.22.0/24"
            availability_zone: "us-east-1b"
            route_table: "private_example"
    loadbalancers:

Creating EC2 Instance:

Below Example will run the EC2 instance if it is in stopped state or it is absent.

web-testing1:
    ensure: running
    availability_zone: "us-east-1b"
    subnet: "public-us-east-1b"
    region: "us-east-1"
    image_id: "ami-aa776ec2"
    instance_type: "t2.micro"
    monitoring: false
    key_name: "example"
    security_groups:
        - "sg_example"
    tags:
        created_by: puppet

Creating an ELB:

loadbalancers:
        test1-elb:
            ensure: 'present'
            region: 'us-east-1'
            scheme: 'internet-facing'
            subnets:
                - 'public-us-east-1c'
                - 'public-us-east-1b'
                - 'public-us-east-1e'
                - 'public-us-east-1d'
            instances:
                - 'www-fpm'
            security_groups:
                - 'default'
                - 'sg_example'
            listeners:
                - 
                    instance_port: 80
                    instance_protocol: 'HTTP'
                    load_balancer_port: 80
                    protocol: 'HTTP'
            tags:
                created_by: 'puppet'

**Creating a Route53 Entry:**

route53: domaintesting.example.in.: ensure: present ttl: '300' values: - 'internal-test-123123213.us-east-1.elb.amazonaws.com' zone: 'example.in.'

puppetlabs-aws-examples's People

Contributors

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