Skip to content

Commit

Permalink
more updates for superuser
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Apr 18, 2024
1 parent 67c4ad2 commit 3bc3fcc
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 2 deletions.
58 changes: 56 additions & 2 deletions docs/64_dandi_archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,72 @@ This `Procfile` shouldn't need to be changed or reconfigured much for a DANDI-cl

## Understanding metrics and logging via Heroku

Heroku provides observability in a very convenient manner. If you'd like to see what is happening with your app in real-time, simply access the options shown in the image below

<br/><br/>
<img
src="../img/metrics_heroku.png"
alt="metrics_heroku"
style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

### Configuring email alerts via Heroku

Heroku will send relevant updates for any concerning behavior/downtime/etc. to your email. Be sure to configure this, as it is a manual step.

You'll find options in the `Access` tab

<br/><br/>
<img
src="../img/members_heroku.png"
alt="members_heroku"
style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

## Creating a Django "superuser" (Admin) Account

Django has the concept of a `superuser` -- essentially an `administrator` user type. For steps such as [setting up authentication for DANDI Archive](../61_dandi_authentication/#creating-sites-and-social-app-in-dandi-archive-admin-panel)
you'll need to set up a `superuser` account.

Go into your Heroku app, and identify the `Run Console` option:

<br/><br/>
<img
src="../img/heroku_console.png"
alt="heroku_console"
style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

Initialize a `bash` session

<br/><br/>
<img
src="../img/heroku_bash.png"
alt="heroku_bash"
style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

Once in the console, run a quick `ls` to ensure that you can see the `manage.py` file. The `manage.py` file is Django's entrypoint to a handful of management commands.

You'll now want to create a `superuser`

<br/><br/>
<img
src="../img/heroku_user.png"
alt="heroku_user"
style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

You'll be prompted to create a user -- **Note: use an email that is not associated with your GitHub account, as GitHub is the default authentication provider for DANDI Archive**.

To do one final test, try using your credentials to log into the Django Admin panel -- it should be located at `/admin` for your API, such as `your-apps-domain.com/admin`

You are all set here!

## Updating Allowed Hosts

## Referencing Authentication credentials from migrations

## Deployment Strategy via Heroku's Procfile

## Approval of Users

## Setting up Staging Environments
Binary file added docs/img/heroku_bash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/heroku_console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/heroku_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/members_heroku.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/metrics_heroku.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3bc3fcc

Please sign in to comment.