oc-deploy/README.md
2024-09-13 12:57:24 +00:00

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:

Layer Tool
OpenCloud components oc-deploy binary
KubernetesCluster TODO or pre-requisite
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).

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

oc-deploy tools

Usage

Command Description
oc-deploy Display help
oc-deploy version Display the version of tool
oc-deploy install [-c|--context <context>] [-v|--version <OcVersion>] Deploy an OpenCloud
oc-deploy uninstall [-c|--context <context>] Undeploy an OpenCloud
Arguments Description Default
context Context Kubernetes opencloud
OcVersion Specific version or latest latest

Principe

  • Download an "OpenCloud file version" : oc_.yml from relase on GitEa (core/oc-version).
  • Initialise an workspace direcotry : ./workspace_
  • Install tools as describe, if not found on the path :
    • Helm
    • Kubectl
  • Check if the Cluster (context) is available
  • Install all charts as describe :
    • Charts : from Harbor or local
    • Images : from Harbor or local
  • Check if componants are available

Pre-requis

oc-deploy need to access to an Kubernetes Cluster, c'est-à-dire : kubeconfig.

oc-deploy need to access to Internet :

Dev

Cf. src/README.md

Publish

Publish in the relase GitEa the binary (the binary is base64 coding).

Set env file to overwrite varibable as :

#!make
PUBLISH_TOKEN = <gitea_token>

To publish :

OC_VERSION = <x.y.z> make publish

Installation on Kubernetes

Minikube

TO DO

Kubernetes

TO DO

RKE2

TO DO

OpenShift

TO DO

Installation on Docker

Without Kubernetes, 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

Obsolete : use oc-deploy tool

helm create occhart