diff --git a/Vagrantfile b/Vagrantfile index 297a96d..6e2769e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -23,7 +23,7 @@ Vagrant.configure("2") do |config| # 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. # NOTE: This will enable public access to the opened port - # config.vm.network "forwarded_port", guest: 80, host: 8080 + config.vm.network "forwarded_port", guest: 3000, host: 8080 # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine and only allow access @@ -69,7 +69,12 @@ Vagrant.configure("2") do |config| # SHELL config.vm.provision "chef_solo" do |chef| - chef.cookbooks_path = "/vagrant/cookbooks/" - chef.add_recipe "hosting::user" + 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.add_recipe "hosting::user" + # chef.add_recipe "hosting::mkdir" + # chef.add_recipe "hosting::postgress" end end diff --git a/cookbooks/hosting.json b/cookbooks/hosting.json index bd87700..e6653ea 100644 --- a/cookbooks/hosting.json +++ b/cookbooks/hosting.json @@ -1,6 +1,3 @@ { - "run_list": [ "recipe[hosting::user]", - "recipe[hosting::mkdir]", - "recipe[hosting::postgress]" - ] + "run_list": [ "role[gitea]"] } diff --git a/cookbooks/hosting/metadata.json b/cookbooks/hosting/metadata.json deleted file mode 100644 index 9076585..0000000 --- a/cookbooks/hosting/metadata.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "hosting", - "description": "Installs/Configures hosting", - "long_description": "Installs/Configures hosting", - "maintainer": "The Authors", - "maintainer_email": "you@example.com", - "license": "All Rights Reserved", - "platforms": { - - }, - "dependencies": { - - }, - "providing": { - - }, - "recipes": { - - }, - "version": "0.1.0", - "source_url": "", - "issues_url": "", - "privacy": false, - "chef_versions": [ - [ - ">= 13.0" - ] - ], - "ohai_versions": [ - - ], - "gems": [ - - ] -} diff --git a/cookbooks/solo.rb b/cookbooks/solo.rb index af837ee..a1409a8 100644 --- a/cookbooks/solo.rb +++ b/cookbooks/solo.rb @@ -1 +1,2 @@ -cookbook_path '/opt/theta42/provision-node/cookbooks' \ No newline at end of file +cookbook_path '/opt/theta42/provision-node/cookbooks' +roles_path '/opt/theta42/provision-node/roles' diff --git a/roles/gitea.rb b/roles/gitea.rb new file mode 100644 index 0000000..84d507f --- /dev/null +++ b/roles/gitea.rb @@ -0,0 +1,8 @@ +name :gitea +description "A basic role" + +run_list( + "recipe[hosting::user]", + "recipe[hosting::mkdir]", + "recipe[hosting::postgress]", +) \ No newline at end of file