Giter Site home page Giter Site logo

vagrant-files's Introduction

vagrant-files

A set of vagrant files for server deployments.

Requirements

You will need a recent version of Vagrant. I suggest downloading the most recent official packages from Vagrant homepage:

In addition you will need the vagrant-env plugin:

It can be installed easily:

$ vagrant plugin install vagrant-env

Bootstrapping scripts come from the PuppetFinland "scripts" repository:

They are included as a Git submodule.

Configuring vagrant-files

To configure Vagrant edit .env in a provider-specific directory, e.g.

$ cd vagrant-files/ec2
$ cp env.sample .env
$ nano .env

Customize .env to match your environment. All of the parameters can be overridden on the command-line. For example if you're using the EC2 provider you could do

$ FQDN=server.domain.com AMI=ami-628cbc7f VOLUMESIZE=40 vagrant up

This would create an instance with a volume size and AMI image that differ from what is configured in ec2/.env.

You can also maintain several different env files for different purposes and make .env a symbolic link to the desired one. You may need to "rm -rf ec2/.vagrant" after switching environments, though.

EC2 notes

EC2 deployments depend on the Vagrant AWS plugin:

It can be installed easily using

$ vagrant plugin install vagrant-aws

The value of EC2_USER_DATA environment variable will determine the script to run on the host. All the other parameters are typical EC2 stuff.

Libvirt notes

Libvirt deployments depend on the Vagrant libvirt plugin:

It can be installed easily using

$ vagrant plugin install vagrant-libvirt

Note that vagrant-libvirt does not currently support attaching the generated VM to an existing bridge interface. This makes it a bit less useful for production server deployments, but does not negatively affect the VirtualBox-style desktop/laptop test provisioning.

Deploying

Once you're done setting up your deployment scripts and .env file, go to the provider-specific directory (e.g. "ec2" or "libvirt") and run

$ FQDN=server.domain.com vagrant up

FQDN is the fully-qualified domain name for the new node and it is generally used for two things:

  • To give a name for the VM instance
  • To make sure that "facter fqdn" resolves to a reasonable value

Some of the puppet-specific example bootstrapping scripts also parse the LSBDISTCODENAME parameter, which is only used to determine which Puppet packages to install from Puppetlabs software repositories:

$ FQDN=server.domain.com LSBDISTCODENAME=wheezy vagrant up

With *NIX provisioning and bootstrapping should just magically work. With Windows be prepared to endure tons of pain and sorrow.

vagrant-files's People

Contributors

mattock avatar

Watchers

James Cloos avatar Mikko Vilpponen avatar  avatar Kibahop avatar  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.