This commit is contained in:
admju 2024-09-13 12:57:24 +00:00
parent bd58ac1e02
commit 95884e14d6
3 changed files with 91 additions and 35 deletions

View File

@ -11,8 +11,7 @@ ifndef PUBLISH_TOKEN
$(error PUBLISH_TOKEN is not set)
endif
# PUBLISH_REPO := "na/oc-version"
PUBLISH_REPO := "ej/oc-test"
PUBLISH_REPO := "core/oc-deploy"
PUBLISH_BRANCH := main
.PHONY: publish
@ -23,3 +22,6 @@ publish:
PUBLISH_TOKEN=${PUBLISH_TOKEN} \
PUBLISH_BRANCH=${PUBLISH_BRANCH} \
go run main.go ${OC_VERSION})
clean:
@rm *.base64

View File

@ -17,20 +17,101 @@ It thus contains a first optional installation layer which deploys the Kubernete
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
# 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_<version>.yml from relase on GitEa (core/oc-version).
* Initialise an workspace direcotry : ./workspace_<contextK8S>
* 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 = <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
## Install Talos
brew install siderolabs/tap/talosctl
talosctl cluster create
# Install helm
## 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
## Create OpenCloud Chart
Obsolete : use oc-deploy tool
helm create occhart

View File

@ -2,33 +2,6 @@
**oc-deploy** is a tool to deploy (with **helm**) all component of **OpenCloud**.
# 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
# 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_
# Development
To init: