Skip to main content
Glama

VyOS MCP Server

by danielbodnar
test-vyos-build-image.shโ€ข3.39 kB
#!/bin/bash # Script to test if vyos/vyos-build:current contains a functional VyOS system set -euo pipefail echo "๐Ÿ” Testing vyos/vyos-build:current for VyOS functionality..." # Test if the image contains VyOS components echo "๐Ÿ“ฆ Pulling docker.io/vyos/vyos-build:current..." podman pull docker.io/vyos/vyos-build:current echo "๐Ÿ”ง Testing VyOS components in build image..." podman run --rm docker.io/vyos/vyos-build:current bash -c ' echo "=== Checking for VyOS components ===" echo "VyOS configuration wrapper: $(test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper && echo "โœ… Found" || echo "โŒ Missing")" echo "VyOS init system: $(test -x /sbin/init && echo "โœ… Found" || echo "โŒ Missing")" echo "VyOS CLI: $(test -x /usr/bin/vtysh && echo "โœ… Found" || echo "โŒ Missing")" echo "VyOS API: $(test -f /usr/lib/python*/site-packages/vyos/http_api.py && echo "โœ… Found" || echo "โŒ Missing")" echo "VyOS HTTPS API: $(find /usr -name "*http*api*" -type f 2>/dev/null | head -3)" echo "" echo "=== Checking if we can start VyOS services ===" echo "Available in /sbin/: $(ls /sbin/ | grep -E "(init|vyos)" | head -5)" echo "Available VyOS services: $(ls /usr/libexec/vyos/ 2>/dev/null | head -5 || echo "Directory not found")" echo "" echo "=== System check ===" echo "OS Release: $(cat /etc/os-release 2>/dev/null | grep PRETTY_NAME || echo "No release info")" echo "VyOS version info: $(ls /usr/share/vyos/ 2>/dev/null || echo "No VyOS share directory")" ' echo "" echo "๐Ÿงช Testing if we can run VyOS init system..." CONTAINER_ID=$(podman run -d --privileged docker.io/vyos/vyos-build:current /sbin/init 2>/dev/null || echo "failed") if [[ "$CONTAINER_ID" != "failed" ]]; then echo "โœ… VyOS init started successfully!" echo "Container ID: $CONTAINER_ID" # Wait a moment for initialization sleep 10 echo "๐Ÿ” Checking if VyOS is running..." podman exec "$CONTAINER_ID" bash -c ' echo "Process tree:" ps aux | head -10 echo "" echo "VyOS config status:" if command -v vyos-configd >/dev/null 2>&1; then echo "โœ… VyOS config daemon available" else echo "โŒ VyOS config daemon not found" fi echo "" echo "Network interfaces:" ip link show | head -10 ' 2>/dev/null || echo "โŒ Failed to check VyOS status" echo "๐Ÿงน Cleaning up test container..." podman stop "$CONTAINER_ID" >/dev/null 2>&1 || true podman rm "$CONTAINER_ID" >/dev/null 2>&1 || true else echo "โŒ Failed to start VyOS init system" fi echo "" echo "๐Ÿ“‹ Test Results Summary:" echo "The docker.io/vyos/vyos-build:current image $(podman run --rm docker.io/vyos/vyos-build:current test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper && echo "DOES" || echo "does NOT") contain VyOS runtime components" echo "" echo "๐Ÿ’ก Recommendation:" if podman run --rm docker.io/vyos/vyos-build:current test -x /opt/vyatta/sbin/vyatta-cfg-cmd-wrapper >/dev/null 2>&1; then echo "โœ… The build image appears to contain VyOS! You can likely use it directly." echo " Try: podman run -d --privileged docker.io/vyos/vyos-build:current /sbin/init" else echo "โŒ The build image is just build tools. You need to build runtime image from ISO." echo " Use: sudo ./scripts/build-vyos-image.sh" fi

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielbodnar/vyos-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server