Skip to content

Commit 663bb07

Browse files
authored
Merge pull request dandi#104 from lincbrain/ak-dandi-init
Add docs to clone a new DANDI instance
2 parents ca16905 + ef923f2 commit 663bb07

File tree

109 files changed

+1095
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1095
-20
lines changed

.github/workflows/publishdocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- name: Deploy docs
1616
uses: mhausenblas/mkdocs-deploy-gh-pages@master
1717
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
local_data
77

88
site/
9+
venv/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Documentation for interacting with the DANDI Archive.
66
Follow the guidelines below when creating and revising text in the DANDI Docs:
77

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

31-
After that you can either
31+
After that you can either
3232
- do one time manual build using `mkdocs build` and find built website under `site/` folder.
33-
- 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.
33+
- 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.

docs/10_using_dandi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To view a specific public Dandiset and download one of its files:
3737

3838
4. From the right side of the Dandiset landing page, click FILES to see a list of all folders and files for that
3939
Dandiset. Click the download icon <img
40-
src="../img/download_file_icon.png"
40+
src="../img/download_file_icon.jpg"
4141
alt="download_file_icon"/> to download a
4242
specific file.
4343
**Note:** To download an entire Dandiset, you will need to follow the instructions in the

docs/11_view.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on `PUBLIC DANDISET` to access all Dandisets currently available
77
in the archive, and you can sort them by name, identifier, size, or date of modification.
88

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

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

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

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

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

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

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

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

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

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

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

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

8282
<img
83-
src="../img/my_dandiset.png"
83+
src="../img/my_dandiset.jpg"
8484
alt="my_dandiset"
8585
style="width: 7
8686
0%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>

docs/12_download.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ On the landing page of each Dandiset, you can find `Download` button on the righ
1010
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).
1111

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

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

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

docs/59_overview.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Overview and Architecture
2+
3+
The series of docs in this directory define how to create your own DANDI ecosystem (i.e. a clone of the entire DANDI ecosystem).
4+
It is suggested that you briefly read through each of the documents in this guide before starting.
5+
6+
This section provides a high-level view of how DANDI’s core components fit together in a typical “full stack” deployment.
7+
8+
## The Big Picture
9+
10+
The DANDI platform is essentially composed of:
11+
12+
1. **Storage**: S3 buckets (AWS) where data actually resides.
13+
2. **API**: A Django/Resonant-based backend application (hosted on Heroku) that handles the DANDI data model, user authentication, and orchestrates S3 interactions.
14+
3. **Frontend**: A Vue-based web application (hosted on Netlify) for users to browse, search, and manage data in the archive.
15+
4. **Workers**: Celery workers (also on Heroku) for asynchronous tasks such as file checksum calculations, analytics, and housekeeping.
16+
5. **Observability**: Log aggregation and alerting (Heroku logs, optional additional logs), plus Sentry for error-tracking and notifications.
17+
6. **Infrastructure-As-Code**: Terraform scripts that glue everything together—AWS (S3, Route53, etc), Netlify, Heroku, etc.
18+
19+
These services interconnect as follows:
20+
21+
<img
22+
src="../img/client_requests.jpg"
23+
alt="client_requests"
24+
style="width: 90%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
25+
26+
* The user (or script) interacts with the **Web UI** or the **DANDI CLI**.
27+
* The **Web UI** calls into the **API** (over HTTPS).
28+
* The **API** queries or updates metadata in its Postgres DB (hosted on Heroku).
29+
* The **API** calls AWS S3 to read/write DANDI assets.
30+
* Certain heavy-lift or background tasks get queued into Celery tasks, handled by the **Workers**.
31+
* 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.
32+
* Large chunks of data can be streamed from S3 directly to the Client via presigned URLs
33+
34+
## Key Components
35+
36+
<img
37+
src="../img/deployment.jpg"
38+
alt="dandi_deployment"
39+
style="width: 90%; height: auto; display: block; margin-left: auto; margin-right: auto;"/>
40+
41+
42+
### 1. AWS S3 Storage
43+
44+
* **Primary Storage**: S3 buckets are the primary storage of the data (Zarr, NWB, etc.).
45+
* **Configured via terraform**: Bucket creation, IAM policies, route to logs, etc., are specified in `terraform/*.tf`.
46+
Provides storage buckets, as well as domain management, for resources across the DANDI ecosystem
47+
48+
### 2. Heroku
49+
50+
Provisions the servers, worker processes, and the database for the API.
51+
52+
1. **API**: Django, extended by [Resonant](https://github.com/kitware-resonant/terraform-heroku-resonant), provides REST endpoints for metadata, asset management, versioning, and authentication.
53+
2. **Postgres**: Stores user metadata, dandiset metadata, and references to S3 objects.
54+
3. **Workers (Celery)**: Offload long-running tasks (checksums, analytics, zarr validation, etc.).
55+
56+
### 3. Netlify (UI)
57+
58+
* **Frontend server**: Serves a static build of the DANDI Archive frontend (Vue.js).
59+
* **Autodeployment**: On each push or merge to `main` (or whichever branch is configured), Netlify automatically builds and deploys.
60+
* **Configuration**:
61+
- **`netlify.toml`**: Describes build commands, environment variables for staging vs. production.
62+
- **`.env.production`**: Holds the environment variables for the Vue-based app at runtime (e.g. `VITE_API_URL`, `VITE_SENTRY_DSN`).
63+
64+
### 4. Terraform Infrastructure
65+
66+
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.
67+
68+
* **Repo**: The [`dandi-infrastructure`](https://github.com/dandi/dandi-infrastructure) repo.
69+
* **Terraform Cloud**: Used to plan or apply changes after you push commits to the infrastructure repo.

0 commit comments

Comments
 (0)