better directory struct
This commit is contained in:
parent
b49dfa915e
commit
977318fbe4
9
Vagrantfile
vendored
9
Vagrantfile
vendored
@ -42,9 +42,12 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.provision "chef_solo" do |chef|
|
||||
chef.version = "14.12.3" # version 14.12.9 fails to run
|
||||
chef.cookbooks_path = "cookbooks/"
|
||||
chef.roles_path = "roles"
|
||||
chef.add_role("gitea")
|
||||
chef.cookbooks_path = [
|
||||
'ops/cookbooks/',
|
||||
'ops/cookbooks/vendor'
|
||||
]
|
||||
chef.roles_path = 'ops/roles'
|
||||
chef.add_role('gitea')
|
||||
chef.json = {
|
||||
'custom-domain': 'localhost.vm42.us',
|
||||
'custom-title': 'My gitea server!',
|
||||
|
@ -1,2 +0,0 @@
|
||||
cookbook_path '/opt/theta42/provision-node/cookbooks'
|
||||
roles_path '/opt/theta42/provision-node/roles'
|
28
init.sh
28
init.sh
@ -1,6 +1,22 @@
|
||||
wget https://packages.chef.io/files/stable/chefdk/3.9.0/ubuntu/16.04/chefdk_3.9.0-1_amd64.deb -O chefdk.deb
|
||||
dpkg -i chefdk.deb
|
||||
mkdir /opt/theta42 -p
|
||||
rm -rf /opt/theta42/provision-node
|
||||
git clone https://git.theta42.com/git-hosting/provision-node.git /opt/theta42/provision-node
|
||||
chef-solo -c /opt/theta42/provision-node/cookbooks/solo.rb -j /opt/theta42/provision-node/cookbooks/hosting.json
|
||||
|
||||
apt install git wget nano;
|
||||
|
||||
if which chef-solo; then
|
||||
echo 'found chef-solo, skipping';
|
||||
else
|
||||
echo 'Installing chef-dk';
|
||||
|
||||
wget https://packages.chef.io/files/stable/chefdk/3.9.0/ubuntu/16.04/chefdk_3.9.0-1_amd64.deb -O chefdk.deb;
|
||||
|
||||
dpkg -i chefdk.deb;
|
||||
fi
|
||||
|
||||
mkdir /opt/theta42 -p;
|
||||
|
||||
rm -rf /opt/theta42/provision-node;
|
||||
|
||||
## Install the node agent
|
||||
|
||||
git clone https://git.theta42.com/git-hosting/provision-node.git /opt/theta42/provision-node;
|
||||
|
||||
chef-solo -c /opt/theta42/provision-node/cookbooks/solo.rb -j /opt/theta42/provision-node/cookbooks/hosting.json;
|
||||
|
5
ops/solo.rb
Normal file
5
ops/solo.rb
Normal file
@ -0,0 +1,5 @@
|
||||
cookbook_path [
|
||||
'/opt/theta42/provision-node/ops/cookbooks',
|
||||
'/opt/theta42/provision-node/ops/cookbooks/vendor',
|
||||
]
|
||||
roles_path '/opt/theta42/provision-node/ops/roles'
|
Loading…
x
Reference in New Issue
Block a user