Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

chef-server-populator (17) Versions 0.4.2

Populate chef server with stuff you want

Berkshelf/Librarian
Policyfile
Knife
cookbook 'chef-server-populator', '= 0.4.2'
cookbook 'chef-server-populator', '= 0.4.2', :supermarket
knife cookbook site install chef-server-populator
knife cookbook site download chef-server-populator
README
Dependencies
Changelog
Quality

Chef Server Populator

Creates admin clients and installs provided public key. Simplifies managing and recreating erchef nodes. Provides backup and restore recipes for complete erchef recovery.

Usage

When bootstrapping with the chef-server cookbook and chef-solo:

  • Download and unpack chef-server and chef-server-populator cookbooks
  • Upload public keys to be used by clients
  • Create json to add client and key information
  • Run chef-solo

When converging with chef-client:

  • Create data bag to hold data bag item with client information
  • Create data bag item with client information
  • Set data bag related attributes

Applicable attributes:

  • node[:chef_server_populator][:databag] - name of the data bag

Structure of the data bag item:

{
  "id": "client_name",
  "chef_server": {
    "client_key": "public key contents",
    "type": [
      "user",
      "client"
    ],
    "enabled": true,
    "admin": true
  }
}

Restoring from a backup:

  • Set path to restore file with node[:chef_server_populator][:restore][:file]
  • The restore recipe is run if a restore file is set
  • The restore file can be remote or local

When enabling backups:

  • Include chef-server-populator::restore recipe
  • Set backup cron interval with node[:chef_server_populator][:schedule]
  • Optionally set a remote storage location with node[:chef_server_populator][:backup][:remote][:connection]
  • Backups include both a pg_dump of the entire chef database and a tarball of the bookshelf data directory

Extras

Need to use the IP address of the node for a bit, or another name instead of having node[:fqdn]?

  • node[:chef_server_populator][:servername_override]

Keep chef server configured via chef client:

  • node[:chef_server_populator][:chef_server]

If the hash is non-empty, it will write the chef-server dna.json and trigger a reconfigure when ever the attributes are updated.

Examples

Take a look in the examples directory for basic bootstrap templates that will build a new erchef server, using existing keys and client, and register itself, or restore an existing chef server from a backup.

Info

Dependent cookbooks

chef-server >= 2.1.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

v0.4.2

  • Make modification of chef-server embedded runit cookbook more robust
  • Backport miasma-powered backup script from 1.0 trunk to avoid being trolled by fog installation process

v0.4.0

  • Allow for creation of clients, users, or both
  • Store backup configuration in separate JSON file
  • Provide proper retries to account for temporary server unavailability
  • Include full server restart on restore from backup
  • Provide 'latest' backup files along with named files
  • Convert backup script from template to cookbook file
  • Make service restarts more consistent

v0.3.2

  • Add client creation retries to stabilize initial bootstrap
  • Updates to example bootstrap script
  • Add support for backup/restore (thanks @luckymike!)

v0.3.0

  • Include chef-server dependency
  • Update configuration overrides for chef-server
  • Use :endpoint attribute for custom hostname/ip

v0.2.0

  • Provide distinct solo vs. client recipes
  • Client recipe configures dna.json and uses ctl for reconfigure

Foodcritic Metric
            

0.4.2 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:29
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:31
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:32
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:33
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:35
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/attributes/default.rb:36
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:32
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:38
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/backups.rb:56
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/default.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/default.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/default.rb:29
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:30
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/templates/default/chef-server-backup.rb.erb:7
FC002: Avoid string interpolation where not required: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/client.rb:3
FC002: Avoid string interpolation where not required: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/solo.rb:3
FC019: Access node attributes in a consistent manner: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/configurator.rb:2
FC048: Prefer Mixlib::ShellOut: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:29
FC048: Prefer Mixlib::ShellOut: /tmp/cook/f79026580c2892885dd17bbf/chef-server-populator/recipes/restore.rb:75