Skip to content

Commit 0b356af

Browse files
swoodward90dogmarmichaeljguarino
authored
Updated structure for CD docs (#242)
* updated structure for CD docs * added browser quickstart * first deployments pages * ran `yarn fix` * first version of eployments section * add docs for byok, architecture, etc * add some more cluster docs * add some more docs for cluster mgmt and add ons * added deprecations page * updated introduction + cleanup * remaining cleanup * added first cli quickstart and update browser quickstart for CD * Fix babel vulnerability GHSA-67hx-6x53-jw92 * Typo * add github actions example --------- Co-authored-by: Klink <[email protected]> Co-authored-by: michaeljguarino <[email protected]>
1 parent bf1da83 commit 0b356af

Some content is hidden

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

56 files changed

+1365
-223
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ help:
66
yarn-install: .PHONY
77
yarn
88

9-
web: yarn ## runs the docs site locally
9+
web: ## runs the docs site locally
1010
yarn dev

pages/adding-new-application/background-app-install.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: >-
66

77
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.
88

9-
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.
9+
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.
1010
Next, the user can install an application bundle using the `plural bundle install <app_name> <bundle>` CLI command.
1111

1212
> Most applications come with more than one bundle, one for each targeted cloud provider.
@@ -32,6 +32,7 @@ $ tree -L 1 .
3232
```
3333

3434
The `workspace.yaml` would look like this:
35+
3536
```yaml
3637
apiVersion: plural.sh/v1alpha1
3738
kind: ProjectManifest
@@ -40,7 +41,7 @@ metadata:
4041
spec:
4142
cluster: pluraldev
4243
bucket: pluraldevsh-tf-state
43-
project: "123456765432"
44+
project: '123456765432'
4445
provider: aws
4546
region: us-east-2
4647
owner:
@@ -53,6 +54,7 @@ spec:
5354
```
5455
5556
And the `context.yaml` like this. In the `spec.configuration` section you can see the recorded user input for each artifact.
57+
5658
```yaml
5759
apiVersion: plural.sh/v1alpha1
5860
kind: Context

pages/adding-new-application/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ description: >-
99
If you want to contribute your own application to the Plural marketplace we invite you to create and publish your own artifacts.
1010
In this section we guide you through the ins and outs of Plural's application artifacts, how you can build your own with the tools that Plural provides you, and how you can publish them for others to use.
1111

12-
> We are focused on properly compensating any contributions to the Plural platform, which includes a meaningful [bounty](https://github.com/pluralsh/plural-artifacts#plural-contributor-program).
12+
> We are focused on properly compensating any contributions to the Plural platform, which includes a meaningful [bounty](https://github.com/pluralsh/plural-artifacts#plural-contributor-program).

pages/adding-new-application/plural-artifact-structure.md

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ description: >-
77
As mentioned in [Background on Application Installations](/adding-new-application/background-app-install),
88
the Plural CLI creates a wrapper Helm chart and Terraform module for each installed application and inputs the user provided values for that installation.
99
Some extra configuration files are necessary in the application's artifact for the Plural API to be able to understand:
10+
1011
- the Helm charts and Terraform modules dependencies to run them through its templating engine
1112
- dependencies on other Plural artifacts
1213
- platform specific components and infrastructure configurations
@@ -83,8 +84,7 @@ $ tree .
8384
└── vendor_images.yaml
8485
```
8586

86-
Let's disect this artifact's structure.
87-
87+
Let's dissect this artifact's structure.
8888

8989
## Helm
9090

@@ -105,7 +105,8 @@ Plural leverages dependency tracking of applications to achieve a high degree of
105105
Dependencies between artifacts are defined in the recipe files (see below).
106106
Dependencies are also tracked between the Helm charts and Terraform modules of other applications in a dedicated `deps.yaml` file in each chart's or module's directory.
107107
For example, for Dagster's Helm chart you would list required dependencies on:
108-
- the `bootstrap` application's Helm chart
108+
109+
- the `bootstrap` application's Helm chart
109110
- the `ingress-nginx` application's Helm chart
110111
- the `postrges` operator application's Helm chart
111112

@@ -120,33 +121,33 @@ metadata:
120121
spec:
121122
breaking: true
122123
dependencies:
123-
- type: helm
124-
name: bootstrap
125-
repo: bootstrap
126-
version: '>= 0.5.1'
127-
- type: helm
128-
name: ingress-nginx
129-
repo: ingress-nginx
130-
version: ">= 0.1.2"
131-
- type: helm
132-
name: postgres
133-
repo: postgres
134-
version: ">= 0.1.6"
135-
- type: terraform
136-
name: aws
137-
repo: dagster
138-
version: '>= 0.1.0'
139-
optional: true
140-
- type: terraform
141-
name: azure
142-
repo: dagster
143-
version: '>= 0.1.0'
144-
optional: true
145-
- type: terraform
146-
name: gcp
147-
repo: dagster
148-
version: '>= 0.1.0'
149-
optional: true
124+
- type: helm
125+
name: bootstrap
126+
repo: bootstrap
127+
version: '>= 0.5.1'
128+
- type: helm
129+
name: ingress-nginx
130+
repo: ingress-nginx
131+
version: '>= 0.1.2'
132+
- type: helm
133+
name: postgres
134+
repo: postgres
135+
version: '>= 0.1.6'
136+
- type: terraform
137+
name: aws
138+
repo: dagster
139+
version: '>= 0.1.0'
140+
optional: true
141+
- type: terraform
142+
name: azure
143+
repo: dagster
144+
version: '>= 0.1.0'
145+
optional: true
146+
- type: terraform
147+
name: gcp
148+
repo: dagster
149+
version: '>= 0.1.0'
150+
optional: true
150151
```
151152
152153
## Terraform
@@ -157,9 +158,10 @@ Most commonly you'd find object storage alongside their IAM resources, or additi
157158
Sometimes it will also include Kubernetes resources like service accounts, if their deployment cannot be achieved through the artifact's Helm chart in a convenient manner.
158159

159160
> One peculiarity about the Terraform modules is that, at the very least, they need to contain the Kubernetes namespace for your application.
160-
This is because during a `plural deploy` with the Plural CLI the `terraform apply` will always run before the `helm install` step.
161+
> This is because during a `plural deploy` with the Plural CLI the `terraform apply` will always run before the `helm install` step.
161162

162163
Just like the Helm chart, the Terraform modules also contain a `deps.yaml` file that inform the Plural API about dependencies on other modules.
164+
163165
```
164166
apiVersion: plural.sh/v1alpha1
165167
kind: Dependencies
@@ -176,7 +178,6 @@ spec:
176178
- aws
177179
```
178180
179-
180181
## Plural Files
181182
182183
The `plural` directory contains the artifact's packaging information (`plural/recipes`), metadata (`plural/tags` and `plural/icons`), and application specific instructions (`plural/docs` and `plural/notes.tpl`).
@@ -185,6 +186,7 @@ On the top-level directory of each artifact you'll also find a`repository.yaml`.
185186
The `repository.yaml` and recipe YAMLs are an integral part of Plural's artifact packaging format.
186187
187188
### `repository.yaml`
189+
188190
```yaml
189191
name: dagster
190192
description: A data orchestration platform for the development, production, and observation of data assets.
@@ -199,53 +201,55 @@ oauthSettings:
199201
uriFormat: https://{domain}/oauth2/callback
200202
authMethod: POST
201203
tags:
202-
- tag: dag
203-
- tag: data
204-
- tag: data-pipelines
204+
- tag: dag
205+
- tag: data
206+
- tag: data-pipelines
205207
```
206208

207209
The metadata in this file informs the Plural API about the application this artifact envelopes.
208210
It will store its name, category and description, where it can find the icon and docs to display in the marketplace,
209211
the notes template to prompt after installation, as well as links to any upstream git repository or homepage (if applicable).
210212

211213
`oauthSettings` specifies the URI format for the OIDC callback address and informs the Plural API how to setup the OIDC endpoint for your application if you use it.
214+
212215
> Behind the scenes, every `plural bundle install` triggers the OIDC client creation when you answer with `yes` on the OIDC prompt.
213-
This happens, because every client needs to be created before a `plural build` which then inputs the client info into the helm chart.
216+
> This happens, because every client needs to be created before a `plural build` which then inputs the client info into the helm chart.
214217
215218
The `private` flag controls whether the artifact's bundles are published publicly or privately on a `plural push` or `plural apply` (see [Publishing](/adding-new-application/publishing)).
216219

217220
### `plural/recipes/dagster-aws.yaml`
221+
218222
```yaml
219223
name: dagster-aws
220224
description: Installs dagster on an aws eks cluster
221225
provider: AWS
222226
primary: true
223227
dependencies:
224-
- repo: bootstrap
225-
name: aws-k8s
226-
- repo: ingress-nginx
227-
name: ingress-nginx-aws
228-
- repo: postgres
229-
name: aws-postgres
228+
- repo: bootstrap
229+
name: aws-k8s
230+
- repo: ingress-nginx
231+
name: ingress-nginx-aws
232+
- repo: postgres
233+
name: aws-postgres
230234
oidcSettings:
231235
uriFormat: https://{domain}/oauth2/callback
232236
authMethod: POST
233237
domainKey: hostname
234238
sections:
235-
- name: dagster
236-
configuration:
237-
- name: dagsterBucket
238-
type: BUCKET
239-
documentation: s3 bucket for storing dagster logs
240-
default: dagster
241-
- name: hostname
242-
type: DOMAIN
243-
documentation: fqdn on which to deploy your dagster instance
244-
items:
245-
- type: TERRAFORM
246-
name: aws
247-
- type: HELM
248-
name: dagster
239+
- name: dagster
240+
configuration:
241+
- name: dagsterBucket
242+
type: BUCKET
243+
documentation: s3 bucket for storing dagster logs
244+
default: dagster
245+
- name: hostname
246+
type: DOMAIN
247+
documentation: fqdn on which to deploy your dagster instance
248+
items:
249+
- type: TERRAFORM
250+
name: aws
251+
- type: HELM
252+
name: dagster
249253
```
250254
251255
The recipe file ties a bundle together, with one dedicated recipe per cloud provider.

pages/adding-new-application/publishing.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ To publish an artifact you first need to create a publisher with your Plural acc
1111

1212
1. Click on your profile on the bottom left on `app.plural.sh`.
1313
2. Select `create publisher`.
14-
3. Enter your information.
14+
3. Enter your information.
1515
4. Hit save.
1616

1717
## Publish an Artifact with the Plural CLI
1818

19-
When you're done with implementing your artifact and you have created a publisher you're ready to publish it.
19+
When you're done with implementing your artifact and you have created a publisher you're ready to publish it.
2020

2121
1. Navigate to the directory of your artifact in your local copy of the [Plural artifacts git repository](https://github.com/pluralsh/plural-artifacts).
2222
2. Locate the `Pluralfile`.
2323
3. Enter the name of your publisher as the first argument in the `ATTRIBUTES` line. E.g. if your publisher is called `mypublisher`, it should look like this:
24+
2425
```
2526
REPO dagster
2627
ATTRIBUTES mypublisher repository.yaml
@@ -29,7 +30,9 @@ TF terraform/*
2930
HELM helm/*
3031
RECIPE plural/recipes/*
3132
```
33+
3234
4. Finally, publish your artifact with the command `plural apply -f Pluralfile`. E.g. for our dagster example
35+
3336
```console
3437
$ plural apply -f Pluralfile
3538
Setting attributes for dagster

pages/deployments/addons.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Kubernetes Add-Ons
3+
description: Extend Kubernetes to support load balancing, dns, monitoring and security
4+
---
5+
6+
Kubernetes natively is just a container orchestrator, but it's apis can be easily extended to support many other major concerns within the DevOps space. Some of the more common usecases we currently support are:
7+
8+
- Networking - you need load balancers, dns, and cert management to build a full production service exposed to the outside world. We can deploy all the operators and controllers needed to get this set up in a fully self-service way.
9+
- Monitoring - inject agents from Datadog, New Relic, Prometheus and other providers to provide observability to your fleet
10+
- Security - tools like Trivy and Kubescape can continuously monitor clusters for vulnerabilities and enhance your security posture.
11+
- Cost Monitoring - deploy the kubecost agent to give you coherent cost dashboards for your entire fleet
12+
13+
All of these will be constantly updated and maintained by us, you just need to perform the initial configuration via our wizards.
14+
15+
You can see all the addons we support in the `Add Ons` tab of Plural Deployments, as seen here:
16+
17+
![](/assets/deployments/addons.png)

pages/deployments/architecture.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Plural CD Architecture
3+
description: Secure, Scalable Pull-Based Architecture
4+
---
5+
6+
## Overview
7+
8+
Plural CD is based on a scalable, secure, agent-based pull architecture. It doesn't require direct access to any of the clusters it deploys to, meaning it can manage workloads in any cloud, on-prem, on the edge, or even on a local laptop running KIND. Further since it doesn't require networking intensive kubernetes watch streams, central access to kubernetes, or relies on single-mastered operator control loops, it should scale to virtually any size kubernetes fleet. We also enhance your kubernetes setup with a auth proxy, allowing you to have full visibility to your workloads without compromising the network security of your setup or require the creation of complex multi-cloud networking setups.
9+
10+
Here's a quick diagram of the setup:
11+
12+
![](/assets/deployments/architecture.png)
13+
14+
## Control Plane
15+
16+
The Control Plane layer is a full-stack service deployable onto any kubernetes cluster you designate as your management cluster. It contains a few main components:
17+
18+
- Horizontally scalable git cache - we should be able to ingest as many git repos as you'd like and auto-shard them throughout your cluster automatically and efficiently.
19+
- Configuration Management - supports re-configurable backends, but allows you to easily parameterize services with information like hostnames, docker image tags, and other secret and non-secret information.
20+
- Auth Proxy - this is a secure bidirectional grpc channel initiated by a deployment agent used to make kubernetes api calls no matter where a cluster may live and give you full dashboarding capabilities from the Plural CD UI.
21+
- Cluster API Providers - Plural CD natively integrates with cluster api and allows you to create and manage new clusters at scale and fork your own kubernetes cluster APIs on top of existing setups for services like EKS, AKS and GKE or on-prem solutions like Rancher
22+
23+
We provide simple installers if you'd like to deploy the control plane layer to a kubernetes cluster already in your fleet, or you can use our own kubernetes setup in the standard plural install flow.
24+
25+
## Deployment Agent
26+
27+
A thin deployment agent is installed onto each cluster and perpetually managed by Plural CD from then on. It will perpetually poll the control plane for new services to apply and if there are any changes to make, apply them into your cluster. It also can do a few other things like:
28+
29+
- establish the bidectional grpc channel for the auth proxy layer (this does require an ingress with websocket support)
30+
- execute integration tests
31+
32+
There were a few design considerations involved in our agent that are worth understanding as well:
33+
34+
- The expectation is the agent is deployed independently at scale, potentially hundreds of times for a large organization, so it must be maximally simple to reduce operational complexity to near 0.
35+
- It is designed to be extensible to arbitrarily many frameworks for defining kubernetes manifests. We aren't actually huge fans of helm or kustomize and want organizations to have the flexibility to ultimately use other toolchains for managing their kubernetes YAML codebase (or ultimately de-YAML themselves)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Plural CD In-Browser Quickstart
3+
description: Deploying your services using the Plural Console UI.
4+
---
5+
6+
## Overview
7+
8+
This guide goes over how to deploy your services with Plural using the Plural Console UI. At the end of this tutorial, you will have:
9+
10+
- Provisioned new clusters, and/or deployed the Plural Deployment Operator on your existing clusters.
11+
- Imported the Git repositories containing your code and manifests.
12+
- Deployed your code onto your clusters of choice.
13+
- Optionally updated any configurations and permissions for the clusters and services.
14+
15+
in under 30 minutes, all within your browser. You can see the process in the video here or follow the instructions step-by-step:
16+
17+
{% embed url="https://www.youtube.com/watch?v=jBlq45ntbBw" aspectRatio="16 / 9" /%}
18+
19+
## Onboard to Plural and install the Plural Console
20+
21+
If you haven't already, you'll need to follow the Plural guide to install Console. You can use the guide for the [in-browser Cloud Shell](/getting-started/cloud-shell-quickstart) or the [CLI](/getting-started/quickstart) to get started.
22+
23+
## Log in to Console and Add Clusters
24+
25+
Once you've logged in to Plural Console, you can click the "Continuous deployment" tab to set up your clusters. By default, you should see the cluster that your Console is deployed on.
26+
27+
To deploy additional clusters, click the "Create cluster" button in the top right. To spin up a new cluster, fill in the required fields:
28+
29+
![](/assets/deployments/create-cluster.png)
30+
31+
To import an existing cluster, select the "Import existing" toggle and add a name, handle, and any tags. You then need to run the following command on the cluster itself to install the Plural Deploy Operator:
32+
33+
```
34+
plural cd install --url https://<CONSOLE_URL>/ext/gql --token <TOKEN>
35+
```
36+
37+
Make sure your kubeconfig points to the desired cluster for import. More information is available in the guide for [existing clusters](/deployments/existing-cluster).
38+
39+
Once you've added the required clusters, you should see them populated on the "Clusters" subtab within your Console.
40+
41+
## Import Git Repositories and Deploy services
42+
43+
You'll need to then import the Git repository containing your service and the associated Kubernetes manifests. Click the "Git repositories" subtab, and hit the "Import Git" button in the top right.
44+
45+
![](/assets/deployments/import-git.png)
46+
47+
Add the url of the repo and authorization if necessary, and hit import. Once your service is pullable, you can deploy it to your clusters.
48+
49+
Navigate to the "Services" subtab and click "Deploy service". Add a name and namespace and select the cluster you want to deploy to. You can then select the relevant repository and add any secrets necessary to parameterize the deployment.
50+
51+
Your service should populate initially as `Stale` until your components are Ready, at which point they will flip to `Healthy`.
52+
53+
Congratulations! You've deployed your first service with Plural.

0 commit comments

Comments
 (0)