...
Code Block |
---|
title | Set up hiera datafiles |
---|
|
root@bootstrap:~# mkdir /etc/puppetlabs/puppet/data
root@bootstrap:~# cd /etc/puppetlabs/puppet/data
root@bootstrap:/etc/puppetlabs/puppet/data# mkdir nodes
root@bootstrap:/etc/puppetlabs/puppet/data# touch common.yaml networking.yaml packages.yaml sensu.yaml users.yaml nodes/bootstrap.infra.skyhigh.iik.ntnu.no.yaml
root@bootstrap:/etc/puppetlabs/puppet/data# git init .
Initialized empty Git repository in /etc/puppetlabs/puppet/data/.git/
root@bootstrap:/etc/puppetlabs/puppet/data# git add .
root@bootstrap:/etc/puppetlabs/puppet/data# git commit -m "Initial import"
|
...
Code Block |
---|
|
root@bootstrap:/etc/puppetlabs/puppet# wget https://githubraw.githubusercontent.com/ntnusky/profile/blob/infrastructure/files/puppet/hiera.yaml
...
2017-12-22 14:18:52 (334 KB/s) - 'hiera.yaml.1' saved [72001]
root@bootstrap:/etc/puppetlabs/puppet# mv hiera.yaml.1 hiera.yaml |
Next up is populating the hiearchi with information based on this wikipage., and commiting this to the git repository
Code Block |
---|
title | Set up hiera datafiles |
---|
|
root@bootstrap:/etc/puppetlabs/puppet/data# git add common.yaml networking.yaml packages.yaml users.yaml
root@bootstrap:/etc/puppetlabs/puppet/data# git commit -m "Initial data"
|
Add the class "role::bootstrap" to the node-specific hierafile so that the role can be set before the ENC is up and running. Also make sure that sensu and munin is set to not be installed; as we need the servers installed before we install the clients. Restart puppetserver, and run the puppetagent.
Code Block |
---|
| root@bootstrap:~# Define role for bootstrap |
|
root@bootstrap:/etc/puppetlabs/puppet/data# echo '---' > nodes/bootstrap.infra.skyhigh.iik.ntnu.no.yaml
root@bootstrap:/etc/puppetlabs/puppet/data# echo 'classes:' >> nodes/bootstrap.infra.skyhigh.iik.ntnu.no.yaml
root@bootstrap:/etc/puppetlabs/puppet/data# echo ' - role::bootstrap' >> nodes/bootstrap.infra.skyhigh.iik.ntnu.no.yaml
root@bootstrap:/etc/puppetlabs/puppet/data# grep install: common.yaml
profile::munin::install: false
profile::sensu::install: false
root@bootstrap:/etc/puppetlabs/puppet/data# systemctl restart puppetserver
root@bootstrap:/etc/puppetlabs/puppet/data# puppet agent --test --server puppet.skyhigh.iik.ntnu.no --environment infrastructure |
a