All accounts needed for the labs in this course have credentials displayed on the classroom welcome page.
Your instructor will provide you with a 4 digit class id. Replace the XXXX
in these instructions with that ID.
Using your computer login to https://classXXXX.classroom.puppet.com
You will be prompted for an email address. Your instructor will assign you a student number. Replace the N
with the student number provided in these instructions with that number.
Login with [email protected]
e.g. [email protected].
When you've completed a Lab or an Exercise, please check off the Activity complete button if you see it. Your slides will not advance along with the instructor's until you do so.
Requirements: An SSH client such as Terminal.app or iTerm2.app, or optionally Microsoft Remote Desktop (can be found preinstalled on Windows and in the macOS AppStore.)
For macOS use Microsoft Remote Desktop version 10 and higher
You have the choice of logging into Linux directly form your computer or using the Remote Desktop Connection to "jump" to the Linux box using the PuTTY terminal emulation software on Windows. If your laptop is on Windows, follow the instructions above to the "jump" host as they both will involve using PuTTY on Windows.
From the Welcome page download the "student.pem" private key file. Note where it is located as you will use it as the value of an argument below.
Do not use the private_key.ppk
file, this file is formatted for the windows PuTTY application.
Using a terminal type
chmod 600 /path/to/downloaded/student.pem
ssh [email protected] -i /path/to/downloaded/student.pem
Tip you can type
-i
and drag the file into the Terminal window in most applications , to automatically fill the path to the file in.
Proceed to the Validate and configure the agent environment
The labs will be done on Linux in this course. The Windows workstation is there as a convenience should you prefer to use it.
Using the username "Administrator" and the windows "RDP Password" displayed to you on the welcome page, connect to the "hostname" displayed on the welcome page under "Type: Windows".
If you prompted about the security of the certificate , acknowledge the dialog affirmatively e.g. "continue". The certificates used in this classroom are self signed and will not be trusted by your operating system by default.
If you would like to connect directly from your macOS or Linux workstation skip these steps and proceed to the optional steps below.
- On your Windows student machine, open a PowerShell window
- Launch PuTTY by typing
putty
and pressing enter:- In the Host Name field, copy and paste your Linux machine's hostname from the Welcome page
- On the left hand menu, expand
SSH
and click on Auth- Under
Private key file for authentication
, click the Browse button - Select the pre-loaded private key from
C:\keys
. - Select private_key.ppk and click Open
- Under
- Next, under the
Connection
category, click on Data- In the
Auto-login username
field, type centos
- In the
- Return to the session view by clicking Session on the left-hand menu in PuTTY
- In the
Saved Sessions
box, type in linux_machine and click Save on the right hand side - Click Open
- If prompted about the host key not being cached, select Yes
For any future connections to this host, you can now simply double-click linux_machine in the Saved Sessions
window
- On your Windows student machine, open a PowerShell window
- Install win32-openssh using chocolatey,
choco install openssh
and press enter:- When the install is done, restart PowerShell
- You can then use the credentials already on the host
- Re-open PowerShell and type in
ssh centos@<your-linux-machine>.classroom.puppet.com
Verify that Git is installed. You will use this for version control when you edit Puppet code.
You should see output similar to the following (note: your version number may be different):
[centos@XXXXlinN ~]$ git --version
git version 1.8.3.1
-
Execute the following commands to add the required YUM repository and install the bolt package:
sudo yum install -y puppet-bolt
-
Now you will validate if your bolt installation is working properly:
$ bolt --version 1.39.0
-
A basic installation script has been pre-staged in your home directory, here
~/install_pe_agent.sh
Invoke the script using Bolt in order to install the agent on your local system:[centos@XXXXlinN ~]$ sudo /usr/local/bin/bolt script run install_pe_agent.sh --targets localhost
For all labs in this class, sudo su -
so that you are root. All labs are to be completed as root
-
sudo to root
sudo su -
-
Run the following commands:
puppet --version
puppet agent --configprint confdir
puppet agent --configprint certname
puppet agent --configprint server
-
Experiment with the management tools.
- Services
systemctl status crond
- Users
useradd marypoppins
id marypoppins
- Packages
yum install tree
yum info tree
- Services
| Next Lab |