0

Aviatrix Sandbox Starter Tool - Local Machine Docker Option

Aviatrix Sandbox Starter Tool (SST) is a community-based and community-supported tool that deploys a small test/lab cloud network environment in minutes.

Everything is self-contained in a docker image. Users do not need to install anything besides a docker run time on a laptop/desktop/VM/instance.

The local machine option requires understanding Docker and its interaction with the underlying operating systems such as Mac, Windows, Linux, etc. It is recommended to Use the Cloud AMI version of the tool if you are new to Dockers.

Before You Run the Tool

To launch the Sandbox Starter Tool UI, run the following commands in the CLI console of your Windows/MAC/Linux machine

docker volume create TF
docker run -v TF:/root -p 5000:5000 -d aviatrix/sandbox-starter

Now browse to http://localhost:5000/ on your local machine, and then follow the step-by-step guided workflow.

For detailed instructions and screenshots, please follow the steps documented in the SandBox Starter Post.

 

This community-based and open-source tool is NOT supported by the Aviatrix Enterprise support team. For any questions or issues related to this tool, please use the Aviatrix Community platform.

Open Source

  1. Code for this open-source tool is available at https://github.com/AviatrixSystems/terraform-solutions/
  2. This tool is packaged as a container image that could run locally on the Windows/Linux/MACOS laptop/server/VM or EC2 instances. The container code is available here

Troubleshooting

The debug option or icon inside the UI will provide you necessary run-time logs.

Error Creating IAM Role/Policy

If you have previously deployed Aviatrix Controller under the same AWS account, you will receive the following errors. You need to manually remove those roles and policies before moving forward

Error: Error creating IAM Role aviatrix-role-ec2: EntityAlreadyExists: Role with name aviatrix-role-ec2 already exists.

Error: Error creating IAM Role aviatrix-role-app: EntityAlreadyExists: Role with name aviatrix-role-app already exists.

Error: Error creating IAM policy aviatrix-assume-role-policy: EntityAlreadyExists: A policy called aviatrix-assume-role-policy already exists. Duplicate names are not allowed.

Error: Error creating IAM policy aviatrix-app-policy: EntityAlreadyExists: A policy called aviatrix-app-policy already exists. Duplicate names are not allowed.

 

You can also check the UI API Status here
http://0.0.0.0:5000/api/v1.0/get-statestatus

ssh Inside the Container Image

shahzadali@shahzad-ali ~ % docker ps

CONTAINER ID   IMAGE                      COMMAND                  CREATED       STATUS       PORTS                    NAMES
befa145cc9ca   aviatrix/sandbox-starter   "/bin/sh -c 'python3…"   7 hours ago   Up 7 hours   0.0.0.0:5000->5000/tcp   amazing_tool
shahzadali@shahzad-ali ~ %

shahzadali@shahzad-ali /Users % docker exec -it amazing_tool bash
bash-5.0#

 

Delete Docker Volume

shahzadali@shahzad-ali ~ % docker volume remove TF
Error response from daemon: remove TF: volume is in use - [4a75b428ff5badf368f1dc9761c51b903652d8cfa4da70b2bdd543be3d352fea, 7f54de5c900d28d23ea61965423394534fe40dd769b20ff78f3a31c1fa98987d]
shahzadali@shahzad-ali ~ %

I had to run the following command to delete

shahzadali@shahzad-ali ~ % docker volume remove TF
Error response from daemon: remove TF: volume is in use - [7f54de5c900d28d23ea61965423394534fe40dd769b20ff78f3a31c1fa98987d, 4a75b428ff5badf368f1dc9761c51b903652d8cfa4da70b2bdd543be3d352fea]
shahzadali@shahzad-ali ~ % docker system prune
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all dangling images
  - all dangling build cache

Are you sure you want to continue? [y/N] y
Deleted Containers:
7f54de5c900d28d23ea61965423394534fe40dd769b20ff78f3a31c1fa98987d
4a75b428ff5badf368f1dc9761c51b903652d8cfa4da70b2bdd543be3d352fea
c6de98c3284e8afdf5cff8f9b45266acf1e4bebf34a2ce0f7a20aa92342a43e5
6227ecf90cf4100b1a1391038171e8ae5dd0cff4f3a7007e4f675360396913da

 

Important Docker CLI Commands

1. Find the container ID

$ docker ps 

2. Stop and delete the container

$ docker stop <id>
$ docker rm <id>

3. Remove the volume

$ docker volume rm TF

4. Create the volume and start a fresh container

$ docker volume create TF
$ docker run -v TF:/root -p 5000:5000 -d aviatrix/sandbox-starter

 

Getting Error that TCP Port 5000 is already in use

Pull completeStatus:
Downloaded newer image for aviatrix/sandbox-starter:1.1.0

docker: Error response from daemon: Ports are not available:
listen tcp 0.0.0.0:5000: bind: address already in use.

Run the following command to check the process using port 5000

~ % lsof -i tcp:5000

COMMAND   PID       USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 670 shahzadali   21u  IPv4 0xa6ecfd4163d72067      0t0  TCP *:commplex-main (LISTEN)
ControlCe 670 shahzadali   22u  IPv6 0xa6ecfd46304820cf      0t0  TCP *:commplex-main (LISTEN)

It shows the Apple Control Center is using this port. It is a known problem with the newer version of Mac OS and documented here https://developer.apple.com/forums/thread/682332

Apple introduced the "AirPlay Receiver" feature that listens on port 5000. You must disable it to run this command.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 6 mths agoLast active
  • 523Views
  • 1 Following