Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Vagrant + Saltstack + Buddycloud stack = BC in a box.
Lua SaltStack Shell HTML Scheme Python
Branch: master
Failed to load latest commit information.
saltstack
.gitignore
README.md make sure that firewall is open for 3000
Vagrantfile Fixed to working saltstack version

README.md

Vagrant + Saltstack + Buddycloud = Buddycloud stack in a Box

Getting Started

Install Git Install VirtualBox Install Vagrant (v1.7.2 or later)

Open a terminal

# in this example we'll assume you work in ~/src/
git clone https://github.com/buddycloud/buddycloud-vm.git
cd buddycloud-vm

Add your username and public key to ~/src/buddycloud-vm/saltstack/pillar/users.sls

Building the VM

vagrant up

SSH into the VM

# [if necessary] remove old key
ssh-keygen -R '[localhost]:2222'
ssh vagrant@localhost -p2222 # or your username if you configured it 
# password is vagrant

Configure changes

Outside the VM Inside the VM
Public configs buddycloud-vm/saltstack/salt/* (read-write) /srv/salt_upstream/saltstack/salt (read-only) e.g. buddycloud-vm/saltstack/salt/nginx.conf.template
Private configs buddycloud-vm/saltstack/pillars/* (read-write) /srv/salt_upstream/saltstack/pillars (read-only) e.g. database passwords
Connecting ssh vagrant@localhost -p2222 (password is vagrant)
Activating changes salt-call --local state.highstate
Webroot buddycloud-vm/buddycloud-webapp (read-write) /opt/buddycloud-webapp (read-only) visible on http://localhost:8080
When deployed to AWS/GCE/your-server edit /etc/salt/minion to pull updates from Git this will pull all future system configs from your private git repo

Depoloying to providers

To deploy to a hosting provider, edit the Vagrantfile with your cloud-hosting-provider data.

Google Cloud

Configure according to https://github.com/mitchellh/vagrant-google, then:

vagrant plugin install vagrant-google
vagrant up --provider=google

VSphere

vagrant plugin install vagrant-vsphere
vagrant up --provider=vsphere

Shutting down the VM

Shut down Vagrant with: vagrant halt. And vagrant kill will remove all disks and configs.

Running in Production

This VM can [optionally] mix settings from your 1) your private repo (override any settings elsewhere) 2) the buddycloud-vm repo.

Setup to run in production,

  • create a private repo (eg: buddycloud-vm-bigproject)
  • git clone buddycloud-vm-bigproject into /srv/salt_local
  • edit /etc/salt/minion.conf add add the path of your private repo
  • run salt-call --local state.highstate

Then each time you want to update the VM,

  • cd /srv/salt_local
  • git pull
  • salt-call --local state.highstate

Todo (pull requests welcomed)

  • add logrotate for all packages
Something went wrong with that request. Please try again.