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

Add docs framework for how to clone a new DANDI instance #104

Open
wants to merge 79 commits into
base: master
Choose a base branch
from

Conversation

aaronkanzer
Copy link
Member

@aaronkanzer aaronkanzer commented Dec 1, 2023

Looking for review for now, no need to merge

These documents provide a step-by-step process if another user would like to launch their own Dandi-like ecosystem

please see here if you'd like to observe a live link: https://aquamarine-profiterole-e20e84.netlify.app/

or specifically:

https://lincbrain.github.io/handbook/40_initialization/

@jwodder
Copy link
Member

jwodder commented Dec 1, 2023

@aaronkanzer Why do the instructions say to create an account on PyPI? That should only be done if you're planning to release packages on PyPI, which has nothing to do with interacting with DANDI.

@kabilar
Copy link
Member

kabilar commented Dec 1, 2023

@aaronkanzer Why do the instructions say to create an account on PyPI? That should only be done if you're planning to release packages on PyPI, which has nothing to do with interacting with DANDI.

Hi @jwodder, These instructions are meant for the developers of the data archive and associated tools, especially for developing a new DANDI-like ecosystem which we are doing for the LINC project. Since the DANDI CLI and Python API are a method of interacting with the archive, Aaron added instructions here for releasing the Python package to PyPI. Hope this helps to answer your question.

@jwodder
Copy link
Member

jwodder commented Dec 1, 2023

@kabilar

Since the DANDI CLI and Python API are a method of interacting with the archive, Aaron added instructions here for releasing the Python package to PyPI.

Releasing what package? This sentence implies you'll be releasing dandi, which only four people can do, none of which are you.

@kabilar
Copy link
Member

kabilar commented Dec 1, 2023

@kabilar

Since the DANDI CLI and Python API are a method of interacting with the archive, Aaron added instructions here for releasing the Python package to PyPI.

Releasing what package? This sentence implies you'll be releasing dandi, which only four people can do, none of which are you.

Hi @jwodder, we are releasing a clone of the dandi client, as the lincbrain client for interacting with LINC datasets. (Please disregard the current semantic version as it will be deleted and released as 0.X.0.)

@aaronkanzer
Copy link
Member Author

aaronkanzer commented Oct 30, 2024

@satra @waxlamp @jwodder @jjnesbitt @mvandenburgh @asmacdo -- just wanted to bump this, any chance a quick read-through, feedback could occur?

The outcomes of this handbook will help inform what we automate/abstract into infra-as-code vs. what remains manual, thus any feedback is greatly appreciated

Comment on lines 5 to 17
• **Heroku**

• **AWS**

• **GitHub**

• **Terraform Cloud**

• **Netlify**

• **Sentry**

• **PyPI**
Copy link
Member

Choose a reason for hiding this comment

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

i think it would be good to add what each of these services provide to the infrastructure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks Satra -- included a brief blurb for what each service is responsible for

style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

Keep this value for further steps.
Copy link
Member

Choose a reason for hiding this comment

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

It would be valuable to know what sizes of instances we have for DANDI and LINC to guide installations of other instances.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure -- I can add, they are defined in the DANDI Infra api.tf Girder extension here: https://github.com/dandi/dandi-infrastructure/blob/master/terraform/api.tf#L14-L18

On this note, has any stress-testing ever been done to evaluate if these worker sizes are appropriate or not for DANDI?

style="width: 60%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
<br/><br/>

Your frontend should be able to deploy to an auto-generated URL via Netlify now! Steps for domain management and configuration are described further in the [Frontend Deployment](../64_dandi_archive/#frontend-deployment) section of these within the DANDI Archive setup.
Copy link
Member

Choose a reason for hiding this comment

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

Question came up on knowing how many minutes is needed by netlify for DANDI instance.

Copy link
Member Author

Choose a reason for hiding this comment

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

When you say minutes in this context for Netlify, do you mean "build minutes"? (e.g. how long Netlify runners are required to run to deploy?) Or something else?

First go to your `Account Settings`:

<br/><br/>
<img
Copy link

Choose a reason for hiding this comment

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

This image was a bit mis-leading when following the instructions. The image led us to believe we needed to go to our Heroku App -> Settings, however what we ended up needing to do was the following:

  • Click the Profile icon in the top right
  • Select "Account Settings" in the dropdown
  • Scroll to find the "API Key" section

Copy link
Member

Choose a reason for hiding this comment

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

Let's add docs on where to update the following components for the web app:

  1. Logos
  2. Favicon
  3. Central text
  4. Footer text/links
  5. Top navigation links

Copy link
Member

Choose a reason for hiding this comment

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

Let's add a section on how to handle database migrations.

Comment on lines +1 to +2
For data management (predominately `upload`, `download` and `validation` of data
to/from DANDI), a local CLI (command line interface) is used.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For data management (predominately `upload`, `download` and `validation` of data
to/from DANDI), a local CLI (command line interface) is used.
Data management including upload, download, and validation is handled through a local DANDI Client. The DANDI Client provides both a command line interface (CLI) and Python API.

f"http://{instancehost}:8085",
f"http://{instancehost}:8000/api",
),
"<your-dandi-clone>": DandiInstance( # Your own "dandi""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"<your-dandi-clone>": DandiInstance( # Your own "dandi""
"<your-dandi-clone>": DandiInstance( # Your own "dandi"


Resources

[Source code and instructions]( https://github.com/dandi/dandi-hub)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[Source code and instructions]( https://github.com/dandi/dandi-hub)
[Source code and instructions](https://github.com/dandi/dandi-hub)

- Getting Started: "59_getting_started_replicating_dandi.md"
- Initialize Vendor Accounts for DANDI: "60_initialize_vendors.md"
- DANDI Authentication: "61_dandi_authentication.md"
- DANDI CLI: "62_dandi_cli.md"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- DANDI CLI: "62_dandi_cli.md"
- DANDI Client: "62_dandi_cli.md"

@@ -40,6 +40,14 @@ nav:
- Notes: "40_development.md"
- REST API Swagger: https://api.dandiarchive.org/swagger
- REST API Redoc: https://api.dandiarchive.org/redoc
- Create DANDI Instance:
- Getting Started: "59_getting_started_replicating_dandi.md"
Copy link
Member

Choose a reason for hiding this comment

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

With this change, when a user selects Create DANDI Instance they will be directed to the "59_getting_started_replicating_dandi.md" page.

Suggested change
- Getting Started: "59_getting_started_replicating_dandi.md"
- "59_getting_started_replicating_dandi.md"

Comment on lines +1 to +2
The series of docs in this directory define how to create your own DANDI ecosystem.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The series of docs in this directory define how to create your own DANDI ecosystem.

For data management (predominately `upload`, `download` and `validation` of data
to/from DANDI), a local CLI (command line interface) is used.

## Referencing your API
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## Referencing your API
## Update the DANDI Client to reference your API

Comment on lines +46 to +56
## Handling Versioning

DANDI CLI leverages a tool called [versioneer](https://pypi.org/project/versioneer/) for semantic versioning in PyPI.

Upon merging of a PR into `main`, if a given GitHub label is attached to the PR (`major`, `minor` or `patch` specifically)
`versioneer` will generate a human-readable CHANGELOG entry, and then push to PyPI the proper new semantic version.





Copy link
Member

@kabilar kabilar Jan 7, 2025

Choose a reason for hiding this comment

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

I would suggest removing the documentation on versioneer and just linking to the developer instructions, which includes these details.

Suggested change
## Handling Versioning
DANDI CLI leverages a tool called [versioneer](https://pypi.org/project/versioneer/) for semantic versioning in PyPI.
Upon merging of a PR into `main`, if a given GitHub label is attached to the PR (`major`, `minor` or `patch` specifically)
`versioneer` will generate a human-readable CHANGELOG entry, and then push to PyPI the proper new semantic version.
## Resources
- [PyPI package](https://pypi.org/project/dandi/)
- [Source code](https://github.com/dandi/dandi-cli)
- [Developer instructions](https://github.com/dandi/dandi-cli/blob/master/DEVELOPMENT.md)

@@ -0,0 +1,57 @@
For data management (predominately `upload`, `download` and `validation` of data
to/from DANDI), a local CLI (command line interface) is used.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For your DANDI Archive clone, you do not need to create a clone of the DANDI Client. By following the instructions below, your users will be able to utilize the DANDI Client to interface with your DANDI Archive instance.

Comment on lines +41 to +44
**Note**: Users will be prompted for a `DANDI_API_KEY`
env. var [see here for code reference](https://github.com/dandi/dandi-cli/blob/6aa414c4db47394970f586cc4fb9758a634aef87/dandi/dandiapi.py#L492-L499)

You do not need to create a unique value here -- a user can just reference the `DANDI_API_KEY` their API issues in their respective clone.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
**Note**: Users will be prompted for a `DANDI_API_KEY`
env. var [see here for code reference](https://github.com/dandi/dandi-cli/blob/6aa414c4db47394970f586cc4fb9758a634aef87/dandi/dandiapi.py#L492-L499)
You do not need to create a unique value here -- a user can just reference the `DANDI_API_KEY` their API issues in their respective clone.
## Access credentials
Users will be prompted for a `DANDI_API_KEY`
environment variable. This variable does not need to be unique to your DANDI clone. A user can just set their `DANDI_API_KEY` to the value that your DANDI API clone issues. See docs on [storing access credentials](https://www.dandiarchive.org/handbook/13_upload/#storing-access-credentials).

}
```

Once your DANDI clone is added to list of available `DandiInstance` objects, you should be able to perform operations via the `-i` flag -- for example:
Copy link
Member

@kabilar kabilar Jan 7, 2025

Choose a reason for hiding this comment

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

Suggested change
Once your DANDI clone is added to list of available `DandiInstance` objects, you should be able to perform operations via the `-i` flag -- for example:
Once your DANDI clone is added to the list of available `DandiInstance` objects, you should be able to perform operations via the `-i` flag. For example:


• **AWS**

Provides storage buckets, as well as domain management, for resources across the DANDI ecosystem
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Provides storage buckets, as well as domain management, for resources across the DANDI ecosystem
Provides storage buckets, as well as domain management, for resources across the DANDI ecosystem. As well as the services (Kubernetes, etc.) for deploying the JupyterHub.

@kabilar kabilar self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

7 participants