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

Feat-update add app docs #240

Merged
merged 37 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bde843d
be clear about difference between workspace and artifact
rauerhans Oct 3, 2023
f10320c
mention deployment repository as it's used but not defined
rauerhans Oct 3, 2023
e70a079
explain plurals artifact structure and scaffolding
rauerhans Oct 3, 2023
e95c320
draft
rauerhans Oct 4, 2023
1c74217
wording, improvements
rauerhans Oct 4, 2023
7a585fc
fix command
rauerhans Oct 4, 2023
2f8c862
add input
rauerhans Oct 4, 2023
a1895c1
add some explanations
rauerhans Oct 4, 2023
a63abf3
wip
rauerhans Oct 4, 2023
9298ca8
fix typos
rauerhans Oct 4, 2023
b7dc365
wip
rauerhans Oct 5, 2023
e911892
explain repository.yaml and recipe.yaml
rauerhans Oct 9, 2023
c3d07b2
explain deps.yaml
rauerhans Oct 9, 2023
c31e825
rm unfinished sentence
rauerhans Oct 9, 2023
581558c
be more precise
rauerhans Oct 9, 2023
943d13e
fix sentence
rauerhans Oct 9, 2023
b73ffd5
reorder
rauerhans Oct 9, 2023
57f67fd
wording
rauerhans Oct 9, 2023
f85bd3b
wording
rauerhans Oct 9, 2023
efcf620
explain primary
rauerhans Oct 9, 2023
9f3cc29
restructure
rauerhans Oct 9, 2023
77ad492
publishing page
rauerhans Oct 10, 2023
5dabce1
correct info about publishing
rauerhans Oct 10, 2023
669c6dc
format
rauerhans Oct 10, 2023
0a9d511
test
rauerhans Oct 10, 2023
2437515
restructure, proof read
rauerhans Oct 10, 2023
b63e519
shorten desc
rauerhans Oct 10, 2023
f993bd7
fix parenthesis
rauerhans Oct 10, 2023
1237d4e
highlight bounty
rauerhans Oct 10, 2023
147e033
fix list
rauerhans Oct 10, 2023
be4e5f6
match title with navdata
rauerhans Oct 10, 2023
027d4a5
fix indent
rauerhans Oct 10, 2023
aef9cd3
add info on node groups
rauerhans Oct 10, 2023
5c207d1
try making those headers
rauerhans Oct 10, 2023
7d75c8e
typo
rauerhans Oct 10, 2023
8efdfee
add link
rauerhans Oct 10, 2023
5a52450
last fixes
rauerhans Oct 10, 2023
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
138 changes: 138 additions & 0 deletions pages/adding-new-application/background-app-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title: Background on Application Installations
description: >-
A good unerstanding of an app's journey into your cluster will go a long way if you want to contribute your own application to the marketplace.
---

In this guide we will lay out how your user provided values tie in with the deployment process as it relates to the configuration and templating of the app.

When a user sets up a new Plural workspace in a git repository (we'll call that a *deployment repository* going forward) a `workspace.yaml` file is created that stores global values for that cluster such as the cloud account and region, the cluster and VPC name and what subdomain all the applications will be hosted under.
Next, the user can install an application bundle using the `plural bundle install <app_name> <bundle>` CLI command.

> Most applications come with more than one bundle, one for each targeted cloud provider.

The CLI will then prompt the user for for inputs needed to setup that application, along with any dependencies of the application.
These inputs are saved in the `context.yaml` file.

For example, let's have a look how the `tree` of a deployment repository, where we installed Dagster with `plural bundle install dagster dagster-aws` (among others), might look like:

```console
$ pwd
~/Repos/deployment-repository
$ tree -L 1 .
.
├── bootstrap
├── cert-manager
├── console
├── dagster
├── postgres
├── terraform.tfstate
├── workspace.yaml
└── context.yaml
```

The `workspace.yaml` would look like this:
```yaml
apiVersion: plural.sh/v1alpha1
kind: ProjectManifest
metadata:
name: pluraldev
spec:
cluster: pluraldev
bucket: pluraldevsh-tf-state
project: "123456765432"
provider: aws
region: us-east-2
owner:
email: [email protected]
network:
subdomain: dev.plural.sh
pluraldns: false
bucketPrefix: pluraldev
context: {}
```

And the `context.yaml` like this. In the `spec.configuration` section you can see the recorded user input for each artifact.
```yaml
apiVersion: plural.sh/v1alpha1
kind: Context
spec:
bundles:
- repository: dagster
name: dagster-aws
- repository: plural
name: plural-aws
- repository: console
name: console-aws
- repository: bootstrap
name: aws-efs
- repository: cert-manager
name: cert-manager-aws
- repository: ingress-nginx
name: ingress-nginx-aws
buckets:
- pluraldev-pluraldev-dagster
domains:
- console.dev.plural.sh
- dagster.dev.plural.sh
configuration:
bootstrap:
vpc_name: pluraldev
cert-manager: {}
console:
admin_name: admin
console_dns: console.dev.plural.sh
...
repo_url: [email protected]:pluralsh/deployment-repo.git
dagster:
dagsterBucket: pluraldev-pluraldev-dagster
hostname: dagster.dev.plural.sh
ingress-nginx: {}
postgres:
wal_bucket: pluraldev-pluraldev-postgres-wal
```

Next, the user would run `plural build` or `plural build --only <app name>` which will create a wrapper Helm chart and Terraform module for that app under a dedicated directory in the deployment repository.
The wrapper Helm chart and Terraform module depend on the application Helm chart(s) and Terraform module(s) it gets from the application's artifact repository via the Plural API.
During this step the CLI will generate the `default-values.yaml` for the wrapper helm chart and `main.tf` for the wrapper Terraform module using its templating engine.
More precisely, `default-values.yaml` will contain the interpolated templated values from its `values.yaml.tpl` (see [Templating](/adding-new-application/templating)) that are derived by injecting the values saved in the `context.yaml` at `spec.configuration`.

For example, after the `plural build --only dagster` command, the `tree` of the built Dagster application in your deployment repository would look like this:

```console
$ pwd
~/Repos/deployment-repository/dagster
$ tree .
.
├── build.hcl
├── deploy.hcl
├── diff.hcl
├── helm
│ └── dagster
│ ├── Chart.lock
│ ├── Chart.yaml
│ ├── charts
│ │ └── dagster-0.1.44.tgz
│ ├── default-values.yaml
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── application.yaml
│ │ ├── license.yaml
│ │ └── secret.yaml
│ └── values.yaml
├── manifest.yaml
├── output.yaml
└── terraform
├── aws
│ ├── deps.yaml
│ ├── iam.tf
│ ├── main.tf
│ ├── outputs.tf
│ ├── postgres.tf
│ └── variables.tf
├── main.tf
└── outputs.tf
```

Here you can see the wrapper Helm chart in `./helm/dagster` around the `./helm/dagster/charts/dagster-0.1.44.tgz`, i.e. the artifact's Helm chart that the Plural CLI downloads for you.
Similarly the wrapper Terraform module in `./terraform` will contain a local copy of the artifact's Terraform module inside `./terraform/aws`.
5 changes: 2 additions & 3 deletions pages/adding-new-application/guide.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: Guide
title: Guide on Creating a New Application Artifact
description: >-
This guide is for anyone who wants to make an open-source application available on the
Plural marketplace.
This guide is for anyone who wants to make an open-source application available on the Plural marketplace and create a new Plural artifact.
---

To add your own application, you'll need the Helm chart for your application and corresponding Terraform.
Expand Down
Loading
Loading