-
Notifications
You must be signed in to change notification settings - Fork 12
Enrolling a Machine in Chef
Guillaume Rischard edited this page Apr 6, 2020
·
7 revisions
Get ready:
- Choose hostname
- Create role in chef repository as
roles/<hostname>.rb
, e.g.roles/nepomuk.rb
- If necessary, create the hosting provider as
roles/<hoster>.rb
, e.g.roles/gandi.rb
. Just use 'osm' as the zone - some of the older nodes do have a provider specific zone, but this is now only for big sites with lots of machines - If necessary, create the hosting country as
roles/<tld>.rb
, e.g.roles/fr.rb
- If necessary, create the hosting provider as
On the chef server:
- Create client with
knife client create <hostname>.openstreetmap.org
- Save private key to
<hostname>.pem
- Create node with
knife node create --user <hostname>.openstreetmap.org --key <hostname>.pem <hostname>.openstreetmap.org
- When editor opens for node add
role[<hostname>]
to the run list
On the new machine:
- Check chef client version
- Download chef client making sure to select the correct version
- Install chef client with
dpkg
- Create
/etc/chef
directory - Create
/etc/chef/client.pem
containing private key from the server - Set hostname with
hostnamectl set-hostname <hostname>.openstreetmap.org
- Run chef with
chef-client -S https://chef.openstreetmap.org/