├── bootstrappers └── chef │ ├── lib │ ├── chef │ │ ├── nodes │ │ │ ├── .gitkeep │ │ │ └── docker.json.erb │ │ ├── roles │ │ │ ├── .gitkeep │ │ │ └── docker.json │ │ ├── environments │ │ │ ├── .gitkeep │ │ │ ├── production.json │ │ │ └── staging.json │ │ └── solo.rb.erb │ ├── capistrano │ │ ├── shiplane_bootstrappers_chef │ │ │ └── version.rb │ │ ├── shiplane_bootstrappers_chef.rb │ │ ├── tasks │ │ │ ├── clear_deploy_tasks.rake │ │ │ └── shiplane_bootstrap.rake │ │ └── chef_error_parser.rb │ ├── shiplane │ │ └── bootstrappers │ │ │ └── chef │ │ │ └── version.rb │ └── tasks │ │ └── release_tasks.rake │ ├── cookbooks │ ├── openssl │ │ ├── .foodcritic │ │ ├── CONTRIBUTING.md │ │ ├── resources │ │ │ ├── dhparam.rb │ │ │ ├── rsa_key.rb │ │ │ └── x509.rb │ │ ├── libraries │ │ │ ├── matchers.rb │ │ │ └── secure_password.rb │ │ ├── recipes │ │ │ ├── default.rb │ │ │ └── upgrade.rb │ │ ├── attributes │ │ │ └── default.rb │ │ ├── MAINTAINERS.md │ │ └── providers │ │ │ ├── dhparam.rb │ │ │ └── rsa_key.rb │ ├── apt │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── files │ │ │ └── 15update-stamp │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── templates │ │ │ ├── unattended-upgrades.seed.erb │ │ │ ├── 10recommends.erb │ │ │ ├── 20auto-upgrades.erb │ │ │ ├── 10dpkg-options.erb │ │ │ └── 01proxy.erb │ │ ├── Gemfile │ │ ├── metadata.rb │ │ ├── kitchen.yml │ │ └── recipes │ │ │ └── cacher-ng.rb │ ├── ntp │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── Gemfile │ │ ├── files │ │ │ └── ntp.ini │ │ ├── metadata.rb │ │ └── recipes │ │ │ └── apparmor.rb │ ├── sudo │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── files │ │ │ └── README │ │ ├── Gemfile │ │ ├── metadata.rb │ │ └── templates │ │ │ └── default │ │ │ └── sudoer.erb │ ├── fail2ban │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── templates │ │ │ ├── filter.conf.erb │ │ │ ├── filter.erb │ │ │ └── jail.erb │ │ ├── Gemfile │ │ └── metadata.rb │ ├── locales │ │ ├── recipes │ │ │ ├── install.rb │ │ │ └── default.rb │ │ ├── Thorfile │ │ ├── templates │ │ │ └── default │ │ │ │ └── locale.erb │ │ ├── Gemfile │ │ ├── metadata.rb │ │ ├── resources │ │ │ └── default.rb │ │ ├── attributes │ │ │ └── default.rb │ │ ├── libraries │ │ │ └── localeshelper.rb │ │ ├── .rubocop.yml │ │ └── .kitchen.yml │ ├── docker │ │ ├── templates │ │ │ └── default │ │ │ │ ├── systemd │ │ │ │ ├── tmpfiles.d.conf.erb │ │ │ │ ├── docker.socket-override.erb │ │ │ │ ├── docker.socket.erb │ │ │ │ └── containerd.service.erb │ │ │ │ ├── default │ │ │ │ └── docker-wait-ready.erb │ │ │ │ └── sysconfig │ │ │ │ └── docker.erb │ │ ├── resources │ │ │ ├── service_base.rb │ │ │ ├── tag.rb │ │ │ ├── image_prune.rb │ │ │ ├── installation_script.rb │ │ │ ├── volume.rb │ │ │ ├── partial │ │ │ │ └── _logging.rb │ │ │ └── exec.rb │ │ ├── .markdownlint-cli2.yaml │ │ ├── libraries │ │ │ ├── helpers_coerce.rb │ │ │ ├── helpers_container.rb │ │ │ ├── base.rb │ │ │ └── helpers_json.rb │ │ ├── renovate.json │ │ ├── metadata.rb │ │ └── metadata.json │ ├── barebones-docker │ │ ├── templates │ │ │ └── default │ │ │ │ ├── logging.conf.erb │ │ │ │ └── proxy.conf.erb │ │ ├── metadata.rb │ │ └── recipes │ │ │ ├── add_docker_service.rb │ │ │ ├── download_images.rb │ │ │ └── default.rb │ ├── build-essential │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── Gemfile │ │ ├── .github │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── attributes │ │ │ └── default.rb │ │ ├── recipes │ │ │ └── default.rb │ │ └── metadata.rb │ ├── mingw │ │ ├── .markdownlint-cli2.yaml │ │ ├── attributes │ │ │ └── default.rb │ │ ├── metadata.rb │ │ ├── files │ │ │ └── default │ │ │ │ ├── bash.bat │ │ │ │ ├── custom-upgrade.sh │ │ │ │ └── custom_prefix.sh │ │ ├── renovate.json │ │ ├── recipes │ │ │ └── default.rb │ │ └── metadata.json │ ├── yum-epel │ │ ├── .markdownlint-cli2.yaml │ │ ├── renovate.json │ │ ├── metadata.rb │ │ ├── attributes │ │ │ ├── epel-next.rb │ │ │ ├── epel-source.rb │ │ │ ├── epel-testing.rb │ │ │ ├── epel-debuginfo.rb │ │ │ ├── default.rb │ │ │ ├── epel-next-source.rb │ │ │ ├── epel-next-testing.rb │ │ │ ├── epel-next-debuginfo.rb │ │ │ ├── epel-testing-source.rb │ │ │ ├── epel-testing-debuginfo.rb │ │ │ ├── epel-next-testing-source.rb │ │ │ ├── epel-next-testing-debuginfo.rb │ │ │ └── epel.rb │ │ ├── metadata.json │ │ └── recipes │ │ │ └── default.rb │ └── seven_zip │ │ ├── .markdownlint-cli2.yaml │ │ ├── metadata.rb │ │ ├── renovate.json │ │ ├── rakefile.rb │ │ └── metadata.json │ ├── berks-cookbooks │ ├── openssl │ │ ├── .foodcritic │ │ ├── CONTRIBUTING.md │ │ ├── resources │ │ │ ├── dhparam.rb │ │ │ ├── rsa_key.rb │ │ │ └── x509.rb │ │ ├── libraries │ │ │ ├── matchers.rb │ │ │ └── secure_password.rb │ │ ├── recipes │ │ │ ├── default.rb │ │ │ └── upgrade.rb │ │ ├── attributes │ │ │ └── default.rb │ │ ├── MAINTAINERS.md │ │ └── providers │ │ │ ├── dhparam.rb │ │ │ └── rsa_key.rb │ ├── apt │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── files │ │ │ └── 15update-stamp │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── templates │ │ │ ├── unattended-upgrades.seed.erb │ │ │ ├── 10recommends.erb │ │ │ ├── 20auto-upgrades.erb │ │ │ ├── 10dpkg-options.erb │ │ │ └── 01proxy.erb │ │ ├── Gemfile │ │ ├── metadata.rb │ │ ├── kitchen.yml │ │ └── recipes │ │ │ └── cacher-ng.rb │ ├── ntp │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── Gemfile │ │ ├── files │ │ │ └── ntp.ini │ │ ├── metadata.rb │ │ └── recipes │ │ │ └── apparmor.rb │ ├── sudo │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── files │ │ │ └── README │ │ ├── Gemfile │ │ ├── metadata.rb │ │ └── templates │ │ │ └── default │ │ │ └── sudoer.erb │ ├── fail2ban │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── templates │ │ │ ├── filter.conf.erb │ │ │ ├── filter.erb │ │ │ └── jail.erb │ │ ├── Gemfile │ │ └── metadata.rb │ ├── locales │ │ ├── recipes │ │ │ ├── install.rb │ │ │ └── default.rb │ │ ├── Thorfile │ │ ├── templates │ │ │ └── default │ │ │ │ └── locale.erb │ │ ├── Gemfile │ │ ├── metadata.rb │ │ ├── resources │ │ │ └── default.rb │ │ ├── attributes │ │ │ └── default.rb │ │ ├── libraries │ │ │ └── localeshelper.rb │ │ ├── .rubocop.yml │ │ └── .kitchen.yml │ ├── docker │ │ ├── templates │ │ │ └── default │ │ │ │ ├── systemd │ │ │ │ ├── tmpfiles.d.conf.erb │ │ │ │ ├── docker.socket-override.erb │ │ │ │ ├── docker.socket.erb │ │ │ │ └── containerd.service.erb │ │ │ │ ├── default │ │ │ │ └── docker-wait-ready.erb │ │ │ │ └── sysconfig │ │ │ │ └── docker.erb │ │ ├── resources │ │ │ ├── service_base.rb │ │ │ ├── tag.rb │ │ │ ├── image_prune.rb │ │ │ ├── installation_script.rb │ │ │ ├── volume.rb │ │ │ ├── partial │ │ │ │ └── _logging.rb │ │ │ └── exec.rb │ │ ├── .markdownlint-cli2.yaml │ │ ├── libraries │ │ │ ├── helpers_coerce.rb │ │ │ ├── helpers_container.rb │ │ │ ├── base.rb │ │ │ └── helpers_json.rb │ │ ├── renovate.json │ │ ├── metadata.rb │ │ └── metadata.json │ ├── build-essential │ │ ├── .delivery │ │ │ └── project.toml │ │ ├── Gemfile │ │ ├── .github │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE.md │ │ ├── attributes │ │ │ └── default.rb │ │ ├── recipes │ │ │ └── default.rb │ │ └── metadata.rb │ ├── mingw │ │ ├── .markdownlint-cli2.yaml │ │ ├── attributes │ │ │ └── default.rb │ │ ├── metadata.rb │ │ ├── files │ │ │ └── default │ │ │ │ ├── bash.bat │ │ │ │ ├── custom-upgrade.sh │ │ │ │ └── custom_prefix.sh │ │ ├── renovate.json │ │ ├── recipes │ │ │ └── default.rb │ │ └── metadata.json │ ├── seven_zip │ │ ├── .markdownlint-cli2.yaml │ │ ├── metadata.rb │ │ ├── renovate.json │ │ ├── rakefile.rb │ │ └── metadata.json │ └── yum-epel │ │ ├── .markdownlint-cli2.yaml │ │ ├── renovate.json │ │ ├── metadata.rb │ │ ├── attributes │ │ ├── epel-next.rb │ │ ├── epel-source.rb │ │ ├── epel-testing.rb │ │ ├── epel-debuginfo.rb │ │ ├── default.rb │ │ ├── epel-next-source.rb │ │ ├── epel-next-testing.rb │ │ ├── epel-next-debuginfo.rb │ │ ├── epel-testing-source.rb │ │ ├── epel-testing-debuginfo.rb │ │ ├── epel-next-testing-source.rb │ │ ├── epel-next-testing-debuginfo.rb │ │ └── epel.rb │ │ ├── metadata.json │ │ └── recipes │ │ └── default.rb │ ├── cookbooks.tar.gz │ ├── site-cookbooks │ └── barebones-docker │ │ ├── templates │ │ └── default │ │ │ ├── logging.conf.erb │ │ │ └── proxy.conf.erb │ │ ├── metadata.rb │ │ └── recipes │ │ ├── add_docker_service.rb │ │ ├── download_images.rb │ │ └── default.rb │ ├── Rakefile │ └── Berksfile ├── examples └── rails_app │ ├── .gitignore │ ├── bin │ ├── start_sidekiq │ ├── start_web_server │ ├── minimal-web-server.sh │ ├── setup_test_env │ ├── start_development_web_server │ ├── start_docker_webpacker_server │ ├── update_yarn │ └── update_bundle │ ├── config │ ├── deploy │ │ └── production.rb │ ├── redis.yml │ └── initializers │ │ ├── sidekiq.rb │ │ └── redis.rb │ ├── .shiplane │ └── insert_on_build │ │ └── config │ │ ├── storage.yml │ │ ├── smtp.yml │ │ ├── redis.yml.erb │ │ └── database.yml.erb │ ├── .env.shiplane │ ├── Dockerfile │ └── .env.example ├── .gem_release.yml ├── assets └── shiplane_logo.jpg ├── lib ├── shiplane │ ├── version.rb │ ├── railtie.rb │ ├── safe_build.rb │ ├── deploy │ │ ├── configuration.rb │ │ └── network_configuration.rb │ ├── safe_yaml_loading.rb │ └── compose_hash.rb ├── capistrano │ ├── shiplane │ │ └── version.rb │ ├── shiplane.rb │ └── tasks │ │ └── shiplane.rake ├── shiplane.rb └── generators │ └── shiplane │ └── install │ └── templates │ └── Capfile.erb ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── deployers └── capistrano_docker │ ├── lib │ ├── capistrano │ │ ├── shiplane_deployers_capistrano_docker.rb │ │ └── shiplane_deployers_capistrano_docker │ │ │ └── version.rb │ └── shiplane │ │ └── deployers │ │ └── capistrano_docker │ │ └── version.rb │ └── Rakefile ├── Gemfile ├── Rakefile ├── .dependabot └── config.yml ├── .gitignore ├── RELEASES.md ├── CONTRIBUTING.md └── LICENSE /bootstrappers/chef/lib/chef/nodes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/roles/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/environments/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/rails_app/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .env.production 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/.foodcritic: -------------------------------------------------------------------------------- 1 | ~FC002 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/.foodcritic: -------------------------------------------------------------------------------- 1 | ~FC002 2 | -------------------------------------------------------------------------------- /.gem_release.yml: -------------------------------------------------------------------------------- 1 | bump: 2 | sign: true 3 | tag: true 4 | tag: 5 | sign: true 6 | -------------------------------------------------------------------------------- /assets/shiplane_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirillian/shiplane/HEAD/assets/shiplane_logo.jpg -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @chef-cookbooks/cookbook_engineering_team 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/recipes/install.rb: -------------------------------------------------------------------------------- 1 | execute 'locale-gen' do 2 | action :nothing 3 | end 4 | -------------------------------------------------------------------------------- /lib/shiplane/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Shiplane 4 | VERSION = "0.2.31" 5 | end 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/recipes/install.rb: -------------------------------------------------------------------------------- 1 | execute 'locale-gen' do 2 | action :nothing 3 | end 4 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirillian/shiplane/HEAD/bootstrappers/chef/cookbooks.tar.gz -------------------------------------------------------------------------------- /examples/rails_app/bin/start_sidekiq: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'bundle exec sidekiq' 5 | -------------------------------------------------------------------------------- /lib/capistrano/shiplane/version.rb: -------------------------------------------------------------------------------- 1 | module Capistrano 2 | module Shiplane 3 | VERSION = Shiplane::Version 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/systemd/tmpfiles.d.conf.erb: -------------------------------------------------------------------------------- 1 | d /var/run/docker 0755 root <%= @config.group || 'root' %> - 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/systemd/tmpfiles.d.conf.erb: -------------------------------------------------------------------------------- 1 | d /var/run/docker 0755 root <%= @config.group || 'root' %> - 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/Thorfile: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require 'bundler' 4 | require 'bundler/setup' 5 | require 'berkshelf/thor' 6 | -------------------------------------------------------------------------------- /examples/rails_app/bin/start_web_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'bin/rails s puma -p 3000 -b 0.0.0.0' 5 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/Thorfile: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require 'bundler' 4 | require 'bundler/setup' 5 | require 'berkshelf/thor' 6 | -------------------------------------------------------------------------------- /examples/rails_app/config/deploy/production.rb: -------------------------------------------------------------------------------- 1 | set :rails_env, 'production' 2 | 3 | server "example.com", user: "ubuntu", roles: %w{ docker }, node: :docker 4 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/files/15update-stamp: -------------------------------------------------------------------------------- 1 | APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";}; 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/templates/default/logging.conf.erb: -------------------------------------------------------------------------------- 1 | access_log /var/log/nginx/access.log; 2 | error_log /var/log/nginx/error.log warn; 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/files/15update-stamp: -------------------------------------------------------------------------------- 1 | APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";}; 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please refer to 2 | https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/templates/default/logging.conf.erb: -------------------------------------------------------------------------------- 1 | access_log /var/log/nginx/access.log; 2 | error_log /var/log/nginx/error.log warn; 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please refer to 2 | https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /lib/shiplane/railtie.rb: -------------------------------------------------------------------------------- 1 | module Shiplane 2 | class Railtie < Rails::Railtie 3 | rake_tasks do 4 | load 'shiplane/tasks/install.rake' 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /examples/rails_app/bin/minimal-web-server.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script starts a bashttpd server 3 | 4 | :;while [ $? -eq 0 ];do nc -lp 23480 -e bin/bashttpd ;done 5 | -------------------------------------------------------------------------------- /examples/rails_app/bin/setup_test_env: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'bin/update_bundle' 5 | system 'bin/update_yarn' 6 | 7 | system 'bash' 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /examples/rails_app/bin/start_development_web_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'rm -f tmp/pids/server.pid' 5 | system 'bin/start_web_server' 6 | -------------------------------------------------------------------------------- /lib/shiplane/safe_build.rb: -------------------------------------------------------------------------------- 1 | module Shiplane 2 | class SafeBuild 3 | def self.wrap 4 | return if ENV['SHIPLANE'] == 'building' 5 | yield 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: '/' 5 | schedule: 6 | interval: weekly 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /examples/rails_app/bin/start_docker_webpacker_server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'rm -rf public/packs' 5 | 6 | system 'bin/webpack-dev-server' 7 | -------------------------------------------------------------------------------- /examples/rails_app/bin/update_yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'yarn check || yarn install' 5 | system 'yarn check && bin/minimal-web-server.sh' 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/.delivery/project.toml: -------------------------------------------------------------------------------- 1 | remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml" 2 | -------------------------------------------------------------------------------- /examples/rails_app/bin/update_bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | system 'bundle check || bundle install' 5 | system 'bundle check && bin/minimal-web-server.sh' 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/templates/default/locale.erb: -------------------------------------------------------------------------------- 1 | # Generated by Chef for <%= node['fqdn'] %> 2 | # Local modifications will be overwritten. 3 | 4 | LANG=<%= node['locales']['default'] %> 5 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/capistrano/shiplane_bootstrappers_chef/version.rb: -------------------------------------------------------------------------------- 1 | module Capistrano 2 | module ShiplaneBootstrappersChef 3 | VERSION = Shiplane::Bootstrappers::Chef::VERSION 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/environments/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "production", 3 | "default_attributes": { 4 | }, 5 | "json_class":"Chef::Environment", 6 | "chef_type":"environment" 7 | } 8 | -------------------------------------------------------------------------------- /deployers/capistrano_docker/lib/capistrano/shiplane_deployers_capistrano_docker.rb: -------------------------------------------------------------------------------- 1 | load File.expand_path('../tasks/docker_repo.rake', __FILE__) 2 | load File.expand_path('../tasks/deployer.rake', __FILE__) 3 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/templates/default/locale.erb: -------------------------------------------------------------------------------- 1 | # Generated by Chef for <%= node['fqdn'] %> 2 | # Local modifications will be overwritten. 3 | 4 | LANG=<%= node['locales']['default'] %> 5 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/templates/unattended-upgrades.seed.erb: -------------------------------------------------------------------------------- 1 | unattended-upgrades unattended-upgrades/enable_auto_updates boolean <%= node['apt']['unattended_upgrades']['enable'] ? 'true' : 'false' %> 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/templates/unattended-upgrades.seed.erb: -------------------------------------------------------------------------------- 1 | unattended-upgrades unattended-upgrades/enable_auto_updates boolean <%= node['apt']['unattended_upgrades']['enable'] ? 'true' : 'false' %> 2 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/seven_zip/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /examples/rails_app/.shiplane/insert_on_build/config/storage.yml: -------------------------------------------------------------------------------- 1 | test: 2 | service: Disk 3 | root: <%= Rails.root.join("tmp/storage") %> 4 | 5 | local: 6 | service: Disk 7 | root: <%= Rails.root.join("storage") %> 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/seven_zip/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/shiplane/bootstrappers/chef/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Shiplane 4 | module Bootstrappers 5 | module Chef 6 | VERSION = "0.2.31" 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/templates/filter.conf.erb: -------------------------------------------------------------------------------- 1 | # generated by chef 2 | [Definition] 3 | 4 | failregex = <%= @failregex.join("\n ") %> 5 | 6 | ignoreregex = <%= @ignoreregex.join("\n ") %> 7 | 8 | -------------------------------------------------------------------------------- /deployers/capistrano_docker/lib/capistrano/shiplane_deployers_capistrano_docker/version.rb: -------------------------------------------------------------------------------- 1 | module Capistrano 2 | module ShiplaneDeployersCapistranoDocker 3 | VERSION = Shiplane::Deployers::CapistranoDocker::VERSION 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/templates/filter.conf.erb: -------------------------------------------------------------------------------- 1 | # generated by chef 2 | [Definition] 3 | 4 | failregex = <%= @failregex.join("\n ") %> 5 | 6 | ignoreregex = <%= @ignoreregex.join("\n ") %> 7 | 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/environments/staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "staging", 3 | "default_attributes": { 4 | }, 5 | "override_attributes": { 6 | }, 7 | "json_class":"Chef::Environment", 8 | "chef_type":"environment" 9 | } 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/templates/10recommends.erb: -------------------------------------------------------------------------------- 1 | # Managed by Chef 2 | APT::Install-Recommends "<%= node['apt']['confd']['install_recommends'] ? 1 : 0 %>"; 3 | APT::Install-Suggests "<%= node['apt']['confd']['install_suggests'] ? 1 : 0 %>"; 4 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/service_base.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | use 'partial/_service_base' 4 | 5 | resource_name :docker_service_base 6 | provides :docker_service_base 7 | provides :docker_service_manager 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/templates/10recommends.erb: -------------------------------------------------------------------------------- 1 | # Managed by Chef 2 | APT::Install-Recommends "<%= node['apt']['confd']['install_recommends'] ? 1 : 0 %>"; 3 | APT::Install-Suggests "<%= node['apt']['confd']['install_suggests'] ? 1 : 0 %>"; 4 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/service_base.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | use 'partial/_service_base' 4 | 5 | resource_name :docker_service_base 6 | provides :docker_service_base 7 | provides :docker_service_manager 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/capistrano/shiplane_bootstrappers_chef.rb: -------------------------------------------------------------------------------- 1 | require 'shiplane/bootstrappers/chef/version' 2 | 3 | load File.expand_path('../tasks/shiplane_bootstrap.rake', __FILE__) 4 | load File.expand_path('../tasks/bootstrap.rake', __FILE__) 5 | 6 | -------------------------------------------------------------------------------- /deployers/capistrano_docker/lib/shiplane/deployers/capistrano_docker/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Shiplane 4 | module Deployers 5 | module CapistranoDocker 6 | VERSION = "0.2.31" 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/templates/filter.erb: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT - This file is being maintained by Chef 2 | 3 | [Definition] 4 | failregex = <%= Array(@failregex).join("\n ") %> 5 | ignoreregex = <%= Array(@ignoreregex).join("\n ") %> 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/templates/filter.erb: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT - This file is being maintained by Chef 2 | 3 | [Definition] 4 | failregex = <%= Array(@failregex).join("\n ") %> 5 | ignoreregex = <%= Array(@ignoreregex).join("\n ") %> 6 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | ignores: 7 | - .github/copilot-instructions.md 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | ul-indent: false # MD007 3 | line-length: false # MD013 4 | no-duplicate-heading: false # MD024 5 | reference-links-images: false # MD052 6 | ignores: 7 | - .github/copilot-instructions.md 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/roles/docker.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-server", 3 | "description": "Something which needs docker installed.", 4 | "default_attributes": { 5 | }, 6 | "json_class": "Chef::Role", 7 | "run_list": [ 8 | ], 9 | "chef_type": "role", 10 | } 11 | -------------------------------------------------------------------------------- /lib/capistrano/shiplane.rb: -------------------------------------------------------------------------------- 1 | require 'shiplane/host' 2 | require 'shiplane/deploy/container_configuration' 3 | require 'shiplane/deploy/network_configuration' 4 | 5 | load File.expand_path('../tasks/capistrano_stubs.rake', __FILE__) 6 | load File.expand_path('../tasks/shiplane.rake', __FILE__) 7 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/libraries/helpers_coerce.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Build 4 | def coerce_buildargs(v) 5 | "{ #{v.map { |key, value| "\"#{key}\": \"#{value}\"" }.join(', ')} }" 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/libraries/helpers_coerce.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Build 4 | def coerce_buildargs(v) 5 | "{ #{v.map { |key, value| "\"#{key}\": \"#{value}\"" }.join(', ')} }" 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /examples/rails_app/.shiplane/insert_on_build/config/smtp.yml: -------------------------------------------------------------------------------- 1 | production: 2 | address: smtp-relay.gmail.com 3 | port: 587 4 | user_name: <%= Rails.application.credentials.gmail_username %> 5 | password: <%= Rails.application.credentials.gmail_password %> 6 | authentication: plain 7 | enable_starttls_auto: true 8 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | source 'https://rubygems.org' 3 | 4 | gemspec 5 | 6 | gem "shiplane_bootstrappers_chef", path: File.expand_path('bootstrappers/chef', __dir__), require: false 7 | gem "shiplane_deployers_capistrano_docker", path: File.expand_path('deployers/capistrano_docker', __dir__), require: false 8 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'berkshelf', '~> 2.0.10' 4 | 5 | group :test do 6 | gem 'foodcritic', '~> 3.0' 7 | gem 'rubocop', '~> 0.24.1' 8 | end 9 | 10 | group :integration do 11 | gem 'test-kitchen', '~> 1.1.1' 12 | gem 'kitchen-vagrant', '~> 0.14' 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'berkshelf', '~> 2.0.10' 4 | 5 | group :test do 6 | gem 'foodcritic', '~> 3.0' 7 | gem 'rubocop', '~> 0.24.1' 8 | end 9 | 10 | group :integration do 11 | gem 'test-kitchen', '~> 1.1.1' 12 | gem 'kitchen-vagrant', '~> 0.14' 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/libraries/helpers_container.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Container 4 | def cgroupv2? 5 | return if node.dig('filesystem', 'by_device').nil? 6 | node.dig('filesystem', 'by_device').key?('cgroup2') 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/libraries/helpers_container.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Container 4 | def cgroupv2? 5 | return if node.dig('filesystem', 'by_device').nil? 6 | node.dig('filesystem', 'by_device').key?('cgroup2') 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/files/README: -------------------------------------------------------------------------------- 1 | # This will cause sudo to read and parse any files in the /etc/sudoers.d 2 | # directory that do not end in '~' or contain a '.' character. 3 | # 4 | # Note that there must be at least one file in the sudoers.d directory (this 5 | # one will do), and all files in this directory should be mode 0440. 6 | # 7 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/files/README: -------------------------------------------------------------------------------- 1 | # This will cause sudo to read and parse any files in the /etc/sudoers.d 2 | # directory that do not end in '~' or contain a '.' character. 3 | # 4 | # Note that there must be at least one file in the sudoers.d directory (this 5 | # one will do), and all files in this directory should be mode 0440. 6 | # 7 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # override these attributes to pull the msys2 package from a custom url 2 | default['msys2']['url'] = 'http://downloads.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20160205.tar.xz' 3 | default['msys2']['checksum'] = '7e97e2af042e1b6f62cf0298fe84839014ef3d4a3e7825cffc6931c66cc0fc20' 4 | -------------------------------------------------------------------------------- /examples/rails_app/config/redis.yml: -------------------------------------------------------------------------------- 1 | default: &default 2 | url: redis://<%= ENV['REDIS_HOST'] %>:<%= ENV['REDIS_PORT'] %> 3 | db: <%= ENV['REDIS_DATABASE_NUMBER'] %> 4 | pool_size: 5 5 | 6 | development: 7 | <<: *default 8 | 9 | test: 10 | <<: *default 11 | 12 | staging: 13 | <<: *default 14 | 15 | production: 16 | <<: *default 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # override these attributes to pull the msys2 package from a custom url 2 | default['msys2']['url'] = 'http://downloads.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20160205.tar.xz' 3 | default['msys2']['checksum'] = '7e97e2af042e1b6f62cf0298fe84839014ef3d4a3e7825cffc6931c66cc0fc20' 4 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/systemd/docker.socket-override.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=<%= @docker_name %>.service 4 | 5 | [Socket] 6 | ListenStream=<%= @docker_socket %> 7 | SocketGroup=<%= @config.group %> 8 | <%= @systemd_socket_args %> 9 | 10 | [Install] 11 | WantedBy=sockets.target 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/systemd/docker.socket.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=<%= @docker_name %>.service 4 | 5 | [Socket] 6 | ListenStream=<%= @docker_socket %> 7 | SocketMode=0660 8 | SocketUser=root 9 | SocketGroup=<%= @config.group %> 10 | 11 | [Install] 12 | WantedBy=sockets.target 13 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'locales' 2 | maintainer 'opendo GmbH' 3 | maintainer_email 'p.bergsmann@opendo.at' 4 | license 'apache2' 5 | description 'Installs/Configures locales' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '0.3.1' 8 | 9 | supports 'ubuntu' 10 | supports 'debian' 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/systemd/docker.socket-override.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=<%= @docker_name %>.service 4 | 5 | [Socket] 6 | ListenStream=<%= @docker_socket %> 7 | SocketGroup=<%= @config.group %> 8 | <%= @systemd_socket_args %> 9 | 10 | [Install] 11 | WantedBy=sockets.target 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/systemd/docker.socket.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=<%= @docker_name %>.service 4 | 5 | [Socket] 6 | ListenStream=<%= @docker_socket %> 7 | SocketMode=0660 8 | SocketUser=root 9 | SocketGroup=<%= @config.group %> 10 | 11 | [Install] 12 | WantedBy=sockets.target 13 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'locales' 2 | maintainer 'opendo GmbH' 3 | maintainer_email 'p.bergsmann@opendo.at' 4 | license 'apache2' 5 | description 'Installs/Configures locales' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '0.3.1' 8 | 9 | supports 'ubuntu' 10 | supports 'debian' 11 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | require 'rubygems' 3 | require 'bundler' 4 | require "bundler/gem_tasks" 5 | 6 | begin 7 | Bundler.setup(:default, :development, :test) 8 | rescue Bundler::BundlerError => e 9 | $stderr.puts e.message 10 | $stderr.puts "Run `bundle install` to install missing gems" 11 | exit e.status_code 12 | end 13 | 14 | require 'rake' 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/libraries/base.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Cookbook 3 | module Helpers 4 | # https://github.com/docker/docker/blob/4fcb9ac40ce33c4d6e08d5669af6be5e076e2574/registry/auth.go#L231 5 | def parse_registry_host(val) 6 | val.sub(%r{https?://}, '').split('/').first 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/libraries/base.rb: -------------------------------------------------------------------------------- 1 | module Docker 2 | module Cookbook 3 | module Helpers 4 | # https://github.com/docker/docker/blob/4fcb9ac40ce33c4d6e08d5669af6be5e076e2574/registry/auth.go#L231 5 | def parse_registry_host(val) 6 | val.sub(%r{https?://}, '').split('/').first 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/default/docker-wait-ready.erb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | i=0 3 | while [ $i -lt <%= @service_timeout * 2 %> ]; do 4 | <%= @docker_cmd %> ps | head -n 1 | grep ^CONTAINER > /dev/null 2>&1 5 | [ $? -eq 0 ] && break 6 | ((i++)) 7 | sleep 0.5 8 | done 9 | [ $i -eq <%= @service_timeout * 2 %> ] && exit 1 10 | exit 0 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/default/docker-wait-ready.erb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | i=0 3 | while [ $i -lt <%= @service_timeout * 2 %> ]; do 4 | <%= @docker_cmd %> ps | head -n 1 | grep ^CONTAINER > /dev/null 2>&1 5 | [ $? -eq 0 ] && break 6 | ((i++)) 7 | sleep 0.5 8 | done 9 | [ $i -eq <%= @service_timeout * 2 %> ] && exit 1 10 | exit 0 11 | -------------------------------------------------------------------------------- /examples/rails_app/.shiplane/insert_on_build/config/redis.yml.erb: -------------------------------------------------------------------------------- 1 | default: &default 2 | url: redis://<%= ENV['REDIS_HOST'] %>:<%= ENV['REDIS_PORT'] %> 3 | db: <%= ENV['REDIS_DATABASE_NUMBER'] %> 4 | pool_size: 5 5 | 6 | development: 7 | <<: *default 8 | 9 | test: 10 | <<: *default 11 | 12 | staging: 13 | <<: *default 14 | 15 | production: 16 | <<: *default 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'barebones-docker' 2 | maintainer 'John Epperson' 3 | maintainer_email 'john.epperson@rockagile.io' 4 | license 'All rights reserved' 5 | description 'Adds and configures docker' 6 | long_description 'Adds and configures docker' 7 | version '0.1.1' 8 | depends 'docker', '>= 4.9.0' 9 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'barebones-docker' 2 | maintainer 'John Epperson' 3 | maintainer_email 'john.epperson@rockagile.io' 4 | license 'All rights reserved' 5 | description 'Adds and configures docker' 6 | long_description 'Adds and configures docker' 7 | version '0.1.1' 8 | depends 'docker', '>= 4.9.0' 9 | -------------------------------------------------------------------------------- /deployers/capistrano_docker/Rakefile: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | require 'rubygems' 3 | require 'bundler' 4 | require "bundler/gem_tasks" 5 | 6 | begin 7 | Bundler.setup(:default, :development, :test) 8 | rescue Bundler::BundlerError => e 9 | $stderr.puts e.message 10 | $stderr.puts "Run `bundle install` to install missing gems" 11 | exit e.status_code 12 | end 13 | 14 | require 'rake' 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/solo.rb.erb: -------------------------------------------------------------------------------- 1 | solo true 2 | log_level :info 3 | json_attribs "/var/chef/nodes/<%= host.properties.node %>.json" 4 | node_name "<%= host.properties.node %>" 5 | cookbook_path ["/var/chef/cookbooks"] 6 | data_bag_path "/var/chef/data_bags" 7 | role_path "/var/chef/roles" 8 | environment_path "/var/chef/environments" 9 | environment "<%= ENV['ENVIRONMENT'] %>" 10 | -------------------------------------------------------------------------------- /lib/shiplane.rb: -------------------------------------------------------------------------------- 1 | require 'yaml' 2 | require 'shiplane/railtie' if defined? Rails 3 | 4 | require_relative 'shiplane/build' 5 | 6 | module Shiplane 7 | DEFAULT_DOCKERFILE_FILEPATH = 'Dockerfile' 8 | DEFAULT_COMPOSEFILE_FILEPATH = 'docker-compose.yml' 9 | DEFAULT_PRODUCTION_DOCKERFILE_STAGES_FILEPATH = 'production_dockerfile_stages' 10 | SHIPLANE_CONFIG_FILENAME ='shiplane.yml' 11 | end 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/resources/default.rb: -------------------------------------------------------------------------------- 1 | actions :add, :set 2 | 3 | default_action :add 4 | 5 | attribute :locales, kind_of: [String, Array], name_attribute: true 6 | attribute :charmap, kind_of: String, default: 'UTF-8' 7 | attribute :lc_all, kind_of: [TrueClass, FalseClass], default: true 8 | 9 | attr_accessor :exists 10 | 11 | def initialize(*args) 12 | super 13 | @action = :add 14 | end 15 | -------------------------------------------------------------------------------- /examples/rails_app/config/initializers/sidekiq.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shiplane/safe_build' 4 | 5 | Shiplane::SafeBuild.wrap do 6 | require 'sidekiq' 7 | 8 | Sidekiq.configure_server do |config| 9 | config.redis = REDIS_CONFIG 10 | end 11 | 12 | Sidekiq.configure_client do |config| 13 | config.redis = REDIS_CONFIG 14 | end 15 | 16 | RedisInstance.instance 17 | end 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/resources/default.rb: -------------------------------------------------------------------------------- 1 | actions :add, :set 2 | 3 | default_action :add 4 | 5 | attribute :locales, kind_of: [String, Array], name_attribute: true 6 | attribute :charmap, kind_of: String, default: 'UTF-8' 7 | attribute :lc_all, kind_of: [TrueClass, FalseClass], default: true 8 | 9 | attr_accessor :exists 10 | 11 | def initialize(*args) 12 | super 13 | @action = :add 14 | end 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/Gemfile: -------------------------------------------------------------------------------- 1 | # This gemfile provides additional gems for testing and releasing this cookbook 2 | # It is meant to be installed on top of ChefDK which provides the majority 3 | # of the necessary gems for testing this cookbook 4 | # 5 | # Run 'chef exec bundle install' to install these dependencies 6 | 7 | source 'https://rubygems.org' 8 | 9 | gem 'community_cookbook_releaser' 10 | -------------------------------------------------------------------------------- /bootstrappers/chef/Rakefile: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | require 'rubygems' 3 | require 'bundler' 4 | require "bundler/gem_tasks" 5 | 6 | begin 7 | Bundler.setup(:default, :development, :test) 8 | rescue Bundler::BundlerError => e 9 | $stderr.puts e.message 10 | $stderr.puts "Run `bundle install` to install missing gems" 11 | exit e.status_code 12 | end 13 | 14 | require 'rake' 15 | 16 | load './lib/tasks/release_tasks.rake' 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/templates/20auto-upgrades.erb: -------------------------------------------------------------------------------- 1 | APT::Periodic::Update-Package-Lists "<%= node['apt']['unattended_upgrades']['update_package_lists'] ? 1 : 0 %>"; 2 | APT::Periodic::Unattended-Upgrade "<%= node['apt']['unattended_upgrades']['enable'] ? 1 : 0 %>"; 3 | <% if node['apt']['unattended_upgrades']['random_sleep'] -%> 4 | APT::Periodic::RandomSleep "<%= node['apt']['unattended_upgrades']['random_sleep'] %>"; 5 | <% end -%> 6 | -------------------------------------------------------------------------------- /.dependabot/config.yml: -------------------------------------------------------------------------------- 1 | version: 1 2 | update_configs: 3 | - package_manager: "javascript" 4 | directory: "/" 5 | update_schedule: "live" 6 | - package_manager: "docker" 7 | directory: "/" 8 | update_schedule: "weekly" 9 | - package_manager: "ruby:bundler" 10 | directory: "/" 11 | update_schedule: "live" 12 | default_reviewers: 13 | - "kirillian" 14 | default_labels: 15 | - "dependencies" 16 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/templates/20auto-upgrades.erb: -------------------------------------------------------------------------------- 1 | APT::Periodic::Update-Package-Lists "<%= node['apt']['unattended_upgrades']['update_package_lists'] ? 1 : 0 %>"; 2 | APT::Periodic::Unattended-Upgrade "<%= node['apt']['unattended_upgrades']['enable'] ? 1 : 0 %>"; 3 | <% if node['apt']['unattended_upgrades']['random_sleep'] -%> 4 | APT::Periodic::RandomSleep "<%= node['apt']['unattended_upgrades']['random_sleep'] %>"; 5 | <% end -%> 6 | -------------------------------------------------------------------------------- /lib/shiplane/deploy/configuration.rb: -------------------------------------------------------------------------------- 1 | module Shiplane 2 | module Deploy 3 | class Configuration 4 | attr_accessor :env, :name, :options 5 | 6 | def initialize(name, options, env) 7 | @name = name 8 | @options = options 9 | @env = env 10 | end 11 | 12 | def docker_command(role) 13 | role.requires_sudo? ? "sudo docker" : "docker" 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/resources/dhparam.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 7 | attribute :generator, equal_to: [2, 5], default: 2 8 | attribute :owner, kind_of: String 9 | attribute :group, kind_of: String 10 | attribute :mode, kind_of: [Integer, String] 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/resources/rsa_key.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 7 | attribute :key_pass, kind_of: String, default: nil 8 | attribute :owner, kind_of: String 9 | attribute :group, kind_of: String 10 | attribute :mode, kind_of: [Integer, String] 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/resources/dhparam.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 7 | attribute :generator, equal_to: [2, 5], default: 2 8 | attribute :owner, kind_of: String 9 | attribute :group, kind_of: String 10 | attribute :mode, kind_of: [Integer, String] 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/resources/rsa_key.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 7 | attribute :key_pass, kind_of: String, default: nil 8 | attribute :owner, kind_of: String 9 | attribute :group, kind_of: String 10 | attribute :mode, kind_of: [Integer, String] 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/chef/nodes/docker.json.erb: -------------------------------------------------------------------------------- 1 | { 2 | "environment":"production", 3 | "barebones-docker": { 4 | "ssl": true, 5 | "cert_path": "/etc/lego/certificates/", 6 | "docker": { 7 | "version": "27.3.1" 8 | }, 9 | "group": { 10 | "name": "docker" 11 | }, 12 | "users": ["<%= @shiplane_users %>"] 13 | }, 14 | "run_list": 15 | [ 16 | "role[server]", 17 | "recipe[barebones-docker]" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /lib/generators/shiplane/install/templates/Capfile.erb: -------------------------------------------------------------------------------- 1 | # Load DSL and set up stages 2 | require 'capistrano/setup' 3 | require 'capistrano/framework' 4 | 5 | require 'capistrano/ssh_doctor' 6 | require "airbrussh/capistrano" 7 | 8 | <% gems.each do |gem| -%> 9 | require 'capistrano/<%= gem %>' 10 | <% end -%> 11 | 12 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined 13 | Dir.glob('lib/capistrano/tasks/**/*.rake').each { |r| import r } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | /pkg 10 | /bootstrappers/chef/pkg 11 | /deployers/capistrano_docker/pkg 12 | .ruby-version 13 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/seven_zip/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'seven_zip' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs/Configures 7-Zip' 6 | version '4.2.10' 7 | source_url 'https://github.com/sous-chefs/seven_zip' 8 | issues_url 'https://github.com/sous-chefs/seven_zip/issues' 9 | chef_version '>= 15.3' 10 | 11 | supports 'windows' 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/seven_zip/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'seven_zip' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs/Configures 7-Zip' 6 | version '4.2.10' 7 | source_url 'https://github.com/sous-chefs/seven_zip' 8 | issues_url 'https://github.com/sous-chefs/seven_zip/issues' 9 | chef_version '>= 15.3' 10 | 11 | supports 'windows' 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/sysconfig/docker.erb: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/docker 2 | 3 | # If you need Docker to use an HTTP proxy, it can also be specified here. 4 | <% if @config.http_proxy %> 5 | export http_proxy="<%= @config.http_proxy %>" 6 | <% end %> 7 | <% if @config.https_proxy %> 8 | export https_proxy="<%= @config.https_proxy %>" 9 | <% end %> 10 | 11 | <% if @config.no_proxy %> 12 | export no_proxy="<%= @config.no_proxy %>" 13 | <% end %> 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/libraries/matchers.rb: -------------------------------------------------------------------------------- 1 | if defined?(ChefSpec) 2 | def create_x509_certificate(name) 3 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_x509, :create, name) 4 | end 5 | 6 | def create_dhparam_pem(name) 7 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_dhparam, :create, name) 8 | end 9 | 10 | def create_rsa_key(name) 11 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_rsa_key, :create, name) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/sysconfig/docker.erb: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/docker 2 | 3 | # If you need Docker to use an HTTP proxy, it can also be specified here. 4 | <% if @config.http_proxy %> 5 | export http_proxy="<%= @config.http_proxy %>" 6 | <% end %> 7 | <% if @config.https_proxy %> 8 | export https_proxy="<%= @config.https_proxy %>" 9 | <% end %> 10 | 11 | <% if @config.no_proxy %> 12 | export no_proxy="<%= @config.no_proxy %>" 13 | <% end %> 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/libraries/matchers.rb: -------------------------------------------------------------------------------- 1 | if defined?(ChefSpec) 2 | def create_x509_certificate(name) 3 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_x509, :create, name) 4 | end 5 | 6 | def create_dhparam_pem(name) 7 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_dhparam, :create, name) 8 | end 9 | 10 | def create_rsa_key(name) 11 | ChefSpec::Matchers::ResourceMatcher.new(:openssl_rsa_key, :create, name) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/templates/jail.erb: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT - This file is being maintained by Chef 2 | 3 | [<%= @name %>] 4 | enabled = true 5 | <% if @protocol -%> 6 | protocol = <%= @protocol %> 7 | <% end -%> 8 | port = <%= @ports.join(",") %> 9 | filter = <%= @filter %> 10 | logpath = <%= @logpath %> 11 | <% if @maxretry -%> 12 | maxretry = <%= @maxretry %> 13 | <% end -%> 14 | <% if @ignoreips -%> 15 | ignoreip = <%= @ignoreips.sort.join(" ") %> 16 | <% end -%> 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/attributes/default.rb: -------------------------------------------------------------------------------- 1 | case node['platform_family'] 2 | when 'debian' 3 | default['locales']['packages'] = ['locales'] 4 | else 5 | default['locales']['packages'] = [] 6 | end 7 | 8 | case node['platform'] 9 | when 'ubuntu' 10 | default['locales']['locale_file'] = '/var/lib/locales/supported.d/local' 11 | else 12 | default['locales']['locale_file'] = '/etc/locale.gen' 13 | end 14 | 15 | default['locales']['default'] = 'en_US.utf8' 16 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/templates/jail.erb: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT - This file is being maintained by Chef 2 | 3 | [<%= @name %>] 4 | enabled = true 5 | <% if @protocol -%> 6 | protocol = <%= @protocol %> 7 | <% end -%> 8 | port = <%= @ports.join(",") %> 9 | filter = <%= @filter %> 10 | logpath = <%= @logpath %> 11 | <% if @maxretry -%> 12 | maxretry = <%= @maxretry %> 13 | <% end -%> 14 | <% if @ignoreips -%> 15 | ignoreip = <%= @ignoreips.sort.join(" ") %> 16 | <% end -%> 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/attributes/default.rb: -------------------------------------------------------------------------------- 1 | case node['platform_family'] 2 | when 'debian' 3 | default['locales']['packages'] = ['locales'] 4 | else 5 | default['locales']['packages'] = [] 6 | end 7 | 8 | case node['platform'] 9 | when 'ubuntu' 10 | default['locales']['locale_file'] = '/var/lib/locales/supported.d/local' 11 | else 12 | default['locales']['locale_file'] = '/etc/locale.gen' 13 | end 14 | 15 | default['locales']['default'] = 'en_US.utf8' 16 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/templates/10dpkg-options.erb: -------------------------------------------------------------------------------- 1 | # Managed by Chef 2 | DPkg::Options { 3 | <%= node['apt']['confd']['force_confask'] ? '"--force-confask";' : '' -%> 4 | <%= node['apt']['confd']['force_confdef'] ? '"--force-confdef";' : '' -%> 5 | <%= node['apt']['confd']['force_confmiss'] ? '"--force-confmiss";' : '' -%> 6 | <%= node['apt']['confd']['force_confnew'] ? '"--force-confnew";' : '' -%> 7 | <%= node['apt']['confd']['force_confold'] ? '"--force-confold";' : '' -%> 8 | } 9 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/templates/10dpkg-options.erb: -------------------------------------------------------------------------------- 1 | # Managed by Chef 2 | DPkg::Options { 3 | <%= node['apt']['confd']['force_confask'] ? '"--force-confask";' : '' -%> 4 | <%= node['apt']['confd']['force_confdef'] ? '"--force-confdef";' : '' -%> 5 | <%= node['apt']['confd']['force_confmiss'] ? '"--force-confmiss";' : '' -%> 6 | <%= node['apt']['confd']['force_confnew'] ? '"--force-confnew";' : '' -%> 7 | <%= node['apt']['confd']['force_confold'] ? '"--force-confold";' : '' -%> 8 | } 9 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/libraries/localeshelper.rb: -------------------------------------------------------------------------------- 1 | module Locales 2 | module Helper 3 | def current_locale 4 | cmd = Mixlib::ShellOut.new('locale').run_command 5 | Hash[cmd.stdout.split.map { |c| c.chomp.gsub('"', '').split('=') }] 6 | end 7 | 8 | def locales_available 9 | Mixlib::ShellOut.new('locale -a').run_command.stdout.split 10 | end 11 | 12 | def locale_pattern 13 | /(C|[a-z]*)(_[A-Z]*)?/ 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/libraries/localeshelper.rb: -------------------------------------------------------------------------------- 1 | module Locales 2 | module Helper 3 | def current_locale 4 | cmd = Mixlib::ShellOut.new('locale').run_command 5 | Hash[cmd.stdout.split.map { |c| c.chomp.gsub('"', '').split('=') }] 6 | end 7 | 8 | def locales_available 9 | Mixlib::ShellOut.new('locale -a').run_command.stdout.split 10 | end 11 | 12 | def locale_pattern 13 | /(C|[a-z]*)(_[A-Z]*)?/ 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/templates/01proxy.erb: -------------------------------------------------------------------------------- 1 | Acquire::http::Proxy "http://<%= @server['host'] %>:<%= @server['port'] %>"; 2 | <% if @server['proxy_ssl'] %> 3 | Acquire::https::Proxy "http://<%= @server['host'] %>:<%= @server['port'] %>"; 4 | <% else %> 5 | Acquire::https::Proxy "DIRECT"; 6 | <% end %> 7 | <% unless @server['cache_bypass'].nil? %> 8 | <% @server['cache_bypass'].each do |bypass, type| %> 9 | Acquire::<%= type %>::Proxy::<%= bypass %> "DIRECT"; 10 | <% end %> 11 | <% end %> 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'mingw' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs a mingw/msys based toolchain on windows' 6 | version '4.0.3' 7 | source_url 'https://github.com/sous-chefs/mingw' 8 | issues_url 'https://github.com/sous-chefs/mingw/issues' 9 | chef_version '>= 15.3' 10 | 11 | supports 'windows' 12 | 13 | depends 'seven_zip' 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/templates/01proxy.erb: -------------------------------------------------------------------------------- 1 | Acquire::http::Proxy "http://<%= @server['host'] %>:<%= @server['port'] %>"; 2 | <% if @server['proxy_ssl'] %> 3 | Acquire::https::Proxy "http://<%= @server['host'] %>:<%= @server['port'] %>"; 4 | <% else %> 5 | Acquire::https::Proxy "DIRECT"; 6 | <% end %> 7 | <% unless @server['cache_bypass'].nil? %> 8 | <% @server['cache_bypass'].each do |bypass, type| %> 9 | Acquire::<%= type %>::Proxy::<%= bypass %> "DIRECT"; 10 | <% end %> 11 | <% end %> 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'mingw' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs a mingw/msys based toolchain on windows' 6 | version '4.0.3' 7 | source_url 'https://github.com/sous-chefs/mingw' 8 | issues_url 'https://github.com/sous-chefs/mingw/issues' 9 | chef_version '>= 15.3' 10 | 11 | supports 'windows' 12 | 13 | depends 'seven_zip' 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/recipes/add_docker_service.rb: -------------------------------------------------------------------------------- 1 | docker_service_manager_systemd 'default' do 2 | systemd_opts "#{node.fetch("barebones-docker", {}).fetch("docker", {}).fetch("systemd_opts")}" 3 | action :nothing 4 | end 5 | 6 | execute 'barebones_docker_add_docker_service' do 7 | command "echo 'Ensuring Docker NGINX service manager is installed into systemd...'" 8 | notifies :start, "docker_service_manager_systemd[default]", :immediately 9 | 10 | action :nothing 11 | end 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/recipes/add_docker_service.rb: -------------------------------------------------------------------------------- 1 | docker_service_manager_systemd 'default' do 2 | systemd_opts "#{node.fetch("barebones-docker", {}).fetch("docker", {}).fetch("systemd_opts")}" 3 | action :nothing 4 | end 5 | 6 | execute 'barebones_docker_add_docker_service' do 7 | command "echo 'Ensuring Docker NGINX service manager is installed into systemd...'" 8 | notifies :start, "docker_service_manager_systemd[default]", :immediately 9 | 10 | action :nothing 11 | end 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Precheck 2 | - Do a quick search through the Github Issues track to determine if your bug might already be submitted 3 | 4 | ## Environment 5 | - OS **[version]** 6 | - Ruby **[version]** 7 | - Shiplane **[version]** 8 | 9 | ## Current behavior 10 | 11 | Include a minimal reproduction sample and describe any errors or steps you may have taken to reproduce the error and stacktraces if appropriate. 12 | 13 | ## Expected behavior 14 | 15 | Describe the behavior you expect to happen in this case 16 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/files/ntp.ini: -------------------------------------------------------------------------------- 1 | [Installer] 2 | InstallDir=C:\NTP 3 | UpgradeMode=Reinstall 4 | Logfile=C:\NTP\install.log 5 | Silent=yes 6 | 7 | [Components] 8 | InstallDocs=yes 9 | InstallTools=yes 10 | InstallOpenSSL=yes 11 | CreateStartMenuEntries=yes 12 | 13 | [Service] 14 | ModifyFirewall=yes 15 | ServiceAccount=@SYSTEM 16 | DisableOthers=yes 17 | AllowBigInitialTimestep=yes 18 | EnableMMTimer=yes 19 | AutoStart=yes 20 | StartAfterInstallation=yes 21 | 22 | [Configuration] 23 | UseConfigFile=C:\NTP\ntp.conf 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/files/ntp.ini: -------------------------------------------------------------------------------- 1 | [Installer] 2 | InstallDir=C:\NTP 3 | UpgradeMode=Reinstall 4 | Logfile=C:\NTP\install.log 5 | Silent=yes 6 | 7 | [Components] 8 | InstallDocs=yes 9 | InstallTools=yes 10 | InstallOpenSSL=yes 11 | CreateStartMenuEntries=yes 12 | 13 | [Service] 14 | ModifyFirewall=yes 15 | ServiceAccount=@SYSTEM 16 | DisableOthers=yes 17 | AllowBigInitialTimestep=yes 18 | EnableMMTimer=yes 19 | AutoStart=yes 20 | StartAfterInstallation=yes 21 | 22 | [Configuration] 23 | UseConfigFile=C:\NTP\ntp.conf 24 | -------------------------------------------------------------------------------- /lib/capistrano/tasks/shiplane.rake: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'shiplane' 3 | 4 | desc "Convert Docker Container Artifacts From Development to Production and Upload to Docker Hub" 5 | task :shiplane, [:appname, :sha] => ['shiplane:default'] 6 | 7 | namespace :shiplane do 8 | task :default do |t, args| 9 | sha = `git rev-parse HEAD`.chomp 10 | invoke "shiplane:build", sha 11 | end 12 | 13 | task :build, :sha do |t, args| 14 | Shiplane::Build.build_latest!(args['sha'], postfix: fetch(:stage), stage: fetch(:stage)) 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/recipes/download_images.rb: -------------------------------------------------------------------------------- 1 | docker_image 'jwilder/nginx-proxy' do 2 | tag 'alpine' 3 | action :nothing 4 | end 5 | 6 | docker_image 'nginxproxy/acme-companion' do 7 | action :nothing 8 | end 9 | 10 | execute 'barebones_docker_download_images' do 11 | command "echo 'Ensuring Docker NGINX proxy images are downloaded...'" 12 | notifies :pull, "docker_image[jwilder/nginx-proxy]", :immediately 13 | notifies :pull, "docker_image[nginxproxy/acme-companion]", :immediately 14 | 15 | action :nothing 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | Include: 3 | - Berksfile 4 | - Gemfile 5 | - Rakefile 6 | - Thorfile 7 | - Guardfile 8 | Exclude: 9 | - vendor/** 10 | 11 | ClassLength: 12 | Enabled: false 13 | Documentation: 14 | Enabled: false 15 | Encoding: 16 | Enabled: false 17 | HashSyntax: 18 | Enabled: false 19 | LineLength: 20 | Enabled: false 21 | MethodLength: 22 | Enabled: false 23 | SignalException: 24 | Enabled: false 25 | TrailingComma: 26 | Enabled: false 27 | WordArray: 28 | Enabled: false 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/recipes/download_images.rb: -------------------------------------------------------------------------------- 1 | docker_image 'jwilder/nginx-proxy' do 2 | tag 'alpine' 3 | action :nothing 4 | end 5 | 6 | docker_image 'nginxproxy/acme-companion' do 7 | action :nothing 8 | end 9 | 10 | execute 'barebones_docker_download_images' do 11 | command "echo 'Ensuring Docker NGINX proxy images are downloaded...'" 12 | notifies :pull, "docker_image[jwilder/nginx-proxy]", :immediately 13 | notifies :pull, "docker_image[nginxproxy/acme-companion]", :immediately 14 | 15 | action :nothing 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | Include: 3 | - Berksfile 4 | - Gemfile 5 | - Rakefile 6 | - Thorfile 7 | - Guardfile 8 | Exclude: 9 | - vendor/** 10 | 11 | ClassLength: 12 | Enabled: false 13 | Documentation: 14 | Enabled: false 15 | Encoding: 16 | Enabled: false 17 | HashSyntax: 18 | Enabled: false 19 | LineLength: 20 | Enabled: false 21 | MethodLength: 22 | Enabled: false 23 | SignalException: 24 | Enabled: false 25 | TrailingComma: 26 | Enabled: false 27 | WordArray: 28 | Enabled: false 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/files/default/bash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set HOME=/home/%USERNAME% 3 | 4 | IF "%MSYSTEM%"=="" ( 5 | echo MSYSTEM is NOT defined 6 | exit 7 | ) 8 | 9 | rem Ask MSYS to initialize with a minimal path by default. 10 | rem This will put only the windows system paths into the msys path. 11 | set MSYS2_PATH_TYPE=minimal 12 | 13 | rem See /etc/profile - it should invoke post-install step 05-home-dir.post 14 | rem which uses this environment variable to change directories. 15 | set CHERE_INVOKING=1 16 | 17 | %~dp0..\usr\bin\bash.exe -l %* 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/files/default/bash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set HOME=/home/%USERNAME% 3 | 4 | IF "%MSYSTEM%"=="" ( 5 | echo MSYSTEM is NOT defined 6 | exit 7 | ) 8 | 9 | rem Ask MSYS to initialize with a minimal path by default. 10 | rem This will put only the windows system paths into the msys path. 11 | set MSYS2_PATH_TYPE=minimal 12 | 13 | rem See /etc/profile - it should invoke post-install step 05-home-dir.post 14 | rem which uses this environment variable to change directories. 15 | set CHERE_INVOKING=1 16 | 17 | %~dp0..\usr\bin\bash.exe -l %* 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/tasks/release_tasks.rake: -------------------------------------------------------------------------------- 1 | namespace :release do 2 | desc "Refresh Cookbooks" 3 | task refresh_cookbooks: ["cookbooks.tar.gz"] do 4 | end 5 | 6 | task :prepare_files do |task| 7 | rm 'cookbooks.tar.gz', force: true 8 | rm_r 'cookbooks', force: true 9 | end 10 | 11 | file "cookbooks.tar.gz" => :cookbooks do |task| 12 | sh "tar -cvzf #{task.name} cookbooks" 13 | end 14 | 15 | file cookbooks: :prepare_files do |task| 16 | cp_r 'berks-cookbooks/.', "cookbooks" 17 | cp_r 'site-cookbooks/.', "cookbooks" 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /examples/rails_app/.shiplane/insert_on_build/config/database.yml.erb: -------------------------------------------------------------------------------- 1 | default: &default 2 | adapter: postgresql 3 | encoding: unicode 4 | pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %> 5 | username: <%= ENV['DATABASE_USERNAME'] %> 6 | password: <%= ENV['DATABASE_PASSWORD'] %> 7 | host: <%= ENV['DATABASE_HOST'] %> 8 | port: <%= ENV['DATABASE_PORT'] %> 9 | 10 | production: 11 | <<: *default 12 | database: example_production 13 | username: <%%= Rails.application.credentials.database_username %> 14 | password: <%%= Rails.application.credentials.database_password %> 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/seven_zip/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/seven_zip/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "packageRules": [ 5 | { 6 | "groupName": "Actions", 7 | "matchUpdateTypes": ["minor", "patch", "pin"], 8 | "automerge": true, 9 | "addLabels": ["Release: Patch", "Skip: Announcements"] 10 | }, 11 | { 12 | "groupName": "Actions", 13 | "matchUpdateTypes": ["major"], 14 | "automerge": false, 15 | "addLabels": ["Release: Patch", "Skip: Announcements"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'yum-epel' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs and configures the EPEL Yum repository' 6 | version '5.0.8' 7 | source_url 'https://github.com/sous-chefs/yum-epel' 8 | issues_url 'https://github.com/sous-chefs/yum-epel/issues' 9 | chef_version '>= 12.15' 10 | 11 | supports 'amazon' 12 | supports 'centos' 13 | supports 'oracle' 14 | supports 'redhat' 15 | supports 'scientific' 16 | supports 'zlinux' 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'yum-epel' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Installs and configures the EPEL Yum repository' 6 | version '5.0.8' 7 | source_url 'https://github.com/sous-chefs/yum-epel' 8 | issues_url 'https://github.com/sous-chefs/yum-epel/issues' 9 | chef_version '>= 12.15' 10 | 11 | supports 'amazon' 12 | supports 'centos' 13 | supports 'oracle' 14 | supports 'redhat' 15 | supports 'scientific' 16 | supports 'zlinux' 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/libraries/helpers_json.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Json 4 | def generate_json(dangling, prune_until = nil, with_label = nil, without_label = nil) 5 | opts = { dangling: { "#{dangling}": true } } 6 | opts['until'] = { "#{prune_until}": true } if prune_until 7 | opts['label'] = { "#{with_label}": true } if with_label 8 | opts['label!'] = { "#{without_label}": true } if without_label 9 | 'filters=' + URI.encode_www_form_component(opts.to_json) 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/libraries/helpers_json.rb: -------------------------------------------------------------------------------- 1 | module DockerCookbook 2 | module DockerHelpers 3 | module Json 4 | def generate_json(dangling, prune_until = nil, with_label = nil, without_label = nil) 5 | opts = { dangling: { "#{dangling}": true } } 6 | opts['until'] = { "#{prune_until}": true } if prune_until 7 | opts['label'] = { "#{with_label}": true } if with_label 8 | opts['label!'] = { "#{without_label}": true } if without_label 9 | 'filters=' + URI.encode_www_form_component(opts.to_json) 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | # name: docker 4 | name: vagrant 5 | 6 | provisioner: 7 | name: chef_zero 8 | 9 | platforms: 10 | - name: ubuntu-12.04 11 | - name: debian-7.2.0 12 | 13 | suites: 14 | - name: default 15 | run_list: 16 | - recipe[locales::default] 17 | attributes: 18 | - name: deAT_utf8 19 | run_list: 20 | - recipe[locales::default] 21 | - recipe[fake::deat_utf8] 22 | attributes: 23 | - name: multiple 24 | run_list: 25 | - recipe[locales::default] 26 | - recipe[fake::multiple] 27 | attributes: 28 | -------------------------------------------------------------------------------- /examples/rails_app/config/initializers/redis.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | require 'shiplane/safe_build' 3 | require 'shiplane/safe_yaml_loading' 4 | 5 | Shiplane::SafeBuild.wrap do 6 | redis_yaml_file = "config/redis.yml" 7 | 8 | raise "Redis config missing or incorrect." unless File.exist?(redis_yaml_file) 9 | 10 | REDIS_CONFIG = Shiplane::SafeYamlLoading.load(ERB.new(File.read(redis_yaml_file)).result)[Rails.env].symbolize_keys! 11 | 12 | class RedisInstance 13 | include Singleton 14 | 15 | def self.redis 16 | @redis ||= Redis.new(REDIS_CONFIG) 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | # name: docker 4 | name: vagrant 5 | 6 | provisioner: 7 | name: chef_zero 8 | 9 | platforms: 10 | - name: ubuntu-12.04 11 | - name: debian-7.2.0 12 | 13 | suites: 14 | - name: default 15 | run_list: 16 | - recipe[locales::default] 17 | attributes: 18 | - name: deAT_utf8 19 | run_list: 20 | - recipe[locales::default] 21 | - recipe[fake::deat_utf8] 22 | attributes: 23 | - name: multiple 24 | run_list: 25 | - recipe[locales::default] 26 | - recipe[fake::multiple] 27 | attributes: 28 | -------------------------------------------------------------------------------- /lib/shiplane/safe_yaml_loading.rb: -------------------------------------------------------------------------------- 1 | require 'yaml' 2 | 3 | module Shiplane 4 | class SafeYamlLoading 5 | def self.load_file(filepath) 6 | load(File.read(filepath)) 7 | end 8 | 9 | def self.load_with_aliases(yaml) 10 | YAML.load(yaml, aliases: true) 11 | end 12 | 13 | def self.load_without_aliases(yaml) 14 | YAML.load(yaml) 15 | end 16 | 17 | if Psych && Gem::Version.new(Psych::VERSION) > Gem::Version.new("4.0.0") 18 | define_singleton_method :load, method(:load_with_aliases) 19 | else 20 | define_singleton_method :load, method(:load_without_aliases) 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | [Describe what this change achieves] 4 | 5 | ### Issues Resolved 6 | 7 | [List any existing issues this PR resolves] 8 | 9 | ### Check List 10 | 11 | - [ ] All tests pass. See 12 | - [ ] New functionality includes testing. 13 | - [ ] New functionality has been documented in the README if applicable 14 | - [ ] All commits have been signed for the Developer Certificate of Origin. See 15 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/files/default/custom-upgrade.sh: -------------------------------------------------------------------------------- 1 | declare -r CRITICAL_PACKAGES="bash pacman msys2-runtime" 2 | declare -r OPTIONAL_PACKAGES="msys2-runtime-devel" 3 | 4 | # set pacman command if not already defined 5 | PACMAN=${PACMAN:-pacman} 6 | # save full path to command as PATH may change when sourcing /etc/profile 7 | PACMAN_PATH=$(type -P $PACMAN) 8 | 9 | run_pacman() { 10 | local cmd 11 | cmd=("$PACMAN_PATH" "$@") 12 | "${cmd[@]}" 13 | } 14 | 15 | if ! run_pacman -Sy; then 16 | exit 1 17 | fi 18 | 19 | run_pacman -Qu ${CRITICAL_PACKAGES} 20 | 21 | if ! run_pacman -S --noconfirm --needed ${CRITICAL_PACKAGES} ${OPTIONAL_PACKAGES}; then 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/files/default/custom-upgrade.sh: -------------------------------------------------------------------------------- 1 | declare -r CRITICAL_PACKAGES="bash pacman msys2-runtime" 2 | declare -r OPTIONAL_PACKAGES="msys2-runtime-devel" 3 | 4 | # set pacman command if not already defined 5 | PACMAN=${PACMAN:-pacman} 6 | # save full path to command as PATH may change when sourcing /etc/profile 7 | PACMAN_PATH=$(type -P $PACMAN) 8 | 9 | run_pacman() { 10 | local cmd 11 | cmd=("$PACMAN_PATH" "$@") 12 | "${cmd[@]}" 13 | } 14 | 15 | if ! run_pacman -Sy; then 16 | exit 1 17 | fi 18 | 19 | run_pacman -Qu ${CRITICAL_PACKAGES} 20 | 21 | if ! run_pacman -S --noconfirm --needed ${CRITICAL_PACKAGES} ${OPTIONAL_PACKAGES}; then 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/files/default/custom_prefix.sh: -------------------------------------------------------------------------------- 1 | # Prepend values from the parent environment to msys2 environment variables. 2 | 3 | export PKG_CONFIG_PATH="${PREMSYS2_PKG_CONFIG_PATH:+${PREMSYS2_PKG_CONFIG_PATH}:}${PKG_CONFIG_PATH}" 4 | 5 | # Instead of placing our entire windows path into msys2, we can selectively 6 | # prepend just the important parts that we need. This also ensures that 7 | # we don't accidentally add other unnecessary chef or git msys2 library 8 | # files in the path. 9 | export PATH="${PREMSYS2_PATH:+${PREMSYS2_PATH}:}${PATH}" 10 | 11 | # TODO: If there are other variabled we want to control like MANPATH or ACLOCALPATH, 12 | # add those here. 13 | 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please include a summary of the change and which issue is fixed. 4 | 5 | ## Motivation 6 | 7 | Describe WHY you believe this code is necessary 8 | 9 | ## Submission Checklist: 10 | - [ ] My code passes all tests and style linters 11 | - [ ] I have added tests that demonstrate the effectiveness of my work 12 | 13 | # Screenshots 14 | 15 | Add any screenshots you might have of what your changes look like 16 | 17 | # Special instructions 18 | 19 | Are there any caveats or special needs that must be met for you code to work? 20 | 21 | # Documentation 22 | 23 | Please add any documentation that might need to be added or changed in the README 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/files/default/custom_prefix.sh: -------------------------------------------------------------------------------- 1 | # Prepend values from the parent environment to msys2 environment variables. 2 | 3 | export PKG_CONFIG_PATH="${PREMSYS2_PKG_CONFIG_PATH:+${PREMSYS2_PKG_CONFIG_PATH}:}${PKG_CONFIG_PATH}" 4 | 5 | # Instead of placing our entire windows path into msys2, we can selectively 6 | # prepend just the important parts that we need. This also ensures that 7 | # we don't accidentally add other unnecessary chef or git msys2 library 8 | # files in the path. 9 | export PATH="${PREMSYS2_PATH:+${PREMSYS2_PATH}:}${PATH}" 10 | 11 | # TODO: If there are other variabled we want to control like MANPATH or ACLOCALPATH, 12 | # add those here. 13 | 14 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next']['repositoryid'] = 'epel-next' 2 | default['yum']['epel-next']['gpgcheck'] = true 3 | default['yum']['epel-next']['description'] = 'Extra Packages for $releasever - Next - $basearch' 4 | default['yum']['epel-next']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next']['enabled'] = true 9 | default['yum']['epel-next']['managed'] = true 10 | default['yum']['epel-next']['make_cache'] = true 11 | -------------------------------------------------------------------------------- /examples/rails_app/.env.shiplane: -------------------------------------------------------------------------------- 1 | # Docker Settings 2 | COMPOSE_HTTP_TIMEOUT=300 3 | 4 | # App Settings 5 | APP_NAME=example 6 | DEPENDENCY_TIMEOUT=300s 7 | HOST_REDIS_PORT=6379 8 | HOST_POSTGRES_PORT=5432 9 | HOST_WEBPACKER_PORT=3035 10 | HOST_PORT=3000 11 | HOST_MAILCATCHER_PORT_1=1080 12 | HOST_MAILCATCHER_PORT_2=1025 13 | 14 | # Database Settings 15 | DATABASE_HOST=db 16 | DATABASE_PORT=5432 17 | 18 | # Redis Settings 19 | REDIS_HOST=redis 20 | REDIS_PORT=6379 21 | REDIS_DATABASE_NUMBER=1 22 | 23 | # Development Settings 24 | RAILS_ENV=production 25 | NODE_ENV=production 26 | WEBPACKER_DEV_SERVER_HOST=webpacker 27 | WEBPACKER_DEV_SERVER_INLINE=false 28 | WEBPACKER_DEV_SERVER_HOT=false 29 | 30 | 31 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next']['repositoryid'] = 'epel-next' 2 | default['yum']['epel-next']['gpgcheck'] = true 3 | default['yum']['epel-next']['description'] = 'Extra Packages for $releasever - Next - $basearch' 4 | default['yum']['epel-next']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next']['enabled'] = true 9 | default['yum']['epel-next']['managed'] = true 10 | default['yum']['epel-next']['make_cache'] = true 11 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'fail2ban' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs and configures fail2ban' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '5.0.2' 8 | 9 | recipe 'default', 'Installs and configures fail2ban' 10 | 11 | depends 'yum-epel' 12 | 13 | %w(amazon centos debian fedora oracle redhat scientific ubuntu suse opensuse opensuseleap ).each do |os| 14 | supports os 15 | end 16 | 17 | source_url 'https://github.com/chef-cookbooks/fail2ban' 18 | issues_url 'https://github.com/chef-cookbooks/fail2ban/issues' 19 | chef_version '>= 13.0' 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'fail2ban' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs and configures fail2ban' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '5.0.2' 8 | 9 | recipe 'default', 'Installs and configures fail2ban' 10 | 11 | depends 'yum-epel' 12 | 13 | %w(amazon centos debian fedora oracle redhat scientific ubuntu suse opensuse opensuseleap ).each do |os| 14 | supports os 15 | end 16 | 17 | source_url 'https://github.com/chef-cookbooks/fail2ban' 18 | issues_url 'https://github.com/chef-cookbooks/fail2ban/issues' 19 | chef_version '>= 13.0' 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'docker' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Provides docker_service, docker_image, and docker_container resources' 6 | version '11.5.2' 7 | source_url 'https://github.com/sous-chefs/docker' 8 | issues_url 'https://github.com/sous-chefs/docker/issues' 9 | chef_version '>= 16.0', '< 19.0' 10 | 11 | supports 'amazon' 12 | supports 'centos' 13 | supports 'scientific' 14 | supports 'oracle' 15 | supports 'debian' 16 | supports 'fedora' 17 | supports 'redhat' 18 | supports 'ubuntu' 19 | 20 | gem 'docker-api', '>= 2.3', '< 3' 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'docker' 2 | maintainer 'Sous Chefs' 3 | maintainer_email 'help@sous-chefs.org' 4 | license 'Apache-2.0' 5 | description 'Provides docker_service, docker_image, and docker_container resources' 6 | version '11.5.2' 7 | source_url 'https://github.com/sous-chefs/docker' 8 | issues_url 'https://github.com/sous-chefs/docker/issues' 9 | chef_version '>= 16.0', '< 19.0' 10 | 11 | supports 'amazon' 12 | supports 'centos' 13 | supports 'scientific' 14 | supports 'oracle' 15 | supports 'debian' 16 | supports 'fedora' 17 | supports 'redhat' 18 | supports 'ubuntu' 19 | 20 | gem 'docker-api', '>= 2.3', '< 3' 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'sudo' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs sudo and configures /etc/sudoers' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '5.4.4' 8 | 9 | recipe 'sudo', 'Installs sudo and configures /etc/sudoers' 10 | 11 | %w(aix amazon redhat centos fedora ubuntu debian freebsd mac_os_x oracle scientific zlinux suse opensuse opensuseleap).each do |os| 12 | supports os 13 | end 14 | 15 | source_url 'https://github.com/chef-cookbooks/sudo' 16 | issues_url 'https://github.com/chef-cookbooks/sudo/issues' 17 | chef_version '>= 12.21.3' if respond_to?(:chef_version) 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'ntp' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs and configures ntp as a client or server' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '3.6.1' 8 | 9 | recipe 'ntp', 'Installs and configures ntp either as a server or client' 10 | 11 | %w( amazon centos debian fedora freebsd gentoo redhat scientific solaris2 oracle ubuntu windows mac_os_x ).each do |os| 12 | supports os 13 | end 14 | 15 | source_url 'https://github.com/chef-cookbooks/ntp' 16 | issues_url 'https://github.com/chef-cookbooks/ntp/issues' 17 | chef_version '>= 12.1' if respond_to?(:chef_version) 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/seven_zip/rakefile.rb: -------------------------------------------------------------------------------- 1 | require 'cookstyle' 2 | require 'foodcritic' 3 | require 'rspec/core/rake_task' 4 | require 'rubocop/rake_task' 5 | 6 | task default: [:rubocop, :foodcritic, :spec] 7 | 8 | FoodCritic::Rake::LintTask.new do |t| 9 | t.options = { 10 | cookbook_paths: '.', 11 | search_gems: true, 12 | } 13 | end 14 | 15 | RSpec::Core::RakeTask.new do |task| 16 | task.pattern = 'spec/**/*_spec.rb' 17 | task.rspec_opts = ['--color', '-f documentation', '-tunit'] 18 | end 19 | 20 | RuboCop::RakeTask.new 21 | 22 | begin 23 | require 'stove/rake_task' 24 | Stove::RakeTask.new 25 | rescue LoadError => e 26 | puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI'] 27 | end 28 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'ntp' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs and configures ntp as a client or server' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '3.6.1' 8 | 9 | recipe 'ntp', 'Installs and configures ntp either as a server or client' 10 | 11 | %w( amazon centos debian fedora freebsd gentoo redhat scientific solaris2 oracle ubuntu windows mac_os_x ).each do |os| 12 | supports os 13 | end 14 | 15 | source_url 'https://github.com/chef-cookbooks/ntp' 16 | issues_url 'https://github.com/chef-cookbooks/ntp/issues' 17 | chef_version '>= 12.1' if respond_to?(:chef_version) 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'sudo' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs sudo and configures /etc/sudoers' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '5.4.4' 8 | 9 | recipe 'sudo', 'Installs sudo and configures /etc/sudoers' 10 | 11 | %w(aix amazon redhat centos fedora ubuntu debian freebsd mac_os_x oracle scientific zlinux suse opensuse opensuseleap).each do |os| 12 | supports os 13 | end 14 | 15 | source_url 'https://github.com/chef-cookbooks/sudo' 16 | issues_url 'https://github.com/chef-cookbooks/sudo/issues' 17 | chef_version '>= 12.21.3' if respond_to?(:chef_version) 18 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-source']['repositoryid'] = 'epel-source' 2 | default['yum']['epel-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Source" 4 | default['yum']['epel-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-source']['gpgcheck'] = true 9 | default['yum']['epel-source']['enabled'] = false 10 | default['yum']['epel-source']['managed'] = false 11 | default['yum']['epel-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/seven_zip/rakefile.rb: -------------------------------------------------------------------------------- 1 | require 'cookstyle' 2 | require 'foodcritic' 3 | require 'rspec/core/rake_task' 4 | require 'rubocop/rake_task' 5 | 6 | task default: [:rubocop, :foodcritic, :spec] 7 | 8 | FoodCritic::Rake::LintTask.new do |t| 9 | t.options = { 10 | cookbook_paths: '.', 11 | search_gems: true, 12 | } 13 | end 14 | 15 | RSpec::Core::RakeTask.new do |task| 16 | task.pattern = 'spec/**/*_spec.rb' 17 | task.rspec_opts = ['--color', '-f documentation', '-tunit'] 18 | end 19 | 20 | RuboCop::RakeTask.new 21 | 22 | begin 23 | require 'stove/rake_task' 24 | Stove::RakeTask.new 25 | rescue LoadError => e 26 | puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI'] 27 | end 28 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-source']['repositoryid'] = 'epel-source' 2 | default['yum']['epel-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Source" 4 | default['yum']['epel-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-source']['gpgcheck'] = true 9 | default['yum']['epel-source']['enabled'] = false 10 | default['yum']['epel-source']['managed'] = false 11 | default['yum']['epel-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-testing.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing']['repositoryid'] = 'epel-testing' 2 | default['yum']['epel-testing']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing " 4 | default['yum']['epel-testing']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing']['gpgcheck'] = true 9 | default['yum']['epel-testing']['enabled'] = false 10 | default['yum']['epel-testing']['managed'] = false 11 | default['yum']['epel-testing']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-testing.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing']['repositoryid'] = 'epel-testing' 2 | default['yum']['epel-testing']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing " 4 | default['yum']['epel-testing']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing']['gpgcheck'] = true 9 | default['yum']['epel-testing']['enabled'] = false 10 | default['yum']['epel-testing']['managed'] = false 11 | default['yum']['epel-testing']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Recipe:: default 4 | # 5 | # Copyright 2009-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Recipe:: default 4 | # 5 | # Copyright 2009-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-debuginfo']['repositoryid'] = 'epel-debuginfo' 2 | default['yum']['epel-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Debug" 4 | default['yum']['epel-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-debuginfo']['enabled'] = false 10 | default['yum']['epel-debuginfo']['managed'] = false 11 | default['yum']['epel-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-debuginfo']['repositoryid'] = 'epel-debuginfo' 2 | default['yum']['epel-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Debug" 4 | default['yum']['epel-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-debuginfo']['enabled'] = false 10 | default['yum']['epel-debuginfo']['managed'] = false 11 | default['yum']['epel-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/default.rb: -------------------------------------------------------------------------------- 1 | default['yum-epel']['repos'] = 2 | value_for_platform( 3 | %w(almalinux redhat centos oracle rocky) => { 4 | '>= 8.0' => epel_repos, 5 | '~> 7.0' => 6 | %w( 7 | epel 8 | epel-debuginfo 9 | epel-source 10 | epel-testing 11 | epel-testing-debuginfo 12 | epel-testing-source 13 | ), 14 | }, 15 | 'amazon' => { 16 | 'default' => 17 | %w( 18 | epel 19 | epel-debuginfo 20 | epel-source 21 | epel-testing 22 | epel-testing-debuginfo 23 | epel-testing-source 24 | ), 25 | }, 26 | # No-op on non-yum systems 27 | 'default' => [] 28 | ) 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/default.rb: -------------------------------------------------------------------------------- 1 | default['yum-epel']['repos'] = 2 | value_for_platform( 3 | %w(almalinux redhat centos oracle rocky) => { 4 | '>= 8.0' => epel_repos, 5 | '~> 7.0' => 6 | %w( 7 | epel 8 | epel-debuginfo 9 | epel-source 10 | epel-testing 11 | epel-testing-debuginfo 12 | epel-testing-source 13 | ), 14 | }, 15 | 'amazon' => { 16 | 'default' => 17 | %w( 18 | epel 19 | epel-debuginfo 20 | epel-source 21 | epel-testing 22 | epel-testing-debuginfo 23 | epel-testing-source 24 | ), 25 | }, 26 | # No-op on non-yum systems 27 | 'default' => [] 28 | ) 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/resources/x509.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :owner, kind_of: String 7 | attribute :group, kind_of: String 8 | attribute :expire, kind_of: Integer 9 | attribute :mode, kind_of: [Integer, String] 10 | attribute :org, kind_of: String, required: true 11 | attribute :org_unit, kind_of: String, required: true 12 | attribute :country, kind_of: String, required: true 13 | attribute :common_name, kind_of: String, required: true 14 | attribute :key_file, kind_of: String, default: nil 15 | attribute :key_pass, kind_of: String, default: nil 16 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: mingw 3 | # Recipe:: default 4 | # 5 | # Copyright:: 2016-2019, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | include_recipe 'seven_zip::default' 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-source']['repositoryid'] = 'epel-next-source' 2 | default['yum']['epel-next-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} $basearch - Next -Source" 4 | default['yum']['epel-next-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-source-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-source']['gpgcheck'] = true 9 | default['yum']['epel-next-source']['enabled'] = false 10 | default['yum']['epel-next-source']['managed'] = false 11 | default['yum']['epel-next-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: mingw 3 | # Recipe:: default 4 | # 5 | # Copyright:: 2016-2019, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | include_recipe 'seven_zip::default' 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/resources/x509.rb: -------------------------------------------------------------------------------- 1 | 2 | actions [:create] 3 | default_action :create 4 | 5 | attribute :name, kind_of: String, name_attribute: true 6 | attribute :owner, kind_of: String 7 | attribute :group, kind_of: String 8 | attribute :expire, kind_of: Integer 9 | attribute :mode, kind_of: [Integer, String] 10 | attribute :org, kind_of: String, required: true 11 | attribute :org_unit, kind_of: String, required: true 12 | attribute :country, kind_of: String, required: true 13 | attribute :common_name, kind_of: String, required: true 14 | attribute :key_file, kind_of: String, default: nil 15 | attribute :key_pass, kind_of: String, default: nil 16 | attribute :key_length, equal_to: [1024, 2048, 4096, 8192], default: 2048 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-source']['repositoryid'] = 'epel-next-source' 2 | default['yum']['epel-next-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} $basearch - Next -Source" 4 | default['yum']['epel-next-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-source-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-source']['gpgcheck'] = true 9 | default['yum']['epel-next-source']['enabled'] = false 10 | default['yum']['epel-next-source']['managed'] = false 11 | default['yum']['epel-next-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'apt' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Configures apt and apt caching.' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '7.1.1' 8 | 9 | recipe 'apt::default', 'Runs apt-get update during compile phase and sets up preseed directories' 10 | recipe 'apt::cacher-ng', 'Set up an apt-cacher-ng caching proxy' 11 | recipe 'apt::cacher-client', 'Client for the apt::cacher-ng caching proxy' 12 | 13 | %w(ubuntu debian).each do |os| 14 | supports os 15 | end 16 | 17 | source_url 'https://github.com/chef-cookbooks/apt' 18 | issues_url 'https://github.com/chef-cookbooks/apt/issues' 19 | chef_version '>= 13.3' if respond_to?(:chef_version) 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'apt' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Configures apt and apt caching.' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '7.1.1' 8 | 9 | recipe 'apt::default', 'Runs apt-get update during compile phase and sets up preseed directories' 10 | recipe 'apt::cacher-ng', 'Set up an apt-cacher-ng caching proxy' 11 | recipe 'apt::cacher-client', 'Client for the apt::cacher-ng caching proxy' 12 | 13 | %w(ubuntu debian).each do |os| 14 | supports os 15 | end 16 | 17 | source_url 'https://github.com/chef-cookbooks/apt' 18 | issues_url 'https://github.com/chef-cookbooks/apt/issues' 19 | chef_version '>= 13.3' if respond_to?(:chef_version) 20 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next-testing.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing']['repositoryid'] = 'epel-next-testing' 2 | default['yum']['epel-next-testing']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing" 4 | default['yum']['epel-next-testing']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-testing-next-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing']['gpgcheck'] = true 9 | default['yum']['epel-next-testing']['enabled'] = false 10 | default['yum']['epel-next-testing']['managed'] = false 11 | default['yum']['epel-next-testing']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/recipes/default.rb: -------------------------------------------------------------------------------- 1 | include_recipe '::install_docker' 2 | include_recipe '::add_docker_service' 3 | include_recipe '::download_images' 4 | include_recipe '::add_configuration_files' 5 | include_recipe '::deploy_containers' 6 | 7 | execute 'ensure_nginx_proxy_prerequisites' do 8 | command "echo 'Ensuring Docker NGINX proxy prereqs...'" 9 | notifies :run, "execute[barebones_docker_install_docker]", :immediately 10 | notifies :run, "execute[barebones_docker_add_docker_service]", :immediately 11 | notifies :run, "execute[barebones_docker_download_images]", :immediately 12 | notifies :run, "execute[barebones_docker_add_configuration_files]", :immediately 13 | notifies :run, "execute[barebones_docker_deploy_containers]", :immediately 14 | 15 | action :run 16 | end 17 | -------------------------------------------------------------------------------- /examples/rails_app/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build Base image 2 | FROM kirillian2/rails:1.2.1 as base 3 | 4 | RUN apt-get update -qq && apt-get install -y cmake 5 | 6 | ARG APP_NAME 7 | ENV APP_PATH /var/www/$APP_NAME 8 | RUN mkdir -p $APP_PATH 9 | 10 | # Build intermediate 11 | FROM base as intermediate 12 | 13 | WORKDIR $APP_PATH 14 | 15 | # Clean up APT when done. 16 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 17 | 18 | # Build Development image 19 | FROM base as development 20 | 21 | COPY --from=intermediate $APP_PATH $APP_PATH 22 | 23 | WORKDIR $APP_PATH 24 | 25 | ARG GITHUB_TOKEN 26 | RUN git config --global url."https://$GITHUB_TOKEN:@github.com/".insteadOf "https://github.com/" 27 | RUN git config --global --add url."https://$GITHUB_TOKEN:@github.com/".insteadOf "ssh://git@github.com/" 28 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next-testing.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing']['repositoryid'] = 'epel-next-testing' 2 | default['yum']['epel-next-testing']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing" 4 | default['yum']['epel-next-testing']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-testing-next-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing']['gpgcheck'] = true 9 | default['yum']['epel-next-testing']['enabled'] = false 10 | default['yum']['epel-next-testing']['managed'] = false 11 | default['yum']['epel-next-testing']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/recipes/default.rb: -------------------------------------------------------------------------------- 1 | include_recipe '::install_docker' 2 | include_recipe '::add_docker_service' 3 | include_recipe '::download_images' 4 | include_recipe '::add_configuration_files' 5 | include_recipe '::deploy_containers' 6 | 7 | execute 'ensure_nginx_proxy_prerequisites' do 8 | command "echo 'Ensuring Docker NGINX proxy prereqs...'" 9 | notifies :run, "execute[barebones_docker_install_docker]", :immediately 10 | notifies :run, "execute[barebones_docker_add_docker_service]", :immediately 11 | notifies :run, "execute[barebones_docker_download_images]", :immediately 12 | notifies :run, "execute[barebones_docker_add_configuration_files]", :immediately 13 | notifies :run, "execute[barebones_docker_deploy_containers]", :immediately 14 | 15 | action :run 16 | end 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/seven_zip/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seven_zip", 3 | "description": "Installs/Configures 7-Zip", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "windows": ">= 0.0.0" 10 | }, 11 | "dependencies": { 12 | 13 | }, 14 | "providing": { 15 | 16 | }, 17 | "recipes": { 18 | 19 | }, 20 | "version": "4.2.10", 21 | "source_url": "https://github.com/sous-chefs/seven_zip", 22 | "issues_url": "https://github.com/sous-chefs/seven_zip/issues", 23 | "privacy": false, 24 | "chef_versions": [ 25 | [ 26 | ">= 15.3" 27 | ] 28 | ], 29 | "ohai_versions": [ 30 | 31 | ], 32 | "gems": [ 33 | 34 | ], 35 | "eager_load_libraries": true 36 | } 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/seven_zip/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seven_zip", 3 | "description": "Installs/Configures 7-Zip", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "windows": ">= 0.0.0" 10 | }, 11 | "dependencies": { 12 | 13 | }, 14 | "providing": { 15 | 16 | }, 17 | "recipes": { 18 | 19 | }, 20 | "version": "4.2.10", 21 | "source_url": "https://github.com/sous-chefs/seven_zip", 22 | "issues_url": "https://github.com/sous-chefs/seven_zip/issues", 23 | "privacy": false, 24 | "chef_versions": [ 25 | [ 26 | ">= 15.3" 27 | ] 28 | ], 29 | "ohai_versions": [ 30 | 31 | ], 32 | "gems": [ 33 | 34 | ], 35 | "eager_load_libraries": true 36 | } 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-debuginfo']['repositoryid'] = 'epel-next-debuginfo' 2 | default['yum']['epel-next-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Debug" 4 | default['yum']['epel-next-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-next-debuginfo']['enabled'] = false 10 | default['yum']['epel-next-debuginfo']['managed'] = false 11 | default['yum']['epel-next-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-debuginfo']['repositoryid'] = 'epel-next-debuginfo' 2 | default['yum']['epel-next-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Debug" 4 | default['yum']['epel-next-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-next-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-next-debuginfo']['enabled'] = false 10 | default['yum']['epel-next-debuginfo']['managed'] = false 11 | default['yum']['epel-next-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-testing-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing-source']['repositoryid'] = 'epel-testing-source' 2 | default['yum']['epel-testing-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing Source" 4 | default['yum']['epel-testing-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing-source']['gpgcheck'] = true 9 | default['yum']['epel-testing-source']['enabled'] = false 10 | default['yum']['epel-testing-source']['managed'] = false 11 | default['yum']['epel-testing-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-testing-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing-source']['repositoryid'] = 'epel-testing-source' 2 | default['yum']['epel-testing-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing Source" 4 | default['yum']['epel-testing-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing-source']['gpgcheck'] = true 9 | default['yum']['epel-testing-source']['enabled'] = false 10 | default['yum']['epel-testing-source']['managed'] = false 11 | default['yum']['epel-testing-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Attributes:: default 4 | # 5 | # Copyright 2014-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | default['openssl']['restart_services'] = [] 21 | -------------------------------------------------------------------------------- /RELEASES.md: -------------------------------------------------------------------------------- 1 | # Releasing A New Version of the Gem 2 | 3 | ## Pre-release Tasks 4 | ## Bundle 5 | Update the bundle 6 | 7 | ```bash 8 | bundle 9 | ``` 10 | 11 | ## shiplane_bootstrappers_chef 12 | When changing cookbooks, you need to run the release tasks in the boostrappers directory 13 | 14 | ```bash 15 | cd bootstrappers/chef && rake release:refresh_cookbooks && cd ../.. 16 | ``` 17 | 18 | ## Bumping shiplane_bootstrappers_chef 19 | ```bash 20 | cd bootstrappers/chef && gem bump --file lib/shiplane/bootstrappers/chef/version.rb --push --release && cd ../.. 21 | ``` 22 | 23 | ## Bumping shiplane_deployers_capistrano_docker 24 | ```bash 25 | cd deployers/capistrano_docker && gem bump --file lib/shiplane/deployers/capistrano_docker/version.rb --push --release && cd ../.. 26 | ``` 27 | 28 | ## Bumping shiplane 29 | gem bump --push --release 30 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Attributes:: default 4 | # 5 | # Copyright 2014-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | default['openssl']['restart_services'] = [] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/Berksfile: -------------------------------------------------------------------------------- 1 | source "https://api.berkshelf.com" 2 | 3 | cookbook 'apt', github: 'opscode-cookbooks/apt' 4 | cookbook 'build-essential', github: 'opscode-cookbooks/build-essential' 5 | cookbook 'docker', '~> 11.5.2' 6 | # cookbook 'chef-server-with-letsencrypt', '~> 4.0.0' 7 | # cookbook 'cmake', '~> 0.3.0' 8 | # cookbook 'environment_variables', github: 'room118solutions/chef-environment-variables' 9 | cookbook 'fail2ban', github: 'opscode-cookbooks/fail2ban' 10 | # cookbook 'hostnames', github: 'nathantsoi/chef-cookbook-hostname' 11 | cookbook 'locales', github: 'phbergsmann/chef-locales' 12 | cookbook 'ntp', github: 'gmiranda23/ntp' 13 | # cookbook 'openssh', github: 'opscode-cookbooks/openssh' 14 | cookbook 'openssl', '~> 6.0.0' 15 | cookbook 'sudo', github: 'opscode-cookbooks/sudo' 16 | # cookbook 'ufw', github: 'opscode-cookbooks/ufw' 17 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/mingw/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mingw", 3 | "description": "Installs a mingw/msys based toolchain on windows", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "windows": ">= 0.0.0" 10 | }, 11 | "dependencies": { 12 | "seven_zip": ">= 0.0.0" 13 | }, 14 | "providing": { 15 | 16 | }, 17 | "recipes": { 18 | 19 | }, 20 | "version": "4.0.3", 21 | "source_url": "https://github.com/sous-chefs/mingw", 22 | "issues_url": "https://github.com/sous-chefs/mingw/issues", 23 | "privacy": false, 24 | "chef_versions": [ 25 | [ 26 | ">= 15.3" 27 | ] 28 | ], 29 | "ohai_versions": [ 30 | 31 | ], 32 | "gems": [ 33 | 34 | ], 35 | "eager_load_libraries": true 36 | } 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/templates/default/sudoer.erb: -------------------------------------------------------------------------------- 1 | # This file is managed by Chef. 2 | # Do NOT modify this file directly. 3 | 4 | <% @command_aliases.each do |a| -%> 5 | Cmnd_Alias <%= a[:name].upcase %> = <%= a[:command_list].join(', ') %> 6 | <% end -%> 7 | <% @env_keep_add.each do |env_keep| -%> 8 | Defaults env_keep += "<%= env_keep %>" 9 | <% end -%> 10 | <% @env_keep_subtract.each do |env_keep| -%> 11 | Defaults env_keep -= "<%= env_keep %>" 12 | <% end -%> 13 | <% @commands.each do |command| -%> 14 | <% unless @sudoer.empty? %><%= @sudoer %> <%= @host %>=(<%= @runas %>) <%= 'NOEXEC:' if @noexec %><%= 'NOPASSWD:' if @nopasswd.to_s == 'true' %><%= 'SETENV:' if @setenv.to_s == 'true' %><%= command %><% end -%> 15 | <% end -%> 16 | <% unless @defaults.empty? %> 17 | Defaults:<%= @sudoer %> <%= @defaults.join(',') %> 18 | <% end -%> 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/templates/default/sudoer.erb: -------------------------------------------------------------------------------- 1 | # This file is managed by Chef. 2 | # Do NOT modify this file directly. 3 | 4 | <% @command_aliases.each do |a| -%> 5 | Cmnd_Alias <%= a[:name].upcase %> = <%= a[:command_list].join(', ') %> 6 | <% end -%> 7 | <% @env_keep_add.each do |env_keep| -%> 8 | Defaults env_keep += "<%= env_keep %>" 9 | <% end -%> 10 | <% @env_keep_subtract.each do |env_keep| -%> 11 | Defaults env_keep -= "<%= env_keep %>" 12 | <% end -%> 13 | <% @commands.each do |command| -%> 14 | <% unless @sudoer.empty? %><%= @sudoer %> <%= @host %>=(<%= @runas %>) <%= 'NOEXEC:' if @noexec %><%= 'NOPASSWD:' if @nopasswd.to_s == 'true' %><%= 'SETENV:' if @setenv.to_s == 'true' %><%= command %><% end -%> 15 | <% end -%> 16 | <% unless @defaults.empty? %> 17 | Defaults:<%= @sudoer %> <%= @defaults.join(',') %> 18 | <% end -%> 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/locales/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: locales 3 | # Recipe:: default 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | node['locales']['packages'].each do |pack| 18 | package pack 19 | end 20 | 21 | locales node['locales']['default'] do 22 | action :set 23 | end 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing-debuginfo']['repositoryid'] = 'epel-testing-debuginfo' 2 | default['yum']['epel-testing-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing Debug" 4 | default['yum']['epel-testing-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-testing-debuginfo']['enabled'] = false 10 | default['yum']['epel-testing-debuginfo']['managed'] = false 11 | default['yum']['epel-testing-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/locales/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: locales 3 | # Recipe:: default 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | node['locales']['packages'].each do |pack| 18 | package pack 19 | end 20 | 21 | locales node['locales']['default'] do 22 | action :set 23 | end 24 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/mingw/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mingw", 3 | "description": "Installs a mingw/msys based toolchain on windows", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "windows": ">= 0.0.0" 10 | }, 11 | "dependencies": { 12 | "seven_zip": ">= 0.0.0" 13 | }, 14 | "providing": { 15 | 16 | }, 17 | "recipes": { 18 | 19 | }, 20 | "version": "4.0.3", 21 | "source_url": "https://github.com/sous-chefs/mingw", 22 | "issues_url": "https://github.com/sous-chefs/mingw/issues", 23 | "privacy": false, 24 | "chef_versions": [ 25 | [ 26 | ">= 15.3" 27 | ] 28 | ], 29 | "ohai_versions": [ 30 | 31 | ], 32 | "gems": [ 33 | 34 | ], 35 | "eager_load_libraries": true 36 | } 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-testing-debuginfo']['repositoryid'] = 'epel-testing-debuginfo' 2 | default['yum']['epel-testing-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Testing Debug" 4 | default['yum']['epel-testing-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-testing-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-testing-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-testing-debuginfo']['enabled'] = false 10 | default['yum']['epel-testing-debuginfo']['managed'] = false 11 | default['yum']['epel-testing-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/templates/default/systemd/containerd.service.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=containerd container runtime 3 | Documentation=https://containerd.io 4 | After=network.target local-fs.target 5 | 6 | [Service] 7 | ExecStartPre=-/sbin/modprobe overlay 8 | ExecStart=/usr/bin/containerd 9 | 10 | Type=<%= @service_type %> 11 | Delegate=yes 12 | KillMode=process 13 | Restart=always 14 | RestartSec=5 15 | # Having non-zero Limit*s causes performance problems due to accounting overhead 16 | # in the kernel. We recommend using cgroups to do container-local accounting. 17 | LimitNPROC=infinity 18 | LimitCORE=infinity 19 | LimitNOFILE=infinity 20 | # Comment TasksMax if your systemd version does not supports it. 21 | # Only systemd 226 and above support this version. 22 | TasksMax=infinity 23 | OOMScoreAdjust=-999 24 | 25 | [Install] 26 | WantedBy=multi-user.target 27 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/sudo/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/templates/default/systemd/containerd.service.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=containerd container runtime 3 | Documentation=https://containerd.io 4 | After=network.target local-fs.target 5 | 6 | [Service] 7 | ExecStartPre=-/sbin/modprobe overlay 8 | ExecStart=/usr/bin/containerd 9 | 10 | Type=<%= @service_type %> 11 | Delegate=yes 12 | KillMode=process 13 | Restart=always 14 | RestartSec=5 15 | # Having non-zero Limit*s causes performance problems due to accounting overhead 16 | # in the kernel. We recommend using cgroups to do container-local accounting. 17 | LimitNPROC=infinity 18 | LimitCORE=infinity 19 | LimitNOFILE=infinity 20 | # Comment TasksMax if your systemd version does not supports it. 21 | # Only systemd 226 and above support this version. 22 | TasksMax=infinity 23 | OOMScoreAdjust=-999 24 | 25 | [Install] 26 | WantedBy=multi-user.target 27 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/sudo/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/fail2ban/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next-testing-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing-source']['repositoryid'] = 'epel-next-testing-source' 2 | default['yum']['epel-next-testing-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing Source" 4 | default['yum']['epel-next-testing-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing-source']['gpgcheck'] = true 9 | default['yum']['epel-next-testing-source']['enabled'] = false 10 | default['yum']['epel-next-testing-source']['managed'] = false 11 | default['yum']['epel-next-testing-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/capistrano/tasks/clear_deploy_tasks.rake: -------------------------------------------------------------------------------- 1 | deploy_tasks = %w( 2 | deploy 3 | deploy:check 4 | deploy:check:directories 5 | deploy:check:linked_dirs 6 | deploy:check:linked_files 7 | deploy:check:make_linked_dirs 8 | deploy:cleanup 9 | deploy:cleanup_rollback 10 | deploy:finished 11 | deploy:finishing 12 | deploy:finishing_rollback 13 | deploy:log_revision 14 | deploy:published 15 | deploy:publishing 16 | deploy:revert_release 17 | deploy:reverted 18 | deploy:reverting 19 | deploy:rollback 20 | deploy:set_current_revision 21 | deploy:started 22 | deploy:starting 23 | deploy:symlink:linked_dirs 24 | deploy:symlink:linked_files 25 | deploy:symlink:release 26 | deploy:symlink:shared 27 | deploy:updated 28 | deploy:updating 29 | install 30 | ) 31 | 32 | deploy_tasks.each do |task| 33 | Rake::Task[task].clear 34 | end 35 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/fail2ban/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next-testing-source.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing-source']['repositoryid'] = 'epel-next-testing-source' 2 | default['yum']['epel-next-testing-source']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing Source" 4 | default['yum']['epel-next-testing-source']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing-source']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing-source']['gpgcheck'] = true 9 | default['yum']['epel-next-testing-source']['enabled'] = false 10 | default['yum']['epel-next-testing-source']['managed'] = false 11 | default['yum']['epel-next-testing-source']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/tag.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :target_repo, String, name_property: true 5 | property :target_tag, String 6 | property :to_repo, String 7 | property :to_tag, String 8 | property :force, [true, false], default: false, desired_state: false 9 | 10 | action :tag do 11 | return if new_resource.force == false && Docker::Image.exist?("#{new_resource.to_repo}:#{new_resource.to_tag}") 12 | begin 13 | converge_by "update #{new_resource.target_repo}:#{new_resource.target_tag} to #{new_resource.to_repo}:#{new_resource.to_tag}" do 14 | i = Docker::Image.get("#{new_resource.target_repo}:#{new_resource.target_tag}") 15 | i.tag('repo' => new_resource.to_repo, 'tag' => new_resource.to_tag, 'force' => new_resource.force) 16 | end 17 | rescue Docker::Error => e 18 | raise e.message 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Cookbook version 2 | [Version of the cookbook where you are encountering the issue] 3 | 4 | ### Chef-client version 5 | [Version of chef-client in your environment] 6 | 7 | ### Platform Details 8 | [Operating system distribution and release version. Cloud provider if running in the cloud] 9 | 10 | ### Scenario: 11 | [What you are trying to achieve and you can't?] 12 | 13 | ### Steps to Reproduce: 14 | [If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?] 15 | 16 | ### Expected Result: 17 | [What are you expecting to happen as the consequence of above reproduction steps?] 18 | 19 | ### Actual Result: 20 | [What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.] 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/tag.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :target_repo, String, name_property: true 5 | property :target_tag, String 6 | property :to_repo, String 7 | property :to_tag, String 8 | property :force, [true, false], default: false, desired_state: false 9 | 10 | action :tag do 11 | return if new_resource.force == false && Docker::Image.exist?("#{new_resource.to_repo}:#{new_resource.to_tag}") 12 | begin 13 | converge_by "update #{new_resource.target_repo}:#{new_resource.target_tag} to #{new_resource.to_repo}:#{new_resource.to_tag}" do 14 | i = Docker::Image.get("#{new_resource.target_repo}:#{new_resource.target_tag}") 15 | i.tag('repo' => new_resource.to_repo, 'tag' => new_resource.to_tag, 'force' => new_resource.force) 16 | end 17 | rescue Docker::Error => e 18 | raise e.message 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: build-essential 3 | # Attributes:: default 4 | # 5 | # Copyright:: 2008-2017, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | default['build-essential']['compile_time'] = false 21 | default['build-essential']['msys2']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys2" 22 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel-next-testing-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing-debuginfo']['repositoryid'] = 'epel-next-testing-debuginfo' 2 | default['yum']['epel-next-testing-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing Debug" 4 | default['yum']['epel-next-testing-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-testing-next-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-next-testing-debuginfo']['enabled'] = false 10 | default['yum']['epel-next-testing-debuginfo']['managed'] = false 11 | default['yum']['epel-next-testing-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/attributes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: build-essential 3 | # Attributes:: default 4 | # 5 | # Copyright:: 2008-2017, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | default['build-essential']['compile_time'] = false 21 | default['build-essential']['msys2']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys2" 22 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel-next-testing-debuginfo.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel-next-testing-debuginfo']['repositoryid'] = 'epel-next-testing-debuginfo' 2 | default['yum']['epel-next-testing-debuginfo']['description'] = 3 | "Extra Packages for #{yum_epel_release} - $basearch - Next - Testing Debug" 4 | default['yum']['epel-next-testing-debuginfo']['mirrorlist'] = 5 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-testing-next-debug-#{yum_epel_release}&arch=$basearch" 6 | default['yum']['epel-next-testing-debuginfo']['gpgkey'] = 7 | "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 8 | default['yum']['epel-next-testing-debuginfo']['gpgcheck'] = true 9 | default['yum']['epel-next-testing-debuginfo']['enabled'] = false 10 | default['yum']['epel-next-testing-debuginfo']['managed'] = false 11 | default['yum']['epel-next-testing-debuginfo']['make_cache'] = true 12 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Maintainers 4 | This file lists how this cookbook project is maintained. When making changes to the system, this 5 | file tells you who needs to review your patch - you need a review from an existing maintainer 6 | for the cookbook to provide a :+1: on your pull request. Additionally, you need 7 | to not receive a veto from a Lieutenant or the Project Lead. 8 | 9 | Check out [How Cookbooks are Maintained](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD) 10 | for details on the process and how to become a maintainer or the project lead. 11 | 12 | # Project Maintainer 13 | * [Tim Smith](https://github.com/tas50) 14 | 15 | # Maintainers 16 | * [Jennifer Davis](https://github.com/sigje) 17 | * [Tim Smith](https://github.com/tas50) 18 | * [Thom May](https://github.com/thommay) 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/providers/dhparam.rb: -------------------------------------------------------------------------------- 1 | # 2 | # dhparam.pem provider 3 | # 4 | # Author:: Charles Johnson 5 | # 6 | 7 | include OpenSSLCookbook::Helpers 8 | 9 | use_inline_resources 10 | 11 | def whyrun_supported? 12 | true 13 | end 14 | 15 | action :create do 16 | converge_by("Create a dhparam file #{@new_resource}") do 17 | unless dhparam_pem_valid?(new_resource.name) 18 | dhparam_content = gen_dhparam(new_resource.key_length, new_resource.generator).to_pem 19 | 20 | log "Generating #{new_resource.key_length} bit "\ 21 | "dhparam file at #{new_resource.name}, this may take some time" 22 | 23 | file new_resource.name do 24 | action :create 25 | owner new_resource.owner 26 | group new_resource.group 27 | mode new_resource.mode 28 | sensitive true 29 | content dhparam_content 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Maintainers 4 | This file lists how this cookbook project is maintained. When making changes to the system, this 5 | file tells you who needs to review your patch - you need a review from an existing maintainer 6 | for the cookbook to provide a :+1: on your pull request. Additionally, you need 7 | to not receive a veto from a Lieutenant or the Project Lead. 8 | 9 | Check out [How Cookbooks are Maintained](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD) 10 | for details on the process and how to become a maintainer or the project lead. 11 | 12 | # Project Maintainer 13 | * [Tim Smith](https://github.com/tas50) 14 | 15 | # Maintainers 16 | * [Jennifer Davis](https://github.com/sigje) 17 | * [Tim Smith](https://github.com/tas50) 18 | * [Thom May](https://github.com/thommay) 19 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/providers/dhparam.rb: -------------------------------------------------------------------------------- 1 | # 2 | # dhparam.pem provider 3 | # 4 | # Author:: Charles Johnson 5 | # 6 | 7 | include OpenSSLCookbook::Helpers 8 | 9 | use_inline_resources 10 | 11 | def whyrun_supported? 12 | true 13 | end 14 | 15 | action :create do 16 | converge_by("Create a dhparam file #{@new_resource}") do 17 | unless dhparam_pem_valid?(new_resource.name) 18 | dhparam_content = gen_dhparam(new_resource.key_length, new_resource.generator).to_pem 19 | 20 | log "Generating #{new_resource.key_length} bit "\ 21 | "dhparam file at #{new_resource.name}, this may take some time" 22 | 23 | file new_resource.name do 24 | action :create 25 | owner new_resource.owner 26 | group new_resource.group 27 | mode new_resource.mode 28 | sensitive true 29 | content dhparam_content 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/capistrano/chef_error_parser.rb: -------------------------------------------------------------------------------- 1 | module Shiplane 2 | class ChefErrorParser 3 | ERROR_LINE_REGEXP = /================================================================================/ 4 | CHEF_ERRORS = [ 5 | /ERROR: Exception handlers complete/, 6 | /FATAL: Chef::Exceptions::ChildConvergeError/, 7 | ] 8 | 9 | attr_accessor :error 10 | 11 | def initialize(error) 12 | @error = error 13 | end 14 | 15 | def lines 16 | @lines ||= error.message.split("\n") 17 | end 18 | 19 | def first_line 20 | @first_line ||= lines.index(lines.reverse_each.find{|line| line =~ ERROR_LINE_REGEXP }) || 0 21 | end 22 | 23 | def last_line 24 | @last_line ||= lines.index{|line| CHEF_ERRORS.any?{ |error| line =~ error } } || -1 25 | end 26 | 27 | def parse 28 | lines[first_line..last_line] 29 | end 30 | 31 | def self.parse(error) 32 | new(error).parse 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/image_prune.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :read_timeout, Integer, default: 120, desired_state: false 5 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 6 | 7 | # https://docs.docker.com/engine/api/v1.35/#operation/ImagePrune 8 | property :dangling, [true, false], default: true 9 | property :prune_until, String 10 | # https://docs.docker.com/engine/reference/builder/#label 11 | property :with_label, String 12 | property :without_label, String 13 | 14 | action :prune do 15 | # Have to call this method ourselves due to 16 | # https://github.com/swipely/docker-api/pull/507 17 | json = generate_json(new_resource.dangling, new_resource.prune_until, new_resource.with_label, new_resource.without_label) 18 | 19 | res = connection.post('/images/prune', json) 20 | Chef::Log.info res 21 | end 22 | 23 | action_class do 24 | include DockerCookbook::DockerHelpers::Json 25 | end 26 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yum-epel", 3 | "description": "Installs and configures the EPEL Yum repository", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "amazon": ">= 0.0.0", 10 | "centos": ">= 0.0.0", 11 | "oracle": ">= 0.0.0", 12 | "redhat": ">= 0.0.0", 13 | "scientific": ">= 0.0.0", 14 | "zlinux": ">= 0.0.0" 15 | }, 16 | "dependencies": { 17 | 18 | }, 19 | "providing": { 20 | 21 | }, 22 | "recipes": { 23 | 24 | }, 25 | "version": "5.0.8", 26 | "source_url": "https://github.com/sous-chefs/yum-epel", 27 | "issues_url": "https://github.com/sous-chefs/yum-epel/issues", 28 | "privacy": false, 29 | "chef_versions": [ 30 | [ 31 | ">= 12.15" 32 | ] 33 | ], 34 | "ohai_versions": [ 35 | 36 | ], 37 | "gems": [ 38 | 39 | ], 40 | "eager_load_libraries": true 41 | } 42 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/image_prune.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :read_timeout, Integer, default: 120, desired_state: false 5 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 6 | 7 | # https://docs.docker.com/engine/api/v1.35/#operation/ImagePrune 8 | property :dangling, [true, false], default: true 9 | property :prune_until, String 10 | # https://docs.docker.com/engine/reference/builder/#label 11 | property :with_label, String 12 | property :without_label, String 13 | 14 | action :prune do 15 | # Have to call this method ourselves due to 16 | # https://github.com/swipely/docker-api/pull/507 17 | json = generate_json(new_resource.dangling, new_resource.prune_until, new_resource.with_label, new_resource.without_label) 18 | 19 | res = connection.post('/images/prune', json) 20 | Chef::Log.info res 21 | end 22 | 23 | action_class do 24 | include DockerCookbook::DockerHelpers::Json 25 | end 26 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yum-epel", 3 | "description": "Installs and configures the EPEL Yum repository", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "amazon": ">= 0.0.0", 10 | "centos": ">= 0.0.0", 11 | "oracle": ">= 0.0.0", 12 | "redhat": ">= 0.0.0", 13 | "scientific": ">= 0.0.0", 14 | "zlinux": ">= 0.0.0" 15 | }, 16 | "dependencies": { 17 | 18 | }, 19 | "providing": { 20 | 21 | }, 22 | "recipes": { 23 | 24 | }, 25 | "version": "5.0.8", 26 | "source_url": "https://github.com/sous-chefs/yum-epel", 27 | "issues_url": "https://github.com/sous-chefs/yum-epel/issues", 28 | "privacy": false, 29 | "chef_versions": [ 30 | [ 31 | ">= 12.15" 32 | ] 33 | ], 34 | "ohai_versions": [ 35 | 36 | ], 37 | "gems": [ 38 | 39 | ], 40 | "eager_load_libraries": true 41 | } 42 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: build-essential 3 | # Recipe:: default 4 | # 5 | # Copyright:: 2008-2018, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # Call the build-essential custom resource 21 | # This can also be called directly in your cookbooks anywhere you want 22 | build_essential 'install_packages' do 23 | compile_time node['build-essential']['compile_time'] 24 | end 25 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: build-essential 3 | # Recipe:: default 4 | # 5 | # Copyright:: 2008-2018, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # Call the build-essential custom resource 21 | # This can also be called directly in your cookbooks anywhere you want 22 | build_essential 'install_packages' do 23 | compile_time node['build-essential']['compile_time'] 24 | end 25 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/ntp/recipes/apparmor.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: ntp 3 | # Recipe:: apparmor 4 | # Author:: Scott Lampert () 5 | # 6 | # Copyright:: 2013-2017, Scott Lampert 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | service 'apparmor' do 21 | action :nothing 22 | end 23 | 24 | cookbook_file '/etc/apparmor.d/usr.sbin.ntpd' do 25 | source 'usr.sbin.ntpd.apparmor' 26 | owner 'root' 27 | group 'root' 28 | mode '0644' 29 | notifies :restart, 'service[apparmor]' 30 | end 31 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/ntp/recipes/apparmor.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: ntp 3 | # Recipe:: apparmor 4 | # Author:: Scott Lampert () 5 | # 6 | # Copyright:: 2013-2017, Scott Lampert 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | service 'apparmor' do 21 | action :nothing 22 | end 23 | 24 | cookbook_file '/etc/apparmor.d/usr.sbin.ntpd' do 25 | source 'usr.sbin.ntpd.apparmor' 26 | owner 'root' 27 | group 'root' 28 | mode '0644' 29 | notifies :restart, 'service[apparmor]' 30 | end 31 | -------------------------------------------------------------------------------- /examples/rails_app/.env.example: -------------------------------------------------------------------------------- 1 | # Docker Settings 2 | COMPOSE_HTTP_TIMEOUT=300 3 | 4 | # App Settings 5 | APP_NAME=example 6 | DEPENDENCY_TIMEOUT=300s 7 | HOST_REDIS_PORT=6379 8 | HOST_POSTGRES_PORT=5432 9 | HOST_WEBPACKER_PORT=3035 10 | HOST_PORT=3000 11 | HOST_MAILCATCHER_PORT_1=1080 12 | HOST_MAILCATCHER_PORT_2=1025 13 | 14 | # Database Settings 15 | DATABASE_HOST=db 16 | DATABASE_PORT=5432 17 | DATABASE_USERNAME=example 18 | DATABASE_PASSWORD=xxxxxxxxxx 19 | 20 | # Redis Settings 21 | REDIS_HOST=redis 22 | REDIS_PORT=6379 23 | REDIS_DATABASE_NUMBER=1 24 | 25 | # Development Settings 26 | RAILS_ENV=development 27 | NODE_ENV=development 28 | WEBPACKER_DEV_SERVER_HOST=webpacker 29 | WEBPACKER_DEV_SERVER_INLINE=false 30 | WEBPACKER_DEV_SERVER_HOT=false 31 | 32 | # SMTP Settings 33 | GMAIL_USERNAME=xxxxxxxxxx 34 | GMAIL_PASSWORD=xxxxxxxxxx 35 | 36 | # Credentials 37 | GITHUB_TOKEN=xxxxxxxxxx 38 | CREDENTIALS_MASTER_KEY=xxxxxxxxxx 39 | 40 | # Deployment Credentials 41 | SHIPLANE_CONTAINER_REGISTRY_TOKEN=xxxxxxxxxx 42 | SHIPLANE_CONTAINER_REGISTRY_USERNAME=xxxxxxxxxx 43 | -------------------------------------------------------------------------------- /bootstrappers/chef/lib/capistrano/tasks/shiplane_bootstrap.rake: -------------------------------------------------------------------------------- 1 | namespace :shiplane do 2 | desc "Bootstrap host - provisions docker and nginx-proxy" 3 | task :bootstrap, [:role] => ['bootstrap:default'] 4 | 5 | namespace :bootstrap do 6 | task :setup, [:role] do |task, args| 7 | filter = args.fetch('role', 'all') 8 | hosts = roles(filter).map do |host| 9 | Shiplane::ChefHost.new(host, env) 10 | end 11 | 12 | set :shiplane_hosts, hosts 13 | end 14 | 15 | task :default, [:role] => :setup do |task, args| 16 | %w{ prepare install configure cleanup }.each do |task| 17 | invoke "shiplane:bootstrap:#{task}" 18 | end 19 | end 20 | 21 | task :prepare do 22 | end 23 | 24 | task :install do 25 | end 26 | 27 | task reinstall: :setup do 28 | %w{ prepare reinstall install configure cleanup }.each do |task| 29 | invoke "shiplane:bootstrap:#{task}" 30 | end 31 | end 32 | 33 | task :configure do 34 | end 35 | 36 | task :cleanup do 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/shiplane/deploy/network_configuration.rb: -------------------------------------------------------------------------------- 1 | require_relative 'configuration' 2 | 3 | module Shiplane 4 | module Deploy 5 | class NetworkConfiguration < Configuration 6 | def connections 7 | @connections ||= options.fetch(:connections, []) 8 | end 9 | 10 | def connect_commands(role) 11 | @connect_commands ||= 12 | connections.map do |connection| 13 | [ 14 | docker_command(role), 15 | "network connect", 16 | name, 17 | connection, 18 | "|| true", 19 | ].flatten.compact.join(" ") 20 | end 21 | end 22 | 23 | def create_command(role) 24 | @create_command ||= [ 25 | docker_command(role), 26 | "network create", 27 | name, 28 | "|| true", 29 | ].flatten.compact.join(" ") 30 | end 31 | 32 | def create_commands(role) 33 | [ 34 | create_command(role), 35 | connect_commands(role), 36 | ].flatten 37 | end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/barebones-docker/templates/default/proxy.conf.erb: -------------------------------------------------------------------------------- 1 | # HTTP 1.1 support 2 | proxy_http_version 1.1; 3 | proxy_buffering on; 4 | proxy_buffer_size 512k; 5 | proxy_buffers 4 512k; 6 | proxy_set_header Host $http_host; 7 | proxy_set_header Upgrade $http_upgrade; 8 | proxy_set_header Connection $proxy_connection; 9 | proxy_set_header X-Real-IP $remote_addr; 10 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 11 | proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; 12 | proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; 13 | proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; 14 | 15 | # Create longer proxy timeouts for use with slower fastcgi backends 16 | proxy_connect_timeout 300; 17 | proxy_send_timeout 300; 18 | proxy_read_timeout 90m; 19 | send_timeout 300; 20 | 21 | # Mitigate httpoxy attack (see README for details) 22 | proxy_set_header Proxy ""; 23 | 24 | # FastCGI buffers 25 | fastcgi_buffers 16 16k; 26 | fastcgi_buffer_size 32k; 27 | 28 | client_max_body_size 1000m; 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Author:: Sean OMeara () 3 | # Cookbook:: yum-epel 4 | # Recipe:: default 5 | # 6 | # Copyright:: 2013-2019, Chef Software, Inc. 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | node['yum-epel']['repos'].each do |repo| 21 | next unless node['yum'][repo]['managed'] 22 | yum_repository repo do 23 | node['yum'][repo].each do |config, value| 24 | send(config.to_sym, value) unless value.nil? || config == 'managed' 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /bootstrappers/chef/site-cookbooks/barebones-docker/templates/default/proxy.conf.erb: -------------------------------------------------------------------------------- 1 | # HTTP 1.1 support 2 | proxy_http_version 1.1; 3 | proxy_buffering on; 4 | proxy_buffer_size 512k; 5 | proxy_buffers 4 512k; 6 | proxy_set_header Host $http_host; 7 | proxy_set_header Upgrade $http_upgrade; 8 | proxy_set_header Connection $proxy_connection; 9 | proxy_set_header X-Real-IP $remote_addr; 10 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 11 | proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; 12 | proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; 13 | proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; 14 | 15 | # Create longer proxy timeouts for use with slower fastcgi backends 16 | proxy_connect_timeout 300; 17 | proxy_send_timeout 300; 18 | proxy_read_timeout 90m; 19 | send_timeout 300; 20 | 21 | # Mitigate httpoxy attack (see README for details) 22 | proxy_set_header Proxy ""; 23 | 24 | # FastCGI buffers 25 | fastcgi_buffers 16 16k; 26 | fastcgi_buffer_size 32k; 27 | 28 | client_max_body_size 1000m; 29 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Author:: Sean OMeara () 3 | # Cookbook:: yum-epel 4 | # Recipe:: default 5 | # 6 | # Copyright:: 2013-2019, Chef Software, Inc. 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | 20 | node['yum-epel']['repos'].each do |repo| 21 | next unless node['yum'][repo]['managed'] 22 | yum_repository repo do 23 | node['yum'][repo].each do |config, value| 24 | send(config.to_sym, value) unless value.nil? || config == 'managed' 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Welcome! 2 | 3 | We're so glad you want to contribute to [Shiplane](https://github.com/kirillian/shiplane)! If you're unsure about anything, just ask -- or submit the issue or pull request anyway. The worst that can happen is you'll be politely asked to change something. We love all friendly contributions. 4 | 5 | We encourage you to read this CONTRIBUTING policy, [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md), [LICENSE](LICENSE.md), and [README](README.md). 6 | 7 | ## Submitting PRs or Issues 8 | 9 | - Make sure to fill out the templates as completely as you possibly can. 10 | - Try to err on the side of giving too much information 11 | - If you find a bug, create a minimum replicable test case so that we can replicate it too. If we are not able to replicate an issue, it takes much longer to troubleshoot or we might be unable to do so at all. 12 | 13 | ## Contributing Agreement 14 | 15 | This project is distributed under the MIT License and, consquently, by submitting a pull request you agree that your code submission will be added to this project under the MIT License as well and waive any copyright interest. 16 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/yum-epel/attributes/epel.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel']['repositoryid'] = 'epel' 2 | default['yum']['epel']['gpgcheck'] = true 3 | case node['kernel']['machine'] 4 | when 'armv7l', 'armv7hl' 5 | default['yum']['epel']['baseurl'] = 'https://armv7.dev.centos.org/repodir/epel-pass-1/' 6 | default['yum']['epel']['gpgcheck'] = false 7 | when 's390x' 8 | default['yum']['epel']['baseurl'] = 'https://kojipkgs.fedoraproject.org/rhel/rc/7/Server/s390x/os/' 9 | default['yum']['epel']['gpgkey'] = 10 | 'https://kojipkgs.fedoraproject.org/rhel/rc/7/Server/s390x/os/RPM-GPG-KEY-redhat-release' 11 | else 12 | default['yum']['epel']['description'] = "Extra Packages for #{yum_epel_release} - $basearch" 13 | default['yum']['epel']['mirrorlist'] = 14 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-#{yum_epel_release}&arch=$basearch" 15 | default['yum']['epel']['gpgkey'] = "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 16 | end 17 | default['yum']['epel']['enabled'] = true 18 | default['yum']['epel']['managed'] = true 19 | default['yum']['epel']['make_cache'] = true 20 | -------------------------------------------------------------------------------- /lib/shiplane/compose_hash.rb: -------------------------------------------------------------------------------- 1 | require_relative 'extensions' 2 | require_relative 'safe_yaml_loading' 3 | 4 | module Shiplane 5 | class ComposeHash 6 | attr_accessor :compose_file, :production_config 7 | 8 | def initialize(compose_file, production_config) 9 | @compose_file = compose_file 10 | @production_config = production_config 11 | end 12 | 13 | def production_yml 14 | blacklisted_nodes.inject(whitelisted_hash){ |acc, node| acc.blacklist(node) } 15 | end 16 | 17 | def compose_hash 18 | @compose_hash ||= Shiplane::SafeYamlLoading.load(compose_file) 19 | end 20 | 21 | def whitelisted_hash 22 | @whitelisted_hash ||= compose_hash.whitelist(*default_whitelisted_nodes, *whitelisted_nodes) 23 | end 24 | 25 | def blacklisted_nodes 26 | @blacklisted_nodes ||= production_config.fetch('blacklist', []) 27 | end 28 | 29 | def whitelisted_nodes 30 | @whitelisted_nodes ||= production_config.fetch('whitelist', []) 31 | end 32 | 33 | def default_whitelisted_nodes 34 | [ 35 | "version", 36 | ] 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/yum-epel/attributes/epel.rb: -------------------------------------------------------------------------------- 1 | default['yum']['epel']['repositoryid'] = 'epel' 2 | default['yum']['epel']['gpgcheck'] = true 3 | case node['kernel']['machine'] 4 | when 'armv7l', 'armv7hl' 5 | default['yum']['epel']['baseurl'] = 'https://armv7.dev.centos.org/repodir/epel-pass-1/' 6 | default['yum']['epel']['gpgcheck'] = false 7 | when 's390x' 8 | default['yum']['epel']['baseurl'] = 'https://kojipkgs.fedoraproject.org/rhel/rc/7/Server/s390x/os/' 9 | default['yum']['epel']['gpgkey'] = 10 | 'https://kojipkgs.fedoraproject.org/rhel/rc/7/Server/s390x/os/RPM-GPG-KEY-redhat-release' 11 | else 12 | default['yum']['epel']['description'] = "Extra Packages for #{yum_epel_release} - $basearch" 13 | default['yum']['epel']['mirrorlist'] = 14 | "https://mirrors.fedoraproject.org/mirrorlist?repo=epel-#{yum_epel_release}&arch=$basearch" 15 | default['yum']['epel']['gpgkey'] = "https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{yum_epel_release}" 16 | end 17 | default['yum']['epel']['enabled'] = true 18 | default['yum']['epel']['managed'] = true 19 | default['yum']['epel']['make_cache'] = true 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 John Epperson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/build-essential/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'build-essential' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs C compiler / build tools' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '8.2.1' 8 | recipe 'build-essential', 'Installs packages required for compiling C software from source.' 9 | 10 | supports 'amazon' 11 | supports 'centos' 12 | supports 'debian' 13 | supports 'fedora' 14 | supports 'freebsd' 15 | supports 'mac_os_x', '>= 10.9.0' 16 | supports 'opensuse' 17 | supports 'opensuseleap' 18 | supports 'oracle' 19 | supports 'redhat' 20 | supports 'scientific' 21 | supports 'smartos' 22 | supports 'solaris2' 23 | supports 'suse' 24 | supports 'ubuntu' 25 | supports 'windows' 26 | supports 'zlinux' 27 | 28 | depends 'seven_zip' 29 | depends 'mingw', '>= 1.1' 30 | 31 | source_url 'https://github.com/chef-cookbooks/build-essential' 32 | issues_url 'https://github.com/chef-cookbooks/build-essential/issues' 33 | chef_version '>= 12.7' if respond_to?(:chef_version) 34 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/build-essential/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'build-essential' 2 | maintainer 'Chef Software, Inc.' 3 | maintainer_email 'cookbooks@chef.io' 4 | license 'Apache-2.0' 5 | description 'Installs C compiler / build tools' 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 7 | version '8.2.1' 8 | recipe 'build-essential', 'Installs packages required for compiling C software from source.' 9 | 10 | supports 'amazon' 11 | supports 'centos' 12 | supports 'debian' 13 | supports 'fedora' 14 | supports 'freebsd' 15 | supports 'mac_os_x', '>= 10.9.0' 16 | supports 'opensuse' 17 | supports 'opensuseleap' 18 | supports 'oracle' 19 | supports 'redhat' 20 | supports 'scientific' 21 | supports 'smartos' 22 | supports 'solaris2' 23 | supports 'suse' 24 | supports 'ubuntu' 25 | supports 'windows' 26 | supports 'zlinux' 27 | 28 | depends 'seven_zip' 29 | depends 'mingw', '>= 1.1' 30 | 31 | source_url 'https://github.com/chef-cookbooks/build-essential' 32 | issues_url 'https://github.com/chef-cookbooks/build-essential/issues' 33 | chef_version '>= 12.7' if respond_to?(:chef_version) 34 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker", 3 | "description": "Provides docker_service, docker_image, and docker_container resources", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "amazon": ">= 0.0.0", 10 | "centos": ">= 0.0.0", 11 | "scientific": ">= 0.0.0", 12 | "oracle": ">= 0.0.0", 13 | "debian": ">= 0.0.0", 14 | "fedora": ">= 0.0.0", 15 | "redhat": ">= 0.0.0", 16 | "ubuntu": ">= 0.0.0" 17 | }, 18 | "dependencies": { 19 | 20 | }, 21 | "providing": { 22 | 23 | }, 24 | "recipes": { 25 | 26 | }, 27 | "version": "11.5.2", 28 | "source_url": "https://github.com/sous-chefs/docker", 29 | "issues_url": "https://github.com/sous-chefs/docker/issues", 30 | "privacy": false, 31 | "chef_versions": [ 32 | [ 33 | "< 19.0", 34 | ">= 16.0" 35 | ] 36 | ], 37 | "ohai_versions": [ 38 | 39 | ], 40 | "gems": [ 41 | [ 42 | "docker-api", 43 | ">= 2.3", 44 | "< 3" 45 | ] 46 | ], 47 | "eager_load_libraries": true 48 | } 49 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/providers/rsa_key.rb: -------------------------------------------------------------------------------- 1 | # 2 | # dhparam.pem provider 3 | # 4 | # Author:: Charles Johnson 5 | # 6 | 7 | include OpenSSLCookbook::Helpers 8 | 9 | use_inline_resources 10 | 11 | def whyrun_supported? 12 | true 13 | end 14 | 15 | action :create do 16 | converge_by("Create an RSA key #{@new_resource}") do 17 | unless key_file_valid?(new_resource.name, new_resource.key_pass) 18 | 19 | log "Generating #{new_resource.key_length} bit "\ 20 | "RSA key file at #{new_resource.name}, this may take some time" 21 | 22 | if new_resource.key_pass 23 | unencrypted_rsa_key = gen_rsa_key(new_resource.key_length) 24 | rsa_key_content = encrypt_rsa_key(unencrypted_rsa_key, new_resource.key_pass) 25 | else 26 | rsa_key_content = gen_rsa_key(new_resource.key_length).to_pem 27 | end 28 | 29 | file new_resource.name do 30 | action :create 31 | owner new_resource.owner 32 | group new_resource.group 33 | mode new_resource.mode 34 | sensitive true 35 | content rsa_key_content 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker", 3 | "description": "Provides docker_service, docker_image, and docker_container resources", 4 | "long_description": "", 5 | "maintainer": "Sous Chefs", 6 | "maintainer_email": "help@sous-chefs.org", 7 | "license": "Apache-2.0", 8 | "platforms": { 9 | "amazon": ">= 0.0.0", 10 | "centos": ">= 0.0.0", 11 | "scientific": ">= 0.0.0", 12 | "oracle": ">= 0.0.0", 13 | "debian": ">= 0.0.0", 14 | "fedora": ">= 0.0.0", 15 | "redhat": ">= 0.0.0", 16 | "ubuntu": ">= 0.0.0" 17 | }, 18 | "dependencies": { 19 | 20 | }, 21 | "providing": { 22 | 23 | }, 24 | "recipes": { 25 | 26 | }, 27 | "version": "11.5.2", 28 | "source_url": "https://github.com/sous-chefs/docker", 29 | "issues_url": "https://github.com/sous-chefs/docker/issues", 30 | "privacy": false, 31 | "chef_versions": [ 32 | [ 33 | "< 19.0", 34 | ">= 16.0" 35 | ] 36 | ], 37 | "ohai_versions": [ 38 | 39 | ], 40 | "gems": [ 41 | [ 42 | "docker-api", 43 | ">= 2.3", 44 | "< 3" 45 | ] 46 | ], 47 | "eager_load_libraries": true 48 | } 49 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/providers/rsa_key.rb: -------------------------------------------------------------------------------- 1 | # 2 | # dhparam.pem provider 3 | # 4 | # Author:: Charles Johnson 5 | # 6 | 7 | include OpenSSLCookbook::Helpers 8 | 9 | use_inline_resources 10 | 11 | def whyrun_supported? 12 | true 13 | end 14 | 15 | action :create do 16 | converge_by("Create an RSA key #{@new_resource}") do 17 | unless key_file_valid?(new_resource.name, new_resource.key_pass) 18 | 19 | log "Generating #{new_resource.key_length} bit "\ 20 | "RSA key file at #{new_resource.name}, this may take some time" 21 | 22 | if new_resource.key_pass 23 | unencrypted_rsa_key = gen_rsa_key(new_resource.key_length) 24 | rsa_key_content = encrypt_rsa_key(unencrypted_rsa_key, new_resource.key_pass) 25 | else 26 | rsa_key_content = gen_rsa_key(new_resource.key_length).to_pem 27 | end 28 | 29 | file new_resource.name do 30 | action :create 31 | owner new_resource.owner 32 | group new_resource.group 33 | mode new_resource.mode 34 | sensitive true 35 | content rsa_key_content 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/installation_script.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | resource_name :docker_installation_script 5 | provides :docker_installation_script 6 | 7 | provides :docker_installation, os: 'linux' 8 | 9 | property :repo, %w(main test experimental), default: 'main', desired_state: false 10 | property :script_url, String, default: lazy { default_script_url }, desired_state: false 11 | 12 | default_action :create 13 | 14 | ######################### 15 | # property helper methods 16 | ######################### 17 | 18 | def default_script_url 19 | case repo 20 | when 'main' 21 | 'https://get.docker.com/' 22 | when 'test' 23 | 'https://test.docker.com/' 24 | when 'experimental' 25 | 'https://experimental.docker.com/' 26 | end 27 | end 28 | 29 | ######### 30 | # Actions 31 | ######### 32 | 33 | action :create do 34 | package 'curl' 35 | 36 | execute 'install docker' do 37 | command "curl -sSL #{new_resource.script_url} | sh" 38 | creates '/usr/bin/docker' 39 | end 40 | end 41 | 42 | action :delete do 43 | package %w(docker-ce docker-engine) do 44 | action :remove 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/volume.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :driver, String, desired_state: false 5 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 6 | property :opts, Hash, desired_state: false 7 | property :volume, Docker::Volume, desired_state: false 8 | property :volume_name, String, name_property: true 9 | 10 | load_current_value do 11 | begin 12 | with_retries { volume Docker::Volume.get(volume_name, connection) } 13 | rescue Docker::Error::NotFoundError 14 | current_value_does_not_exist! 15 | end 16 | end 17 | 18 | action :create do 19 | converge_by "creating volume #{new_resource.volume_name}" do 20 | opts = {} 21 | opts['Driver'] = new_resource.driver if property_is_set?(:driver) 22 | opts['DriverOpts'] = new_resource.opts if property_is_set?(:opts) 23 | Docker::Volume.create(new_resource.volume_name, opts, connection) 24 | end if current_resource.nil? 25 | end 26 | 27 | action :remove do 28 | converge_by "removing volume #{new_resource.volume_name}" do 29 | current_resource.volume.remove 30 | end unless current_resource.nil? 31 | end 32 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/installation_script.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | resource_name :docker_installation_script 5 | provides :docker_installation_script 6 | 7 | provides :docker_installation, os: 'linux' 8 | 9 | property :repo, %w(main test experimental), default: 'main', desired_state: false 10 | property :script_url, String, default: lazy { default_script_url }, desired_state: false 11 | 12 | default_action :create 13 | 14 | ######################### 15 | # property helper methods 16 | ######################### 17 | 18 | def default_script_url 19 | case repo 20 | when 'main' 21 | 'https://get.docker.com/' 22 | when 'test' 23 | 'https://test.docker.com/' 24 | when 'experimental' 25 | 'https://experimental.docker.com/' 26 | end 27 | end 28 | 29 | ######### 30 | # Actions 31 | ######### 32 | 33 | action :create do 34 | package 'curl' 35 | 36 | execute 'install docker' do 37 | command "curl -sSL #{new_resource.script_url} | sh" 38 | creates '/usr/bin/docker' 39 | end 40 | end 41 | 42 | action :delete do 43 | package %w(docker-ce docker-engine) do 44 | action :remove 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/volume.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :driver, String, desired_state: false 5 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 6 | property :opts, Hash, desired_state: false 7 | property :volume, Docker::Volume, desired_state: false 8 | property :volume_name, String, name_property: true 9 | 10 | load_current_value do 11 | begin 12 | with_retries { volume Docker::Volume.get(volume_name, connection) } 13 | rescue Docker::Error::NotFoundError 14 | current_value_does_not_exist! 15 | end 16 | end 17 | 18 | action :create do 19 | converge_by "creating volume #{new_resource.volume_name}" do 20 | opts = {} 21 | opts['Driver'] = new_resource.driver if property_is_set?(:driver) 22 | opts['DriverOpts'] = new_resource.opts if property_is_set?(:opts) 23 | Docker::Volume.create(new_resource.volume_name, opts, connection) 24 | end if current_resource.nil? 25 | end 26 | 27 | action :remove do 28 | converge_by "removing volume #{new_resource.volume_name}" do 29 | current_resource.volume.remove 30 | end unless current_resource.nil? 31 | end 32 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/partial/_logging.rb: -------------------------------------------------------------------------------- 1 | property :log_driver, 2 | equal_to: %w( json-file syslog journald gelf fluentd awslogs splunk etwlogs gcplogs logentries loki-docker none local ), 3 | default: 'json-file', 4 | desired_state: false 5 | 6 | property :log_opts, 7 | [Hash, nil], 8 | coerce: proc { |v| coerce_log_opts(v) }, 9 | desired_state: false 10 | 11 | def coerce_log_opts(v) 12 | case v 13 | when Hash, nil 14 | v 15 | else 16 | Array(v).each_with_object({}) do |log_opt, memo| 17 | key, value = log_opt.split('=', 2) 18 | memo[key] = value 19 | end 20 | end 21 | end 22 | 23 | # log_driver and log_opts really handle this 24 | def log_config(value = Chef::NOT_PASSED) 25 | if value != Chef::NOT_PASSED 26 | @log_config = value 27 | log_driver value['Type'] 28 | log_opts value['Config'] 29 | end 30 | return @log_config if defined?(@log_config) 31 | def_logcfg = {} 32 | def_logcfg['Type'] = log_driver if property_is_set?(:log_driver) 33 | def_logcfg['Config'] = log_opts if property_is_set?(:log_opts) 34 | def_logcfg = nil if def_logcfg.empty? 35 | def_logcfg 36 | end 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/partial/_logging.rb: -------------------------------------------------------------------------------- 1 | property :log_driver, 2 | equal_to: %w( json-file syslog journald gelf fluentd awslogs splunk etwlogs gcplogs logentries loki-docker none local ), 3 | default: 'json-file', 4 | desired_state: false 5 | 6 | property :log_opts, 7 | [Hash, nil], 8 | coerce: proc { |v| coerce_log_opts(v) }, 9 | desired_state: false 10 | 11 | def coerce_log_opts(v) 12 | case v 13 | when Hash, nil 14 | v 15 | else 16 | Array(v).each_with_object({}) do |log_opt, memo| 17 | key, value = log_opt.split('=', 2) 18 | memo[key] = value 19 | end 20 | end 21 | end 22 | 23 | # log_driver and log_opts really handle this 24 | def log_config(value = Chef::NOT_PASSED) 25 | if value != Chef::NOT_PASSED 26 | @log_config = value 27 | log_driver value['Type'] 28 | log_opts value['Config'] 29 | end 30 | return @log_config if defined?(@log_config) 31 | def_logcfg = {} 32 | def_logcfg['Type'] = log_driver if property_is_set?(:log_driver) 33 | def_logcfg['Config'] = log_opts if property_is_set?(:log_opts) 34 | def_logcfg = nil if def_logcfg.empty? 35 | def_logcfg 36 | end 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/kitchen.yml: -------------------------------------------------------------------------------- 1 | driver: 2 | name: vagrant 3 | 4 | provisioner: 5 | name: chef_zero 6 | deprecations_as_errors: true 7 | 8 | verifier: 9 | name: inspec 10 | 11 | platforms: 12 | - name: centos-7 13 | - name: debian-8 14 | - name: debian-9 15 | - name: ubuntu-16.04 16 | - name: ubuntu-18.04 17 | - name: ubuntu-16.04-chef-12.9 18 | driver_config: 19 | box: bento/ubuntu-16.04 20 | provisioner: 21 | require_chef_omnibus: 12.9.41 22 | 23 | suites: 24 | - name: default 25 | run_list: 26 | - recipe[apt] 27 | 28 | - name: cacher 29 | run_list: 30 | - recipe[test::cacher] 31 | excludes: centos-7 32 | 33 | - name: compile-time 34 | run_list: 35 | - recipe[apt::default] 36 | attributes: 37 | apt: 38 | compile_time_update: true 39 | excludes: centos-7 40 | 41 | - name: resources 42 | run_list: 43 | - recipe[test::resources] 44 | excludes: centos-7 45 | 46 | - name: unattended-upgrades 47 | run_list: 48 | - recipe[test::unattended-upgrades] 49 | attributes: 50 | apt: 51 | unattended_upgrades: 52 | enable: true 53 | excludes: centos-7 54 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/kitchen.yml: -------------------------------------------------------------------------------- 1 | driver: 2 | name: vagrant 3 | 4 | provisioner: 5 | name: chef_zero 6 | deprecations_as_errors: true 7 | 8 | verifier: 9 | name: inspec 10 | 11 | platforms: 12 | - name: centos-7 13 | - name: debian-8 14 | - name: debian-9 15 | - name: ubuntu-16.04 16 | - name: ubuntu-18.04 17 | - name: ubuntu-16.04-chef-12.9 18 | driver_config: 19 | box: bento/ubuntu-16.04 20 | provisioner: 21 | require_chef_omnibus: 12.9.41 22 | 23 | suites: 24 | - name: default 25 | run_list: 26 | - recipe[apt] 27 | 28 | - name: cacher 29 | run_list: 30 | - recipe[test::cacher] 31 | excludes: centos-7 32 | 33 | - name: compile-time 34 | run_list: 35 | - recipe[apt::default] 36 | attributes: 37 | apt: 38 | compile_time_update: true 39 | excludes: centos-7 40 | 41 | - name: resources 42 | run_list: 43 | - recipe[test::resources] 44 | excludes: centos-7 45 | 46 | - name: unattended-upgrades 47 | run_list: 48 | - recipe[test::unattended-upgrades] 49 | attributes: 50 | apt: 51 | unattended_upgrades: 52 | enable: true 53 | excludes: centos-7 54 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/recipes/upgrade.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Recipe:: upgrade 4 | # 5 | # Copyright 2015-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | case node['platform_family'] 21 | when 'debian', 'ubuntu' 22 | packages = %w(libssl1.0.0 openssl) 23 | when 'rhel', 'fedora', 'suse' 24 | packages = %w(openssl) 25 | else 26 | packages = [] 27 | end 28 | 29 | packages.each do |ssl_pkg| 30 | package ssl_pkg do 31 | action :upgrade 32 | node['openssl']['restart_services'].each do |ssl_svc| 33 | notifies :restart, "service[#{ssl_svc}]" 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/recipes/upgrade.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Recipe:: upgrade 4 | # 5 | # Copyright 2015-2016, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | case node['platform_family'] 21 | when 'debian', 'ubuntu' 22 | packages = %w(libssl1.0.0 openssl) 23 | when 'rhel', 'fedora', 'suse' 24 | packages = %w(openssl) 25 | else 26 | packages = [] 27 | end 28 | 29 | packages.each do |ssl_pkg| 30 | package ssl_pkg do 31 | action :upgrade 32 | node['openssl']['restart_services'].each do |ssl_svc| 33 | notifies :restart, "service[#{ssl_svc}]" 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/docker/resources/exec.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 5 | property :command, Array 6 | property :container, String 7 | property :timeout, Numeric, default: 60, desired_state: false 8 | property :container_obj, Docker::Container, desired_state: false 9 | property :returns, [ Integer, Array ], coerce: proc { |v| Array(v) }, default: [0], 10 | description: 'The return value for a command. This may be an array of accepted values. An exception is raised when the return value(s) do not match.' 11 | 12 | alias_method :cmd, :command 13 | 14 | action :run do 15 | converge_by "executing #{new_resource.command} on #{new_resource.container}" do 16 | with_retries { new_resource.container_obj Docker::Container.get(new_resource.container, {}, connection) } 17 | stdout, stderr, exit_code = new_resource.container_obj.exec(new_resource.command, wait: new_resource.timeout) 18 | Chef::Log.trace(stdout) 19 | Chef::Log.trace(stderr) 20 | unless new_resource.returns.include?(exit_code) 21 | raise "Expected process to exit with 0, but received #{exit_code}" 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/docker/resources/exec.rb: -------------------------------------------------------------------------------- 1 | unified_mode true 2 | use 'partial/_base' 3 | 4 | property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false 5 | property :command, Array 6 | property :container, String 7 | property :timeout, Numeric, default: 60, desired_state: false 8 | property :container_obj, Docker::Container, desired_state: false 9 | property :returns, [ Integer, Array ], coerce: proc { |v| Array(v) }, default: [0], 10 | description: 'The return value for a command. This may be an array of accepted values. An exception is raised when the return value(s) do not match.' 11 | 12 | alias_method :cmd, :command 13 | 14 | action :run do 15 | converge_by "executing #{new_resource.command} on #{new_resource.container}" do 16 | with_retries { new_resource.container_obj Docker::Container.get(new_resource.container, {}, connection) } 17 | stdout, stderr, exit_code = new_resource.container_obj.exec(new_resource.command, wait: new_resource.timeout) 18 | Chef::Log.trace(stdout) 19 | Chef::Log.trace(stderr) 20 | unless new_resource.returns.include?(exit_code) 21 | raise "Expected process to exit with 0, but received #{exit_code}" 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/openssl/libraries/secure_password.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Library:: secure_password 4 | # Author:: Joshua Timberman 5 | # 6 | # Copyright 2009-2016, Chef Software, Inc. 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | # 20 | 21 | include OpenSSLCookbook::Helpers 22 | 23 | module Opscode 24 | module OpenSSL 25 | # Generate secure passwords with OpenSSL 26 | module Password 27 | def secure_password(length = 20) 28 | pw = '' 29 | 30 | while pw.length < length 31 | pw << ::OpenSSL::Random.random_bytes(1).gsub(/\W/, '') 32 | end 33 | 34 | pw 35 | end 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /bootstrappers/chef/cookbooks/apt/recipes/cacher-ng.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: apt 3 | # Recipe:: cacher-ng 4 | # 5 | # Copyright:: 2008-2017, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the 'License'); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an 'AS IS' BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | package 'apt-cacher-ng' 21 | 22 | directory node['apt']['cacher_dir'] do 23 | owner 'apt-cacher-ng' 24 | group 'apt-cacher-ng' 25 | mode '0755' 26 | end 27 | 28 | template '/etc/apt-cacher-ng/acng.conf' do 29 | source 'acng.conf.erb' 30 | owner 'root' 31 | group 'root' 32 | mode '0644' 33 | notifies :restart, 'service[apt-cacher-ng]', :immediately 34 | end 35 | 36 | service 'apt-cacher-ng' do 37 | supports restart: true, status: false 38 | action [:enable, :start] 39 | end 40 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/apt/recipes/cacher-ng.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook:: apt 3 | # Recipe:: cacher-ng 4 | # 5 | # Copyright:: 2008-2017, Chef Software, Inc. 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the 'License'); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an 'AS IS' BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | package 'apt-cacher-ng' 21 | 22 | directory node['apt']['cacher_dir'] do 23 | owner 'apt-cacher-ng' 24 | group 'apt-cacher-ng' 25 | mode '0755' 26 | end 27 | 28 | template '/etc/apt-cacher-ng/acng.conf' do 29 | source 'acng.conf.erb' 30 | owner 'root' 31 | group 'root' 32 | mode '0644' 33 | notifies :restart, 'service[apt-cacher-ng]', :immediately 34 | end 35 | 36 | service 'apt-cacher-ng' do 37 | supports restart: true, status: false 38 | action [:enable, :start] 39 | end 40 | -------------------------------------------------------------------------------- /bootstrappers/chef/berks-cookbooks/openssl/libraries/secure_password.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: openssl 3 | # Library:: secure_password 4 | # Author:: Joshua Timberman 5 | # 6 | # Copyright 2009-2016, Chef Software, Inc. 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | # 20 | 21 | include OpenSSLCookbook::Helpers 22 | 23 | module Opscode 24 | module OpenSSL 25 | # Generate secure passwords with OpenSSL 26 | module Password 27 | def secure_password(length = 20) 28 | pw = '' 29 | 30 | while pw.length < length 31 | pw << ::OpenSSL::Random.random_bytes(1).gsub(/\W/, '') 32 | end 33 | 34 | pw 35 | end 36 | end 37 | end 38 | end 39 | --------------------------------------------------------------------------------