YoloVer Example Repository
This (mono-)repository serves as an example for working with the YoloVer workflow.
This Chef repository will deploy Apache and PostgreSQL for a hypothetical Vandelay Industries.
The major centerpiece of the repo are the Policyfiles.
policies/_base.rb– Shared base policy for all servers. This applies the
chef-clientrecipe to all nodes and sets the default sources used for all policies.
dbpolicy to create a Postgres database server. This applies the
webpolicy to create an Apache web server. This applies the
Each policy has a corresponding lockfile.
policies/db.lock.json– Lockfile for the
policies/web.lock.json– Lockfile for the
As this is at least in part a mono-repo layout, we have an old school
folder containing our local cookbooks.
cookbooks/vandelay-httpd– Wrapper cookbook around the community
cookbooks/vandelay-postgres– Local cookbook to install PostgeSQL because we didn't want to use any of the community ones.
To verify that our policies are correct, we use InSpec tests.
test/integration/db/db_spec.rb– Tests for the
psqlto confirm the database is operational.
test/integration/web/web_spec.rb– Tests for the
curlto confirm the content of index page.
Development sponsored by Bloomberg.
Copyright 2016, Noah Kantrowitz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.