Skip to content

Instantly share code, notes, and snippets.

@GMaissa
Last active September 20, 2015 21:19
Show Gist options
  • Save GMaissa/6a8d93cfe4a590f4a624 to your computer and use it in GitHub Desktop.
Save GMaissa/6a8d93cfe4a590f4a624 to your computer and use it in GitHub Desktop.
Initialize Rubedo demo environment using Ansible and Vagrant
---
- hosts: rubedo-front
sudo: yes
roles:
- GMaissa.common
- GMaissa.rubedo
- GMaissa.mailcatcher
- kosssi.composer
tasks:
- name: Install Rubedo dependencies
shell: ./rubedo.sh
args:
chdir: "{{ rubedo_vhost.root }}"
vars:
rubedo_vhost:
filename: rubedo.conf
enabled: yes
listen: '*:80'
root: /var/www/rubedo
name: rubedo.test
aliases: []
rubedo_download: true
rubedo_version: 3.2.0
common_packages:
- vim
- tree
- git
- strace
# Composer configuration
#composer_github_oauth: YOUR_GITHUB_TOKEN
- hosts: rubedo-db
sudo: yes
roles:
- GMaissa.mongodb
- hosts: rubedo-search
sudo: yes
roles:
- GMaissa.elasticsearch
vars:
elasticsearch_version: 1.5.2
elasticsearch_mandatory_plugins:
elasticsearch/elasticsearch-mapper-attachments: 2.5.0
elasticsearch/elasticsearch-analysis-icu: 2.5.0
---
- src: https://github.com/GMaissa/ansible-role-common
version: master
name: GMaissa.common
- src: https://github.com/GMaissa/ansible-role-rubedo
version: master
name: GMaissa.rubedo
- src: https://github.com/GMaissa/ansible-role-elasticsearch
version: master
name: GMaissa.elasticsearch
- src: https://github.com/GMaissa/ansible-role-mongodb
version: master
name: GMaissa.mongodb
- src: GMaissa.mailcatcher
- src: kosssi.composer
# -*- 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|
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.vm.define 'rubedo' do |rubedo|
rubedo.vm.box = "puphpet/debian75-x64"
rubedo.vm.hostname = 'rubedo.test'
rubedo.vm.network :private_network, ip: '192.168.56.185'
end
config.vm.provision "ansible" do |ansible|
ansible.groups = {
"rubedo-front" => ["rubedo"],
"rubedo-db" => ["rubedo"],
"rubedo-search" => ["rubedo"],
"rubedo:children" => ["rubedo-front", "rubedo-db", "rubedo-search"]
}
ansible.playbook = "playbook.yml"
end
end
@GMaissa
Copy link
Author

GMaissa commented Jul 19, 2015

Be sure to install required roles with the command :

ansible-galaxy install -fr requirements.yml

And to configure your github token in the playbook, to complete Rubedo dependencies installation with composer :

# Configure with your github token
#composer_github_oauth: YOUR_GITHUB_TOKEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment