nautobot / nautobot-lab

All-in-one Docker container that allows a user to explore Nautobot in a lab environment.
Apache License 2.0
41 stars 13 forks source link

recent commit (4af4518) deletes mock data, why? #76

Closed pedro-nonfree closed 1 year ago

pedro-nonfree commented 1 year ago

Suddenly fixture/mock data disapparead with no reference to any issue or PR, so this issue serves to clarify it

I have seen it in this commit

https://github.com/nautobot/nautobot-lab/commit/4af4518a42a9a07c3fc884386d26893abcdcf5e5

I wanted to test that if anyway some mock data is in the container (TL DR; the answer is no)

docker run -itd --name nautobot -p 8000:8000 networktocode/nautobot-labs:
docker exec -it nautobot nautobot-server createsuperuser

which is

$ docker images | grep nautobot
networktocode/nautobot-lab                   latest                    c38a5d2afafa   5 days ago     1.48GB

and I don't see any mock data, and If I follow for example this outdated official(?) written article guide, says:

$ docker exec -it nautobot load-mock-data

OCI runtime exec failed: exec failed: unable to start container process: exec: "load-mock-data": executable file not found in $PATH: unknown

it also deprecates this outdated official video guide

is there any other up-to-date way to load mock data, I see that it could be useful to quickly test APIs and exports on data (without having to import on my own)

Thanks

jtdub commented 1 year ago

Hi @pedro-nonfree

The mock data was created from an early dataset and was dumped into the container as a Postgres SQL dump file. As Nautobot has matured, the SQL dump file has failed to import properly, which is a significant reason why nautobot-lab hasn't kept up with Nautobot releases.

There are a number of changes that will make Nautobot Lab easier to maintain.

  1. There are a number of plugins loaded by default. The device onboarding plugin is installed and can be used to quickly populate your Nautobot Lab instance with devices from your network. Nautobot SSoT will is also coming. Nautobot SSoT contains an example SSoT job that will enable you to sync data directly from demo.nautobot.com.
  2. A default demo account will be created. This account will have a default token as well. This can allow you to quickly test against nautobot lab with fewer administrative steps to get going.
  3. A Github Actions CI/CD workflow has been created to keep Nautobot Lab more closely in sync with Nautobot releases. It does this by comparing the latest Nautobot release to the latest Nautobot Lab docker image tag. If a newer image needs to be created, it will automatically create the newer image and push it to docker hub. This should keep Nautobot Lab versions in sync of Nuatobot releases within a 24 hour window.

I understand that losing mock data isn't ideal. For the sake of maintainability, it had to go away. However, we are going to be providing better options in the near future. The latest pull request, once merged will create the default account and add the SSoT plugin. Device onboarding currently exists.