Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
Configuration
Create a folder path for the apache2 class: sudo mkdir −p / e t c / puppet / modules / apache2 / m a n i f e s t s Now setup some resources for apache2. Create a file /etc/puppet/modules/apache2/manifests/init.pp con- taining the following: c l a s s apache2 { package { ’ apache2 ’ : e n s u r e => i n s t a l l e d , } s e r v i c e { ’ apache2 ’ : e n s u r e => t r u e , e n a b l e => t r u e , r e q u i r e => Package [ ’ apache2 ’ ] , } } Next, create a node file /etc/puppet/code/environments/production/manifests/site.pp with: node ’ p u p p e t c l i e n t . example . com ’ { i n c l u d e apache2 } 276 Note Replace puppetclient .example.com with your actual Puppet client’s host name. The final step for this simple Puppet server is to restart the daemon: sudo s y s t e m c t l r e s t a r t puppetmaster . s e r v i c e Now everything is configured on the Puppet server, it is time to configure the client. First, configure the Puppet agent daemon to start. Edit /etc/default/puppet, changing START to yes: START=y e s Then start the service: sudo s y s t e m c t l s t a r t puppet . s e r v i c e View the client cert fingerprint sudo puppet a g e n t −−f i n g e r p r i n t Back on the Puppet server, view pending certificate signing requests: sudo puppet c e r t l i s t On the Puppet server, verify the fingerprint of the client and sign puppetclient’s cert: sudo puppet c e r t s i g n p u p p e t c l i e n t . example . com On the Puppet client, run the puppet agent manually in the foreground. This step isn’t strictly speaking necessary, but it is the best way to test and debug the puppet service. sudo puppet a g e n t −−t e s t Check /var/log/syslog on both hosts for any errors with the configuration. If all goes well the apache2 package and it’s dependencies will be installed on the Puppet client. Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling