(2 votes, average: 3.00 out of 5)
Loading...
Below you will find how to install & configure Puppet server on Solaris.
Part of my DevOps effort I am testing Puppet and Chef server, especially how they work with a Solaris environment.
Note: Part of the documentation below is Solaris specific This guide is using puppet version 4.7
How to install puppet (server and or client)
How to install puppet (server and or client)
pkg install puppetNote:The below install is needed for hiera
gem install json_pureTo configure the server
svccfg -s puppet:master setprop config/server=devtech101.com svccfg -s puppet:master refreshNow enable the server
svcadm enable svc:/application/puppet:master svcadm enable svc:/application/puppet:user svcadm enable svc:/application/puppet:mainTo configure the client run on the client
svccfg -s puppet:agent setprop config/server=devtech101.com svccfg -s puppet:agent refreshTo use the agent you need to check in, and then sign the cert.
# Check an initial agent check in. puppet agent --test # On the server sign the cert puppet cert sign client1.devtech101.comNow enable the agent on the client
svcadm enable svc:/application/puppet:agentNow lets configure the manifest and client structure
# Create directory structure mkdir -p /etc/puppetlabs/code/environments/production/manifests/classes mkdir -p /etc/puppetlabs/code/environments/production/modules mkdir -p /etc/puppetlabs/code/environments/production/hieradata/nodesCreate global site.pp main manifest file Note: The modules directory name has to be all lowercase The example below uses default (empty), and two nodes defined, more below.
cat /etc/puppetlabs/code/environments/production/manifests/site.pp node default { } node 'client1.devtech101.com', 'client2.devtech101.com' { # classes example include create_zfs include create_file # module example include extrafiles }The below example will create the zfs file system (using the build in zfs module), and will create the file “example-ip-file” in /tmp
cat /etc/puppetlabs/code/environments/production/manifests/classes/create_zfs.pp class create_zfs { zfs { 'rpool/test': ensure => 'present', readonly => 'on', } } class create_file { file {'/tmp/example-ip-file': ensure => present, mode => '0644', content => "Here is my Public IP Address: 10.10.10.10.\n" } }Modules are very similar, create a file under modules > [module_name] > manifests > init.pp
cat /etc/puppetlabs/code/environments/production/modules/extrafiles/manifests/init.pp class extrafiles { file {'/var/tmp/file1': ensure => present, mode => '0644', content => "Elis file\n", } }
0
0
votes
Article Rating