When Nautobot was launched, there were many discussions at Network to Code about how we can provide an extremely easy-to-use method to evaluate Nautobot. Many ideas were tossed around. Ultimately, what we came up with was an all-in-one Docker container. This all-in-one Docker container is Nautobot Lab. With Nautobot Lab, users are able to spin up the latest instance of Nautobot, with a single command, for the purpose of testing.
Nautobot Lab is solely meant for testing purposes. Please don’t use this in production.
Docker and an internet connection are the only requirements for getting up and running with Nautobot Lab.(1)
To get up and running, execute:
docker run -itd --name nautobot -p 80:8000 networktocode/nautobot-lab
% docker run -itd --name nautobot -p 80:8000 networktocode/nautobot-lab Unable to find image 'networktocode/nautobot-lab:latest' locally latest: Pulling from networktocode/nautobot-lab 5d3b2c2d21bb: Already exists 3fc2062ea667: Already exists 75adf526d75b: Already exists 424c5c49d5c0: Pull complete ca0c078a819d: Pull complete fb02a8250b81: Pull complete 407b0386dc7d: Pull complete 8b0b961aec8a: Pull complete 5d3421b113f0: Pull complete 5610e5f6a271: Pull complete d7297f338d60: Pull complete 4be78aaa6e76: Pull complete Digest: sha256:df50523954c64ad239ac12bd680c8f07090b676443ba164aee5fd6d794b2e303 Status: Downloaded newer image for networktocode/nautobot-lab:latest 7df9757b7115ed9858f860f0755acb15bebf6c24c659040719ea81e947e8b0fe
Getting started with Nautobot is as easy as executing
docker run
.
That’s it! This single command will download the latest Nautobot Lab Docker container from Docker Hub and launch the container in the background. It will take a few seconds to download the container from the internet. Then, it will take 30 seconds for the container to start all the services; PostgreSQL, Redis, Nautobot, and Nautobot Worker. Once all the services are up and stable, Nautobot is ready for action.
To verify that Nautobot Lab is up and running, execute:
docker ps -a | grep nautobot
% docker ps -a | grep nautobot 7df9757b7115 networktocode/nautobot-lab "/usr/local/bin/supe…" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:80->8000/tcp nautobot
The (healthy)
flag is an acknowledgment that all services have started and are healthy. At this point, launch your favorite web browser and navigate to http://localhost
.
By default, Nautobot Lab will not come with any accounts or data pre-loaded. We assume that you will want to load in data from your own environment to evaluate Nautobot. Thus, to log in, you will need to create a Super User with the nautobot-server
command. This can be accomplished by executing:
docker exec -it nautobot nautobot-server createsuperuser
% docker exec -it nautobot nautobot-server createsuperuser Username (leave blank to use 'root'): demo Email address: info@networktocode.com Password: Password (again): Superuser created successfully.
Once a Super User has been created, you can log in and kick the tires.
If you just want to get Nautobot running with minimal effort, we provide an option to load a mock dataset into your Nautobot Lab instance. Be aware that doing this will DESTROY all existing data in the database and re-create it with the mock data. Loading the mock data will create a default username of demo and a default password of nautobot.
WARNING Loading the mock dataset will destroy the existing database and recreate it with the mock data.
The login credentials for the mock dataset are username:demo and password:nautobot
To do this, execute:
docker exec -it nautobot load-mock-data
This will populate a complete dataset so that you can start interacting with Nautobot immediately.
% docker exec -it nautobot load-mock-data NOTICE: drop cascades to 103 other objects DETAIL: drop cascades to table django_migrations drop cascades to table django_content_type drop cascades to table auth_permission drop cascades to table auth_group drop cascades to table auth_group_permissions drop cascades to table auth_user drop cascades to table auth_user_groups drop cascades to table auth_user_user_permissions drop cascades to table django_admin_log drop cascades to table extras_configcontext drop cascades to table extras_relationship drop cascades to table extras_tag drop cascades to table extras_webhook drop cascades to table extras_webhook_content_types drop cascades to table extras_taggeditem drop cascades to table extras_status drop cascades to table extras_status_content_types ... OMITTED FOR BREVITY ... ALTER TABLE ALTER TABLE ALTER TABLE ALTER TABLE
To stop the Nautobot Lab container, simply execute:
docker stop nautobot
This will stop the Nautobot Lab container, but any changes that were made will remain intact.
When you’re ready to restart the container, execute:
docker start nautobot
This will restart the existing container and allow you to pick up where you left off.
When your evaluation has completed, execute:
docker rm -f nautobot
The docker rm -f
command will stop the container if it’s running and will remove the container process. Any changes that were made will be lost at this point.
Want to modify Nautobot Lab for your own evaluation use case? Or just want to see how the container is built under the hood? Feel free to fork the Nautobot Lab Github repository. Have an idea that could make Nautobot Lab better? Open an issue or implement the changes yourself and open a pull request.
Evaluating software with a wide breadth of requirements shouldn’t be difficult. Simplifying the evaluation process was our main goal with Naubot Lab. We believe that goal has been met. We welcome and encourage community contributions and feedback. Chat with us in the #nautobot
channel in the Network to Code Slack workspace.
Share details about yourself & someone from our team will reach out to you ASAP!