Review the configuration of the classroom control repository used to deploy your version of code to your own Puppet environment.
You will use your own branch in the control repository in order to have your own version of the code. Nearly all the code editing you do in the classroom will happen in this branch. The instructor will demonstrate the codebase populating on the classroom Puppet master as each student completes this lab.
Throughout the course, we'll refer to the top level of this control repository as [control-repo]
when describing paths to files you should edit.
When we cover community modules from the Puppet Forge, we'll show you how to incorporate external modules without needing to copy them into your own repository. The modules
directory is reserved for these modules.
- Log into the classroom welcome page and click the link labeled Gitlab
- Login with the username
studentN
- Login with the password
puppetlabs
- Click
control-repo
displayed as puppet / control-repo
- Login with the username
- Click the Production drop down menu.
- Use the Branch dropdown menu to select your branch.
- Complete the rest of the lab instructions.
-
The
git config --global user.email
andgit config --global user.name
only need to be run once, no matter how many repositories you clone. -
The other steps are typical when cloning a repository and only need to be done once per repository.
Run these commands in a Linux shell (or a Windows host machine using Visual Studio code):
git config --global user.email "[email protected]" git config --global user.name "studentN" git clone [email protected]:puppet/control-repo.git cd control-repo git checkout studentN
-
Edit the Puppetfile inside the control-repo and add the following content. Replace studentN with your assigned student number (i.e. studentN becomes student0)
#mod 'pltraining-userprefs' #mod 'stahnma/epel' #mod 'puppetlabs/apache' #mod 'puppetlabs/haproxy' #mod 'puppetlabs/mysql' #mod 'hunner/wordpress' #mod 'review', # :git => '[email protected]:puppet/review.git', # :branch => 'studentN' #mod 'file_content', # :git => '[email protected]:puppet/file_content.git', # :branch => 'studentN' #mod 'kerberos', # :git => '[email protected]:puppet/kerberos.git', # :branch => 'studentN' #mod 'ordering', # :git => '[email protected]:puppet/ordering.git', # :branch => 'studentN' #mod 'system', # :git => '[email protected]:puppet/system.git', # :branch => 'studentN' #mod 'time', # :git => '[email protected]:puppet/time.git', # :branch => 'studentN' #mod 'webapp', # :git => '[email protected]:puppet/webapp.git', # :branch => 'studentN'
-
Save it and exit your editor.
-
Commit and push your code changes:
git add Puppetfile
git commit -m 'initial commit'
git push origin studentN
| Previous Lab | Next Lab |