oc-deploy/README.md

3.3 KiB

Purpose of this component

The purpose of oc-deploy, is to deploy all the OC components over a Kubernetes cluster.

An OpenCloud deployment is composed of the following layers:

OpenCloud components | <-- TODO

KubernetesCluster | <-- TODO

IaaS (VMs, LAN) | <-- pre-requisite

HW (network and servers) | <-- pre-requisite

It thus contains a first optional installation layer which deploys the Kubernetes nodes (control plane(s) and workers) above an existing infrastructure (Iaas).

Then the second installation layer uses Helm charts to deploy and configure all the OC components.

This documentation will be updated with the needed command and/or requirements to properly execute the installation.

Deploy cluster

For dev in Docker

Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Talos

brew install siderolabs/tap/talosctl
talosctl cluster create

Install helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Create OpenCloud Chart

oc-deploy Component

The oc-deploy component aims to simplify and automate the deployment of OpenCloud components on a Kubernetes cluster through the creation of Helm Charts.

Prerequisites:

  • Access to the OpenCloud forge and the associated Harbor registry: https://registry.o-forge.io/, which will allow pulling OpenCloud release images from the "stable" project.
  • To test the connection to this registry from the Docker client:
    docker login registry.o-forge.io
    
  • A Kubernetes cluster: Minikube, K3s, RKE2, etc. See KubernetesCluster.
  • Helm installed locally

To Be Defined:

Configuring a Docker Secret for Kubernetes

Kubernetes needs to know your credentials to pull images from the "registry.o-forge.io" registry. Create a Docker secret in Kubernetes:

kubectl create secret docker-registry regcred \
  --docker-server=registry.o-forge.io \
  --docker-username=<your_username> \
  --docker-password=<your_password> \
  --docker-email=<your_email>

Checking if Helm Recognizes Your Local Kubernetes Cluster:

1. Verify Connection to Kubernetes:

Before checking Helm, ensure that your kubectl is properly configured to connect to your local Kubernetes cluster. Run the following command to see if you can communicate with the cluster:

kubectl get nodes

If this command returns the list of nodes in your cluster, it means kubectl is properly connected.

2. Verify Helm Configuration:

Now, you can check if Helm can access the cluster by using the following command:

helm version

This command displays the Helm version and the Kubernetes version it is connected to.

Deploying with Helm:

You can deploy the oc-deploy Chart with Helm:

helm install oc-deploy path/to/your/Helm/oc-deploy

Checking Helm Releases:

You can also list the existing releases to see if Helm is properly connected to the cluster:

helm list

If all these commands execute without errors and give the expected results, your Helm installation is correctly configured to recognize and interact with your local Kubernetes cluster