Puppet arvestus: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Created page with 'Ülesande käigus kontrollitakse Puppet konfiguratsioonihaldus tarkvara paigaldamise seadistamise ja kasutamise oskust. File:Puppetarvestus1.png Kontrolli kas masinates…' |
No edit summary |
||
Line 24: | Line 24: | ||
5. Paigalda ja seadista puppet-client1.test.zz veebiserver. | 5. Paigalda ja seadista puppet-client1.test.zz veebiserver. | ||
...... | *LAMP ehk Apache2, Mysql ja PHP paigaldamiseks loo uus klass. | ||
*Kausta '''/etc/apache2/sites-available''' fail (nt. test.vhost), mille sisu on järgnev: | |||
<pre> | |||
###modules/veebiserver/files/test.vhost | |||
<VirtualHost *:80> | |||
ServerAdmin webmaster@localhost | |||
###muudetud | |||
DocumentRoot /var/www/test/ | |||
<Directory /> | |||
Options FollowSymLinks | |||
AllowOverride None | |||
</Directory> | |||
<Directory /var/www/> | |||
Options Indexes FollowSymLinks MultiViews | |||
AllowOverride None | |||
Order allow,deny | |||
allow from all | |||
</Directory> | |||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | |||
<Directory "/usr/lib/cgi-bin"> | |||
AllowOverride None | |||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | |||
Order allow,deny | |||
Allow from all | |||
</Directory> | |||
###muudetud | |||
ErrorLog /var/log/apache2/test.error.log | |||
# Possible values include: debug, info, notice, warn, error, crit, | |||
# alert, emerg. | |||
LogLevel warn | |||
###muudetud | |||
CustomLog /var/log/apache2/access.log combined | |||
Alias /doc/ "/usr/share/doc/" | |||
<Directory "/usr/share/doc/"> | |||
Options Indexes MultiViews FollowSymLinks | |||
AllowOverride None | |||
Order deny,allow | |||
Deny from all | |||
Allow from 127.0.0.0/255.0.0.0 ::1/128 | |||
</Directory> | |||
</VirtualHost> | |||
</pre> | |||
*Loo sellele failile link kausta '''etc/apache2/sites-enabled''' | |||
*Uue klassiga loo kaust '''/var/www/test''' ja lisa sinna fail '''index.php'''. Index.php sisu: | |||
<pre> | |||
#modules/veebiserver/files/index.php | |||
<html> | |||
<head> | |||
<title>Veebiserver Puppet</title> | |||
</head> | |||
<body> | |||
<?php echo date('l jS \of F Y h:i:s A'); ?> | |||
</body> | |||
</html> | |||
</pre> |
Revision as of 20:30, 25 May 2013
Ülesande käigus kontrollitakse Puppet konfiguratsioonihaldus tarkvara paigaldamise seadistamise ja kasutamise oskust.
Kontrolli kas masinatesse sisse logimine õnnestub ning kas nad saavad ühendust üksteisega.
Ülesanded
1. Paigalda Puppet tarkvara teades,et:
- puppet master on:
- puppet.test.zz; IP aadressiga 192.168.13.50;
- kaks klientmasinat on:
- puppet-client1.test.zz; IP aadressiga 192.168.13.51;
- puppet-client2.test.zz; IP aadressiga 192.168.13.52.
2. Lisa klientmasinad masterisse. Testimine käivitada käsklusega:
puppet agent --test --verbose
3. Site.pp faili lisada ainult include-lause. Näiteks include node.pp. Kõik tegevused kirjeldada moodulites.
4. Kasutades Puppet tarkvara paigalda kõigile masinatele tekstiredaktor Vim. Tee seda ka masinatele, mis ei ole deklareeritud.
5. Paigalda ja seadista puppet-client1.test.zz veebiserver.
- LAMP ehk Apache2, Mysql ja PHP paigaldamiseks loo uus klass.
- Kausta /etc/apache2/sites-available fail (nt. test.vhost), mille sisu on järgnev:
###modules/veebiserver/files/test.vhost <VirtualHost *:80> ServerAdmin webmaster@localhost ###muudetud DocumentRoot /var/www/test/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ###muudetud ErrorLog /var/log/apache2/test.error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn ###muudetud CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
- Loo sellele failile link kausta etc/apache2/sites-enabled
- Uue klassiga loo kaust /var/www/test ja lisa sinna fail index.php. Index.php sisu:
#modules/veebiserver/files/index.php <html> <head> <title>Veebiserver Puppet</title> </head> <body> <?php echo date('l jS \of F Y h:i:s A'); ?> </body> </html>