Created
July 9, 2014 08:49
-
-
Save itayw/ea7920a25faf81509928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[submodule "wiki"] | |
path = wiki | |
url = https://github.com/joola/joola.io.wiki.git | |
[submodule "build/cookbooks/nodejs"] | |
path = build/cookbooks/nodejs | |
url = https://github.com/mdxp/nodejs-cookbook.git | |
[submodule "build/cookbooks/apt"] | |
path = build/cookbooks/apt | |
url = https://github.com/opscode-cookbooks/apt.git | |
[submodule "build/cookbooks/build-essential"] | |
path = build/cookbooks/build-essential | |
url = https://github.com/opscode-cookbooks/build-essential.git | |
[submodule "build/cookbooks/yum-epel"] | |
path = build/cookbooks/yum-epel | |
url = https://github.com/opscode-cookbooks/yum-epel.git | |
[submodule "build/cookbooks/yum"] | |
path = build/cookbooks/yum | |
url = https://github.com/opscode-cookbooks/yum.git | |
[submodule "build/cookbooks/redisio"] | |
path = build/cookbooks/redisio | |
url = https://github.com/brianbianco/redisio.git | |
[submodule "build/cookbooks/mongodb"] | |
path = build/cookbooks/mongodb | |
url = https://github.com/edelight/chef-mongodb.git | |
[submodule "build/cookbooks/rabbitmq"] | |
path = build/cookbooks/rabbitmq | |
url = https://github.com/kennonkwok/rabbitmq | |
[submodule "build/cookbooks/ulimit"] | |
path = build/cookbooks/ulimit | |
url = https://github.com/bmhatfield/chef-ulimit.git | |
[submodule "build/cookbooks/python"] | |
path = build/cookbooks/python | |
url = https://github.com/poise/python.git | |
[submodule "build/cookbooks/runit"] | |
path = build/cookbooks/runit | |
url = https://github.com/hw-cookbooks/runit.git | |
[submodule "build/cookbooks/erlang"] | |
path = build/cookbooks/erlang | |
url = https://github.com/opscode-cookbooks/erlang.git | |
[submodule "build/cookbooks/yum-erlang_solutions"] | |
path = build/cookbooks/yum-erlang_solutions | |
url = https://github.com/opscode-cookbooks/yum-erlang_solutions.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "build-essential" | |
# CREATE THE JOOLA GROUP | |
group "joola" do | |
gid 1500 | |
end | |
# CREATE THE JOOLA USER | |
user "joola" do | |
comment "Joola" | |
home "/home/joola" | |
gid "joola" | |
shell "/bin/bash" | |
password "$1$iM5DBZ6Z$EZw6e28BUw3DqK8z.dfEj." | |
end | |
# CREATE THE SSH DIR IN THE JOOLA USER | |
directory "/home/joola" do | |
not_if { File.exist?("/home/joola") } | |
owner "joola" | |
group "joola" | |
mode 00700 | |
action :create | |
end | |
rabbitmq_plugin "rabbitmq_management" do | |
action :enable | |
end | |
rabbitmq_plugin "rabbitmq_stomp" do | |
action :enable | |
end | |
bash "install joola" do | |
user "root" | |
code <<-EOH | |
mkdir /opt/joola | |
cd /opt/joola | |
npm install /vagrant | |
chown -R joola /opt/joola | |
EOH | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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.vm.box = "ubuntu/trusty32" | |
config.vm.network "forwarded_port", guest: 8080, host: 8080 | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
vb.customize ["modifyvm", :id, "--cpus", "2"] | |
end | |
config.vm.provision "chef_solo" do |chef| | |
chef.cookbooks_path = "./build/cookbooks" | |
chef.custom_config_path = "./build/cookbooks/VagrantConfig.chef" | |
chef.add_recipe "nodejs" | |
chef.add_recipe "redisio::install" | |
chef.add_recipe "redisio::enable" | |
chef.add_recipe "mongodb" | |
chef.add_recipe "rabbitmq" | |
chef.add_recipe "joola" | |
chef.verbose_logging = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment