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 to clone a new DANDI instance #104

Merged
merged 99 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 94 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
53ec1e3
Build out docs for Linc clone
Nov 20, 2023
ad50c71
progress
Nov 20, 2023
9e3af87
a bit more progress
Nov 20, 2023
0f0360d
progress x2
Nov 20, 2023
a4b12f5
more progress on docs
Nov 22, 2023
7747ac9
more progress
Nov 22, 2023
4c27961
bump docs again
Nov 22, 2023
52dc753
tf section
Nov 24, 2023
0c77256
build out netlifty section
Nov 28, 2023
7592ad6
Sentry included
Nov 28, 2023
026121b
include pypi docs
Nov 28, 2023
77d7599
Merge pull request #1 from lincbrain/ak-docs
aaronkanzer Nov 29, 2023
c648e1d
more bumps
Nov 29, 2023
eaa0495
Merge branch 'master' into ak-test
Nov 29, 2023
2e8931a
Merge pull request #2 from lincbrain/ak-test
aaronkanzer Nov 29, 2023
f0e5e80
include more specific token
Nov 29, 2023
7fb9a07
Merge pull request #3 from lincbrain/ak-token
aaronkanzer Nov 29, 2023
c5682f0
Attempt with personal token instead
Nov 29, 2023
c357ca2
bump value
Nov 29, 2023
aca1611
Trivial change for personal token
Nov 29, 2023
f07b04c
Merge pull request #4 from lincbrain/ak-personal-2
aaronkanzer Nov 29, 2023
1473cce
Provide draft readme for dandi ecosystem replication
Dec 1, 2023
a10f216
cleanup for dandi pr
Dec 1, 2023
7fbaf32
cleanup x2
Dec 1, 2023
b14568a
whoops
Dec 1, 2023
8a4b9ff
cleanup x3
Dec 1, 2023
47ce471
Minor requirements bump to have mkdocs work
Jan 18, 2024
75fb959
more organization
Apr 8, 2024
1ecdafa
temp push
Apr 11, 2024
8d3ad40
merge main into ak-dandi-init
Apr 11, 2024
5af0e2e
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
a91bfd7
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
df3cc6c
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
b76d178
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
0f76cc7
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
d5dfac1
Update docs/40_initialization.md
aaronkanzer Apr 11, 2024
9361359
rename and reorganize files
Apr 11, 2024
1f2d7b8
More updates and outlines for future docs
Apr 11, 2024
bec7c29
Update outlines
Apr 11, 2024
f694167
minor update
Apr 11, 2024
bd96080
more seutp
Apr 11, 2024
4ec5d96
simplify
Apr 11, 2024
71c92b2
more progress on auth
Apr 18, 2024
9c2ec5c
more updates
Apr 18, 2024
67c4ad2
more progress on docs
Apr 18, 2024
3bc3fcc
more updates for superuser
Apr 18, 2024
a485fab
bump more progress
Apr 18, 2024
980d785
more archive updates
Apr 18, 2024
4c6876c
include allowed host section
Apr 18, 2024
c292b51
include approved users section
Apr 19, 2024
e0409db
minor cleanup
Apr 19, 2024
9d40f4f
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
9c24ec6
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
b07a695
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
71505db
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
754169a
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
52d48d5
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
61e4ad1
Update docs/61_dandi_authentication.md
aaronkanzer Apr 19, 2024
ebb7d33
Update mkdocs.yml
aaronkanzer Apr 19, 2024
dfb655c
bump docs
Apr 19, 2024
38cd078
more dandi infra org
Apr 22, 2024
2711cc5
continued progress on infra docs
Apr 23, 2024
ee02544
more progresS
Apr 23, 2024
8b5ed44
more infra docs
Apr 23, 2024
fb591c0
more infra docs
Apr 23, 2024
7f7951a
more progress
Apr 24, 2024
135cd36
more progress
Apr 24, 2024
ca76ae8
begin CLI docs
Apr 24, 2024
ddab9dd
temp bump on cli page
Apr 24, 2024
6bc3c70
resolve codespell
May 7, 2024
7dea59b
include section about dandi cache table
Oct 22, 2024
6c717d6
more progress on docs
Oct 25, 2024
f536a38
mini update
Oct 25, 2024
5ffc98e
merge upstream
Oct 25, 2024
32502ee
Remove neuroglancer docs for now for simplicity
Oct 25, 2024
d6a7c0c
include changes per some reviews
Oct 31, 2024
3ce4235
fix codespell
Oct 31, 2024
887bb46
Updates per review by Sandy Hider
Nov 6, 2024
fce80c7
Bump docs for CLI handling for clones
Nov 27, 2024
a744f82
Apply some suggestions from code review
yarikoptic Feb 12, 2025
3838b82
Add overview/architecture docs
asmacdo Feb 10, 2025
86b5c14
Merge pull request #9 from asmacdo/architecture-docs
aaronkanzer Feb 14, 2025
9004544
include logo description
Feb 14, 2025
0c048cf
Merge branch 'ak-dandi-init' of https://github.com/lincbrain/handbook…
Feb 14, 2025
a9adaef
push updates per Kabi's review
Feb 14, 2025
b0b8561
More updates per Kabi's review
Feb 14, 2025
44adf1c
remove unnecessary images for pypi
Feb 14, 2025
bd9571a
Include heroku dyno and add on docs
Feb 14, 2025
00e4706
Merge branch 'master' into ak-dandi-init
yarikoptic Feb 14, 2025
3390f4b
Apply suggestions from code review
satra Feb 17, 2025
1a38a50
update all png to jpg in docs
Feb 18, 2025
9b10133
update mkdocs logo
Feb 18, 2025
4e75f38
Merge branch 'ak-dandi-init' of https://github.com/lincbrain/handbook…
Feb 18, 2025
3dc1823
Updates from Kabi's most recent updates
Feb 18, 2025
ee76e1f
Various minor tune ups from code review
yarikoptic Feb 18, 2025
5843b54
replace proper logo, updates per Kabi's updates
Feb 18, 2025
13214e0
Merge branch 'ak-dandi-init' of https://github.com/lincbrain/handbook…
Feb 18, 2025
5314e7d
Update docs/59_overview.md
kabilar Feb 18, 2025
ef923f2
Update docs/60_initialize_vendors.md
kabilar Feb 18, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/publishdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
local_data

site/
venv/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Documentation for interacting with the DANDI Archive.
Follow the guidelines below when creating and revising text in the DANDI Docs:

* **dandi-** repositories — hyphenate the names of DANDI GitHub repositories (e.g. **dandi-archive**); "Dandisets" is an exception because it is a
complete word
complete word
* **Dandiset** — use single, unformatted, capitalized word (**not** dandiset or `Dandiset`)
* file names — use lower case (e.g. **development.md**)
* headings — use Title Capitalization (for 1st and 2nd levels) and follow with an intro sentence
Expand All @@ -28,6 +28,6 @@ If you would like to render it locally, you would need to create and configure a
And your current session would already be using that virtual Python environment, which you could deactivate by executing `deactivate` command.
If in the future you would need to activate it, just `source venv/bin/activate` again.

After that you can either
After that you can either
- do one time manual build using `mkdocs build` and find built website under `site/` folder.
- run `mkdocs serve` which would not only build website and start a local webserver for you to visit rendered version at e.g., http://0.0.0.0:8000/, but also it would automatically re-build if you change any source markdown or configuration file.
- run `mkdocs serve` which would not only build website and start a local webserver for you to visit rendered version at e.g., http://0.0.0.0:8000/, but also it would automatically re-build if you change any source markdown or configuration file.
2 changes: 1 addition & 1 deletion docs/10_using_dandi.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To view a specific public Dandiset and download one of its files:

4. From the right side of the Dandiset landing page, click FILES to see a list of all folders and files for that
Dandiset. Click the download icon <img
src="../img/download_file_icon.png"
src="../img/download_file_icon.jpg"
alt="download_file_icon"/> to download a
specific file.
**Note:** To download an entire Dandiset, you will need to follow the instructions in the
Expand Down
14 changes: 7 additions & 7 deletions docs/11_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on `PUBLIC DANDISET` to access all Dandisets currently available
in the archive, and you can sort them by name, identifier, size, or date of modification.

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

Expand All @@ -18,7 +18,7 @@ return a subset of all Dandisets, while `"mouse house"` will likely not return a
word is used as an `OR`.

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

Expand All @@ -27,7 +27,7 @@ When you click on one of the Dandisets, you can see that the searching phrase ca
appear in the description, keywords, or in the assets summary.

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

Expand All @@ -40,7 +40,7 @@ metadata provided by the owners such as contact information, description, licens
a summary of the Dandiset including information about species, techniques, and standards.

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

Expand All @@ -54,7 +54,7 @@ found by clicking `Metadata` on the right-side panel. For Dandiset owners, this
adding relevant metadata to populate the landing page.

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

Expand All @@ -64,7 +64,7 @@ The right side panel allows you also to access a file browser to navigate the li
in a Dandiset.

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

Expand All @@ -80,7 +80,7 @@ services that can open the file. *Note:* that these services often have size lim
If you log in as a registered user, you will also see `My Dandisets` tab:

<img
src="../img/my_dandiset.png"
src="../img/my_dandiset.jpg"
alt="my_dandiset"
style="width: 7
0%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
Expand Down
4 changes: 2 additions & 2 deletions docs/12_download.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ On the landing page of each Dandiset, you can find `Download` button on the righ
button, you will see the specific command you can use with DANDI Python CLI (as well as the information on how to download the CLI).

<img
src="../img/web_dandiset_rsp_download.png"
src="../img/web_dandiset_rsp_download.jpg"
alt="web_dandiset_rsp_download"
style="width: 30%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>

Expand All @@ -20,7 +20,7 @@ style="width: 30%; height: auto; display: block; margin-left: auto; margin-righ
The right-side panel of the Dandiset landing page allows you also to access the list of folders and files.

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

Expand Down
69 changes: 69 additions & 0 deletions docs/59_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Overview and Architecture

The series of docs in this directory define how to create your own DANDI ecosystem (i.e. a clone of the entire DANDI ecosystem).
It is suggested that you briefly read through each of the documents in this guide before starting.

This section provides a high-level view of how DANDI’s core components fit together in a typical “full stack” deployment.

## The Big Picture

The DANDI platform is essentially composed of:

1. **Storage**: S3 buckets (AWS) where data actually resides.
2. **API**: A Django/Resonant-based backend application (hosted on Heroku) that handles the DANDI data model, user authentication, and orchestrates S3 interactions.
3. **Frontend**: A Vue-based web application (hosted on Netlify) for users to browse, search, and manage data in the archive.
4. **Workers**: Celery workers (also on Heroku) for asynchronous tasks such as file checksum calculations, analytics, and housekeeping.
5. **Observability**: Log aggregation and alerting (Heroku logs, optional additional logs), plus Sentry for error-tracking and notifications. TODO(asmacdo) verify
6. **Infrastructure-As-Code**: Terraform scripts that glue everything together—AWS S3 resources, Netlify or domain DNS, Heroku apps, etc.

These services interconnect as follows:

<img
src="../img/client_requests.jpg"
alt="client_requests"
style="width: 90%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>

* The user (or script) interacts with the **Web UI** or the **DANDI CLI**.
* The **Web UI** calls into the **API** (over HTTPS).
* The **API** queries or updates metadata in its Postgres DB (hosted on Heroku).
* The **API** calls AWS S3 to read/write DANDI assets.
* Certain heavy-lift or background tasks get queued into Celery tasks, handled by the **Workers**.
* Domain names, certificates, and load-balancing records are handled by AWS Route 53 or Netlify’s DNS, depending on whether it’s the API subdomain or the apex domain for the UI.
* Large chunks of data can be streamed from S3 directly to the Client via presigned URLs

## Key Components

<img
src="../img/deployment.jpg"
alt="dandi_deployment"
style="width: 90%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>


### 1. AWS S3 Storage

* **Primary Storage**: S3 buckets are the primary storage of the data (Zarr, NWB, etc.).
* **Configured via terraform**: Bucket creation, IAM policies, route to logs, etc., are specified in `terraform/*.tf`.
Provides storage buckets, as well as domain management, for resources across the DANDI ecosystem

### 2. Heroku

Provisions the servers, worker processes, and the database for the API.

1. **API**: Django, extended by [Resonant](https://github.com/kitware-resonant/terraform-heroku-resonant), provides REST endpoints for metadata, asset management, versioning, and authentication.
2. **Postgres**: Stores user metadata, dandiset metadata, and references to S3 objects.
3. **Workers (Celery)**: Offload long-running tasks (checksums, analytics, zarr validation, etc.).

### 3. Netlify (UI)

* **Frontend server**: Serves a static build of the DANDI Archive frontend (Vue.js).
* **Autodeployment**: On each push or merge to `main` (or whichever branch is configured), Netlify automatically builds and deploys.
* **Configuration**:
- **`netlify.toml`**: Describes build commands, environment variables for staging vs. production.
- **`.env.production`**: Holds the environment variables for the Vue-based app at runtime (e.g. `VITE_API_URL`, `VITE_SENTRY_DSN`).

### 4. Terraform Infrastructure

The single source of truth for spinning up or tearing down resources such as S3 buckets, IAM users, Route 53 DNS, Heroku pipeline config, Netlify domain config, etc.

* **Repo**: The [`dandi-infrastructure`](https://github.com/dandi/dandi-infrastructure) repo.
* **Terraform Cloud**: Used to plan or apply changes after you push commits to the infrastructure repo.
Loading