Giter Club home page Giter Club logo

devhops's Introduction

devhops

Table of Contents

  1. Description
  2. Setup
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.

Description

This module helps deploying infrastructure for DevHops Workshops in various regions.

It assumes a "Demo Reboot" Puppetmaster AMI is available in your region.

The module uses module-level hiera to store all configuration. The hierarchy is expressed as follows in hiera.yaml:

  - name: "AWS region-level user-level data"
    path: "%{::aws_region}/%{::user}.yaml"

  - name: "User-level data"
    path: "%{::user}.yaml"

  - name: "AWS region-level data"
    path: "%{::aws_region}/common.yaml"

  - name: "Common data"
    path: "common.yaml"

Setup

AWS setup

  1. Make sure you have your AWS credentials (Access key and Secret key).
  2. If you don't already have one, make sure you create an AWS SSH keypair in the region you are going to use.

(To create a keypair, go to https://console.aws.amazon.com/ec2/v2/home#KeyPairs)

Setup on your Mac

brew install awscli
aws configure # needed for your AWS access
export AWS_REGION=$your_region # speeds up puppet aws module tremendously
export FACTER_aws_region=$your_region # needed for hiera
export FACTER_user=$your_user_name # needed for hiera
sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk retries --no-ri --no-rdoc
puppet module install puppetlabs/aws
puppet module install puppetlabs/stdlib

Usage

Clone the devhops repo

git clone https://github.com/puppetlabs-seteam/devhops.git

Configure hiera

  • cd to the module dir cd devhops
  • Configure region-specific AMI ids in the hash devhops::amis in the data/common.yaml file
  • If not done yet, create the file data/${FACTER_aws_region}/common.yaml and configure region-specific AWS variables
  • If not done yet, reserve a static IP for your master by doing: aws ec2 allocate-address --region ${FACTER_aws_region}
  • Create the file data/${FACTER_aws_region}/${FACTER_user}.yaml and add your devhops::key_name and devhops::master_ip
  • Create the file data/${FACTER_user}.yaml and configure user-specific variabls (such as tags)

Provision the master

  • run tasks/provision.sh master

Provision count linux agents

  • run tasks/provision.sh linux_node count

Provision count windows agents

  • run tasks/provision.sh windows_node count

Provision the Puppet Discovery VM

  • run tasks/provision.sh discovery

Provision the Windows Domain Controller

  • run tasks/provision.sh windc

Configure the control repo

First, make sure to install bolt.

Next run the following task on the local machine. This will push the contents of the control repo you specify to Puppetmaster's local GOGS server (which is hosted at http://$puppet_ip:3000). Optionally, you can add your own public key to GOGS so you can start pusing your changes to the PM riectly.

bolt task run devhops::conf_control_repo --modulepath .. -n $master_ip control_repo="https://github.com/puppetlabs-seteam/control-repo-devhops.git" public_key_name=$key_name public_key_value="$($your_pub_key)" -u root -p #--debug --verbose

Limitations

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.