diff --git a/Makefile b/Makefile index 07c778a..9c0dba5 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 6c17e4b..61fe60d 100644 --- a/README.md +++ b/README.md @@ -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 ] [-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 +## 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 diff --git a/src/README.md b/src/README.md index eef348d..b8df419 100644 --- a/src/README.md +++ b/src/README.md @@ -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 ] [-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 - -# 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: