Difference between revisions of "Handson1"

From Gridkaschool
(Puppet first steps)
(Puppet first steps)
Line 37: Line 37:
 
## Hint:
 
## Hint:
 
##* https://docs.puppetlabs.com/references/latest/type.html#notify
 
##* https://docs.puppetlabs.com/references/latest/type.html#notify
  +
##* https://docs.puppetlabs.com/learning/ordering.html#before-and-require
  +
##* Resources with lower case are instantiating, Resources with first letter upper case are reference

Revision as of 11:26, 27 August 2014

Hands-On

Environment

  1. Login via ssh to the workgroup server naf-school01.desy.de with your assigned account
  2. Check if you can login via ssh to you assigned VM as root
  3. Check if you can edit a text file on the wgs and the node. We provide vim, emacs, nano

Puppet first steps

  1. Use the puppet RAL to examine and configure the VM node solution
    1. Show all managed resources
    2. Show description of the resource service
    3. Show all configured services
    4. Create a testuser
    5. Show resource of the created user
    6. Delete the testuser
    7. HINT:
  2. Write the first Manifest
    1. Create a puppet manifest which creates two testuser. Filename: handson1create.pp
    2. Create a puppet manifest which removes both testuser. Filename: handson1remove.pp
    3. Concatenate both puppet manifest. Filename: handson1combine.pp
    4. Apply the manifests to your node.
    5. Try to understand why the handson1combine.pp manifest fails?
    6. Hint:
  3. Write the second Manifest Media:puppet_handson12.tar.gz
    1. Create a puppet manifest which creates the file /etc/motd with the content Hello World!. Filename: handson1motd.pp
    2. Apply the manifest to your node
    3. Examine what happens if you re-apply the manifest.
    4. Add a line to the file /etc/motd and re-apply the manifest
    5. Hint:
  4. Write the third Manifest Media:puppet_handson13.tar.gz
    1. Write a manifest which writes 10 debug messages in the following order
      • Hello World 1
        Hello World 2
        Hello World 3
    2. Hint: