-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add DigitalOcean documentation
- Loading branch information
Showing
42 changed files
with
837 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
hide_title: true | ||
sidebar_label: Credits | ||
# custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md | ||
description: credit to all the awesome open source projects | ||
image: "https://docs.kubefirst.io/img/logo.svg" | ||
--- | ||
|
||
import CommonCredits from "../common/credits.mdx" | ||
|
||
<CommonCredits /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
hide_title: true | ||
display_sidebar: do | ||
sidebar_label: Deprovision | ||
# custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md | ||
description: how to deprovision your kubefirst platform | ||
keywords: | ||
- aws | ||
image: 'https://docs.kubefirst.io/img/logo.svg' | ||
--- | ||
|
||
import Deprovision from '../common/deprovision.mdx'; | ||
|
||
<Deprovision /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Argo CD | ||
sidebar_position: 1 | ||
--- | ||
|
||
import ExploreArgocd from "../../common/argocd.mdx" | ||
|
||
<ExploreArgocd /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: GitOps | ||
sidebar_position: 2 | ||
--- | ||
|
||
|
||
import ExploreGitOps from "../../common/gitops.mdx" | ||
|
||
<ExploreGitOps /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Metaphor | ||
sidebar_position: 3 | ||
--- | ||
|
||
import ExploreMetaphor from "../../common/metaphor.mdx" | ||
|
||
<ExploreMetaphor /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Telemetry | ||
sidebar_position: 7 | ||
--- | ||
|
||
import ExploreTelemetry from "../../common/telemetry.mdx" | ||
|
||
<ExploreTelemetry /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Terraform & Atlantis | ||
sidebar_position: 4 | ||
--- | ||
|
||
import ExploreTerraform from "../../common/terraform.mdx" | ||
|
||
<ExploreTerraform /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: User Creation | ||
sidebar_position: 5 | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import styles from '../../stylesheets/tabs.module.css'; | ||
|
||
import GitHubUserCreation from '../partials/github/_user-creation.mdx'; | ||
import GitLabUserCreation from '../partials/gitlab/_user-creation.mdx'; | ||
|
||
<Tabs groupId="git_provider" defaultValue="github" queryString> | ||
<TabItem | ||
attributes={{ className: styles.github }} | ||
value="github" | ||
label={ | ||
<div className="git-tab"> | ||
<img src="https://assets.kubefirst.com/console/github.svg" /> | ||
<span>GitHub</span> | ||
</div> | ||
} | ||
> | ||
<GitHubUserCreation /> | ||
</TabItem> | ||
<TabItem | ||
value="gitlab" | ||
attributes={{ className: styles.gitlab }} | ||
label={ | ||
<div className="git-tab"> | ||
<img src="https://assets.kubefirst.com/console/gitlab.svg" /> | ||
<span>GitLab</span> | ||
</div> | ||
} | ||
> | ||
<GitLabUserCreation /> | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Vault | ||
sidebar_position: 6 | ||
--- | ||
|
||
import ExploreVault from "../../common/vault.mdx" | ||
|
||
<ExploreVault /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
hide_title: true | ||
sidebar_label: FAQ | ||
# custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md | ||
description: frequently asked quesitons about the kubefirst platform | ||
image: "https://docs.kubefirst.io/img/logo.svg" | ||
--- | ||
|
||
import FAQ from "../common/faq.mdx" | ||
|
||
<FAQ /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
hide_title: true | ||
display_sidebar: civo | ||
sidebar_label: GitOps Catalog | ||
# custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md | ||
description: using the kubefirst gitops catalog | ||
keywords: | ||
- aws | ||
image: 'https://docs.kubefirst.io/img/logo.svg' | ||
--- | ||
|
||
import GitOpsCatalog from '../common/gitops-catalog.mdx'; | ||
|
||
<GitOpsCatalog /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
hide_title: true | ||
sidebar_label: Overview | ||
sidebar_position: 1 | ||
# custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md | ||
description: an overview of kubefirst on a DigitalOcean kubernetes cluster | ||
image: 'https://docs.kubefirst.io/img/logo.svg' | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
import styles from '../stylesheets/tabs.module.css'; | ||
import ReactDom from 'react-dom'; | ||
import * as config from '../constants.js'; | ||
import GitHubOverview from '../do/partials/github/_overview.mdx'; | ||
import GitLabOverview from '../do/partials/gitlab/_overview.mdx'; | ||
import CloudBanner from '@site/src/components/CloudBanner/CloudBanner.jsx'; | ||
import CommonProvisionProcess from "../common/partials/common/_provision-process.mdx"; | ||
|
||
<div | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'flex-end', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<div> | ||
<img src={config.VULTR_LOGO_URL} height="50" width="120" /> | ||
</div> | ||
</div> | ||
|
||
# Overview | ||
|
||
:::caution | ||
|
||
DigitalOcean is in beta. It is quite stable, but use at your own risks. | ||
|
||
::: | ||
|
||
The DigitalOcean provisioning process will: | ||
<CommonProvisionProcess firstitem="Create a Kubernetes cluster in the DigitalOcean cloud."/> | ||
|
||
![kubefirst DigitalOcean with GitLab Cluster Diagram](../img/do/gitlab/installation-diagram-light.png#light-mode)![kubefirst DigitalOcean with GitLab Cluster Diagram](../img/do/gitlab/installation-diagram-dark.png#dark-mode) | ||
|
||
# Applications | ||
|
||
<Tabs groupId="git_provider" defaultValue="github" queryString> | ||
<TabItem | ||
attributes={{ className: styles.github }} | ||
value="github" | ||
label={ | ||
<div className="git-tab"> | ||
<img src="https://assets.kubefirst.com/console/github.svg" /> | ||
<span>GitHub</span> | ||
</div> | ||
} | ||
> | ||
<GitHubOverview /> | ||
</TabItem> | ||
<TabItem | ||
value="gitlab" | ||
attributes={{ className: styles.gitlab }} | ||
label={ | ||
<div className="git-tab"> | ||
<img src="https://assets.kubefirst.com/console/gitlab.svg" /> | ||
<span>GitLab</span> | ||
</div> | ||
} | ||
> | ||
<GitLabOverview /> | ||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Connecting to Kubernetes | ||
|
||
To connect to your new Kubernetes cluster, run | ||
|
||
```bash | ||
export KUBECONFIG=~/.k1/kubeconfig | ||
``` | ||
|
||
To view all cluster pods, run | ||
|
||
```bash | ||
kubectl get pods -A | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Installed Applications | ||
|
||
To see what is installed by kubefirst, check the [overview page](../../overview.mdx). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Prerequisites | ||
|
||
### Local Prerequisites | ||
|
||
If you are on macOS, and have [Homebrew](https://brew.sh) installed, you can run: | ||
|
||
```shell | ||
brew install kubefirst/tools/kubefirst | ||
``` | ||
|
||
To upgrade an existing kubefirst CLI to the latest version run: | ||
|
||
```shell | ||
brew update | ||
brew upgrade kubefirst | ||
``` | ||
|
||
There are other ways to install kubefirst for different operating systems, architectures, and containerized environments. See our [installation README](https://github.com/kubefirst/kubefirst/blob/main/build/README.md) for details. | ||
|
||
### DigitalOcean Prerequisites | ||
|
||
For kubefirst to be able to provision your DigitalOcean cloud resources: | ||
|
||
- A [DigitalOcean account](https://cloud.digitalocean.com/registrations/new) in which you are an account owner. | ||
- A publicly routable [DNS](https://docs.digitalocean.com/tutorials/dns-registrars/). | ||
- A [DigitalOcean API personal access token](https://cloud.digitalocean.com/account/api/tokens). | ||
- A [DigitalOcean Spaces access key & its secret](https://cloud.digitalocean.com/account/api/spaces). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import CloudflareDNS from "../../../common/partials/common/_cloudflare-dns.mdx"; | ||
|
||
## Create your new kubefirst cluster | ||
|
||
Adjust the following command with your GitHub and DigitalOcean key in addition to the appropriate values for your new platform. | ||
|
||
```shell | ||
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxx | ||
export DO_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
export DO_SPACES_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
export DO_SPACES_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
|
||
kubefirst beta digitalocean create \ | ||
--alerts-email [email protected] \ | ||
--github-org your-github-org \ | ||
--domain-name your-domain.io \ | ||
--cluster-name kubefirst | ||
``` | ||
|
||
<CloudflareDNS /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
`kubefirst beta digitalocean create` provisions a local [DigitalOcean](https://digitalocean.com) Kubernetes cluster to host your cloud native environment locally. | ||
|
||
Your DigitalOcean cluster will include: | ||
|
||
| Application | Description | | ||
| ------------------------------- | ----------------------------------------------------------------- | | ||
| Argo CD | GitOps Continuous Delivery | | ||
| Argo Workflows | Application Continuous Integration | | ||
| Atlantis | Terraform Workflow Automation | | ||
| cert-manager | Certificate Automation Utility | | ||
| ChartMuseum | Helm Chart Registry | | ||
| External Secrets Operators | Syncs Kubernetes secrets with Vault secrets | | ||
| GitHub Action Runner Controller | GitHub Self-Hosted CI Executor | | ||
| HashiCorp Vault | Secrets Management | | ||
| Metaphor | (development, staging, production) instance of sample Next.js app | | ||
| Ingress Nginx | Ingress Controller | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### GitHub Prerequisites | ||
|
||
- A GitHub [organisation](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch). | ||
- A new GitHub [account](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account) for your `kbot` automation user. | ||
- A GitHub [personal access token](../../../common/git-auth.mdx) for your `kbot` account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# GitHub Repositories | ||
|
||
When you deploy a cluster on DigitalOcean using kubefirst, new repositories will be added to your organization's GitHub account. | ||
|
||
![GitHub repositories](../../../img/common/github/repositories.png) | ||
|
||
## Repositories | ||
|
||
### gitops | ||
|
||
The `gitops` repository houses all of our IAC and all your GitOps configurations. The infrastructure created by kubefirst was produced by some combination of Terraform and Argo CD. You modify the infrastructure or add new applications to your cluster by creating a pull request to your new `gitops` repository. | ||
|
||
### metaphor | ||
|
||
`metaphor` is a suite of demo microservice applications to demonstrate how an application can be integrated into the kubefirst platform following best practices. It is described in more details [here](../../../common/metaphor.mdx). | ||
|
||
## Repositories Management | ||
|
||
These {props.name} repositories are being managed in Terraform. As you need additional GitHub repositories, just add a new section of Terraform code to `digitalocean-github/terraform/github/repos.tf`: | ||
|
||
## Making Terraform Changes | ||
|
||
To make infrastructure and configuration changes with Terraform, simply open a pull request against any of the Terraform directory folders in the `gitops` repository. Your pull request will automatically provide plans, state locks, and applies, and even comment in the merge request itself. You'll have a simple, peer reviewable, auditable changelog of all infrastructure and configuration changes. | ||
|
||
![Atlantis GitHub](../../../img/common/github/atlantis.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Platform User Onboarding | ||
|
||
In this tutorial we will show how to add users to your platform through [Atlantis](https://www.runatlantis.io/), which will allow a preview of how changes made will be expressed through Terraform before branches are merged into your repository. | ||
|
||
Navigate to the `gitops` repository in your GitHub org, clone the contents, and create a new branch: | ||
|
||
```shell | ||
cd gitops | ||
git checkout -b new-user | ||
``` | ||
|
||
The folder `digitalocean-github/terraform/users/admins` contains two separate files that represent admin users: `admin-one.tf` (commented-out), and the kbot user in the `kbot.tf` file. Here's the module from `admin-one.tf`: | ||
|
||
```terraform | ||
module "admin_one" { | ||
source = "./modules/user/github" | ||
acl_policies = ["admin"] | ||
email = "[email protected]" | ||
first_name = "Admin" | ||
github_username = "admin-one-github-username" | ||
last_name = "One" | ||
team_id = data.github_team.admins.id | ||
username = "aone" | ||
user_disabled = false | ||
userpass_accessor = data.vault_auth_backend.userpass.accessor | ||
} | ||
``` | ||
|
||
Uncomment and edit this code to replace the values for the `email`, `first_name`, `github_username`, `last_name`, and `username` before pushing to your branch. | ||
|
||
Note: If you are doing using this walkthrough simply to test Atlantis, you do not need to update these fields to be accurate. | ||
|
||
```shell | ||
git add . | ||
git commit -m feat: add new user | ||
git push --set-upstream origin new-user | ||
``` | ||
|
||
Create a pull request. This will kick off the Atlantis workflow. Within a minute or so of submitting the pull request, a comment will appear on the pull request that shows the Terraform plan with the changes it will be making to your infrastructure. | ||
|
||
![Atlantis Plan Comment Example](../../../img/common/github/atlantis-comments.png) | ||
|
||
To apply these changes, you or someone in the organization can submit a comment on that pull request with the following comment text: | ||
|
||
`atlantis apply` | ||
|
||
Doing so will instruct Atlantis to apply the plan. It will report back with the results of the apply within a minute or so. | ||
|
||
NOTE: Atlantis merges your pull request automatically once an apply is successfully executed. Don't merge Terraform pull requests yourself. | ||
|
||
Atlantis will always run plans automatically for you when a pull request is opened that changes files mapped in `atlantis.yaml`. | ||
|
||
Any new users you have created through this process will have their temporary initial passwords stored in your Vault cluster. You can access Vault using the root login credentials provided to you during your kubefirst installation. Only the root Vault token can access these secrets. You will find your users' initial passwords in the Vault secret store `/secrets/users/<username>`. | ||
|
||
![vault token login](../../../img/kubefirst/local/vault-token-login.png) | ||
|
||
Once you've provided them their initial password, they can update their own password throughout the platform by updating their user password entity in Vault. Anyone can change their own password, and Admins can reset anyone's password. These rules, just like everything else on kubefirst, can be configured in your new `gitops` repository. | ||
|
||
![default user creation](../../../img/kubefirst/local/default-user-creation.png) | ||
|
||
The admins and developers that you add through IaC will automatically propagate to all tools due to the Vault OIDC provider that's preconfigured throughout the kubefirst platform tools. |
Oops, something went wrong.