Skip to content

chore(docs): Add installation documentation#580

Open
NautiluX wants to merge 2 commits into
mainfrom
docs
Open

chore(docs): Add installation documentation#580
NautiluX wants to merge 2 commits into
mainfrom
docs

Conversation

@NautiluX

Copy link
Copy Markdown
Member

No description provided.

Comment thread docs/install-codesphere-on-any-infrastructure.md Outdated
Comment thread docs/install-codesphere-on-any-infrastructure.md Outdated
k0s supports combined control-plane/worker nodes. However, the current OMS k0sctl configuration generator treats an IP present in both lists as control-plane-only and ignores the duplicate worker entry. Until combined-role generation is supported by OMS, use dedicated control-plane and worker entries in this workflow.
- The platform and public gateways use `LoadBalancer`, or `ExternalIP` where that is the chosen integration.
- `codesphere.domain` is `cs.<base-domain>`.
- `codesphere.workspaceHostingBaseDomain` and the custom-domain CNAME base are `ws.<base-domain>`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the workspaceBaseDomain the de-facto standard we use is ., I'd put this in the Guide as well. The dcId shall be part of it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean by this, can you propose an edit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the codesphere.workspaceHostingBaseDomain parameter was never really configured to something else than <dataCenter.id>.<codesphere.domain> at all.
And nothing in the guide tells you that the value must differ between multiple DCs (e.g. by prefixing the datacenter id).
IMO we should

  1. make this parameter optional and default to <dataCenter.id>.<codesphere.domain> if undefined
    and
  2. document the requirement adequately

Comment thread docs/install-codesphere-on-any-infrastructure.md Outdated
Comment thread docs/install-codesphere-on-any-infrastructure.md Outdated
Comment thread docs/install-codesphere-on-any-infrastructure.md Outdated
test -r /etc/codesphere/secrets/prod.vault.yaml
```

Run the installation from the jumpbox. The lite package does not contain the platform container images, so skip `load-container-images`; the cluster pulls them directly from GHCR using the credentials in the vault:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we require --skip-steps load-container-images is just a bug. The installer script should know that it can skip this for the lite installation if configured here:

registry:
  loadContainerImages: false

@clemensfreitagdev clemensfreitagdev Jul 16, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to double-check, but I think I fixed that bug also 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, fails for me on csa demo cluster:

Loading container image postgres of component database. 
open /etc/codesphere/deps/database/images/postgres.tar: no such file or directory

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫢 I try to rebase it tmrw

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, don't think this PR can be merged as it is. It's introducing a breaking config change.
I've moved the corresponding CU task to the PE board for triage.
Tell me if you disagree that this is an OMS task.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope that one looks better :) We let Manuel decide, I'd say.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can completely remove that step from the installer since we don't plan to support the full package anymore. For now I tend to leave it as is in case we need to circle back for whatever reason.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but shouldn't we fix the --skip-step bug at least?
https://github.com/codesphere-cloud/codesphere-monorepo/pull/17934 should be non breaking and we can still control the load-container-images step by using the existing config option.

Comment thread docs/install-codesphere-on-any-infrastructure.md

```yaml
kubernetes:
managedByCodesphere: true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the current best practice? I remember SRE telling me they install it externally using k0sctl because of k8s version update issues. This information can be outdated though.
And maybe for external users, it's still better to document the intended way instead of the temporary workaround.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a k0sctl based installation in OMS, but not sure if and how it can be used currently. I'll collect input from the team.


k0s supports combined control-plane/worker nodes. However, the current OMS k0sctl configuration generator treats an IP present in both lists as control-plane-only and ignores the duplicate worker entry. Until combined-role generation is supported by OMS, use dedicated control-plane and worker entries in this workflow.
- The platform and public gateways use `LoadBalancer`, or `ExternalIP` where that is the chosen integration.
- `codesphere.domain` is `cs.<base-domain>`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `codesphere.domain` is `cs.<base-domain>`.
- `codesphere.domain` is `<base-domain>`, can be a sub-domain like `codesphere.corp42.net`

k0s supports combined control-plane/worker nodes. However, the current OMS k0sctl configuration generator treats an IP present in both lists as control-plane-only and ignores the duplicate worker entry. Until combined-role generation is supported by OMS, use dedicated control-plane and worker entries in this workflow.
- The platform and public gateways use `LoadBalancer`, or `ExternalIP` where that is the chosen integration.
- `codesphere.domain` is `cs.<base-domain>`.
- `codesphere.workspaceHostingBaseDomain` and the custom-domain CNAME base are `ws.<base-domain>`.

@clemensfreitagdev clemensfreitagdev Jul 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `codesphere.workspaceHostingBaseDomain` and the custom-domain CNAME base are `ws.<base-domain>`.
- `codesphere.workspaceHostingBaseDomain`: recommended to set to `<dc-id>.<base-domain>', e.g. `1.codesphere.corp42.net`
- `codesphere.customDomains.cNameBaseDomain`: recommended to set to `workspaces.<base-domain>`.


## What the installation builds

The installation uses a management host as the single entry point into a private network. From there, OMS installs and configures PostgreSQL, Ceph, k0s, and the Codesphere platform.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The installation uses a management host as the single entry point into a private network. From there, OMS installs and configures PostgreSQL, Ceph, k0s, and the Codesphere platform.
The installation uses a jumphost as the single entry point into a private network. From there, OMS installs and configures PostgreSQL, Ceph, k0s, and the Codesphere platform.

another name for jumpbox/jumphost/controller? 😄

- A datacenter ID, name, city, and country code.
- Stable private IP addresses for every machine.
- A public IP address for the jumpbox. This is separate from the service addresses and should accept SSH only from trusted administrator networks.
- Three stable, externally reachable service IP addresses: platform gateway, workspace gateway, and workspace SSH proxy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we give some examples how we do it or mention the CCM here?


## 2. Provision the machines

Provision x86-64 machines running Ubuntu 22.04 LTS or an equivalent supported operating system. Choose a topology based on the purpose of the installation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's blocking us from recommending newer versions? 🫣


## 7. Prepare the jumpbox

Install OMS on the jumpbox together with `sops` and `age`. Pin and verify approved versions so the environment is repeatable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to oms installation guide? Especially useful if we move this doc out of github

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply link to OMS I guess: https://github.com/codesphere-cloud/oms

> ```yaml
> k8s-cp:
> hosts:
> cp-1: {private_ip: 10.10.0.11}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> cp-1: {private_ip: 10.10.0.11}
> cp-1:
private_ip: 10.10.0.11

No brackets in yaml inventory

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json is yaml no?

> worker-1: {private_ip: 10.10.0.21}
> ceph:
> hosts:
> ceph-1: {private_ip: 10.10.0.31}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> ceph-1: {private_ip: 10.10.0.31}
> ceph-1:
private_ip: 10.10.0.31

Comment on lines +326 to +332
| Record | Target |
| --- | --- |
| `cs.<base-domain>` | Platform gateway IP |
| `*.cs.<base-domain>` | Platform gateway IP |
| `ws.<base-domain>` | Workspace gateway IP |
| `*.ws.<base-domain>` | Workspace gateway IP |
| `*.ssh.cs.<base-domain>` | Workspace SSH proxy IP |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should stick to the names of the kubernetes services to make it simple to identify.
These are gateway-controller, public-gateway-controller and ssh-workspace-proxy


## 14. Complete the infrastructure integration

If the selected infrastructure needs a Kubernetes cloud controller, install its supported provider integration and enable external cloud-provider mode on the k0s controller and workers. Use only manifests and service annotations intended for that infrastructure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloud controller could be related to the DNS step


```bash
/etc/codesphere/deps/kubernetes/files/k0s kubectl \
get services --all-namespaces

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
get services --all-namespaces
get services -n codesphere

Could grep for LoadBalancer as well.

4. `https://cs.<base-domain>` presents a trusted certificate and loads Codesphere.
5. A workspace can be created, reached over HTTPS, and reached through the workspace SSH proxy.

Run the Codesphere smoke test when credentials for the environment are available:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Run the Codesphere smoke test when credentials for the environment are available:
Run the Codesphere smoke test when an API key for the environment is available:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants