This repo shows how to build a puppet infra on CentOS/RedHat 7
sudo rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
install puppetserver
If installing on centos 8 run update-crypto-policies --set LEGACY
mkdir git
cd git
git clone https://github.com/gameforce/puppet-core
sudo rsync -av files/puppet/ /etc/puppetlabs/puppet/
sudo systemctl start puppetserver
ln -s /opt/puppetlabs/bin/puppet /usr/bin/
cd /etc/puppetlabs/puppet/code/environments/production
sudo puppet module install puppet-r10k
sudo puppet apply modules/r10k/manifests/init.pp
or use gem install method (describe)
cd %HOME/git/puppet-core
sudo r10k puppetfile install
vi site
puppet agent --test
yum install -y razor-server
sudo -u postgres psql postgres
vim /etc/puppetlabs/razor-server/config.yaml
create user razor password 'razor';
create database razor_prd;
create database razor;
create database razor_dev;
GRANT ALL PRIVILEGES ON DATABASE razor_prd TO razor;
GRANT ALL PRIVILEGES ON DATABASE razor TO razor;
GRANT ALL PRIVILEGES ON DATABASE razor_dev TO razor;
\q
razor-admin -e production migrate-database
service razor-server start
gem install razor-client
alias razor='razor -u http://razor:8150/api'
razor create-repo --name centos --iso-url http://kam/iso/CentOS-7-x86_64-DVD-1511.iso --task centos
razor create-repo --name vyos #TODO (based off debian)
razor create-repo --name ubuntu #TODO
razor create-repo --name windows #TODO
razor create-broker --name noop --broker-type noop`
razor create-broker --name puppet -c server=kam.lab.gameforce.net -c environment=staging --broker-type puppet
razor create-tag --name kam --rule '["=", ["fact", "macaddress"], "08:00:27:a6:16:e5"]'
razor create-tag --name dmx --rule '["=", ["fact", "macaddress"], "08:00:27:14:4e:dd"]'
razor create-tag --name ads --rule '["=", ["fact", "macaddress"], "08:00:27:2d:2f:99"]'
razor create-tag --name pms --rule '["=", ["fact", "macaddress"], "08:00:27:d8:af:b6"]'
razor create-tag --name gms --rule '["=", ["fact", "macaddress"], "08:00:27:0e:3f:64"]'
razor create-tag --name rtr --rule '["=", ["fact", "macaddress"], "08:00:27:e6:34:33"]'
razor create-policy --name kam --repo centos --tag kam --hostname 'kam.lab.gameforce.net' --root-password 'secret' --broker puppet --task centos
razor create-policy --name dmx --repo centos --tag dmx --hostname 'dmx.lab.gameforce.net' --root-password 'secret' --broker puppet --task centos
razor create-policy --name pms --repo centos --tag pms --hostname 'pms.lab.gameforce.net' --root-password 'secret' --broker puppet --task centos
razor create-policy --name gms --repo centos --tag gms --hostname 'gms.lab.gameforce.net' --root-password 'secret' --broker puppet --task centos
razor create-policy --name rtr --repo vyos --tag rtr --hostname 'rtr.lab.gameforce.net' --root-password 'secret' --broker puppet --task vyos
razor create-policy --name ads --repo windows --tag ads --hostname 'ads.lab.gameforce.net' --root-password 'secret' --broker noop --task windows