SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
The Tools
for Learning
Puppet
A SlideShare guide to getting started
with command line interface, Vim and Git
Here’s a quick reference guide of basic
commands and shortcuts for the common tools
that Puppet users work with on a routine basis —
command line interface (CLI), Vim and Git.
Keep this SlideShare handy, and for more
details on using these tools, see the full guide to
getting started with Puppet in our downloadable
ebook, The Tools for Learning Puppet.
So you want to learn how
to use Puppet? Perfect!
The 3 tools to train on:
Command line
(interface)
Vim
(text editor)
Git
(versioning control)
Command line is the language used
to communicate with the computer
through the keyboard, rather than
through a mouse-icon interface.
Think of the command line terminal as a
chat room/instant message conversation
between you and your computer.
Command line
(interface)
Command line
5 things to remember
1.	 Press Enter after each command or nothing will happen.
2.	 If you ever get lost in the terminal, don’t panic. Just use pwd
to show your current location, or present working directory.
3.	 If you are completely lost, or just want to go back
to the home directory, use the cd command.
4.	 When creating new files, remember to add the file type at
the end of the new file name, like this: new_file.txt.
5.	 There are many resources for help with CLI when you
are stuck or confused, including StackOverflow and
FossWire’s Unix/Linux command cheat sheet.
Command line
Basics & common commands
pwd show present working directory
mkdir make a directory/folder in the location
cd
change directories — allows movement from one directory to another;
goes to home directory if no directory specified after command
cd.. change directory one level up
ls shows a list of all the files and folders in the current directory.
cp copy file
mv move/rename file
Vim
(open source text editor)
You are going to need a text editor for any
computer you plan to use for programming.
Technically you could use Notepad, but don’t
use Microsoft Word, or similar programs used
to type up documents — these programs
actually put invisible code around your words
to format text and make it look pretty.
This formatting code will get jumbled with the
code you are writing, making for an angry kitty.
Vim
(open source text editor)
Instead of a graphical user interface (GUI),
where you click an icon around to do things,
Vim uses a text interface. This means you’ll
save a lot of time by not moving and clicking
the mouse constantly, but you will have
to memorize (or make a cheatsheet of)
keyboard shortcuts to make things happen.
Vim
5 things to remember
1.	 Vim is in its Normal mode when it begins with an intimidating black screen.
This mode is for taking action to a file. Enter Insert mode with i to type within the file.
2.	 While in Insert mode, you can move the cursor below a character you want to delete
and then use the X command. Remember that dw deletes the whole word.
3.	 If you are unhappy with the changes you made, use command ZQ to exit Vim without
saving the bad changes.
4.	 You can copy text from one section and paste it to another section with the y, or yank,
command. Other options for yanking are available, like yy to yank the whole line.
5.	 Vim has a built-in tutor that you can access by typing vimtutor -g.
It will give you some practice and teach you the next few steps.
Vim
Basics & common commands
i Insert mode enabled
:w Write file and save — :w newfilename.txt will save as a new file
:q! Quit (yes, I’m sure)
:wq! Write file, save file, and quit (yes, I’m sure)
ZZ Quick save and quit
ZQ Quit without save
cat
“concatenated” — combine files or copy contents between files
cat ball_of_yarn.txt calls up contents of file ball_of_yarn.txt
Vim
Basic commands: moving around
h Move cursor one space left w Move forward one word
j Move cursor one line down b Move back one word
k Move cursor one line up 0 Move to beginning of line
l Move cursor one space right $ Move to end of line
gg Move to start of file G Move to end of file
Multiply any of the above commands with a number. For example:
•	3h — move 3 characters left •	10j — move 10 lines down
•	3b — move back 3 words •	2$ — move to t he end of the line below the cursor
Vim
Basic commands: making the things happen
v — Enter visual mode for moving cursor around to make selections
i — Enter insert mode for making changes to selections
u — Undo previous; ctrl+r — Redo previous
X Delete/cut character at cursor
y yank (copy), ends selection dw Deletes a word
yy yank full line dd Delete full line
yap yank all paragraph d% Delete from cursor to line end
p Paste last yank/cut at cursor dgg Delete from cursor to file start
/text phrase Enter: Find phrase. Use n to move to next instance, N for previous
Vim
Advanced command: Find & replace
:%s/old text/new text/gc Enter
Initiate command; search entire document; find old text and
subsititute new text for it; check each instance and confirm.
: Enter Command mode
% Perform on entire document (replace % with numbers to search lines)
s Substitute
g Global
c Check (at each instance, respond with y — yes, n — no, a — all, q — quit)
Git
(versioning control)
Git keeps track of all changes you make to your
files and enables you to share your code, allowing
it to be used on any computer. You can create
several copies (branches) of your original file,
make changes to each of the branches, and then
seamlessly merge everything back together into
the original file (called a repository or repo).
An easy way to think of using Git for versioning:
Packing for a trip!
Git
Basics
When you pack, you lay out (stage) all your items
on the bed (working directory) until you have
everything you need. Then you fold your items
and pack (commit) them in your suitcase (repo).
git init turn working directory into repository
git add FILE_NAME.txt stage file, to be added to repo on commit
git commit
commit all staged items to new version;
prompts for comment about changes
git commit -m ‘added
sandals’
skip going into Vim, and add text inside
quotes as your commit message
Git
Basics
You’ll also want to add an ID tag to your
suitcase so people know whose luggage it is.
You do the same in Git by globally applying
your username and email address:
git config --global user.name your_name
git config --global user.email your_name@example.com
KitTub GitHub
(versioning control)
GitHub is the website that runs Git, the open
source version control system. It is where you
can write or upload code right in the browser, and
allow others to use and contribute to that code.
You can create your own account and
start using Git at github.com.
For more on using GitHub to work with others,
see the guide, The Tools for Learning Puppet.
Git
Whenever you git init or git clone a repo, that repo is
called the origin. Within a repo are branches, and the first
branch is called the master branch. To make changes
without affecting the master branch, create a new branch.
git branch new_branch create a new branch (use any name you like for your new_branch)
git checkout new_branch lets you begin making changes to the new branch
git merge new_branch pushes everything in the new branch to the master branch
git push origin master push changes from new branch to master repo on GitHub
git branch -d branch_name delete a branch
For more instruction on using command line,
Vim and Git — and more cat photos — check out
our full guide, The Tools for Learning Puppet
at puppet.com/tools-for-learning-puppet.
And if you need more catnip after the full guide,
check out the resources on the following slides.
That’s it for meow!
Resources
General / Puppet-related
Download VirtualBox so you can host a VM on your computer. It’s free!
Download the Learning Puppet VM — also free!
•	If you’re looking for enterprise-level configuration
management software that’s fully tested,
scalable and fully supported, you can download
and try out Puppet Enterprise for free.
•	Once you’ve downloaded Puppet Enterprise,
learn foundational Puppet concepts and best
practices for managing your infrastructure
with Puppet Fundamentals.
•	Learn how to manage all aspects of a Windows
system configuration with Puppet Enterprise,
leveraging existing Puppet modules with
Puppet Essentials for Windows.
•	Learn Code the Hard Way:
Slightly sassy dude tells you to, “Shut up and shell.”
•	The Puppet blog has lots of helpful technical posts
Resources
Command Line Interface
Linux
•	Learning the terminal: Let Lifehacker help you choose
a Linux terminal emulator.
•	Learning the Shell — A darn good resource to learn Linux, period.
Cheat sheets:
•	Dave Child’s Linux command line cheat sheet
•	Linux command line reference for common operations
•	Linux bash shell cheat sheet
Windows (Powershell)
•	Get instructions for installing and
getting started with Powershell.
•	Check out the Learn and Library sections
on technet.microsoft.com.
Resources
Vim & Git
Vim
•	Vim has a built-in tutor that you can
access by typing vimtutor -g in the
VM command line. It will give you some
practice and teach you the next few steps.
•	Vimdoc — The manual written by
Bram Moolenaar, the author of Vim.
If you want to jump straight to the
review and new stuff, go to this page.
Git
•	Git cheat sheet — A cool interactive cheat sheet to learn the
different places where you do things or put things in a Git workflow.
It’ll show you some useful next-level commands, which you can
then review more thoroughly with git help <command name>.
•	Git Tutorial — A good reference for visual learners from
Atlassian (which makes Bitbucket, an alternative to GitHub).
•	Pro Git — The entire Pro Git book written by Scott Chacon.
Scott goes into far more depth than what is covered here.
Thankfully, this wonderful resource is available for free.

Más contenido relacionado

Destacado

Intro to Puppet Enterprise
Intro to Puppet EnterpriseIntro to Puppet Enterprise
Intro to Puppet EnterprisePuppet
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Puppet
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Puppet
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollectivePuppet
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetMichael Lessard
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternPuppet
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibanapkill
 
Using puppet
Using puppetUsing puppet
Using puppetAlex Su
 
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet
 
Building On Puppet and Puppet Forge
Building On Puppet and Puppet ForgeBuilding On Puppet and Puppet Forge
Building On Puppet and Puppet ForgePuppet
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThomas Graf
 
Metasploit Class: Shellshock Attack
Metasploit Class: Shellshock AttackMetasploit Class: Shellshock Attack
Metasploit Class: Shellshock AttackJulian Gonzalez
 

Destacado (15)

Intro to Puppet Enterprise
Intro to Puppet EnterpriseIntro to Puppet Enterprise
Intro to Puppet Enterprise
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013Managing Windows Systems with Puppet - PuppetConf 2013
Managing Windows Systems with Puppet - PuppetConf 2013
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
 
Coursmos deck
Coursmos deckCoursmos deck
Coursmos deck
 
Using puppet
Using puppetUsing puppet
Using puppet
 
Shadow puppet
Shadow puppetShadow puppet
Shadow puppet
 
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)Puppet Camp Portland: Nagios Management With Puppet (Beginner)
Puppet Camp Portland: Nagios Management With Puppet (Beginner)
 
Building On Puppet and Puppet Forge
Building On Puppet and Puppet ForgeBuilding On Puppet and Puppet Forge
Building On Puppet and Puppet Forge
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
Metasploit Class: Shellshock Attack
Metasploit Class: Shellshock AttackMetasploit Class: Shellshock Attack
Metasploit Class: Shellshock Attack
 

Más de Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

Más de Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Último

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 

Último (20)

Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 

The Tools for Learning Puppet: Command Line, VIM & GIT

  • 1. The Tools for Learning Puppet A SlideShare guide to getting started with command line interface, Vim and Git
  • 2. Here’s a quick reference guide of basic commands and shortcuts for the common tools that Puppet users work with on a routine basis — command line interface (CLI), Vim and Git. Keep this SlideShare handy, and for more details on using these tools, see the full guide to getting started with Puppet in our downloadable ebook, The Tools for Learning Puppet. So you want to learn how to use Puppet? Perfect!
  • 3. The 3 tools to train on: Command line (interface) Vim (text editor) Git (versioning control)
  • 4. Command line is the language used to communicate with the computer through the keyboard, rather than through a mouse-icon interface. Think of the command line terminal as a chat room/instant message conversation between you and your computer. Command line (interface)
  • 5. Command line 5 things to remember 1. Press Enter after each command or nothing will happen. 2. If you ever get lost in the terminal, don’t panic. Just use pwd to show your current location, or present working directory. 3. If you are completely lost, or just want to go back to the home directory, use the cd command. 4. When creating new files, remember to add the file type at the end of the new file name, like this: new_file.txt. 5. There are many resources for help with CLI when you are stuck or confused, including StackOverflow and FossWire’s Unix/Linux command cheat sheet.
  • 6. Command line Basics & common commands pwd show present working directory mkdir make a directory/folder in the location cd change directories — allows movement from one directory to another; goes to home directory if no directory specified after command cd.. change directory one level up ls shows a list of all the files and folders in the current directory. cp copy file mv move/rename file
  • 7. Vim (open source text editor) You are going to need a text editor for any computer you plan to use for programming. Technically you could use Notepad, but don’t use Microsoft Word, or similar programs used to type up documents — these programs actually put invisible code around your words to format text and make it look pretty. This formatting code will get jumbled with the code you are writing, making for an angry kitty.
  • 8. Vim (open source text editor) Instead of a graphical user interface (GUI), where you click an icon around to do things, Vim uses a text interface. This means you’ll save a lot of time by not moving and clicking the mouse constantly, but you will have to memorize (or make a cheatsheet of) keyboard shortcuts to make things happen.
  • 9. Vim 5 things to remember 1. Vim is in its Normal mode when it begins with an intimidating black screen. This mode is for taking action to a file. Enter Insert mode with i to type within the file. 2. While in Insert mode, you can move the cursor below a character you want to delete and then use the X command. Remember that dw deletes the whole word. 3. If you are unhappy with the changes you made, use command ZQ to exit Vim without saving the bad changes. 4. You can copy text from one section and paste it to another section with the y, or yank, command. Other options for yanking are available, like yy to yank the whole line. 5. Vim has a built-in tutor that you can access by typing vimtutor -g. It will give you some practice and teach you the next few steps.
  • 10. Vim Basics & common commands i Insert mode enabled :w Write file and save — :w newfilename.txt will save as a new file :q! Quit (yes, I’m sure) :wq! Write file, save file, and quit (yes, I’m sure) ZZ Quick save and quit ZQ Quit without save cat “concatenated” — combine files or copy contents between files cat ball_of_yarn.txt calls up contents of file ball_of_yarn.txt
  • 11. Vim Basic commands: moving around h Move cursor one space left w Move forward one word j Move cursor one line down b Move back one word k Move cursor one line up 0 Move to beginning of line l Move cursor one space right $ Move to end of line gg Move to start of file G Move to end of file Multiply any of the above commands with a number. For example: • 3h — move 3 characters left • 10j — move 10 lines down • 3b — move back 3 words • 2$ — move to t he end of the line below the cursor
  • 12. Vim Basic commands: making the things happen v — Enter visual mode for moving cursor around to make selections i — Enter insert mode for making changes to selections u — Undo previous; ctrl+r — Redo previous X Delete/cut character at cursor y yank (copy), ends selection dw Deletes a word yy yank full line dd Delete full line yap yank all paragraph d% Delete from cursor to line end p Paste last yank/cut at cursor dgg Delete from cursor to file start /text phrase Enter: Find phrase. Use n to move to next instance, N for previous
  • 13. Vim Advanced command: Find & replace :%s/old text/new text/gc Enter Initiate command; search entire document; find old text and subsititute new text for it; check each instance and confirm. : Enter Command mode % Perform on entire document (replace % with numbers to search lines) s Substitute g Global c Check (at each instance, respond with y — yes, n — no, a — all, q — quit)
  • 14. Git (versioning control) Git keeps track of all changes you make to your files and enables you to share your code, allowing it to be used on any computer. You can create several copies (branches) of your original file, make changes to each of the branches, and then seamlessly merge everything back together into the original file (called a repository or repo). An easy way to think of using Git for versioning: Packing for a trip!
  • 15. Git Basics When you pack, you lay out (stage) all your items on the bed (working directory) until you have everything you need. Then you fold your items and pack (commit) them in your suitcase (repo). git init turn working directory into repository git add FILE_NAME.txt stage file, to be added to repo on commit git commit commit all staged items to new version; prompts for comment about changes git commit -m ‘added sandals’ skip going into Vim, and add text inside quotes as your commit message
  • 16. Git Basics You’ll also want to add an ID tag to your suitcase so people know whose luggage it is. You do the same in Git by globally applying your username and email address: git config --global user.name your_name git config --global user.email your_name@example.com
  • 17. KitTub GitHub (versioning control) GitHub is the website that runs Git, the open source version control system. It is where you can write or upload code right in the browser, and allow others to use and contribute to that code. You can create your own account and start using Git at github.com. For more on using GitHub to work with others, see the guide, The Tools for Learning Puppet.
  • 18. Git Whenever you git init or git clone a repo, that repo is called the origin. Within a repo are branches, and the first branch is called the master branch. To make changes without affecting the master branch, create a new branch. git branch new_branch create a new branch (use any name you like for your new_branch) git checkout new_branch lets you begin making changes to the new branch git merge new_branch pushes everything in the new branch to the master branch git push origin master push changes from new branch to master repo on GitHub git branch -d branch_name delete a branch
  • 19. For more instruction on using command line, Vim and Git — and more cat photos — check out our full guide, The Tools for Learning Puppet at puppet.com/tools-for-learning-puppet. And if you need more catnip after the full guide, check out the resources on the following slides. That’s it for meow!
  • 20. Resources General / Puppet-related Download VirtualBox so you can host a VM on your computer. It’s free! Download the Learning Puppet VM — also free! • If you’re looking for enterprise-level configuration management software that’s fully tested, scalable and fully supported, you can download and try out Puppet Enterprise for free. • Once you’ve downloaded Puppet Enterprise, learn foundational Puppet concepts and best practices for managing your infrastructure with Puppet Fundamentals. • Learn how to manage all aspects of a Windows system configuration with Puppet Enterprise, leveraging existing Puppet modules with Puppet Essentials for Windows. • Learn Code the Hard Way: Slightly sassy dude tells you to, “Shut up and shell.” • The Puppet blog has lots of helpful technical posts
  • 21. Resources Command Line Interface Linux • Learning the terminal: Let Lifehacker help you choose a Linux terminal emulator. • Learning the Shell — A darn good resource to learn Linux, period. Cheat sheets: • Dave Child’s Linux command line cheat sheet • Linux command line reference for common operations • Linux bash shell cheat sheet Windows (Powershell) • Get instructions for installing and getting started with Powershell. • Check out the Learn and Library sections on technet.microsoft.com.
  • 22. Resources Vim & Git Vim • Vim has a built-in tutor that you can access by typing vimtutor -g in the VM command line. It will give you some practice and teach you the next few steps. • Vimdoc — The manual written by Bram Moolenaar, the author of Vim. If you want to jump straight to the review and new stuff, go to this page. Git • Git cheat sheet — A cool interactive cheat sheet to learn the different places where you do things or put things in a Git workflow. It’ll show you some useful next-level commands, which you can then review more thoroughly with git help <command name>. • Git Tutorial — A good reference for visual learners from Atlassian (which makes Bitbucket, an alternative to GitHub). • Pro Git — The entire Pro Git book written by Scott Chacon. Scott goes into far more depth than what is covered here. Thankfully, this wonderful resource is available for free.