Skip to content

Instantly share code, notes, and snippets.

@phaus
Last active August 29, 2015 14:07
Show Gist options
  • Save phaus/7dcbab06b0e7c3e9e46e to your computer and use it in GitHub Desktop.
Save phaus/7dcbab06b0e7c3e9e46e to your computer and use it in GitHub Desktop.
vagrant-mesos
- hosts: default
vars:
builddir: /root/build
tasks:
- name: Ensure APT Cache is most recent
apt: update_cache=yes
- name: Ensure build Dependencies are installed
apt: name={{ item }} state=present force=yes
with_items:
- build-essential
- openjdk-6-jdk
- python-dev
- python-boto
- libcurl4-nss-dev
- libsasl2-dev
- maven
- git
- name: Ensure build from Depo Dependencies are installed
apt: name={{ item }} state=present force=yes
with_items:
- autoconf
- libtool
- name: clone mesos repo
git: repo=http://git-wip-us.apache.org/repos/asf/mesos.git dest={{ builddir }}/mesos
- name: Bootstrap mesos build
command: chdir={{ builddir }}/mesos ./bootstrap
- name: Ensure mesos Build Folder is present
file: path={{ builddir }}/mesos/build state=directory
- name: Configure mesos build
command: chdir={{ builddir }}/mesos/build ../configure
- name: Make mesos (will take A LOT of time)
command: chdir={{ builddir }}/mesos/build make
- name: Make check mesos (will take A LOT of time)
command: chdir={{ builddir }}/mesos/build make check
- name: Make install mesos (will take A LOT of time)
command: chdir={{ builddir }}/mesos/build make install
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 5050, host: 5050
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.memory = 2048
vb.cpus = 2
end
# provision with ansible
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yaml"
ansible.sudo = true
ansible.host_key_checking = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment