junovitch@
Developer
CONTENTS
Intro
I've been using Puppet for most of this year using the standard sysutils/puppet with its included WEBrick server. While that works for me, I was interested in having the Puppet Dashboard and figured it would be an excellent opportunity to work with something new and learn something in the process. My goal here is to take what I have learned and cover how to set up a production quality Puppetmaster/Puppet Dashboard installation from scratch. Many of the steps will follow along closely with Puppet Lab's online instructions so I would encourage you to read along with their detailed explanation as you do the steps.
Assumptions
I've started with a pair of bare FreeBSD 9.2-RELEASE VMs to test out the procedure on to ensure I didn't miss anything from my live setup. We'll need to do a few things to stage our environment. Our server VM will also run both the Dashboard and Puppet master. With enough clients this may have to be on different systems. Much of the same configuration will still apply. Adapt accordingly if this doesn't fit your environment.
For these two VMs, I'll use the following /etc/hosts file. Ensure that DNS resolves appropriately in a live environment.
On jailhost.example.com we'll set up a basic environment:
MariaDB Database Jail Prep
databases/mariadb55-server will handle the back end requirements of Puppet Dashboard. MySQL can also be used as well.
Configure the jail on jailhost.example.com:
On mariadb.example.com:
Creating and Configurating MariaDB Database for Puppet Dashboard
http://docs.puppetlabs.com/dashboar...tml#creating-and-configuring-a-mysql-database
Tuning: Copy one of the default config files and change the max packet size to allow for the 17 MB data rows that Dashboard can occasionally send.
Enable and start MariaDB
Prepare Database for use by running the secure installation.
Choose a root password and answer yes to all questions.
Login to MariaDB and create appropriate tables for Dashboard.
- Intro
- Assumptions
- MariaDB Database Jail Prep
- Creating and Configurating a MariaDB Database for Puppet Dashboard
Intro
I've been using Puppet for most of this year using the standard sysutils/puppet with its included WEBrick server. While that works for me, I was interested in having the Puppet Dashboard and figured it would be an excellent opportunity to work with something new and learn something in the process. My goal here is to take what I have learned and cover how to set up a production quality Puppetmaster/Puppet Dashboard installation from scratch. Many of the steps will follow along closely with Puppet Lab's online instructions so I would encourage you to read along with their detailed explanation as you do the steps.
Assumptions
I've started with a pair of bare FreeBSD 9.2-RELEASE VMs to test out the procedure on to ensure I didn't miss anything from my live setup. We'll need to do a few things to stage our environment. Our server VM will also run both the Dashboard and Puppet master. With enough clients this may have to be on different systems. Much of the same configuration will still apply. Adapt accordingly if this doesn't fit your environment.
For these two VMs, I'll use the following /etc/hosts file. Ensure that DNS resolves appropriately in a live environment.
Code:
10.100.82.10 client.example.com client
10.100.82.2 jailhost.example.com jailhost
10.100.82.3 mariadb.example.com mariadb
10.100.82.4 puppet.example.com dashboard.example.com puppet dashboard
On jailhost.example.com we'll set up a basic environment:
pkg_add -r ezjail
ezjail-admin install
ezjail-admin update -P
MariaDB Database Jail Prep
databases/mariadb55-server will handle the back end requirements of Puppet Dashboard. MySQL can also be used as well.
Configure the jail on jailhost.example.com:
ezjail-admin create [highlight]mariadb.example.com 10.100.82.3[/highlight]
cp /etc/resolv.conf /usr/jails/[highlight]mariadb.example.com/etc/[/highlight]
cp /etc/hosts /usr/jails/[highlight]mariadb.example.com/etc/[/highlight]
ezjail-admin console -f [highlight]mariadb.example.com[/highlight]
On mariadb.example.com:
pkg_add -r portmaster
portmaster databases/mariadb55-server
Creating and Configurating MariaDB Database for Puppet Dashboard
http://docs.puppetlabs.com/dashboar...tml#creating-and-configuring-a-mysql-database
Tuning: Copy one of the default config files and change the max packet size to allow for the 17 MB data rows that Dashboard can occasionally send.
Code:
cp /usr/local/share/mysql/[highlight]my-huge.cnf[/highlight] /var/db/mysql/my.cnf
patch /var/db/mysql/my.cnf << 'EOF'
32c32,33
< max_allowed_packet = 1M
---
> # Allow 32MB packet Size for ~17MB size rows Puppet dashboard sends
> max_allowed_packet = 32M
'EOF'
Enable and start MariaDB
echo 'mysql_enable="YES"' >> /etc/rc.conf
service mysql-server start
Prepare Database for use by running the secure installation.
Choose a root password and answer yes to all questions.
mysql_secure_installation
Login to MariaDB and create appropriate tables for Dashboard.
mysql -u root -p
Code:
CREATE DATABASE dashboard_production CHARACTER SET utf8;
CREATE DATABASE dashboard_development CHARACTER SET utf8;
CREATE DATABASE dashboard_test CHARACTER SET utf8;
CREATE USER 'dashboard'@'[highlight]10.100.82.4[/highlight]' IDENTIFIED BY '[highlight]dashboard_password[/highlight]';
GRANT ALL PRIVILEGES ON dashboard_production.* TO 'dashboard'@'[highlight]10.100.82.4[/highlight]';
GRANT ALL PRIVILEGES ON dashboard_development.* TO 'dashboard'@'[highlight]10.100.82.4[/highlight]';
GRANT ALL PRIVILEGES ON dashboard_test.* TO 'dashboard'@'[highlight]10.100.82.4[/highlight]';
flush privileges;
quit;