Cisco Customer Success - Video

Infrastructure as Code with Ansible and Terraform for Meraki

Playback confirmation!

Do you want to resume playing from last left location?

Chapter 1 Thumbnail
00:00
Welcome, agenda, and moving from click-ops to code
Chapter 2 Thumbnail
05:03
Infrastructure as code fundamentals and benefits
Chapter 3 Thumbnail
12:30
Ansible basics: playbooks, modules, inventory, idempotency
Chapter 4 Thumbnail
22:30
Ansible for Meraki and event-driven automation with webhooks
Chapter 5 Thumbnail
29:30
Terraform basics: providers, resources, variables
Chapter 6 Thumbnail
36:30
Terraform state, drift detection, and differences vs Ansible
Chapter 7 Thumbnail
47:10
Live demo part 1: Terraform plan/apply for Meraki network and VMs
Chapter 8 Thumbnail
56:30
Live demo part 2: Ansible config for DNS and RADIUS, apply to Meraki
Chapter 9 Thumbnail
01:06:30
Live demo part 3: Mixing tools, drift checks, revert, destroy, redeploy
Chapter 10 Thumbnail
01:17:00
Key takeaways, tool selection, resources, and wrap-up

Transcript

Oh and welcome everyone to the infrastructure as a code with Ansible and Terraform for Meraki. This is part of the expert insight series for.00:00Emia, I'm Sandra Narvey. I will be your host for us today and I'm a customer success specialist within the Meraki business unit. So I have a little bit of experience prior to being a customer success specialist with the Meraki training team. So we used to have conversation with people around topics.00:20Revolved around dashboard. For today, we're gonna mainly talk about Ansible and Terraform to automate the platform.00:41Oh what's the agenda for today? 1st and foremost, we're gonna cover what these infrastructure as a code, what are the pros and cons to move to manage your infrastructure using code rather than traditionally what we call click ops, which is gonna.00:50Go and click into the various areas in this case of dashboard, what are Ansible and terraform? What is Ansible and what it.01:10The does do, how we can ties Ansible into Meraki, what is terraform? What's the main concept behind the Terraform platform and use cases and obviously live demo. The demo today will be a long demo because we're actually gonna try and provision.01:17A full network using both, and demonstrate how you can use one, you can use the other or they can interact together. It's always a matter of finding the right solution and I'm gonna cover also why you wanna go with one, why you wanna go with the other, and what we're seeing out in the market.01:37Customers using it for.01:58Also, again, some summary and resources if you want to continue your journey, learning more and start using this approach of infrastructure as code. What is infrastructure as a code? It's usually we what we call traditional clicks operation.02:00Is you have a business requirement of some sort. It's coming from inside. It's coming from your view, it's coming from yourself because you want to improve something in a network or in your organization. You're gonna go in, fetch some data, try and understand what the process that you want to put in place to achieve that.02:20Business requirement and then you're gonna go into the Meraki dashboard and you're gonna click click click and configure it wherever it's needed.02:39And the infrastructure will reflect the changes that you made manually. Obviously, this is challenging when it comes down to how fast can I do it if I need to implement a change on a thousand network? How many error can I make if I go in and try and make what I think is the.02:47Name change for each and every network, but maybe the status of all the network is not the same, so I need to tweak my business requirement and the way I operate on specific network, make it longer for you to deploy those changes. Sometimes we are afraid to make changes because we don't know what's the status of a specific.03:07Specific network, we are in a situation where maybe you haven't managed every single network up until the point you don't.03:27Possess the full knowledge of what will happen if you implement a change and the network knowledge is usually concentrator around a few individuals in the company and that can make some of the even minor changes a little bit challenging.03:37And obviously because these knowledge is on few people, you rely on their availability, their knowledge and their time to make all the things. Conceptually, what we're trying to do with infrastructure as a code is going from.03:55I'm clicking on every single button to make the change to can I just click a single button and make everything happen exactly the same way, exactly the way I want it. And that's where infrastructure as a whole as a concept come into play. It's important to remember.04:12That is not our product is not a single solution, ok? It's an approach to manage and configure the networks.04:32What is it? Well, quite literally it's lines of code. You define what you want to happen in your network, your organization, your specific wireless configuration. But these expand even beyond the network. If you think about the way.04:46In this case Terraform and Ansible were born. They were born with the desire to automate complex infrastructure that also include computing 3rd party system. So it's not just about the Meraki dashboard and these can help you tie nicely into the story of.05:05I'm gonna deploy everything, not just the network, also any, ideation system that might be required if you think about a DNS server, DHCP server, if you have specific resources that every time you create a new network, they must be made available instead of you having to rely.05:25On another team to do the job and wait for them to be ready before you can actually deploy the network or even worse. You start deploying the network, you discover that something is missing, you have to pose, you leave it in a little bit of an unknown stage and then you have to wait for something to happen and then you need to go back and.05:45Remember what you've done and what you still have to implement. So all these challenges can be tackled using infrastructure as code.06:05Because tools like Ansible and Terraform, they use code to recreate, to create, read, update, and destroy the infrastructure automatically. And as I said, it's not only confined to dashboard. Just as a word of reference, Ansible use YAML and.06:14Is.06:34Language to write these, this code which is yet another markup language. That's what the acronyms stay stay for and Terraform use TF files. Does it make your life different? No, it's just to remember that they're not interchangeable, ok? They use different structure.06:36And they are, different in the way you need to provide the information to these tools in order to achieve.06:56A result. Once you have it defined, you can pipe that inside dashboard and 3rd party system and you can get results right out on the other end. For Meraki.07:04Obviously, as we learned already in the series, but I always like to repeat myself, API is the foundation. We have these capabilities with Ansible and Terraform because the platform has API. So once again, generally if you think about what you can and cannot do is.07:21Mainly related to if an API call exists for you to perform the task. Ansible and Terraform, they add this abstraction layer moving you a little bit away from the API and thinking more about the structure itself rather than the single API.07:41All you need to perform. The benefit every time we go into the world of automation and coding to make our network works, it's always about consistency, repeatability, speed, and scalability. With consistency, what we mean is if it works, it can work.08:00Again, once you design it well, it will perform the same series of actions all the time. You don't have to.08:20Think about it, should I click here? Should I click there? Did I remember this? Did I forgot that? That's not the case because it's written and it's set not in stone, but as long as you don't change it, you know exactly what will happen. And that means that is repeatable. If you have to perform the same task on a thousand network, you don't have to, ok?08:29Okay, you just maybe set some parameters and you let it run not on a single network, you design it on one, you test it on five, you run it on a thousand.08:49Which give us obviously speed because, hey, let's be honest a program is faster than you clicking and typing. And this makes it scalable so you can scale the same task and once you have the concept in mind, you will see in the demo later.09:00How reuse these ideas that you had, these series of tasks that you designed can be called by other.09:19In this case for ansible, they're called playbook, but it doesn't really matter. It's just a series of tasks. One of the tasks could be, hey, I have another series of tasks that I want you to perform that I know it's working already. So think a little bit in the the same parallelism with functions for traditional programming language, you can change that.09:30Them together to obtain a result. And even better if you're talking with.09:51About integrating with also 3rd party system. Maybe you or someone for you will be maintaining the bits that are related to the network. Somebody else will maintain the bits that are related to the servers and every time you need something it's just a matter of.09:56Calling one, calling right after the other and have the results that you want. Let's get a little bit dirty into these two words. These are infrastructure as code tools. They're not the only one available out there. We are using the.10:11Is as.10:31An example, and also we do have resources that we provide as Cisco as Meraki for you to make it easier to enter the word of ansible or enter the word of terraform. We're gonna learn it later, but pretty much the same way libraries exist.10:33Ansible has collections.10:53There's a collection for Meraki that is maintained by us and it's available for everyone to use and Terraform uses providers. And again, providers are all the different system you can interact with using terraform. One of the providers is the Meraki providers that we maintain and offer.10:56To you for free. So if you want to use it, you can.11:16Once you design like the, probably the main challenge is obviously definition, ok? So you need to understand what you want to do. And that's always the big challenge when it comes down to automating a task. You need to sit down.11:22And check what you want to do, then it's gonna be about how to do it right after. This is stored on your laptop, on a 3rd party machine wherever you want. It's basically just a list of files that you can pass around and you can update whenever you want. And this file will.11:38Will contain the list of instruction to create destroy, and update or maintain the infrastructure based on the settings that you define.11:58So in summary, what does it mean? 1st and foremost, if we're talking about a specific in this case, let let's pick Ansible and as an as an example.12:09Well, we're talking about ansible, the series of tasks, as I said, they're called playbooks, which is just a list of tasks. We write out the playbooks following obviously the the constraints of the YAML language file type that defines how I.12:22Network should be built and how it should be maintained. E.g., as I said before, wireless ID configuration, if you want to have auto VPN enabled on the site and which subnet should be propagated.12:42Creating those subnets, so you want to make sure that before propagating the subnet, that subnet in the network actually exists or firewall rules that you want to keep constant across your entire organization. It's not an all or nothing approach. We've seen, customers out there that maybe performs.12:57Some friction manually and for something that is more boring repetitive and kind of standardized company wide, they leverage this type of tools to maintain everything aligned.13:17These type of tools allow you to push the configuration at your will or they can be scheduled. A great example could be, hey, I have my standard configuration for the network. I have a network administrator that can go in and fiddle with the configuration manually. It's not ideal, it's not what I want.13:29But sometimes it's needed. I need to quickly change the port for as wish because I have a person coming through underneath the guest port.13:49Great, but because I have my infrastructure as a code every Sunday afternoon, will I will check if the network is running the same way as the code has defined it. And if there is a mismatch, what I want to do is revert those change back. Go back to what I consider.13:58As secure and stable configuration. So.14:18It's a possible approach, of why you want to schedule it. Or it can be just, hey, on a weekly basis, just run the check to see if there are any differences and then an operator, a user, a network admin will decide if those changes should stay or should be revert.14:21The playbook itself serves as a blueprint for the automation task. This has the steps that you need to execute and then you have an inventory. You specify a base where those changes or those configurations should be applied.14:42You we're gonna see it in the demo, you also have granularity. What happened in most of the cases is, e.g., you're gonna have settings that are common across all the networks and then you're gonna have a series of network that needs a tiny bit of a different configuration. So instead of rewriting the same playbook for network A.14:59And network type A and network type B, what we can do is we can have a playbook that covers everything that is common and then two dedicated one that covers specifics for the network or we can introduce parameter and say, hey, if this network is the office in Milan.15:19After applying the regular configuration, then apply what is specific to the office or vice versa, this is the office in London, after applying the common configuration, apply the specific changes for the networking in London. And you can define these parameters so you don't have to memorize. It could be a.15:39IP addresses of servers. They're different in one office rather than another. You're gonna define them into your file. And every time you add a new office, it's just a matter of.15:59Defining the name, defining the IP addresses of the server, and you can reuse the same playbook to deploy a new location. The other beautiful thing is what we call it importancy, so you.16:11Might have experience with different approaches to automation. Ansible and terraform, they are able to rerun the same playbook and if NO changes need to be made.16:30Nothing will change. So it's fairly easy to just say, hey, I'm gonna go through all the things I'm supposed to configure and if they're ok, I'm just gonna move on, ok? Running the same playbook or the same flow.16:46For terraform, will result in the same or will achieve the same result over and over. So that's the beauty of having this kind of tool that is like, ok, I don't know what happened, but I'm gonna run this and it's gonna revert everything back or he's gonna configure everything.17:04To a status that is stable for me because mostly you don't define how to do the thing, but you define what the things should look like. This is how my SSID should look like. If it's not.17:22Ansible will take care of understanding what needs to be done in order to reach that point. So that's what makes them very nice for operation at scale. A bit more about ansible. It's an open source automation tool. It's.17:38By Red Hat, it used simple human readable configuration files called playbooks. These playbooks are in YAML, so the format of the file would be YAML.17:58And, I like it. They're readable. So that's personal take of sandro. YAML files are fairly easy to read. So, you know, yes, it's parsed by a machine, but once again as a human, you can quickly understand what is going on and they're clearly indented to make it easier to follow.18:09Another beautiful thing of Ansible is that it's completely agentless. Now, for Meraki, it doesn't really make a difference because we're still interacting with API, but if you want to include 3rd party system and if you have, I don't know, a Linux server somewhere, you don't need to install anything.18:30On that machine, Ansible only require SSH access to the machine and it will be able to perform tasks on that machines right away.18:49We have official support, so as I said, we have a Meraki never remember the name collection for Ansible available. It works as code in a terminal which is what we're gonna use today for the demo. There's also a.19:03Graphical user interface called Ansible Automation controller or also known as previously as Ansible tower.19:22For us, as I said, it uses API, so it's not gonna go and connect to the device. Ansible will use the Meraki API to interact with dashboard and dashboard will then push the configuration changes in your environment. As I said, and these are two characteristics.19:30It's declarative, you want, you just define what you want the configuration to look like. That's my goal. And it's either important. If you run the same playbook ten times, it will just work.19:49What does it do? It's designed to do configuration management and application deployment. It's very good at orchestration and provisioning and it can help you automate a task. The key concept within Ansible, we have the playbook that is the script that defines.20:05Means what Ansible should do.20:24Which goal do I want to achieve? Modules that are built in unit of code. So e.g., I'm gonna connect to a Linux host. I want to update the machine 1st. Then I want to install a package, then I want to copy over some SSH keys because I.20:26I use it in the future or I'm deploying my DNS server, I want to deploy this list of destination as IP hundred IP address host definition, you name it, ok? For Meraki, again, it's about configuring the network.20:46It also has a concept of the inventory. This is where you place all your resources. For us, it's gonna be a single resource. We're always gonna call the Meraki dashboard. That's the resource that we have, but if you're planning to expand to different systems, it's very interesting to see what you can do with.21:03With ansible.21:23The portal where you can have or have access to all the modules available for ansible. It's called Ansible Galaxy and it's a little bit of an app store of every single thing that you can do with it. So it's vast. Today we're gonna stick mainly to Meraki, but don't think about, hey.21:24I'm gonna have a new tool to configure the network. If you want to scale it out to other system, you definitely can. Or most likely if you're gonna start interacting with other part of your business, you might discover that.21:44And other views within your organization might be already using ansible, e.g., because it's amazing to manage one example containers and virtual machines. So if you have an environment that maybe is distributed across different cloud providers or you have your own prem.21:58And.22:18Server farm or location, probably they're already doing something with it. Just as an example, what it looks like a playbook is is a yaml file, this is this is the structure. You can see that everything is indented. You define the host that.22:19You want to target in this case is the Meraki.22:38Dashboard API and then you have specific tasks. A task could be get all the organization, it could be configure all the SSID. It could be changed the list of or update the list of firewall rules to look exactly like this. Different modules can come from.22:42On different collections that are available for ansible. And obviously you can have output results. It's always important to have a feedback loop to know what is going on into your system. I'm doing something, I want to see a result I wanna have a report. I wanna know if it was successful or it was a failure or it might be a way to just.23:02Give you the green light of like ok good we are going to the next task because the previous one has succeeded.23:21How Ansible works for Meraki? As I said, Meraki has an Ansible collection published. You can just define it. Ansible will do the heavy lifting of finding that collection, installing onto your system and use it. So again, very nice and easy. It kind of make tasks like as I did.23:31The configuration, firewall rules, which setting but also organization level setting or network level setting.23:49It can enable you to provision branch very quickly. It could be used as an audit tool because remember, we are declaring what it should look like, but we also have a way to check if the configuration running doesn't look like what I should deploy.23:56So you always have this ability to.24:15Quickly check, hey, is everything compliant? And you can detect configuration drift. As I said, this can be used to automate a task in order to, hey, I've seen a drift, just reverted back or it could be used in a situation where I've seen a drift I'm gonna have a manual user in.24:18Intervention to decide what's the best course of action to to take, could be maintained or revert back all the changes.24:38It can use event driven automation, so as we learned already in the previous episode, webhooks are are our friend. In this case is gonna be You can have a webhook in the dashboard getting triggered and that trigger can land.24:47Into Ansible and Ansible can take action as a remediation, as a report or, you know, just as a configuration tools. Couple of words about webhooks. If you've already heard the previous session, this will be a bit of a rehash of the thing. Webhooks is a way that we have.25:04For a system.25:24To trigger alerts or to send message out to other systems. The Meraki dashboard has webhooks, you configure them exactly the same way as you will configure email alert instead of having an email as a destination, you're gonna have an HTTPS server. Then.25:26In that communication, we're gonna have an HTTP message with a payload and the payload is reporting what's the status we are seeing. E.g., if a device goes down, we're gonna have a payload that will say this is the device, this is the network, this is when the event happened, this is the current status of the device, and so on.25:45And a 3rd party system, in this case could be ansible, can intercept that message and do something with it. It can parse the result and take decision. You can use what we're sending through the webhook as, e.g., input data for a specific playbook should you need it.26:05Change of registry moving from Ansible to a terraform. So what is terraform? Again, it's an infrastructure provisioning tool. It is open source, it has some commercial support available should be needed, it used again simple human readable TF.26:27Format files.26:45Personal take here, I find easier to read ansible files than terraform, but it's definitely not impossible, ok? So it's still something that isn't structured. It's just that for me, the Ansible structure resonated a little bit better with how my brain works when I'm looking at it.26:47It's again, declarative and it important. You will see this as a bit of a common thread across all this thing because we want to just say, hey, this is how it should look like. And if I run it again, I want just to work or to do nothing if there's nothing to do. Again, it can manage a.27:05Wide range of systems, we're talking about VMs, docker containers, network devices, cloud instances, cloud providers. It's designed to be that point of contact where.27:25It will launch something and will apply on different systems. Again, this could be, hey, I'm spinning a new site, I am a managed service provider, I'm spinning a new customer and then my best practice is they're gonna have VMX running in my.27:37Proprietary cloud or running into a public cloud platform and I want to automatically view tunnel from each and every network of that organization to these NX for XYZ reason. You can define it using both Ansible or Terraform but Terraform for this is really good.27:57Again, it's agentless and it mostly use API to talk to target. Again, a little bit of.28:17A thread across common across these two, because it's the easiest way. We want to be as hands off as possible. We don't, we want to not have to rely on the machine to be in a particular state. We want to be able to talk with that machine and bring it to the state that we want.28:25Terraform providers, as I said, same thing as collection, see them as library for general programming language. It's a collection of things you can do using Terraform interacting with Meraki. Cisco has released an official Meraki provider for terraform. Terraform.28:46Plugins are called.29:04Providers and they're used to interact with remote system, required providers must be declared. So when you start a new deployment you're gonna have a series of provider and Terraform can automatically automatically install and use them for your.29:06Deployment. Each provider can add a set of resources. So again, if we are talking with Meraki, there's gonna be a Meraki provider. If we're talking with a specific cloud provider, there's gonna be a provider for that provider. That's a lot of providers. You get the idea depending on the type of interaction that you want and the system you want to bring in.29:26You just need to define the providers that you want to use.29:46Terraform uses a similar structure as Ansible galaxy. It's just called Terraform registry, and it's the main directory of all the public providers or of, of all the available providers. It's just a matter of finding the right one for the thing you have integrated.29:50If it's just Meraki, you just need one. What is different between the two? And I think this is where the, the, the, the roads start to take apart from each other. Terraform has the ability to keep the state.30:07Of the data. Every time you apply a change with Terraform, Terraform will keep a file that defines exactly what the structure of the resource you're trying to edit, modify or destroy should look like. And there is a one to one cur.30:27Respondents. So Terraform always have available, this is the state where that the resource should be in.30:47So it's very easy to, for Terraform to compare it, ok? This same operation with Ansible is doable, but it's a little bit more challenging. This makes it Terraform very nicely to modify existing objects because it knows the state already, the detecting configuration drifts because.30:55Once again at the state I can just fetch and compare the two. Terraform.31:15States are automatically updated, so every time you apply a change through terraform, the file will reflect the changes you've made and state can be stored locally, not super recommended or in a in a remote backend. Again, because this is a state file.31:21That we want to keep it safe and it's gonna be on you to make sure that.31:40You maintain those state files available because it uses it to understand what's the status of the infrastructure versus what I want the infrastructure to look like. And this is also where when we're talking about parking roads.31:46Like which one to use we're gonna have a broader conversation later, but in general, if you start managing something with terraform, the mainline will be everything will be managed through it, ok? Because this state file must be kept up to date. We're gonna see an example.32:05Later this is not mandatory.32:25But you're losing some of the power of Terraform if you are not relying on state files. Actually, as a word of reference, the demo later will completely ignore a state file, ok? Because I wanted to have something that was a bit more dynamic and we're gonna see it in action.32:27Again, just a little bit of an example here just to see what you're getting into. It's, 1st and foremost, we define the providers. This is what is needed for this Terraform job to run. In this case is only Meraki, but it could be also other systems. We're gonna configure the provider for Meraki the.32:48There's not much in it because we just need pretty much the API key and and that's all we need. And then.33:06We are gonna define some data sources, so in this case is could be the organization ID, could be a specific network ID, it really depends, and then we're gonna have some output of the actions. It's important to keep in mind that the same way I said before Ansible that you can confi.33:15Do these as parameter, so it's not set in stone. Terraform can do exactly the same. You can provide parameter when you're launching the the script that is performing the actions. You can define them in a separate file and.33:34The job will just go in and fetch those parameters whenever is needed so it's easy to scale even for a situation where you have more complex scenario and it's not just one configuration fits old. How Terraform work with Meraki, it defines and provision Meraki.33:51Network as code. So we define the steps and once again, we just apply those. Well, if you have a brownfield deployment? Terraform supports the or has the ability to import an existing configuration.34:11Into the terraform state. So instead of trusting the state and trying to align the real configuration to the state, you can do the opposite. Hey, this is the Terraform job that I want to run. This is gonna be the 1st time just to take things as a reference.34:29One off, check the the current configuration as the source rather than vice versa. Not recommended to do it that often, ok? It's, it's a thing that you will most likely do at the beginning of your journey because you already have brownfield deployment where net.34:47Works are already available. It enables environment separation with workspaces, so once again, as I said with this variable concepts, you can say, hey.35:07The job is always the same, but as I said at the beginning with test on one, and actually design on one, test on five, deploy on a thousand, you can do exactly the same here. You might have your development environment where you're gonna test the changes 1st, then you're gonna.35:19Have a few staging networks where you want to try and and see if everything is working at scales and then you can move it to production and have it covering every single.35:39The deployment that you have. And you can do this without having to rewrite the thing. It's just using different targets, different workspaces to execute what you want to achieve. How did we detect configuration drift here? What's fairly easy, we know how we want to apply the configuration.35:51Instead of applying it, we're just gonna read it and then we compare it with the state file that we have for each and every defined resource. In terms of the resources, 1st and foremost, I'm gonna keep this.36:11And hopefully it will open. Yay. If you're looking for, where do I find the providers? This is the Meraki provider for Terraform and this is the Ansible collection for Meraki. Don't.36:26Get scared. There's gonna be a lot of information there, but if you run, if you start looking at the documentation, it will tell you what you can do. What are the modules that we can use? And you will most likely see a comparison one by one.36:46What we can do in with dashboard API being replicated, well it changes, it changes the structure, ok? Because the the way to interact, the way you call, e.g., the get organization or the get, the other.37:03List or get SSID, it's gonna be different, ok? It's just the naming structure and obviously.37:23Terraform has a different structure compared to Ansible compared to the Meraki API, but you can see here that there is plenty of documentation on how to use it. Another important thing, when you're searching for this, there used to be there probably still out there.37:31Terraform provider that is not supported by us, it was made by the community and the same was true for the answerable collection. So always try to reference the latest and greatest because over the year things have changed and sometimes when you go for a search, you might find an outdated resource. They might work.37:49But they lose all the benefit of what we do, which is constant update, supporting the provider or the collection and so on. With that being said, it's every time we're talking about infrastructure as a code, the way I like to frame it is.38:09It's not easy to start, ok? It takes a little bit of time. It takes a little bit to go across the 1st step, the 1st hill you need to pass in order to get things done. Start with something simple.38:29Have access to an LLM, provide the context. That's my personal experience. It's like I was using an LLM to get some ideas for the demo. It was most mostly aspiring partner to get something as ideas.38:43And at certain point it gave me something that I didn't know exactly how to do it and he was able to provide me, hey, because the provider is installed on your machine, because the collection is installed on your machine, you can give me the exact expected input and expected output for this code. So I.39:00Can design for you exactly as it should be. A word of advice, always.39:20Use it for ideas, double check what is the output because we know how it goes. It's a bit of a different story, ok? Here we're talking about something that is reliable reliable and it's gonna execute always the same when we're talking about results from AI, they might vary and change over.39:26Over time even on the same prompt, so.39:46Again, it's a good way to go across if you have an idea, I used it a lot to get ideas on how to structure the files, ok? You can end up pretty quickly either too detailed where it's like, ok, I'm gonna have a specific Ansible playbook for each and every action that I.39:49Want to do, and then you have to maintain 20 of those and you realize that they're all doing the same, not the same thing, but they're valid for each and every action you're trying to take. So why not compress it down to a single file that is easier to read if you know it's always gonna be the same?40:09Which brings me to some use cases and this is actually you know what? We're gonna go into the demo 1st or NO NO, let's do this. Let's do this 1st. Let's do a couple of slides and then we're gonna jump into the demo demonstratively. So 1st and foremost.40:28What are the use cases? Automated deployment of new site with the similar configuration. This is definitely a place where Ansible and Terraform can help you with us like creating network claiming the device, configuring the gateway, configuring the switches, configuring the SSID, and definitely have.40:47Helping you reducing the manual error. Not only that.41:07These can help you with forcing you to define all the required information because if you think about it, you have to start a job that requires some input variables and you can say, hey, I need to have the IP address of the DHC.41:11AP server, I need to have the IP address of the DNS. I need to have the IP address of the radio server because I bake them into the job. So it's not gonna be like we're, we're gonna start when we have everything and that can also be used as a database for you for future reference to understand.41:31How things are, what you're missing, what is currently correctly defined, and so on. So if used into the process when we are designing this type of thing, it can help also having better documentation. And if you think about it, once you have it written, once again, you can automate.41:51Do you need to produce updated documentation with all the devices that are in your network, it's one click away because you have already that information. You don't have to go and fetch it into dashboard. You have it locally and you know that it is a hundred percent correct what it should look like.42:11You can contrast and compare to see if the actual deployment is, following those rules. The other good use case is a drift detection. So when you have a golden configuration as a baseline, this is what everything should look like. An ansible.42:31Platform can compare the live network with the baseline you define and if you want, automatically correct the deviation or as I said, bring in a human operator to make a decision.42:51One thing to keep in mind is Terraform has it built in with the concept of the state. You can achieve the same with Ansible, but Ansible plus Meraki, it requires you to do a little bit more work. We're gonna see it in the demo because it's gonna be one of the key part of what you need.43:05To keep in mind when choosing or when understanding what is best or even what you can do and how should you do it. And last but not least, probably the one that it was most useful in my experience is.43:24Compliance verification. There's always that case of like, oh, I need to make sure that is enabled everywhere and you're gonna do it, you're gonna do it manually, you're gonna maybe write a script that you can use to do that. But then somebody else will come along and they're like, oh, this is the compliance security off.43:41Is whatever, and what you can do is.44:01As we learn with programmability, once you've defined the structure, you can make it available to other and you can automate that compliance verification to send out an email every month with the list of everything that is compliant and everything that is not, you can offer them through a portal.44:04Easy graphical user interface. I'm gonna click a button, what is happening in the backend? I'm actually running Ansible and Terraform to perform the check and giving you the result.44:24And obviously this can be used to detect and report those known compliances and by the nature maintain security. Even better, if something changes, what you can do is.44:341st, review the deployment cycle to make sure that that new configuration item that is paramount for security that wasn't paramount for security, I don't know, a year ago, now it is you included in the deployment, and then you include that also in the compliance verification.44:50So you can run it once to make sure that it's applied everywhere and then included in the reporting structure whenever you need it.45:10And as we were talking about event driven, some of this thing can be automated on a timely basis, so you can be every day, every Sunday, every month, whatever it is, because it's running on a machine somewhere, but you can also react. So web.45:18For automation, use Webex to trigger playbook on a network event. This is true for.45:39Ansible and it allows you for immediate remediation. How do we do that? Well, somebody goes in, makes a change, you trigger a web book for somebody made a configuration change, and you're like, ok, I'm gonna know the network, I'm gonna know the configuration. I'm gonna have an associated playbook. You make a change, I run a playbook against you to.45:44Alert that change.46:04It could be aggressive, ok? So bear in mind it's a it's a system that some love because they want to make sure that, hey, there are some settings that I don't want anybody to change or that I want to be in a specific way or I want to be able to change them within minutes and maybe not everybody.46:06Aware of that and somebody's trying to change it back because it's seen something weird in the configuration.46:26I'm gonna run it against, you know, something changed. I'm gonna restore it right away. And obviously it's a nice way to integrate with chat operations, so again, it could be used to send a message to someone, it could be used to open a case, open the ticket, report it back via email.46:31You name it. So before the summary, let's have some fun. Let's stop having slides and let's review a little bit of what we could do. 1st and foremost, I need to move the Webex interface because in the way. Okay, hopefully you're seeing my screen.46:50We're gonna have on one end we're gonna have a shell that is pointing in this environment, I have a virtual machine that is running Terraform and Ansible for me.47:10And because I wanted to not just be about dashboard, I managed to be bringing some virtualized solution. In this case, it's proxmocks because it's free. I need for my home lab, but in general you're gonna see how we can ties into.47:21Configuring the network also configure services that are attached to the network with a single click. In the interest of time, I started with an already deployed network, but at the end of the demo, we're gonna try and redeploy it from scratch. So what's the situation right now? I went in.47:39I use Terraform. Terraform has a specific syntax that is called the plan. So.47:59You've defined your terraform script and if you do a plan, it will run. You can see here that we're running it with a parameter. I have a single network that I want to check, and you can see here that in my definition, I define each and every branch office should have a primary DNS.48:07Server, a secondary DNS server, a radio server dedicated and an internet page that should be available for everyone, as well as the appliance VLAN setting should be as I defined. I'm gonna have two wireless LAN, a corporate and a guest on SSID zero and one.48:27I want to make sure that the correct devices are claiming into the network, so I have the exact list of devices I'm expecting to be there and I'm also making a change to port five on the security appliance. That's for connectivity reason. It's not needed, but it was needed to work in my lab. And last but not least, I want to enable.48:47Right side VPN connection. So if we go in in here, we can see that the machines are running primary, secondary radius internet. I can go into my network and I can see that I have a branch office labeled as Milan, let me zoom in a little.49:07If I go and check, let's say 1st and foremost security oops, almost too fast security and as the one VPN status, we do have it connected to our hub location. If we.49:25Go in and we go for addressing and we do have a couple of VLANs. If VLANs are enabled, I have a corporate and a guest VLAN defined. The corporate network is enabled in VPN mode and the guest is obviously disabled. And I also have a couple of ssids, so let me go there.49:44New page loading. Here we go, the corporate employee wireless network and the Milan network. Now, because I really love Terraform to deploy virtual machine, this is what I use. So what I've assigned different tasks here. Terraform is doing.50:08The deployment of the virtual machine and the deployment of the network. Obviously, if I go in here and I do.50:28I make a change. Let's go somebody goes in, corporate guest, it's gonna be changed to enterprise with cloud application. I'm gonna save, what I can do is I'm gonna plan. If you remember what I said before, Terraform has a status file.50:36It knows that it shouldn't look like this. So hopefully, I'm gonna go in. It's gonna check all the things and hopefully it's gonna fail there. Here we go. It's giving me hey.50:54This is what it doesn't look like right. This is what is divergent from the the state file that I have. This is what I will do to bring it back. So plan is not only telling you the differences, but it's like if you apply these now, this is what I will.51:11No change. Bear in mind, in this case.51:31The plan is not doing anything, it's not changing anything, ok? It's giving you a snapshot of now. So it's telling you, hey, this is the current snapshot. If somebody goes in and change it again, different thing will happen. The other part that we have with Terraform is the apply command.51:36So again, it's gonna be the same, same script, but in this case is I'm not calling a different set of instruction. It's the same set of instruction, but with a different goal.51:55I'm not planning and I want to see, I want you to do things. And if we go and plan hopefully, it will give us exactly the same output, is everything else is ok so we know what's the status, nothing to do here, but I'm gonna.52:07Oh, I did a plan again, sorry. Apply. That's the beauty, same comment, same result. Unexpected. Here we have exactly the same output, but now I have to answer yes, I want you to apply.52:27By those changes, bring my infrastructure back to the status that it's supposed to be.52:47And here we have a very long output, ok? Don't don't get scared. It's like, hey, this is what I've done the configured, this is the change changes that I made. If I go here and refresh the page, you can see that corporate guest is back to.52:54Open. Now, bear in mind that everything I showed you right now with Terraform, you can do it with Ansible as well, but I needed a little bit of bridge to have a demo that will go over both. And also I wanted to showcase some of the things that for me, are easier with one ver.53:11Versus the other. As I said, Terraform to deploy.53:31Virtual machine is amazing, and that's why I used it because I wanted to have services. Services that by the way are up and running. If we go in here, this is the internet that is running on the machine. If I go on the DNS server and I try to resolve.53:35I don't know. I don't remember the name of this service, so you have to bear with me. I'm gonna have it later in the demo, but you can set the DNS server and see that it's responding. One thing though, we said we deployed the radio server, we deployed other stuff. If you go in and you will go to the corporate.53:55Employee.54:15Subnet, you will notice that nothing is defined. For demo purposes, I'm gonna use Ansible to make these changes. What's the idea here? I used it to deploy, and now I'm gonna use Ansible to define the structure. Why? Because I just don't.54:17I don't want to just go in and apply a DNS server. I want to configure the DNS server 1st. I want to make sure that it's working before applying it to my network. I don't want to be in a situation where, hey, DNS is down, nobody realized or I had to test it manually.54:36Who cares? Let's go in, ensure that the status is ok, ensure that the the DNS record are in place ensure that the radio server is configured and then let's move on to configure those parameter on my network. So what we're going.54:55To do here is ansible, because this is where the store, the files are stored. Ansible playbooks are called with the syntax Ansible playbook, the name of the playbook, and if you have some parameter. In this case, to keep the demo short, I'm just gonna work on the Milan office that.55:13But think of these as it could be a hundred of different sites.55:33And to keep the output short. So click we're gonna go through and we can see here what I defined in the task. I'm gonna show it to you later, but in general is I want the virtual machine to have SSH enabled. I want to connect to port 202I want to verify that some software is available. I want the machine to be up.55:38To date, I want the machine.55:58To have a specific announcement for DNS record. I want to install those records. I want to test those records so I can write a little bit of a, of a script here that is telling, hey, not only configure it, but see if the actual resolution with the outer word is working.56:00Once I've done this task on the 1st, on the primary DNS server, I want to do exactly the same on 2nd, and I want to do them one after the other. Because my idea was if I'm going into maintenance, if I need to change something, I want to make sure that one is always working.56:21When the other is making the updates or the changes that are required. I'm gonna go over, I'm gonna configure my internet server. What do I need? I need some kind of.56:40HTTP front end, so the page can load, I wanna make it reachable from a specific range of subnets and so on. And after that, I'm gonna move and configure the radio server. I'm gonna accept the request for the radio server from a specific subnet, the one where I'm.56:51Expected to have my.57:11Gatekeeper. So my access points and my switch. I want to configure some demo users cause that's what we're doing here and I want to make sure that the resolution is working at least if I'm using the radio server to resolve. So let's test that everything is working.57:14If it's working, we can move to the next step. The next step is applying the radio server to my, network is applying a specific DNS server to a specific subnet and so on. A little bit of a white lie here. We're gonna see it later. I've run these.57:32Before because it takes a little bit of time to perform all these tasks especially when it comes down to update the software on a virtual machine, downloading specific software. We have some time that I wanted to skip here, but we're gonna see it later if we have more time. You can see here it's been.57:52A few change and the local host, which is what's happening on the dashboard, it's it's what went through. So is if we go in, we can 1st check corporate employee.58:12Driving the data is now using interpret enterprise authentication with my radio server. If you scroll down, we have a radio server configured. We can test it. I do have what is and I'm gonna copy and paste the password because otherwise I'm gonna get wrong.58:31Here we go, ok, that's fast. We're gonna have the user. In this case, the radio server is sitting on the other side of the VPN tunnel. So once again, we see this powerful thing. I've deployed everything that I need in advance.58:51Once and now that I'm configuring it, it's just ready for me to go.59:11If the 1st step was unsuccessful, if I wasn't able to provision it in the 1st place, I will not be able to reach to this stage. I will not be here questioning myself why the radio server is not responding, if it wasn't enabled in the 1st place. And the ansible playbook does also that part.59:15Goes in and checks, is it is it available? Is it reachable? Does it have the correct IP address and so on? And it's all defined by perimeter, NO manual mistakes here. Last but not least, what I wanted to show you is if we go into the HCP page.59:35We now have a couple of servers here. So I specified for the corporate VLAN, we now have our custom DNS server. Again, just to show you what, can be done here, let's make a mistake. Let's change this. I'm gonna change it to upstream DNS and I'm.59:53Yeah, save.01:00:12Now, with ansible, what we can do is we can define a playbook to check for drifts. The challenging part when it comes down to this is you need to define the tasks. So the task will most likely be.01:00:15Something like, let me grab my editor. It's not super interesting, but it's in drift check.01:00:33To check. Okay, this is an ansible playbook as it looks like in the row form, I would say. What we're doing is we're gonna fetch some variable and then we have a series of tasks. So 1st we're gonna find the SSID number, we're gonna get the status of that SSID and then we're gonna.01:00:43Compute the drift. We're gonna see what has changed compared to what we're trying to do.01:01:04With the result. These must be defined by you, ok? With Terraform, you don't have that part because it has the state file while, Ansible doesn't, ok? So you need to be a little bit creative. This is a bit different this is just.01:01:09The side note, if you're doing it with other services, some provider because of some collection, because the the way they're designed or the way they work, they do have a check the option. So.01:01:29That's one of the main difference to keep in mind, especially if you go down the road of implementing something that is infrastructure as a code and you already have people that are experts into deploying and designing this thing. For Meraki, you need to be a bit more verbose of what you want actually to check. Because again, the main.01:01:44Goal here could be hey, there's an ID that I'm returning back.01:02:04And I don't care about that ID because it's something that it served a purpose in the system. Equals for me is the IP address of the radio server must be the same, but maybe in dashboard the same IP address on different network is stored with a different ID which we use to track.01:02:09Uniqueness but to you and to the end user, this information doesn't matter. So you need to define what you want to match.01:02:29In this case I have a dedicated playbook that I called Meraki drift check this is one option, so I go in and hopefully I have my page clear these and.01:02:38It's again, ansible playbook, Meraki drift check on the office of plan. And this is an actual good point that I want to make. Why not run it on everything? You've seen how long the playbook starts to get, ok? If you're in a situation where.01:02:53It's like, ok, I'm gonna check the servers, I'm gonna log in into the servers, then I'm gonna check the dashboards and because.01:03:12Ansible will execute each and every task, then it might do do do nothing if there's nothing to do. But it will still execute. So sometimes you want to cut time short and it's like, Oh I want to just do a configuration check for.01:03:20Meraki, ok? And write a shorter playbook I can ignore some of the parts. In this case, once again, we have the baseline, current DNS is set to upstream DNS. The expected is.ten and.eleven, we're we're we're away, we're away, we need to fix it.01:03:37Which options do we have to fix it? One option is.01:03:57We redeploy it because remember, it's important, so I can just go in and run it straight away again. It will ignore all the virtual machines that are already configured and then it will change the configuration and dashboard, which is nice, but it takes a little bit of time.01:04:01Or, and we can go back in here because as I said, all these things are connected to each other. We can do, e.g., I defined a playbook that is apply all, this just apply the changes to Meraki.01:04:17What is it? It's in fact applying the DNS and applying the radio server. And these are also called when I created in the 1st time. So I'm reusing the bits and definition that, you know, maybe I want to narrow down the scope and just hey apply DNS.01:04:34There's something very.01:04:54Small. It goes in, it checks for the configuration, it tests the DNS server 1st, and then if it's working, it applies the changes. So let's use the shortcut here, which is the apply all that we just seen.01:04:56And here we go. You can see here the tasks that are gonna say we're skipping the full part to the beginning where we were talking with virtual machines, ok? Because we don't care.01:05:18This is not what we want. Even better, I did have a playbook that I'm gonna have to search for it because I don't remember how it's called.01:05:35Which can help you on day two changes. We've configured everything. It's amazing. We need to do maintenance on the radio server, on the DNS. We need to change something. We need to revert it back to how it looked like on day zero. Remember, ja.01:05:49That's right after Terraform has applied and created that network. What you can do, well in this case, again, I've designed the playbook or you're gonna see it in action that is called.01:06:07Revert all. This goes in, it has two different playbooks in one in in yeah in one, one is reverting the DNS changes, so it's gonna bring it back to a status that is known which is used upstream DNS server and the same is gonna be for ready server. I'm gonna go in and remove it from.01:06:21The wireless ID definition. Before doing that though, I want to show you why working with both together could be a bit challenging, ok? This is a classic example. If I go back.01:06:40And I try to do a terraform plan now, the state will not match, ok? Because we've done something with Terraform and then we applied some changes. If we go in, we do a plan. What we're seeing is virtual machine and touch because we don't care too much right now.01:07:00And when I'm going and and check is like, hey, the radius is reported. Why we do not have a report on DNS server? Because we didn't tell Terraform to touch them at all.01:07:19A resource to end up in a terraform state file must be edited. So even if you want to use upstream DNS server, remember, these are declarative things. I want these to look like that. And if you do it or.01:07:34Over and over, you will find some corner cases. E.g., you configured SSID one, you configure SSID zero.01:07:54What about SSID three? Well, if you didn't tell terraform, hey, SSID three should look like disabled and with the name, don't touch this. Terraform will not put it in the state. So again, if we check in here and we go and modify SSID 457.01:08:02Then whatever it is. If it wasn't defined, Terraform will just ignore it because it's not part of the state file. So another thing to keep in mind, because as we said, we define everything the way we want it. It could be as easy as.01:08:22SID zero corp, SID one guest and all the other ssids should be disabled. Done. That that's enough. But if you don't touch a resource, it will never end up in the state file because Terraform is assuming.01:08:39Is not managing it, ok? Which brings me to what we were trying to do? Oh yeah, we were trying to 1st revert all the changes, so.01:08:57In this case let's go with the short screen, here we go. So this is my revert old that is just gonna attach.01:09:13Oh, NO, sorry. This is the revert all this is the day two. I have to do maintenance. What should I do? Well, I'm gonna go in and what it's gonna do is load the branch definition, fetch the networks, and then it will go in and revert things back office in the land.01:09:30From whatever you can see here, authentication mode, I don't care. I declare that these should be open now, is the same for the guest network is the same for the, the DNS, ok? So one we get the.01:09:49And it's reverting back to a known state where I can start operating on the network for maintenance, e.g.. If I need to restore it, it's as easy as.01:10:09Just to show you the, I can just redeploy. So in this case we reverted back to proxy DNS stream upstream and wireless access control.01:10:21It's not open or sorry, not open which brings me to the most amazing operation. No, the one that you want to be afraid of but it's, it's there what if you want to destroy the resources? Well, with ansible, again.01:10:41You need to define what you want to do. It's gonna be maybe I want this, this, this network to disappear, this ID to disappear and I want the serial number to not be associated to anything. Great, it will go back to the inventory. With terraform, we have a destroy command.01:11:01And we're gonna run it actually, I'm gonna give you a glimpse of what's gonna happen. So we run the destroy and what we're gonna see happening is virtual machine by virtual machine. I don't need them anymore. Hopefully.01:11:19No, sorry. It's gonna plan it ahead. It's gonna tell you, hey, these resources will be gone. Are you sure you want to do it? Yes. Cause I'm confident in my infrastructure as a code and I know that if I want to rebuild it.01:11:34It will take me minutes. I don't have to remember, ok? I just need to do it. You can see here all the virtual machines disappeared, 14 resources destroyed. If I refresh the branch office of Milan is now.01:11:50Gone, it's not there anymore and hopefully if I try to reload this page, maybe I need two cookies, it's cached. Okay, I'm not gonna start cleaning the cache now because it will forget all the passwords but you get the idea.01:12:07The beautiful machine where it was hosted, it doesn't exist anymore. So what should I do next? Well, again, in the interest of time, we're just gonna go and try and apply this. So once again, it will scan, it will notice that it doesn't have a state, this resource doesn't exist anymore. And.01:12:27You can see here, it's a pretty long report, but think about it, we are starting five virtual machines deploying one network, enabling auto VPN and self configure two ssids in a single go.01:12:47Now I'm gonna go with yes, and we're gonna hit a little bit of reality here. It takes a little bit of time to bring virtual machines up and running. But you can see here in one go virtual machines are being deployed, and I'm gonna wait for these machines to be.01:13:01Deployed before moving to the next step, which we're gonna let it cook in the background. I'm gonna bring you back to the presentation and hopefully when we're done with the closing part, I'm gonna be able to show you a little bit more of under, under the hood of of what is going on here.01:13:20So let me bring back the presentation. This was a little bit of a long demo and an overview, what are the key takeaways here? Which one, if you want to start using it tomorrow, which one do you want to start to use? Well.01:13:40We have different approaches here. The 1st one is, do I currently have the skill set in house for one or the other? If the answer is yes, that's probably gonna be the preferred resources. Are you currently using one of those for other tasks?01:13:59Remember that you can bring in the automation for dashboard as well. They can coexist. This was the main point of the demo and pick and choosing one if you don't have preference, if you don't have experience, it's down to what are the tasks that you want to automate and trust.01:14:16Me, the moment you start dipping into it.01:14:36It's gonna be like, Oh I can also do this. I can also do this. I can correlate so many pieces and the tool that is best suited for what you need will emerge. It's not in either or store, so as I showed you here, I'm personally using it because I have.01:14:40At my home lab. I do a lot of demos on the lab and you know what's the main problem? After I've done it, I don't remember which configuration I applied anywhere. Cause cause one demo is one for one customer, one demo was for a different scenario and those changes usually used to.01:15:00Hunt me. Okay, my camera had a moment. Can you still hear me? Hopefully yes. Oh, I didn't want to jinx it with the raining part, but hopefully, ok, everything is still good. Great. I had a bleed.01:15:19And.01:15:39Where was I? Yeah. The tool will merge in my home lab. I needed something to have a baseline. It's exactly what is that it's like I need a working network for all the changes, but every time I go through and make bits and changes, I want to be able to rebuild it in minute. So what I can do is I'm running.01:15:42Clean up everything and re redeploy the state that I want. It's nice. It's easy. It's super usable, even just for configuration drift checks when you're like, ok, I don't remember what I changed. I made a change two weeks ago for a demo.01:16:01I don't know if it's now impacting whatever I'm trying to do now because I don't remember how it was configured. Just one click away, ok? There is a little bit of the effort to maintain the machine and use terraform, but in general or ansible.01:16:18In general is amazing. The other thing is don't try and mix and match, ok? Even for minor changes usually infrastructure as a code goes a little bit of a philosophy, ok? We're gonna try and think.01:16:34Right away how any change could be implemented through this because this is the only way this could work. It's a bit nicer with ansible. Maybe you can use Ansible for some of the tasks, maybe compliance check and so on and maybe still do something manually, but if you.01:16:50Try to do a little bit too much of clickops and kind of use this as just the tool on the side you might end up in an inconsistency zones where you don't want to be. So it's a buy in that takes a little bit of time to speed up. It definitely has a lot of benefits especially for.01:17:09For large deployments.01:17:28But it's a thing that you need to put a little bit into your work philosophy of, can I, can I do it through these 1st, ok? Then minor changes you've seen, ok? I need to reconfigure a port for a day. Okay, you're not gonna write an Ansible playbook to do that and you're gonna do it and then you're gonna use Ansible to just make sure.01:17:30Sure that everything is safe and sound. Terraform keeps the state locally. We've seen it some of the good and some of the bed of this, so remember this and Ansible mutate the infrastructure. Again, we've seen some of the good and we've seen some of the beds. So it doesn't require the state, but because it doesn't know if you need to.01:17:50To do compliancy check, you need to tell Ansible what it should do in order to achieve that goal.01:18:10That goal, and also if you create long things, make sure you split it where it logically makes sense for you because maybe you don't want to recreate the virtual machine every time you need to recreate the network. With Ansible is as easy as define different blocks of code to do one or the other and have them chained to the.01:18:16Together in a series of events exactly the same with terraform. For resources, ok, benefits I mean we we spoken about it from the beginning, so I'm not gonna hammer this down anymore. Operational efficiency, faster deployment, risk reduction, scalable automation.01:18:36Configuration audit, you name it. In terms of the resources, I'm gonna pause here we go. There is a little bit of an introduction to Ansible and Terraform in our documentation, so if you want to get started from scratch, I'm gonna host one link, the.01:18:54Terraform one is right below, so.01:19:14And for terraform, I really hope there's the link here. No, for terraform, we also have a little bit of a lab, so if you want to have a play with it without having to install anything on your machine.01:19:21Here you are, you're welcome. You can do it right away. What else? Oh yes, we had a thing running, so here we go. While while we.01:19:37For chatting, we now have the virtual machine deployed. If we go in, the network is back, if I refresh the page, there we go.01:19:55Up and ready. And I'm gonna run another one just for the sake, but that's probably not gonna be in time. This is another part that I said I already deployed it because it takes a little bit of time in this case because we were configuring also the virtual machines there this virtual machine had just Linux on board, ok? The need.01:20:15Going, they need to.01:20:35Use APT get to fetch the software that is required to run the DNS server, it takes a little bit of time. So the real deployment time, if you will change the Terraform and Ansible together is a little bit less than 10 min, ok? I didn't want to.01:20:37Just have you look at me doing the thing, ok? So we're gonna run it in the background if there is still more time.01:20:57I'm just gonna show it to you later. But for today, this is all the content we had. So once again, if you have any question, I didn't see a lot coming through, but if you have something, let me know. I will stop the recording for today and actually let's stop the.01:21:03Recording to find a button.01:21:23You can stop. Here we go. Stop the recording and last bit just if you would be so kind, sounds like which he here but yeah we do we should have.01:21:29And hopefully I have the link for these very helpful. Here we go. If you will be so kind to let me know how it went, that would be very useful.01:21:49So again, if you have any additional questions, let me know. I did have, actually I'm gonna leave this up. Oh go. No, ok, so I'm gonna leave this up. I'm gonna use another browser to do a little bit of a search in the meantime, so if.01:22:06You want to do that and it's like, I wish I had it. No.01:22:26Let me try here. Yeah, definitely. Yes, example, this is a link that we already shared in the previous session. So there's also the example for session one two and three. The section three example are a bit lighter. Why? Because what I showed you to.01:22:45Today it obviously require an infrastructure, you need approximate server. You you need so many pieces to actually enjoy it.01:23:05I try to write a well commented small script that uses both Ansible and terraform. So if you want to start from somewhere, that's definitely a good starting point. The call to action still remains. Bear in mind if an API script takes a couple of hours to get something done minimal.01:23:13A workflow can take.01:23:33A day to get something done minimal infrastructure as good can take three or four days of approaching it, trying to find the best way to do it. My recommendation is always try it 1st. It's a journey that you can start whenever you want and it's gonna be beneficial.01:23:35Going to so you can definitely go in.01:23:55And start with a small approach, try and have the wow effect or bring in resources that know more about it, use a little bit of AI to just give you the right direction because here starting from the best.01:23:58Foundation will make deployment in the future and developing the future so much easier. They hit the word from person that started without having the right conversation that is like what I want to achieve, what's the business goal? And instead it's just, oh, I want to test the library I want to test.01:24:17Therefore and it started with that way.01:24:37And obviously, at a certain point you reach the moment where it's like, ok, I need to go back and and define stuff, ok? And with that in mind, I was able to design something that was more tied to my infrastructure, your infrastructure will be different. Your customer infrastructure will be different. So there is NO.01:24:39Golden rules, there is the ability to do things with automation infrastructure as a code and leverage all the benefit we've seen previously. Again, thank you so much. I haven't seen any.01:24:59Why is still coming through? So I'm gonna stop the screen sharing Apparently I can't. Okay, having a few issues stopping.01:25:19For sharing. So hopefully you had a pleasant time if you have ideas for.01:25:37Future session, please fill in the form Fill the form twice, I don't care, let us know because there's gonna be more to come and we want to be tied to what you think is best. Where do you need to learn more? Where do you need to know more about these types of interactions so.01:25:43Let me know, let us know. I'm not the only one that is doing this session, just as a reminder, they are available and they will be available later in the community. So if you go to the Cisco community, you search for EIS or there's plenty.01:26:03Video video session like this on different products on different solution. Sometimes on very small use cases that are super important and sometimes on broad resources that is how you best manage our specific platform. So.01:26:22I hope it was a good use of your time, and you got a glimpse of what can be done. As always, we're against time so 2 h are an hour and a half, is never, it's never enough.01:26:38

About this Video

Author : Cisco Customer Success

Uploaded : May 28, 2026

NetworkingMeraki
AI summary icon

AI summary

Discover how Cisco Infrastructure as Code streamlines Cisco Meraki deployments with Ansible and Terraform. The recording explains pros and cons, shows how to replace click ops with repeatable playbooks and plans, and demonstrates end-to-end automation: creating networks, claiming devices, configuring VLANs, SSIDs, firewall rules, and Auto VPN; integrating DNS and RADIUS; detecting drift; and triggering event-driven tasks with Webhooks. See the Cisco Meraki Ansible Collection and Cisco Meraki Provider for Terraform in action, including planning versus applying changes, state handling, and controlled rollbacks.

  • Learn to enable, deploy, and manage Infrastructure as Code for Meraki using the official Ansible Collection and Terraform Provider.
  • Improve reliability with consistent, repeatable changes, drift detection, and compliance verification across many networks.
  • Speed day one setup and day two operations with parameters, Webhooks, and safe rollbacks.