Skip to content

A Vagrant configuration using ansible to provision Ubuntu Precise and the latest versions of Node.js, MongoDB, Yeoman, and the Yeoman Angular.js generator.

Notifications You must be signed in to change notification settings

awongh/vagrant-ansible-mean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting MEAN with Vagrant and Ansible

This configuration will install the latest versions of MongoDB, Nginx, Node.js, Express, Yeoman, and the Yeoman Angular.js generator. Ruby and the compass gem are installed for the yo build process.

All running on the Ubuntu 13.10 (Saucy Salamander)

Installation

  1. Install Vagrant 1.3.5
  2. Install VirtualBox 4.3
  3. Install Ansible

Running

Running and provisioning can be handled nicely:

vagrant up

You can SSH into the provisioned vm like so:

vagrant ssh

And stop it:

vagrant halt

Voila! You have a development enviroment with the latest and greatest Node.js, MongoDB, and Yeoman.

Note: part of the provisioning process ensures that Mongo is already running on it's default port.

Ansible

Ansible is configured to run for the vagrant host and you can see the specified private IP in provisioning/hosts.

If for some reason you want to use a different IP, be aware that you will need to update the Vagrantfile as well as provisioning/hosts.

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  config.vm.network :private_network, ip: "192.168.111.222"
end

Ansible installs the following packages:

  • git
  • nodejs
  • mongodb
  • yeoman
  • generator-angular for yeoman
  • express
  • nginx

The mongodb and nginx services are started after provisioning takes place.

Synced Folders

By default this repo disables directory syncing. If you wish to have this environment checked in as part of the dev process you can create your source directory in the top level of the project and uncomment this line in the Vagrantfile:

# config.vm.synced_folder "src/", "/home/vagrant/path/to/your/project"

This will sync your source folders over SSH so you can develop on your host machine.

Ansible Variables

The file provisioning/group_vars/all contains configurations for your install. This will allow you to configure project directories and things like nginx hostname and the port node js will run on.

VM Configuration

For more on VM configuration options, check out the docs at Vagrant

About

A Vagrant configuration using ansible to provision Ubuntu Precise and the latest versions of Node.js, MongoDB, Yeoman, and the Yeoman Angular.js generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages