From 8b69ba10a79cae8208dce0d7ea55331e1b830c26 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Mon, 20 May 2019 01:39:19 -0400 Subject: [PATCH] ?? --- Vagrantfile | 4 ++-- init.sh | 2 +- ops/app.json | 5 +++++ .../{hosting => app}/.delivery/build_cookbook/.kitchen.yml | 0 .../{hosting => app}/.delivery/build_cookbook/Berksfile | 0 .../{hosting => app}/.delivery/build_cookbook/LICENSE | 0 .../{hosting => app}/.delivery/build_cookbook/README.md | 0 .../{hosting => app}/.delivery/build_cookbook/chefignore | 0 .../data_bags/keys/delivery_builder_keys.json | 0 .../{hosting => app}/.delivery/build_cookbook/metadata.rb | 0 .../.delivery/build_cookbook/recipes/default.rb | 0 .../.delivery/build_cookbook/recipes/deploy.rb | 0 .../.delivery/build_cookbook/recipes/functional.rb | 0 .../.delivery/build_cookbook/recipes/lint.rb | 0 .../.delivery/build_cookbook/recipes/provision.rb | 0 .../.delivery/build_cookbook/recipes/publish.rb | 0 .../.delivery/build_cookbook/recipes/quality.rb | 0 .../.delivery/build_cookbook/recipes/security.rb | 0 .../.delivery/build_cookbook/recipes/smoke.rb | 0 .../.delivery/build_cookbook/recipes/syntax.rb | 0 .../.delivery/build_cookbook/recipes/unit.rb | 0 .../.delivery/build_cookbook/secrets/fakey-mcfakerton | 0 .../build_cookbook/test/fixtures/cookbooks/test/metadata.rb | 0 .../test/fixtures/cookbooks/test/recipes/default.rb | 0 ops/cookbooks/{hosting => app}/.delivery/config.json | 0 ops/cookbooks/{hosting => app}/.delivery/project.toml | 0 ops/cookbooks/{hosting => app}/.gitignore | 0 ops/cookbooks/{hosting => app}/.kitchen.yml | 0 ops/cookbooks/{hosting => app}/Berksfile | 0 ops/cookbooks/{hosting => app}/CHANGELOG.md | 0 ops/cookbooks/{hosting => app}/LICENSE | 0 ops/cookbooks/{hosting => app}/README.md | 0 ops/cookbooks/{hosting => app}/chefignore | 0 ops/cookbooks/{hosting => app}/metadata.rb | 2 +- ops/cookbooks/{hosting => app}/recipes/default.rb | 0 ops/cookbooks/{hosting => app}/recipes/gitea.rb | 0 ops/cookbooks/{hosting => app}/recipes/mkdir.rb | 0 ops/cookbooks/{hosting => app}/recipes/nginx.rb | 0 ops/cookbooks/{hosting => app}/recipes/postgress.rb | 0 ops/cookbooks/{hosting => app}/recipes/user.rb | 0 ops/cookbooks/{hosting => app}/spec/spec_helper.rb | 0 .../{hosting => app}/spec/unit/recipes/default_spec.rb | 0 ops/cookbooks/{hosting => app}/templates/app.ini.erb | 0 ops/cookbooks/{hosting => app}/templates/autossl.conf.erb | 0 .../{hosting => app}/templates/gitea_postgres.sql.erb | 0 ops/cookbooks/{hosting => app}/templates/host.conf.erb | 0 ops/cookbooks/{hosting => app}/templates/nginx.conf.erb | 0 .../test/integration/default/default_test.rb | 0 ops/hosting.json | 3 --- ops/roles/{gitea.rb => app.rb} | 6 ++---- 50 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 ops/app.json rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/.kitchen.yml (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/Berksfile (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/LICENSE (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/README.md (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/chefignore (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/data_bags/keys/delivery_builder_keys.json (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/metadata.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/default.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/deploy.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/functional.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/lint.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/provision.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/publish.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/quality.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/security.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/smoke.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/syntax.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/recipes/unit.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/secrets/fakey-mcfakerton (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/test/fixtures/cookbooks/test/metadata.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/build_cookbook/test/fixtures/cookbooks/test/recipes/default.rb (100%) rename ops/cookbooks/{hosting => app}/.delivery/config.json (100%) rename ops/cookbooks/{hosting => app}/.delivery/project.toml (100%) rename ops/cookbooks/{hosting => app}/.gitignore (100%) rename ops/cookbooks/{hosting => app}/.kitchen.yml (100%) rename ops/cookbooks/{hosting => app}/Berksfile (100%) rename ops/cookbooks/{hosting => app}/CHANGELOG.md (100%) rename ops/cookbooks/{hosting => app}/LICENSE (100%) rename ops/cookbooks/{hosting => app}/README.md (100%) rename ops/cookbooks/{hosting => app}/chefignore (100%) rename ops/cookbooks/{hosting => app}/metadata.rb (97%) rename ops/cookbooks/{hosting => app}/recipes/default.rb (100%) rename ops/cookbooks/{hosting => app}/recipes/gitea.rb (100%) rename ops/cookbooks/{hosting => app}/recipes/mkdir.rb (100%) rename ops/cookbooks/{hosting => app}/recipes/nginx.rb (100%) rename ops/cookbooks/{hosting => app}/recipes/postgress.rb (100%) rename ops/cookbooks/{hosting => app}/recipes/user.rb (100%) rename ops/cookbooks/{hosting => app}/spec/spec_helper.rb (100%) rename ops/cookbooks/{hosting => app}/spec/unit/recipes/default_spec.rb (100%) rename ops/cookbooks/{hosting => app}/templates/app.ini.erb (100%) rename ops/cookbooks/{hosting => app}/templates/autossl.conf.erb (100%) rename ops/cookbooks/{hosting => app}/templates/gitea_postgres.sql.erb (100%) rename ops/cookbooks/{hosting => app}/templates/host.conf.erb (100%) rename ops/cookbooks/{hosting => app}/templates/nginx.conf.erb (100%) rename ops/cookbooks/{hosting => app}/test/integration/default/default_test.rb (100%) delete mode 100644 ops/hosting.json rename ops/roles/{gitea.rb => app.rb} (92%) diff --git a/Vagrantfile b/Vagrantfile index 93e00c8..625d762 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -14,7 +14,6 @@ Vagrant.configure("2") do |config| # boxes at https://vagrantcloud.com/search. config.vm.box = "generic/ubuntu1604" - # Create a forwarded port mapping which allows access to a specific port # 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. @@ -47,8 +46,9 @@ Vagrant.configure("2") do |config| 'ops/cookbooks/vendor' ] chef.roles_path = 'ops/roles' - chef.add_role('gitea') + chef.add_role('app') chef.json = { + 'custom-domain': 'localhost.vm42.us', 'custom-title': 'My gitea server!', 'db-password': 'mypassword', diff --git a/init.sh b/init.sh index 0501234..78a1d32 100644 --- a/init.sh +++ b/init.sh @@ -1,5 +1,5 @@ -apt install git wget nano; +apt-get install -y git wget nano; if which chef-solo; then echo 'found chef-solo, skipping'; diff --git a/ops/app.json b/ops/app.json new file mode 100644 index 0000000..86adf57 --- /dev/null +++ b/ops/app.json @@ -0,0 +1,5 @@ +{ + "run_list": [ + "role[app]" + ] +} diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/.kitchen.yml b/ops/cookbooks/app/.delivery/build_cookbook/.kitchen.yml similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/.kitchen.yml rename to ops/cookbooks/app/.delivery/build_cookbook/.kitchen.yml diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/Berksfile b/ops/cookbooks/app/.delivery/build_cookbook/Berksfile similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/Berksfile rename to ops/cookbooks/app/.delivery/build_cookbook/Berksfile diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/LICENSE b/ops/cookbooks/app/.delivery/build_cookbook/LICENSE similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/LICENSE rename to ops/cookbooks/app/.delivery/build_cookbook/LICENSE diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/README.md b/ops/cookbooks/app/.delivery/build_cookbook/README.md similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/README.md rename to ops/cookbooks/app/.delivery/build_cookbook/README.md diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/chefignore b/ops/cookbooks/app/.delivery/build_cookbook/chefignore similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/chefignore rename to ops/cookbooks/app/.delivery/build_cookbook/chefignore diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/data_bags/keys/delivery_builder_keys.json b/ops/cookbooks/app/.delivery/build_cookbook/data_bags/keys/delivery_builder_keys.json similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/data_bags/keys/delivery_builder_keys.json rename to ops/cookbooks/app/.delivery/build_cookbook/data_bags/keys/delivery_builder_keys.json diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/metadata.rb b/ops/cookbooks/app/.delivery/build_cookbook/metadata.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/metadata.rb rename to ops/cookbooks/app/.delivery/build_cookbook/metadata.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/default.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/default.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/default.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/default.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/deploy.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/deploy.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/deploy.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/deploy.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/functional.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/functional.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/functional.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/functional.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/lint.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/lint.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/lint.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/lint.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/provision.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/provision.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/provision.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/provision.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/publish.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/publish.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/publish.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/publish.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/quality.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/quality.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/quality.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/quality.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/security.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/security.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/security.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/security.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/smoke.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/smoke.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/smoke.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/smoke.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/syntax.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/syntax.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/syntax.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/syntax.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/recipes/unit.rb b/ops/cookbooks/app/.delivery/build_cookbook/recipes/unit.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/recipes/unit.rb rename to ops/cookbooks/app/.delivery/build_cookbook/recipes/unit.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/secrets/fakey-mcfakerton b/ops/cookbooks/app/.delivery/build_cookbook/secrets/fakey-mcfakerton similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/secrets/fakey-mcfakerton rename to ops/cookbooks/app/.delivery/build_cookbook/secrets/fakey-mcfakerton diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/test/fixtures/cookbooks/test/metadata.rb b/ops/cookbooks/app/.delivery/build_cookbook/test/fixtures/cookbooks/test/metadata.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/test/fixtures/cookbooks/test/metadata.rb rename to ops/cookbooks/app/.delivery/build_cookbook/test/fixtures/cookbooks/test/metadata.rb diff --git a/ops/cookbooks/hosting/.delivery/build_cookbook/test/fixtures/cookbooks/test/recipes/default.rb b/ops/cookbooks/app/.delivery/build_cookbook/test/fixtures/cookbooks/test/recipes/default.rb similarity index 100% rename from ops/cookbooks/hosting/.delivery/build_cookbook/test/fixtures/cookbooks/test/recipes/default.rb rename to ops/cookbooks/app/.delivery/build_cookbook/test/fixtures/cookbooks/test/recipes/default.rb diff --git a/ops/cookbooks/hosting/.delivery/config.json b/ops/cookbooks/app/.delivery/config.json similarity index 100% rename from ops/cookbooks/hosting/.delivery/config.json rename to ops/cookbooks/app/.delivery/config.json diff --git a/ops/cookbooks/hosting/.delivery/project.toml b/ops/cookbooks/app/.delivery/project.toml similarity index 100% rename from ops/cookbooks/hosting/.delivery/project.toml rename to ops/cookbooks/app/.delivery/project.toml diff --git a/ops/cookbooks/hosting/.gitignore b/ops/cookbooks/app/.gitignore similarity index 100% rename from ops/cookbooks/hosting/.gitignore rename to ops/cookbooks/app/.gitignore diff --git a/ops/cookbooks/hosting/.kitchen.yml b/ops/cookbooks/app/.kitchen.yml similarity index 100% rename from ops/cookbooks/hosting/.kitchen.yml rename to ops/cookbooks/app/.kitchen.yml diff --git a/ops/cookbooks/hosting/Berksfile b/ops/cookbooks/app/Berksfile similarity index 100% rename from ops/cookbooks/hosting/Berksfile rename to ops/cookbooks/app/Berksfile diff --git a/ops/cookbooks/hosting/CHANGELOG.md b/ops/cookbooks/app/CHANGELOG.md similarity index 100% rename from ops/cookbooks/hosting/CHANGELOG.md rename to ops/cookbooks/app/CHANGELOG.md diff --git a/ops/cookbooks/hosting/LICENSE b/ops/cookbooks/app/LICENSE similarity index 100% rename from ops/cookbooks/hosting/LICENSE rename to ops/cookbooks/app/LICENSE diff --git a/ops/cookbooks/hosting/README.md b/ops/cookbooks/app/README.md similarity index 100% rename from ops/cookbooks/hosting/README.md rename to ops/cookbooks/app/README.md diff --git a/ops/cookbooks/hosting/chefignore b/ops/cookbooks/app/chefignore similarity index 100% rename from ops/cookbooks/hosting/chefignore rename to ops/cookbooks/app/chefignore diff --git a/ops/cookbooks/hosting/metadata.rb b/ops/cookbooks/app/metadata.rb similarity index 97% rename from ops/cookbooks/hosting/metadata.rb rename to ops/cookbooks/app/metadata.rb index c191b0f..2698051 100644 --- a/ops/cookbooks/hosting/metadata.rb +++ b/ops/cookbooks/app/metadata.rb @@ -1,4 +1,4 @@ -name 'hosting' +name 'app' maintainer 'The Authors' maintainer_email 'you@example.com' license 'All Rights Reserved' diff --git a/ops/cookbooks/hosting/recipes/default.rb b/ops/cookbooks/app/recipes/default.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/default.rb rename to ops/cookbooks/app/recipes/default.rb diff --git a/ops/cookbooks/hosting/recipes/gitea.rb b/ops/cookbooks/app/recipes/gitea.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/gitea.rb rename to ops/cookbooks/app/recipes/gitea.rb diff --git a/ops/cookbooks/hosting/recipes/mkdir.rb b/ops/cookbooks/app/recipes/mkdir.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/mkdir.rb rename to ops/cookbooks/app/recipes/mkdir.rb diff --git a/ops/cookbooks/hosting/recipes/nginx.rb b/ops/cookbooks/app/recipes/nginx.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/nginx.rb rename to ops/cookbooks/app/recipes/nginx.rb diff --git a/ops/cookbooks/hosting/recipes/postgress.rb b/ops/cookbooks/app/recipes/postgress.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/postgress.rb rename to ops/cookbooks/app/recipes/postgress.rb diff --git a/ops/cookbooks/hosting/recipes/user.rb b/ops/cookbooks/app/recipes/user.rb similarity index 100% rename from ops/cookbooks/hosting/recipes/user.rb rename to ops/cookbooks/app/recipes/user.rb diff --git a/ops/cookbooks/hosting/spec/spec_helper.rb b/ops/cookbooks/app/spec/spec_helper.rb similarity index 100% rename from ops/cookbooks/hosting/spec/spec_helper.rb rename to ops/cookbooks/app/spec/spec_helper.rb diff --git a/ops/cookbooks/hosting/spec/unit/recipes/default_spec.rb b/ops/cookbooks/app/spec/unit/recipes/default_spec.rb similarity index 100% rename from ops/cookbooks/hosting/spec/unit/recipes/default_spec.rb rename to ops/cookbooks/app/spec/unit/recipes/default_spec.rb diff --git a/ops/cookbooks/hosting/templates/app.ini.erb b/ops/cookbooks/app/templates/app.ini.erb similarity index 100% rename from ops/cookbooks/hosting/templates/app.ini.erb rename to ops/cookbooks/app/templates/app.ini.erb diff --git a/ops/cookbooks/hosting/templates/autossl.conf.erb b/ops/cookbooks/app/templates/autossl.conf.erb similarity index 100% rename from ops/cookbooks/hosting/templates/autossl.conf.erb rename to ops/cookbooks/app/templates/autossl.conf.erb diff --git a/ops/cookbooks/hosting/templates/gitea_postgres.sql.erb b/ops/cookbooks/app/templates/gitea_postgres.sql.erb similarity index 100% rename from ops/cookbooks/hosting/templates/gitea_postgres.sql.erb rename to ops/cookbooks/app/templates/gitea_postgres.sql.erb diff --git a/ops/cookbooks/hosting/templates/host.conf.erb b/ops/cookbooks/app/templates/host.conf.erb similarity index 100% rename from ops/cookbooks/hosting/templates/host.conf.erb rename to ops/cookbooks/app/templates/host.conf.erb diff --git a/ops/cookbooks/hosting/templates/nginx.conf.erb b/ops/cookbooks/app/templates/nginx.conf.erb similarity index 100% rename from ops/cookbooks/hosting/templates/nginx.conf.erb rename to ops/cookbooks/app/templates/nginx.conf.erb diff --git a/ops/cookbooks/hosting/test/integration/default/default_test.rb b/ops/cookbooks/app/test/integration/default/default_test.rb similarity index 100% rename from ops/cookbooks/hosting/test/integration/default/default_test.rb rename to ops/cookbooks/app/test/integration/default/default_test.rb diff --git a/ops/hosting.json b/ops/hosting.json deleted file mode 100644 index e6653ea..0000000 --- a/ops/hosting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "run_list": [ "role[gitea]"] -} diff --git a/ops/roles/gitea.rb b/ops/roles/app.rb similarity index 92% rename from ops/roles/gitea.rb rename to ops/roles/app.rb index 965779d..e04afcc 100644 --- a/ops/roles/gitea.rb +++ b/ops/roles/app.rb @@ -1,4 +1,4 @@ -name :gitea +name :app description "A basic role" run_list( @@ -7,6 +7,4 @@ run_list( "recipe[hosting::postgress]", "recipe[hosting::gitea]", "recipe[hosting::nginx]", - - -) \ No newline at end of file +)