annotations:
  - border_color: "#00000000"
    border_style: ""
    color: "#808080FF"
    rotation: 0
    text_bold: false
    text_content: |-
      Inside interface:
      192.168.100.1
    text_font: monospace
    text_italic: false
    text_size: 12
    text_unit: pt
    thickness: 1
    type: text
    x1: -280.0
    y1: 80.0
    z_index: 1
  - border_color: "#00000000"
    border_style: ""
    color: "#808080FF"
    rotation: 0
    text_bold: false
    text_content: |-
      VLAN 1:
      192.168.100.100
    text_font: monospace
    text_italic: false
    text_size: 12
    text_unit: pt
    thickness: 1
    type: text
    x1: -80.0
    y1: 80.0
    z_index: 3
  - border_color: "#00000000"
    border_style: ""
    color: "#808080FF"
    rotation: 0
    text_bold: false
    text_content: 192.168.100.102
    text_font: monospace
    text_italic: false
    text_size: 12
    text_unit: pt
    thickness: 1
    type: text
    x1: 240.0
    y1: -40.0
    z_index: 5
  - border_color: "#00000000"
    border_style: ""
    color: "#808080FF"
    rotation: 0
    text_bold: false
    text_content: 192.168.100.103
    text_font: monospace
    text_italic: false
    text_size: 12
    text_unit: pt
    thickness: 1
    type: text
    x1: 240.0
    y1: 280.0
    z_index: 6
  - border_color: "#00000000"
    border_style: ""
    color: "#808080FF"
    rotation: 0
    text_bold: false
    text_content: 192.168.100.101
    text_font: monospace
    text_italic: false
    text_size: 12
    text_unit: pt
    thickness: 1
    type: text
    x1: 240.0
    y1: -240.0
    z_index: 7
smart_annotations: []
nodes:
  - boot_disk_size: null
    configuration:
      - name: default
        content: System Bridge
    cpu_limit: null
    cpus: null
    data_volume: null
    hide_links: false
    id: n0
    image_definition: null
    label: ext-conn-0
    node_definition: external_connector
    parameters: {}
    ram: null
    tags: []
    x: -600
    y: 0
    interfaces:
      - id: i0
        label: port
        mac_address: null
        slot: 0
        type: physical
  - boot_disk_size: null
    configuration: []
    cpu_limit: null
    cpus: null
    data_volume: null
    hide_links: false
    id: n1
    image_definition: null
    label: unmanaged-switch-0
    node_definition: unmanaged_switch
    parameters: {}
    ram: null
    tags: []
    x: -440
    y: 0
    interfaces:
      - id: i0
        label: port0
        mac_address: null
        slot: 0
        type: physical
      - id: i1
        label: port1
        mac_address: null
        slot: 1
        type: physical
      - id: i2
        label: port2
        mac_address: null
        slot: 2
        type: physical
      - id: i3
        label: port3
        mac_address: null
        slot: 3
        type: physical
      - id: i4
        label: port4
        mac_address: null
        slot: 4
        type: physical
      - id: i5
        label: port5
        mac_address: null
        slot: 5
        type: physical
      - id: i6
        label: port6
        mac_address: null
        slot: 6
        type: physical
      - id: i7
        label: port7
        mac_address: null
        slot: 7
        type: physical
  - boot_disk_size: null
    configuration:
      - name: ios_config.txt
        content: |-
          Building configuration...

          Current configuration : 1084 bytes
          !
          ! Last configuration change at 13:47:40 UTC Fri Jun 27 2025
          !
          version 17.15
          service timestamps debug datetime msec
          service timestamps log datetime msec
          !
          hostname router-1
          !
          boot-start-marker
          boot-end-marker
          !
          !
          no logging console
          no aaa new-model
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          ip domain name cml.local
          ip cef
          login on-success log
          no ipv6 cef
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          memory free low-watermark processor 80093
          !
          !
          spanning-tree mode rapid-pvst
          !
          !
          username cisco privilege 15 password 0 cisco
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          interface Ethernet0/0
           ip address dhcp
          !
          interface Ethernet0/1
           ip address 192.168.100.1 255.255.255.0
          !
          interface Ethernet0/2
           no ip address
           shutdown
          !
          interface Ethernet0/3
           no ip address
           shutdown
          !
          ip forward-protocol nd
          !
          !
          ip http server
          ip http secure-server
          ip ssh bulk-mode 131072
          no logging btrace
          !
          !
          !
          control-plane
          !
          !
          !
          line con 0
           exec-timeout 0 0
           logging synchronous
          line aux 0
          line vty 0 4
           session-timeout 10
           exec-timeout 0 0
           login local
           transport input ssh
          !
          !
          !
          !
          interface Ethernet0/0
           ip nat outside
          !
          interface Ethernet0/1
           ip nat inside
          !
          access-list 1 permit 192.168.100.0 0.0.0.255
          !
          ip nat inside source list 1 interface Ethernet0/0 overload
          !
          end
    cpu_limit: 60
    cpus: null
    data_volume: null
    hide_links: false
    id: n2
    image_definition: iol-xe-17-15-01
    label: router-1
    node_definition: iol-xe
    parameters: {}
    ram: null
    tags: []
    x: -240
    y: 0
    interfaces:
      - id: i0
        label: Loopback0
        mac_address: null
        type: loopback
      - id: i1
        label: Ethernet0/0
        mac_address: null
        slot: 0
        type: physical
      - id: i2
        label: Ethernet0/1
        mac_address: null
        slot: 1
        type: physical
      - id: i3
        label: Ethernet0/2
        mac_address: null
        slot: 2
        type: physical
      - id: i4
        label: Ethernet0/3
        mac_address: null
        slot: 3
        type: physical
  - boot_disk_size: null
    configuration:
      - name: ios_config.txt
        content: |-
          Building configuration...
          Current configuration : 1083 bytes
          !
          ! Last configuration change at 13:51:18 UTC Fri Jun 27 2025
          !
          version 17.15
          service timestamps debug datetime msec
          service timestamps log datetime msec
          !
          hostname switch-1
          !
          boot-start-marker
          boot-end-marker
          !
          !
          no logging console
          no aaa new-model
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          ip audit notify log
          ip audit po max-events 100
          ip cef
          login on-success log
          no ipv6 cef
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          !
          memory free low-watermark processor 79593
          !
          !
          spanning-tree mode rapid-pvst
          spanning-tree extend system-id
          !
          !
          vlan internal allocation policy ascending
          !
          vlan 1
           name default
          !
          !
          !
          !
          interface Ethernet0/0
           switchport mode access
          !
          interface Ethernet0/1
           switchport mode access
          !
          interface Ethernet0/2
           switchport mode access
          !
          interface Ethernet0/3
           switchport mode access
          !
          interface Vlan1
           ip address 192.168.100.100 255.255.255.0
           no shutdown
          !
          ip forward-protocol nd
          !
          !
          ip http server
          ip http secure-server
          ip ssh bulk-mode 131072
          !
          no logging btrace
          !
          !
          !
          control-plane
          !
          !
          !
          line con 0
           exec-timeout 0 0
           logging synchronous
          line aux 0
          line vty 0 4
           exec-timeout 0 0
           login
           transport input ssh
          !
          !
          end
    cpu_limit: 75
    cpus: null
    data_volume: null
    hide_links: false
    id: n3
    image_definition: ioll2-xe-17-15-01
    label: switch-1
    node_definition: ioll2-xe
    parameters: {}
    ram: null
    tags: []
    x: -40
    y: 0
    interfaces:
      - id: i0
        label: Loopback0
        mac_address: null
        type: loopback
      - id: i1
        label: Ethernet0/0
        mac_address: null
        slot: 0
        type: physical
      - id: i2
        label: Ethernet0/1
        mac_address: null
        slot: 1
        type: physical
      - id: i3
        label: Ethernet0/2
        mac_address: null
        slot: 2
        type: physical
      - id: i4
        label: Ethernet0/3
        mac_address: null
        slot: 3
        type: physical
  - boot_disk_size: 8
    configuration:
      - name: iosxe_config.txt
        content: |-
          # this is a shell script which will be sourced at boot
          hostname server-1
          # configurable user account
          USERNAME=cisco
          PASSWORD=cisco
          # no password for tc user by default
          TC_PASSWORD=cisco

          # Apply network configuration directly since /opt is read-only during boot
          # Configure eth0 with static IP
          ifconfig eth0 192.168.100.101 netmask 255.255.255.0 up

          # Add default route
          route add default gw 192.168.100.1

          # Set up DNS
          echo "nameserver 1.1.1.1" > /etc/resolv.conf
          echo "nameserver 8.8.8.8" >> /etc/resolv.conf
    cpu_limit: 74
    cpus: null
    data_volume: 8
    hide_links: false
    id: n4
    image_definition: server-tcl-15-0
    label: server-1
    node_definition: server
    parameters: {}
    ram: 1024
    tags: []
    x: 320
    y: -200
    interfaces:
      - id: i0
        label: eth0
        mac_address: null
        slot: 0
        type: physical
  - boot_disk_size: 4
    configuration:
      - name: node.cfg
        content: |-
          # This is a shell script which will be sourced at boot
          hostname client-1
          # Configure /etc/network/interfaces for static IP
          cat << EOF > /etc/network/interfaces
          auto lo
          iface lo inet loopback

          auto eth0
          iface eth0 inet static
              address 192.168.100.102
              netmask 255.255.255.0
              gateway 192.168.100.1
          EOF

          # Configure /etc/resolv.conf for nameservers
          echo "nameserver 1.1.1.1" > /etc/resolv.conf
          echo "nameserver 8.8.8.8" >> /etc/resolv.conf

          # Commit changes for persistence across reboots (Alpine specific)
          lbu commit -d "Initial network configuration"

          # Restart networking service to apply changes
          rc-service networking restart
    cpu_limit: 50
    cpus: 1
    data_volume: 2
    hide_links: false
    id: n5
    image_definition: alpine-desktop-3-20-3
    label: client-1
    node_definition: desktop
    parameters: {}
    ram: null
    tags: []
    x: 320
    y: 0
    interfaces:
      - id: i0
        label: eth0
        mac_address: null
        slot: 0
        type: physical
  - boot_disk_size: 4
    configuration:
      - name: user-data
        content: |-
          #cloud-config
          hostname: ubuntu-te
          manage_etc_hosts: True
          system_info:
            default_user:
              name: cisco
          password: cisco
          chpasswd: { expire: False }
          ssh_pwauth: True
          ssh_authorized_keys:
            - your-ssh-pubkey-line-goes-here
          packages:
            - python3
            - python3-pip

          runcmd:
            - [ sh, -c, 'if [ ! -d /data ]; then mkdir -p /data; fi' ]
            - [ sh, -c, 'if ! blkid /dev/vdb | grep -q TYPE; then mkfs.ext4 -F /dev/vdb; fi' ]
            - [ sh, -c, 'if ! grep -q "/dev/vdb" /etc/fstab; then echo "/dev/vdb /data ext4 defaults 0 2" >> /etc/fstab; fi' ]
            - [ mount, -a ]
            - [ chown, 'cisco:cisco', '/data' ]
            - [ chmod, '755', '/data' ]
            - [ apt-get, update ]
            - [ apt-get, install, -y, 'ca-certificates', 'curl', 'gnupg', 'lsb-release' ]
            - [ sh, -c, 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg' ]
            - [ sh, -c, 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null' ]
            - [ apt-get, update ]
            - [ apt-get, install, -y, 'docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-buildx-plugin', 'docker-compose-plugin' ]
            - [ mkdir, -p, '/data/docker' ]
            - [ sh, -c, 'echo "{\"data-root\": \"/data/docker\"}" > /etc/docker/daemon.json' ]
            - [ systemctl, enable, docker ]
            - [ systemctl, restart, docker ]
            - [ usermod, -aG, docker, cisco ]
            - [ su, -c, 'newgrp docker', cisco ]

          # Optional: Create a welcome message for students
          write_files:
            - path: /data/README.txt
              content: |
                Welcome to your CML Ubuntu Lab Node!
                
                This system has two storage areas:
                - Root filesystem (/): 4GB for OS and system files
                - Data volume (/data): 6GB for your projects, files, and Docker containers
                
                Docker is pre-installed and configured to use /data for container storage.
                You can store your lab work in /data to avoid filling up the root filesystem.
                
                Useful commands:
                - df -h                    # Show disk usage
                - du -sh /data/*           # Show space used in data directory
                - docker system df         # Show Docker disk usage
                - docker system prune      # Clean up unused Docker resources
                
                Docker usage:
                - All Docker images and containers are stored in /data/docker
                - The 'cisco' user can run Docker commands without sudo
                - Log out and back in after first boot to use Docker
                
                Happy learning!
              owner: cisco:cisco
              permissions: '0644'
      - name: network-config
        content: |-
          network:
            version: 2
            ethernets:
              ens2:
                dhcp4: false
                addresses:
                  - 192.168.100.103/24
                gateway4: 192.168.100.1
                nameservers:
                  addresses:
                    - 1.1.1.1
                    - 8.8.8.8
    cpu_limit: 90
    cpus: null
    data_volume: 6
    hide_links: false
    id: n6
    image_definition: null
    label: ubuntu-te
    node_definition: ubuntu
    parameters: {}
    ram: null
    tags: []
    x: 320
    y: 200
    interfaces:
      - id: i0
        label: ens2
        mac_address: null
        slot: 0
        type: physical
      - id: i1
        label: ens3
        mac_address: null
        slot: 1
        type: physical
      - id: i2
        label: ens4
        mac_address: null
        slot: 2
        type: physical
      - id: i3
        label: ens5
        mac_address: null
        slot: 3
        type: physical
      - id: i4
        label: ens6
        mac_address: null
        slot: 4
        type: physical
links:
  - id: l0
    n1: n0
    n2: n1
    i1: i0
    i2: i0
    conditioning: {}
    label: ext-conn-0-port<->unmanaged-switch-0-port0
  - id: l1
    n1: n2
    n2: n1
    i1: i1
    i2: i1
    conditioning: {}
    label: router-1-Ethernet0/0<->unmanaged-switch-0-port1
  - id: l2
    n1: n3
    n2: n2
    i1: i1
    i2: i2
    conditioning: {}
    label: switch-1-Ethernet0/0<->router-1-Ethernet0/1
  - id: l3
    n1: n4
    n2: n3
    i1: i0
    i2: i2
    conditioning: {}
    label: server-1-eth0<->switch-1-Ethernet0/1
  - id: l4
    n1: n5
    n2: n3
    i1: i0
    i2: i3
    conditioning: {}
    label: client-1-eth0<->switch-1-Ethernet0/2
  - id: l5
    n1: n6
    n2: n3
    i1: i0
    i2: i4
    conditioning: {}
    label: ubuntu-te-ens2<->switch-1-Ethernet0/3
lab:
  description: ""
  notes: ""
  title: ThousandEyes_Splunk
  version: 0.3.0
