Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme new user updates #95

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ The reason it was chosen over Makefile was due to our collective familiarity wit

This repo is designed to provide a custom build of Nautobot to include a set of plugins which can then be used in a development environment or deployed in production. Included in this repo is a skeleton Nautobot plugin which is designed only to provide a quick example of how a plugin could be developed. Plugins should ultimately be built as packages, published to a PyPI style repository and added to the poetry `pyproject.toml` in this repo. The plugin code should be hosted in their own repositories with their own CI pipelines and not included here.

Are you installing Nautobot for the first time to locally try out the application? After installing Poetry and Docker, jump down to [Getting Started](#getting-started) for a step-by-step guide to install the application.

If you want to play with a cloud instance, you can always access [the Nautobot Demo Instance](https://demo.nautobot.com/) online.

## Install Docker

Before beginning, install Docker and verify its operation by running `docker run hello-world`. If you encounter any issues connecting to the Docker service, check that your local user account is permitted to run Docker. **Note:** `docker` v1.10.0 or later is required.
Expand Down Expand Up @@ -184,6 +188,8 @@ The installation of plugins has a slightly more involved getting-started process

## Super User Account

If you are testing the application locally, you will need to create a super user below in order to authenticate to the application, even if the credential files are already created from the previous steps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify what you mean by "even if the credential files are created from previous step"? I believe the super user will be automatically created upon initial startup if the appropriate environment variables are set.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jdrew82 ,

It is probably a user education or user error issue on my part then. From what I can tell the environment variables are set, from updating the creds.env:

(nautobot-docker-compose-py3.10) nautobot-docker-compose$ invoke cli
Running docker compose command "ps --services --filter status=running"
Running docker compose command "exec nautobot bash"
nautobot@ba2e8f2e492b:~$ echo $NAUTOBOT_CREATE_SUPERUSER
True
nautobot@ba2e8f2e492b:~$ echo $NAUTOBOT_SUPERUSER_NAME
admin
nautobot@ba2e8f2e492b:~$ echo $NAUTOBOT_SUPERUSER_PASSWORD
admin
nautobot@ba2e8f2e492b:~$ exit
exit
(nautobot-docker-compose-py3.10) nautobot-docker-compose$ docker container ls
CONTAINER ID   IMAGE                                    COMMAND                  CREATED         STATUS                   PORTS                              NAMES
ec1ce64c3b57   yourrepo/nautobot-docker-compose:local   "sh -c 'nautobot-ser…"   9 minutes ago   Up 9 minutes (healthy)   8080/tcp, 8443/tcp                 nautobot-docker-compose-celery_worker-1
ba2e8f2e492b   yourrepo/nautobot-docker-compose:local   "/docker-entrypoint.…"   9 minutes ago   Up 9 minutes (healthy)   0.0.0.0:8080->8080/tcp, 8443/tcp   nautobot-docker-compose-nautobot-1
c7e1c41a9ad0   redis:6-alpine                           "docker-entrypoint.s…"   9 minutes ago   Up 9 minutes             6379/tcp                           nautobot-docker-compose-redis-1
c752cb76df2f   postgres:13-alpine                       "docker-entrypoint.s…"   9 minutes ago   Up 9 minutes (healthy)   5432/tcp                           nautobot-docker-compose-db-1
(nautobot-docker-compose-py3.10) nautobot-docker-compose$

But when I try to authenticate into the web UI with admin / admin, I also tried nautobot/nautobot, I get "Please enter a correct username and password. Note that both fields may be case-sensitive." I added that statement because the only way I could get authentication to work was with the manual invoke createsuperuser command.

I can remove this portion of the update to the README though, and just focus on the flow update.


### Create Super User via Environment

The Docker container has a Docker entry point script that allows you to create a super user by the usage of Environment variables. This can be done by updating the `creds.env` file environment option of `NAUTOBOT_CREATE_SUPERUSER` to `True`. This will then use the information supplied to create the specified superuser.
Expand Down