GithubHelp home page GithubHelp logo

packer-puppet's Introduction

Packer Percona

The goal of these packer builds is to create consistent Vagrant boxes across multiple vagrant providers, specifically for Percona vagrant usage. Currently only Virtualbox and EC2 are supported.

These setups are typically for the purposes of internal testing and demonstration purposes and don't necessarily reflect recommended production settings.

Setup

Required Software:

And one or all of the following for the associated box types to get created:

AWS

Put your access and secret keys in environment variables in your .bashrc or similar (for packer):

export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=THE_ASSOCIATED_SECRET_KEY

Building

Currently only CentOS 6 is up to date. Ubuntu and other Linux types are feasible with Packer.

  • Modify centos6.json as desired
  • Source AMI
  • Region
packer validate centos-6_4-64.json
packer build centos-6_4-64.json
vagrant box add centos-6_4-64_percona centos-6_4-64_percona_virtualbox.box
vagrant box add centos-6_4-64_percona centos-6_4-64_percona_aws.box
cd ..

This will add boxes for each of the providers packer builds a box for. You can optionally just build a box for specific provider like this:

packer build --only=amazon-ebs centos-6_4-64.json

Once you are done building boxes, they will be located in the 'boxes' subdir. You can manually load them using 'vagrant box add' or use the 'load_boxes.sh' to add all boxes and replace any that may already be in Vagrant.

Nuances

  • These boxes assume Vagrant is logging in with 'root', not 'vagrant'.
  • These boxes should be updated to the latest package releases on build
  • An extra device or logical volume is available (and possibly setup) for /var/lib/mysql (note: for AWS you can configure these at the vagrant-aws level now, so we will leave this unset for EC2 instances)

Local Percona package repository

These boxes contain a local repository that is disabled by default containing recent releases of Percona software. This repo can be enabled for the purposes of using these boxes in situations with poor or no internet connectivity. (E.g., conferences)

OSes

CentOS 6 builds

The VM-based builds use a netinstall ISO and a kickstart file to provision the box. This guarantees all packages are up to date at the time of the build.

AWS uses an official CentOS 6 AMI "with Updates". http://wiki.centos.org/Cloud/AWS These are Region-specific, so you'll need a different AMI identifier for different AWS regions.

The local Percona repo is stored in /var/repo and the repo definition is in /etc/yum.repos.d/local.repo. Change 'enabled' to '1' in that file to use the local repo.

Ubuntu

Needs work

???

Providers

Virtualbox

Local VM -- a favorite for conference tutorials.

http://virtualbox.org

Amazon EC2 - EBS AMI

Creates an EBS-based AMI associated with a specific AWS Region.

The current instance comes with no extra EBS volumes because these can be added at the Vagrant level. However, you can create AMIs with the EBS volumes pre-defined. An example of such a configuratuion creating a 100GB volume with 1000 provisioned IOPS:

    "ami_block_device_mappings": [
      {
        "device_name": "/dev/sda",
        "delete_on_termination": true
      },
      {
        "device_name": "/dev/sdf",
        "virtual_name": "mysql_data",
        "volume_size": 100,
        "volume_type": "io1",
        "iops": 1000,
        "delete_on_termination": true
      }
    ]

???

Maintenance

Packer will cruft up your EC2 dashboard. In particular, pay attention and periodically delete:

  • Old AMIs
  • Unused EBS volumes left over from AMI creation

packer-puppet's People

Contributors

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