CCNA (200-301) Topic 6.6: Puppet, Chef, and Ansible

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey welcome back to the channel everybody this is kevin and in this week's video we're going to take a look at a topic from the ccna exam blueprint that's exam 200-301 specifically we're going to be talking about three configuration management tools puppet and chef and ansible and if you look at that exam blueprint it tells us we don't have to be able to configure or troubleshoot or really even thoroughly explain these it says we have to be able to recognize the capabilities of these tools and that's what we're going to do in this video which is taken from our ccna video training series and as always if you enjoyed the video please give me a like down below and subscribe so you don't miss any of our weekly content in our previous video when we were talking about the devops life cycle we said in the deploy phase we were pushing configurations out to our devices and we wanted to maintain consistency in our configuration across the devices and we wanted to have scalability we didn't want to have to go to each device and one at a time do a configuration and we said that for the exam cisco wanted us to know about three specific configuration management tools and those were puppet chef and ansible we're going to consider those in this video at a high level specifically on the cisco exam blueprint they tell us that they just want us to be able to recognize the capabilities of these tools we don't have to configure them we don't need to know how to write to the configuration code that these tools are going to use we just need to recognize what they can do for us and they all have the basic same purpose in life they're going to be able to push configuration changes from some sort of a file that we have out to our managed devices like routers or switches and specifically we're going to be focused on cisco nexus switches those are switches that we typically see in a data center environment and the reason we're really going to be focused on those is two of these tools puppet and chef they're going to require that something be installed an agent has to be installed on the devices that we're managing and since cisco nexus allows us to install software because it essentially has a layer in the software that's running linux and we can install things on top of that linux platform we're going to be able to install that agent and that's as opposed to our traditional cisco ios devices like our isr routers our cisco catalyst switches but we'll see that ansible does not require an agent we can just push instructions one way and let's dive into these just a bit more beginning with puppet puppet is written in ruby and when people hear that they often think they have to be expert programmers in ruby in order to use puppet that's really not the case we just have to get comfortable with the configuration file structure and i'll give you a simple snippet here in just a few moments but we don't have to be expert ruby programmers so don't let that throw you off and within puppet we're going to declare different resources and say what type of resource it is there's a couple of examples a resource might be an interface that we're going to configure a resource might be an ospf process that we're going to run and the parameters or the characteristics that we want to assign to that resource is done with a class a class is a set of common configuration settings for example a setting for an interface resource might be an ip address for that interface and then we can take a collection of those common configuration settings and group them together in what's called a manifest this is the puppet code this is what gets sent out to our devices this manifest is going to accomplish a particular job and it's going to contain a collection of classes and we probably have more than one manifest to do different jobs and we can store those in a repository called a module and in order for this to work we need to install a puppet server on a server and we have to install puppet agents on the devices that we're going to be managing and we'll need to do that to our cisco nexus switches as an example and what we can do is say i want these switches to be in a particular state i want them to have a specific configuration in other words and we can represent our intent for what state we want them to be in in one of those manifest documents that set of puppet instructions and let's just say that the state we are after we're just calling state b and again we don't need to worry about the syntax for the exam but just to give you a simple example of what the configuration file might look like even though we're not ruby experts i think we can read this pretty well we see that we're configuring interface ethernet one slash four we see that it's currently shut down because shutdown is set to true switchport mode is disabled in other words it's set as a routed port it's being managed by puppet that's our description and we see that the ip address is 172.16.1.24 and we're not applying this specific configuration file to these switches in this example we don't want to assign the same ip addresses to all of our switches i just wanted to give you an example of the syntax that we might find inside of one of these manifests but let's say that we've got this big manifest with all kinds of instructions and it represents the state we want our devices to be in and we're just calling it state b as an example and we can have bi-directional communication between the server and the agents that are running on these nexus switches and we can check to see what their states are and maybe the top and bottom switches they're in state a they're in a different state than what we want the middle switch it's in state b so we don't need to do any configuration there but what we can do is we can push out this manifest and make changes on those top and bottom switches so that they become compliant with the state we want everybody to be in that's an example of what puppet can do for us chef is very similar chef is also written in ruby the terminology we use is a little bit different since we're using the metaphor of being a chef and cooking we say that our configuration instructions are contained in recipes and a recipe is going to be configuration instructions for a specific task like creating a one q trunk for example and we can have a collection of recipes to go into can you guess yeah a cookbook we're gonna put those in a cookbook that's a collection of recipes and there actually is a cookbook that's called the cisco cookbook and we can install that on our chef server and just like puppet we need to have an agent on these nexus switches we're going to install a chef client that's going to be our agent that we put on these switches now we can have bi-directional communication and even though we don't have to do coding or interpret code on the exam here's a sample of what a configuration might look like again i think we can interpret this without being ruby experts in the top example we're going into ethernet one slash one and it looks like we have an ip address of 192.168.1.1 with a slash 24 subnet mask we're bringing it up administratively because shutdown is set to false switchport mode is disabled meaning this is a routed port and then we've got ethernet one slash two we're bringing it up administratively its switchport mode is access so this is not a routed port this is an actual switchport and we're signing it to vlan 200. that's just a simple example of the kind of code that we might find in the instructions that we're pushing out to our devices now the third example is ansible and this is the one that really stands apart from the other two the other two used a server and agents on the managed devices this is going to be an agentless model and again the terminology is a bit different we're going to have what's called a playbook that's going to be our configuration instructions and the configuration instructions are written in a language called yaml yaml and when i first saw that my guess was that that stood for yet another markup language but and i've double checked this with many many resources because it just seems wrong but this is actually from the official site this is what yaml stands for it stands for yaml ain't markup language that doesn't seem grammatically correct to me does that bother anybody it bothers me but i'll try to ignore it move on but yaml that's how we're going to write our configuration instructions using that command syntax and then we're going to have an inventory that's a list of devices that we're going to apply our configuration to what we're going to do is take that playbook and run it against our inventory and again the big distinction between ansible and the other two tools we talked about puppet and chef no agent is going to be required now let's take a look at what this yaml configuration might look like and this is just a simple example this is not an example we would be applying to these cisco nexus switches but here i think it's pretty readable we see that we're applying a description of engineering interface and an ip address of 10.5.5.1 with an ip address of 255.255.255.192 we're applying that to a parent interface of interface gigabit ethernet 1 and we're applying an ip helper address of 10.1.1.100 to a couple of parent items those items are interfaces gigabit ethernet 1 and gigabit ethernet 2. and as a review here's the ansible process we've got a playbook with a set of configuration instructions we've got an inventory which is a list of devices and we're going to run that playbook against that inventory and our server or just basic machine it doesn't have to be a high powered server again it's going to send those configuration instructions using secure shell one way out to our managed devices and it's going to be applied on those devices no agent required that's what i want you to know for the exam about puppet chef and ansible as you start getting more into these in the real world you'll see that there are some exceptions to what we just discussed for example there is such a thing as agentless puppet there's an option to do what's called a chef push where we can push instructions out to a device that's not managed by an agent we could use puppet for example with traditional cisco ios devices by having a puppet proxy so there are lots of different things that we can do beyond what we've talked about here but this is the high level overview that i want you to know for the exam again to summarize we've talked about three configuration management tools the goals being we want scalability and we want consistency in our configuration and we want the ability to do quick deployments two of those tools puppet and chef required that we had agents installed on the managed devices and we said those are going to be typically cisco nexus switches because they are actually running linux and we can install the agents on top of that linux platform running inside of our cisco nexus switches and we said we could ultimately use ansible ansible is going to be able to push configuration changes using secure shell out to devices without those devices having to have an agent installed and that's a look at our three configuration management tools that we need to know for this exam [Music] you
Info
Channel: Kevin Wallace Training, LLC
Views: 6,712
Rating: 4.9749217 out of 5
Keywords: puppet, chef, ansible, ccna, cisco, 200-301, configuration management, ccnp, ccie, #kwtrain, cisco cert, cisco certifications, cisco ccna
Id: W7B-vjvkW0I
Channel Id: undefined
Length: 11min 18sec (678 seconds)
Published: Thu Feb 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.