Skip to content

Commit

Permalink
clean up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Aug 27, 2024
1 parent 8682a3d commit 3ec062c
Show file tree
Hide file tree
Showing 25 changed files with 125 additions and 150 deletions.
5 changes: 3 additions & 2 deletions apps/docs/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"systems": "Systems",
"environments": "Environments",
"targets": "Targets",
"workflows": "Workflow (CI)",
"jobs": "Jobs",
"variables": "Variables",
"runbooks": "Runbooks",
"advanced": "Advanced",
Expand All @@ -22,5 +22,6 @@
"title": "Integrations"
},
"github": "GitHub",
"google-cloud": "Google Cloud"
"google-cloud": "Google Cloud",
"kubernetes": "Kubernetes"
}
8 changes: 8 additions & 0 deletions apps/docs/pages/deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ The typical deployment process in Ctrlplane involves the following steps:
deployment, providing you with visibility into the progress and success of
your releases.

import { Callout } from "nextra/components";

<Callout type="info">
Its common to have multiple targets a single application may deploy too. It is
best practice to have a single deployment with a pipeline that supports
deploying to these different systems.
</Callout>

## Benefits of Deployments in Ctrlplane

- **Automation:** Automates the entire deployment process, reducing manual
Expand Down
1 change: 1 addition & 0 deletions apps/docs/pages/examples/deploy-to-gke.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Provisiong and deploying to GKE
36 changes: 36 additions & 0 deletions apps/docs/pages/github/actions-dispatcher.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,39 @@ GitHub Actions Dispatcher is allows you to trigger other GitHub Actions
workflows from a single workflow. This is useful when you want to run multiple
workflows in parallel or when you want to trigger a workflow from another
repository.

## Creating Actions

<Callout type="info">
Due to [limitations of the GitHub
API](https://github.com/orgs/community/discussions/9752), workflows do not
return the run ID. Inorder for Ctrl Plane to get the ID it generates a random
one that is passed into the pipeline and is expected to be added to the Run
name. This can be done by adding

```yaml
name: Receiving Workflow
run-name: Receiving Workflow [${{ inputs.distinct_id && inputs.distinct_id || 'N/A' }}]

on:
workflow_dispatch:
inputs:
distinct_id:
description: "Distinct ID"
required: false
```
</Callout>
### Configuring a workflows
Each provider will make there own assmputions about how values and properties
are expected to be passed to the underlying workflow. In this section we will
outline the format inwhich data will be passed in.
First, the workflow must be able to be triggered by a dispatch.
```yaml
on:
workflow_dispatch: {}
```
26 changes: 22 additions & 4 deletions apps/docs/pages/google-cloud/compute-scanner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,28 @@
The Compute Scanner is a tool that scans Google Cloud projects for new instances
and creates them for related deployments automatically.

Ctrlplane offers a managed and unmanaged version of the Compute Scanner.
Currently the compute scanner supports importing the following resources:

- Google Kubernetes Engine Clusters (GKE)

## Managed Compute Scanner

The managed Compute Scanner is a service that is hosted
and managed by Ctrlplane. When adding a target provider you
will se an option to enable the managed Compute Scanner.
The managed Compute Scanner is build into the Ctrlplane solution. Each workspace
will is assigned a google service account. You need to invite this service
account to your projects you would like it to scan. Then in the UI, you can add
a new provider, select the managed install and add all the projects you will
like it to scale. Once you hit submit you may need to wait a few mins while it
scanns and imports all compute resources.

## Unmanaged Compute Scanner

The unmanaged Compute Scanner is a standalone tool that can be run in your
infrastrcuture. Similar to the managed solution, it imports all compute
resources from your projects. The unmanaged scanner is a docker container that
can be run in your infrastructure. You will need to provide the service account
credentials to the container.

You may want to use the unmanaged solution when you want fine control over the scanner.

| Environment Variable | Description | Required | Default |
| :------------------- | :---------- | -------- | ------- |
4 changes: 0 additions & 4 deletions apps/docs/pages/job-executions/_meta.json

This file was deleted.

11 changes: 0 additions & 11 deletions apps/docs/pages/job-executions/integrations/_meta.json

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/pages/job-executions/integrations/circle-ci.mdx

This file was deleted.

82 changes: 0 additions & 82 deletions apps/docs/pages/job-executions/integrations/github.mdx

This file was deleted.

This file was deleted.

Empty file.
13 changes: 0 additions & 13 deletions apps/docs/pages/job-executions/integrations/kubernetes-jobs.mdx

This file was deleted.

File renamed without changes.
13 changes: 13 additions & 0 deletions apps/docs/pages/kubernetes/jobs-agent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Jobs Agent

The Kubernetes Job Agent seamlessly integrates with your Kubernetes clusters,
enabling you to trigger Kubernetes Jobs directly from within Ctrlplane. It
responds to events like new software releases, new target discoveries, or
updates to existing targets. This powerful integration allows you to leverage
Ctrlplane's flexible management capabilities while harnessing the robust job
execution capabilities of Kubernetes.

- **Job Creation:** Dynamically creates Kubernetes Jobs based on predefined
templates or specifications.
- **Handlebars for Templating:** Utilizes Handlebars templating to dynamically
generate Kubernetes Job manifests.
File renamed without changes.
1 change: 0 additions & 1 deletion apps/docs/pages/targets/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"introduction": "Introduction",
"labels": "Labels",
"target-providers": "Target Providers",
"schemas": "Schemas"
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/pages/targets/schemas/_meta.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"kubernetes": "kubernetes/v1"
}
42 changes: 38 additions & 4 deletions apps/docs/pages/targets/schemas/kubernetes.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
# Kubernetes
# `kubernetes/v1`

## `kubernetes/v1` Schemas
## ClusterAPI

### KubernetesAPI
```yaml
version: kubernetes/v1
kind: ClusterAPI
config:
name: string
server:
certificateAuthorityData: string
endpoint: url
labels:
kubernetes/version: string
kubernetes/distribution: string
kubernetes/master-version: string
kubernetes/master-version-major: string
kubernetes/master-version-minor: string
kubernetes/master-version-patch: string
```
### KubernetesNmamespace
## Namespace
```yaml
version: kubernetes/v1
kind: Namespace
config:
name: string
namespace: string
server:
certificateAuthorityData: string
endpoint: url
labels:
kubernetes/namespace: string
kubernetes/version: string
kubernetes/distribution: string
kubernetes/master-version: string
kubernetes/master-version-major: string
kubernetes/master-version-minor: string
kubernetes/master-version-patch: string
```
5 changes: 0 additions & 5 deletions apps/docs/pages/targets/target-providers/_meta.json

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/pages/targets/target-providers/aws.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/docs/pages/targets/target-providers/azure.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/docs/pages/targets/target-providers/google.mdx

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/pages/targets/target-providers/terraform.mdx

This file was deleted.

1 change: 1 addition & 0 deletions packages/validators/src/targets/kubernetes-v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const clusterConfig = z.object({
endpoint: z.string().url(),
}),
});

export const kubernetesClusterApiV1 = z.object({
version: z.literal("kubernetes/v1"),
kind: z.literal("ClusterAPI"),
Expand Down

0 comments on commit 3ec062c

Please sign in to comment.