# 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 ] [-v\|--version ]``` | Deploy an OpenCloud | | ```oc-deploy uninstall [-c\|--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 : * to download the _oc.json_ file (contient _oc.yml_) : * Url : https://cloud.o-forge.io/core/oc-deploy/releases * to download _kubectl_ and _helm_ tools if * Url : Urls are specified into _oc.yml_ ## 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 = To publish : OC_VERSION = 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