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

docs: document self-managed infrastructure #2458

Merged
merged 19 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion docs/docs/getting-started/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ If you encounter any problem with the following steps, make sure to use the [lat
-->

3. Create the cluster. `constellation create` uses options set in `constellation-conf.yaml`.
If you want to manually use [Terraform](../reference/terraform.md) for managing the cloud resources instead, follow the corresponding instructions in the [Create workflow](../workflows/create.md).
If you want to manually use [Terraform](../reference/terraform.md) for managing the cloud resources instead, or want completely self-managed infrastructure, follow the corresponding instructions in the [Create workflow](../workflows/create.md).
msanft marked this conversation as resolved.
Show resolved Hide resolved

:::tip

Expand Down
36 changes: 34 additions & 2 deletions docs/docs/workflows/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,44 @@
```bash
CONSTELL_IP=$(terraform output ip)
CONSTELL_INIT_SECRET=$(terraform output initSecret | jq -r | tr -d '\n' | base64)
touch constellation-state.yaml
yq eval '.version ="v1"' --inplace constellation-state.yaml
yq eval '.infrastructure.initSecret ="$CONSTELL_INIT_SECRET"' --inplace constellation-state.yaml
yq eval '.infrastructure.clusterEndpoint ="$CONSTELL_IP"' --inplace constellation-state.yaml
```

</tabItem>
<tabItem value="self-managed" label="Self-Managed">
msanft marked this conversation as resolved.
Show resolved Hide resolved

Self-managed infrastructure allows for managing the cloud resources necessary for a Constellation cluster separately from the Constellation CLI and Terraform,

Check warning on line 81 in docs/docs/workflows/create.md

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Microsoft.SentenceLength] Try to keep sentences short (< 30 words). Raw Output: {"message": "[Microsoft.SentenceLength] Try to keep sentences short (\u003c 30 words).", "location": {"path": "docs/docs/workflows/create.md", "range": {"start": {"line": 81, "column": 1}}}, "severity": "WARNING"}

Check warning on line 81 in docs/docs/workflows/create.md

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Consider removing 'separately'. Raw Output: {"message": "[Microsoft.Adverbs] Consider removing 'separately'.", "location": {"path": "docs/docs/workflows/create.md", "range": {"start": {"line": 81, "column": 107}}}, "severity": "WARNING"}
msanft marked this conversation as resolved.
Show resolved Hide resolved
providing maximum flexibility in DevOps as well as meeting potential regulatory requirements.

To self-manage the infrastructure of your cluster, download the Terraform files for the selected CSP from the [Constellation GitHub repository](https://github.com/edgelesssys/constellation/tree/main/cli/internal/terraform/terraform).
They contain a minimum configuration for the resources necessary to run a Constellation cluster on the corresponding CSP. From this base, you can now add, edit, or substitute resources as per your own requirements, while ensuring the essential

Check warning on line 85 in docs/docs/workflows/create.md

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Microsoft.Wordiness] Consider using 'per' instead of 'as per'. Raw Output: {"message": "[Microsoft.Wordiness] Consider using 'per' instead of 'as per'.", "location": {"path": "docs/docs/workflows/create.md", "range": {"start": {"line": 85, "column": 186}}}, "severity": "WARNING"}
functionality of the base configuration is kept. You can also recreate the infrastructure from the Terraform configuration with the infrastructure management tooling of your choice, e.g. create it manually through a CSP portal.

When using Terraform, initialize and apply your configuration. Otherwise, make sure all necessary resources are created, e.g. through checking your CSP's portal.
msanft marked this conversation as resolved.
Show resolved Hide resolved

```bash
terraform init
terraform apply
```

And retrieve the necessary outputs from your configuration. When using another infrastructure management strategy than Terraform, retrieve the outputs accordingly, e.g. through your CSP's portal.
msanft marked this conversation as resolved.
Show resolved Hide resolved

```bash
CONSTELL_IP=$(terraform output ip)
CONSTELL_INIT_SECRET=$(terraform output initSecret | jq -r | tr -d '\n' | base64)
msanft marked this conversation as resolved.
Show resolved Hide resolved
yq eval '.infrastructure.initSecret ="$CONSTELL_INIT_SECRET"' --inplace constellation-state.yaml
yq eval '.infrastructure.clusterEndpoint ="$CONSTELL_IP"' --inplace constellation-state.yaml
```

Depending on the [configuration](./config.md) of your cluster, additional outputs might be necessary. Use the following command to query all possible outputs:

```bash
terraform output
```
msanft marked this conversation as resolved.
Show resolved Hide resolved

And continue with [initializing your cluster](#the-init-step).
msanft marked this conversation as resolved.
Show resolved Hide resolved

</tabItem>
</tabs>

Expand Down
Loading