Skip to content

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.

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:

Terminal window
cd ~/network-as-code/meraki-as-code

That 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

This table of contents provides a view of the different sections of the guide and the respective topics.

StepTopicDescription
1Meraki as Code ToolsetThis section provides an overview of the tools and technologies used in Meraki-as-Code.
2Meraki as Code SetupThis section will go into the details of how you set up your environment for Meraki as Code.
3Working with Meraki Data ModelThis 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.
4Deploying Meraki as CodeOnce 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.
5Configure Everything as CodeExpand the data model with wireless, switch, and appliance configuration and deploy a fully configured network.
6ChallengeA DIY exercise to build and deploy additional networks on your own using what you have learned so far.
7PlaygroundExplore additional data model features on your own — SSIDs, firewall rules, content filtering, VPN, and more.
8Understanding RemoveHow to remove resources declaratively by deleting them from the data model and re-applying.
9Working with TemplatesUse templates and variables to define reusable configuration patterns and deploy them across multiple networks.
10Overview of Automation PipelinesLearn the fundamentals of CI/CD pipelines and how they automate validation, deployment, and testing.
11Automation Pipelines with Meraki as CodeSet up a working GitLab CI/CD pipeline to validate, deploy, and test configuration changes automatically.
12Lab SummaryRecap of what you accomplished across all 11 tasks.