Lab Overview
This learning lab introduces the Meraki Data Model and demonstrates how to deploy and manage it using Meraki as Code. The lab is designed to help users understand the key concepts, configurations, and operational aspects of Meraki as Code.
This document is a comprehensive guide to understanding Network as Code (NaC) which utilizes Infrastructure as Code (IaC) principles to manage configuration for Cisco Meraki Dashboard. The focus of this guide is specific to the Meraki as Code. The guide is structured to build a solid understanding of the concepts and toolchain required to deploy and operate Meraki environments, integrating Meraki as Code automation with a cloud-managed architecture.
There are several sections in this guide; each section focusing on different aspects. It includes practical examples, best practices, and detailed explanations to help you understand the concepts.
If you have no environment of your own, we can provide a limited lab available in dCloud. If you need the lab, please reach out in our Network as Code Public Webex Space or seek assistance from your Cisco contact to get access to the lab.
Guide details
Section titled “Guide details”This guide contains instructions to help you get started with the Meraki as Code learning lab. The lab focuses on deploying and managing Meraki configurations using Infrastructure as Code principles. The primary interface that is used in this guide is a web-based version of Visual Studio Code (known as Code Server). This takes the role of a development environment (IDE - Integrated Development Environment) that you will use to modify the data model for Network as Code.
You will find in the guide both reference material for learning and then direct Steps for you to follow. These steps can also include code snippets or CLI commands for you to copy and paste into your Code Server terminal. In the guide you will see elements as:
cd ~/network-as-code/meraki-as-codeThat you can copy and paste easily via the button that appears when you hover over the code snippet. There are also screenshots of specific elements, including Meraki Dashboard to guide you on specific tasks.
Some of these commands that you copy seem redundant, but are designed such that the command always works even if you have changed directories, or explored different parts of the directory structure.
The guide is intended to be directional. Each section of the guide will provide you builds towards the next section and are all connected. The best approach is to follow the guide in order.
You will need the following to complete the lab:
Section titled “You will need the following to complete the lab:”The next sections of the guide will go into the details of how you can set up your environment for Meraki as Code.
- IDE / Code Server: to modify the Network as Code data model.
- Installed tools: Git, Terraform (>=1.9.0), Python (3.12).
- SCM platform: GitLab, GitHub, or similar.
- Meraki API Key (full write access): no hardware required. Generate an API key using this guide.
- Optional: CI/CD platform such as GitLab Pipelines or Jenkins
Table of Contents
Section titled “Table of Contents”This table of contents provides a view of the different sections of the guide and the respective topics.
| Step | Topic | Description |
|---|---|---|
| 1 | Meraki as Code Toolset | This section provides an overview of the tools and technologies used in Meraki-as-Code. |
| 2 | Meraki as Code Setup | This section will go into the details of how you set up your environment for Meraki as Code. |
| 3 | Working with Meraki Data Model | This section explains how a data model is built and how it can be modified. As a Network engineer utilizing a declarative approach, the data model represents the primary focus area to define what is the intent of the configuration in the network. |
| 4 | Deploying Meraki as Code | Once you have created the data model that represents the intended configuration state for your Meraki networks, you will deploy that configuration to Meraki Dashboard so that it deploys the configuration. |
| 5 | Configure Everything as Code | Expand the data model with wireless, switch, and appliance configuration and deploy a fully configured network. |
| 6 | Challenge | A DIY exercise to build and deploy additional networks on your own using what you have learned so far. |
| 7 | Playground | Explore additional data model features on your own — SSIDs, firewall rules, content filtering, VPN, and more. |
| 8 | Understanding Remove | How to remove resources declaratively by deleting them from the data model and re-applying. |
| 9 | Working with Templates | Use templates and variables to define reusable configuration patterns and deploy them across multiple networks. |
| 10 | Overview of Automation Pipelines | Learn the fundamentals of CI/CD pipelines and how they automate validation, deployment, and testing. |
| 11 | Automation Pipelines with Meraki as Code | Set up a working GitLab CI/CD pipeline to validate, deploy, and test configuration changes automatically. |
| 12 | Lab Summary | Recap of what you accomplished across all 11 tasks. |