Skip to content

Commit

Permalink
Rewrote to 'diataxis by feature'
Browse files Browse the repository at this point in the history
nais/system#63

Co-authored-by: Johnny Horvi <johnny@horvi.no>
  • Loading branch information
tronghn and jhrv committed May 15, 2024
1 parent a0234c6 commit 196d0a8
Show file tree
Hide file tree
Showing 253 changed files with 2,889 additions and 2,354 deletions.
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /bin/bash
set -e

rm -rf ./out ./docs-base
mkdir -p ./out ./docs-base
Expand All @@ -10,6 +11,7 @@ for TENANT in $@;
do
rm -rf ./docs
cp -r ./docs-base ./docs
cp -rf ./tenants/$TENANT/* ./docs
cp -rf ./tenants/$TENANT/* ./docs || true
TENANT=$TENANT poetry run mkdocs build --strict -d out/$TENANT
done

17 changes: 17 additions & 0 deletions docs/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
nav:
- "":
- explanations
- tutorials
- "":
- workloads
- build
- authentication
- observability
- persistence
- security
- Other services: services
- "":
- operate
- "":
- tags.md
- ...
59 changes: 24 additions & 35 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,46 @@
hide:
- feedback
- footer
- toc
---

<style> // hides the edit button on the start-page
.md-typeset h1,
<!-- This hides the edit button on the start page -->
<style>
.md-content__button {
display: none;
}
</style>

# NAIS Documentation
# :wave: **Welcome to the NAIS developer documentation!**

<div class="grid cards" markdown>
- :seedling: **Getting Started?**
Here you'll find _explanations_[^1], _how-to guides_[^2], and _references_[^3] for all things NAIS.

---
- Initially it's a good idea to learn about [what NAIS is](./explanation/nais.md) to get an idea of the fundamentals.
- Once you're familiar with the basic concepts, move on to the [Hello NAIS](./tutorial/hello-nais/hello-nais-1.md) tutorial to get your first app running.
### :seedling: **New to NAIS?**

</div>
Start here to get an idea of the fundamentals.

<div class="grid cards" markdown>
- :rocket: **Tutorials**

---

Learning-oriented lessons that take you through a series of steps to complete a project. Most useful when you want to get started with NAIS.

[:octicons-arrow-right-24: Tutorials](tutorial/README.md)

- :dart: **How-to guides**

---

Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.
- :ok_hand: [**What is NAIS?**](explanations/nais.md)
- :student: [**Your first application; Hello NAIS**](tutorials/hello-nais.md)

[:octicons-arrow-right-24: How-to guides](how-to-guides/README.md)

- :bulb: **Explanation**

---

Big-picture explanations of higher-level concepts. Most useful when you want to understand how NAIS works.

[:octicons-arrow-right-24: Explanations](explanation/README.md)
</div>

- :books: **Reference**
### :technologist: **Already familiar with NAIS?**

---
What can we help you with today?

Reference documentation for the NAIS platform. Most useful when you need to look up details about a specific feature.
<div class="grid cards" markdown>

[:octicons-arrow-right-24: Reference](reference/README.md)
- :package: [**Run your code**](workloads/README.md)
- :rocket: [**Build and deploy your code**](build/README.md)
- :open_file_folder: [**Store your data**](persistence/README.md)
- :closed_lock_with_key: [**Authenticate your users**](security/auth/README.md)
- :telescope: [**Gain insight into your workloads**](observability/README.md)
- :wrench: [**Manage your workloads and services**](operate/README.md)
- :heavy_plus_sign: [**Explore the rest of NAIS**](services/README.md)

</div>

[^1]: an :bulb: [_explanation_](tags.md#explanation) presents higher-level concepts. Most useful when you want to understand how NAIS works.
[^2]: a :dart: [_how-to guide_](tags.md#how-to) helps you achieve a specific goal. Most useful when you're trying to get something done.
[^3]: a :books: [_reference_](tags.md#reference) contains technical descriptions and specifications. Most useful when you need to look up details about a specific feature.
1 change: 1 addition & 0 deletions docs/authentication/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hide: true
1 change: 1 addition & 0 deletions docs/authentication/machines/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Machines
1 change: 1 addition & 0 deletions docs/authentication/users/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Users
5 changes: 5 additions & 0 deletions docs/build/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: Build and deploy
nav:
- README.md
- 🎯 How-To: how-to
- ...
25 changes: 25 additions & 0 deletions docs/build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
tags: [build, deploy, explanation, services]
---

# Build and deploy

To make your application available to others, you need to build and deploy it.

NAIS attempts to make this as simple as possible by providing a set of composable [GitHub Actions](https://docs.github.com/en/actions).

Use these actions to compose your own build and deploy pipeline through [Github Actions workflows](https://docs.github.com/en/actions/using-workflows).

## GitHub Actions

:books: [nais/docker-build-push](https://github.com/nais/docker-build-push)

:books: [nais/deploy](https://github.com/nais/deploy/tree/master/actions/deploy)

See the respective GitHub Action links for detailed configuration options.

## What's next

:dart: [Build and deploy with Github Actions](how-to/build-and-deploy.md)

:dart: [Set up auto-merge with Dependabot](how-to/dependabot-auto-merge.md)
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
---
tags: [build, deploy, how-to]
---

# Build and deploy with Github Actions

This how-to guide shows you how to build and deploy your application using [Github Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions) and the NAIS deploy action.

## Prerequisites

- You're part of a [NAIS team](./team.md)
- You're part of a [NAIS team](../../operate/how-to/create-team.md)
- A Github repository where the NAIS team has access
- The repository contains a valid [workload manifest](../explanation/workloads/README.md)
- The repository contains a valid [workload manifest](../../workloads/README.md)

## Authorize your Github repository for deployment

1. Open [NAIS console](https://console.<<tenant()>>.cloud.nais.io) in your browser and select your team.
1. Open [NAIS Console](https://console.<<tenant()>>.cloud.nais.io) in your browser and select your team.
2. Select the `Repositories` tab
3. Find the repository you want to deploy from, and click `Authorize`

Expand Down Expand Up @@ -52,7 +56,7 @@ This how-to guide shows you how to build and deploy your application using [Gith
```

This example workflow is a minimal example that builds, signs, and pushes your container image to the image registry.
It then deploys the [app.yaml](../reference/application-spec.md), injecting the image tag from the previous step.
It then deploys the [app.yaml](../../workloads/application/reference/application-spec.md), injecting the image tag from the previous step.

When this file is pushed to the `main` branch, the workflow will be triggered and you are all set.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [build, deploy, how-to]
---

# Dependabot with auto-merge

[working-with-dependabot]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot
Expand Down
9 changes: 0 additions & 9 deletions docs/explanation/.pages

This file was deleted.

3 changes: 0 additions & 3 deletions docs/explanation/README.md

This file was deleted.

Empty file.
9 changes: 0 additions & 9 deletions docs/explanation/naisdevice.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/explanation/restoring.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/explanation/team.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/explanation/under-the-hood.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/explanation/workloads/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/explanation/workloads/application.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/explanation/workloads/job.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/explanation/zero-trust.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/explanations/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nav:
- nais.md
- team.md
- under-the-hood.md
6 changes: 5 additions & 1 deletion docs/explanation/nais.md → docs/explanations/nais.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags: [explanation, nais]
---

# What is NAIS?

NAIS is a platform aiming to provide you with the technical capabilities you need to develop and run software in a safe and enjoyable way.
Expand All @@ -8,7 +12,7 @@ In order to support this idea, we aim to provide you with functionality that jus

You can think of the provided functionality as building blocks, where you as a developer can select the ones that fit your specific needs.

The fundamental building block provided by NAIS is a robust and secure runtime environment for your [workloads](./workloads/README.md).
The fundamental building block provided by NAIS is a robust and secure runtime environment for your [workloads](../workloads/README.md).

When your workload is up and running, it’s crucial to be able to observe how it’s doing. Here the platform provides you with the tooling you need to log, emit metrics and run traces.

Expand Down
Loading

0 comments on commit 196d0a8

Please sign in to comment.