Thursday, September 14, 2023

DEVCOR - Infrastructure as Code - Puppet Commands

 Over the next series of blog posts I'm going to set out the commands required in order is install and run Infrastructure as Code solutions - Puppet, Chef, Ansible, Terraform.

I'm not going to go in to any depth on explanations per say, these are meant to be command guide posts allowing you to ensure you have correct sequence of events in mind and can easily identify answers if they ask 'Which command do you use to execute XYZ' or perhaps a drag and drop type question stating 'Put these commands in the correct order'

So lets start with Puppet.

Assume we are installing the server and agent on Ubuntu servers. 

1) Download Puppet using wget:
 $ wget https://apt.puppet.com/puppet7-release-focal.deb

2) Install Puppet with dpkg utility:
 $ sudo dpkg -i puppet7-release-focal.deb

3) Run an update to ensure you have all the latest package information:
 $ sudo apt-get update

4) Install the Puppet Server:
$ sudo apt-get install puppetserver

5a) Start the Puppet Server service:
$ sudo systemctl start puppetserver
$ sudo systemctl enable puppetserver

5b) Check the Puppet Service is running:
$ sudo systemctl status puppetserver

Puppet Server is now installed.

Now lets install the Puppet Agent, go to your server/destination that will be running the agent.

1) Install the Puppet Agent
$ sudo apt-get install puppet-agent

2a) Add the package binaries to the Ubuntu executable path, first run the Puppet Agent profile script
$ source /etc/profile.d/puppet-agent.sh

2b) Next, check the executable path is as expected:
$ echo $PATH
      *Note output should contain - : /opt/puppetlabs/bin - at the end of the line.

3) Confirm Puppet is install correctly and check the version is as expected:*
$ puppetserver -v
$ puppet -V
$ puppet agent -V

       * Note - the lowercase v for the puppetserver cmd and the uppercase V for the puppet cmds.

4a) Configure the Puppet Server destination that the Puppet Agent targets:
$ sudo puppet config set server puppetserver.networkstudies.co.uk
* obviously set this to whatever your server FQDN is

4b) Confirm this is correct by checking the puppet.conf file:
$ cat /etc/puppetlabs/puppet/puppet.conf

5) Start the Puppet Agent service:
$ sudo puppet reseource service puppet state-running

6) Test the Puppet Agent connectivity
$ sudo puppet agent --test

Monday, June 12, 2023

CCNA - Starting Out For Free (...or at least very nearly...)

 Over on the Learning Network some one asked how to get started with studying the CCNA.

I thought I'd post my reply here as well in case it can be of help to any one.

'Assuming you're starting out from scratch, if you work in an environment that has its own IT dept or even better a Networks team, start speaking to them. Find out what tech they use, what systems are used to monitor the tech and what new technologies are being looked at for the future. This gives you your focus.

Next, what to study.

 

There are no prerequisites to studying and passing the CCNA exam.

 

In an ideal world I would recommend you ask your employer to fund a place at your local Networking Academy on a CCNA course. Its a fantastic training program and really sets out the ground work that all other networking builds upon.

 

If you're self funding, then there are loads of free/ low cost resources you can access.

 

The hardest part is trying to determine where to start? You want to be fully prepared to be able to sit and pass the CCNA exam. So I recommend you start by checking out the exam topics here. Now you have a list of topics you can start making a plan to study each area.

 

If you can, buy the CCNA Official Cert Guide which has sample questions and provides a framework to cover the topics being tested in the exam.

 

The Learning Network has a fantastic CCNA Learning Plan that you can work through in preparation for your exam.

 

Lean on this community, keep an eye on the CCNA community pages. Watch the CCNA training series here (again for free).

 

Check out the free tier on CiscoU - work through the Automation learning path which will set you on a path for automating networks and future proofing your skills.

 

YouTube has loads of free CCNA courses. I recommend David Bombal's Complete CCNA Course or Network Chuck's free CCNA course

 

You can practice building networks and study packets as they move across the network using Packet Tracer from the Network Academy.

 

You can practice the technologies covered in the exam topics for free at the Cisco DevNet website. There are labs, learning paths and tutorials all for free that can help with preparing you for the CCNA exam.

 

Finally, you will need to know your subnetting. On the exam there will be loads of questions such as 'Which network is this host IP on?' or 'How many hosts can you have on this network?' These type of questions provide an opportunity to gain easy marks and can be answered quickly if you know your subnetting.

 

Practice, Practice, Practice! you can access subnetting questions here and aim to be able to answer any subnetting question within 20 seconds. You can gain easy marks and recover time on the exam to use up on harder questions.'