86 lines
2.1 KiB
Markdown
86 lines
2.1 KiB
Markdown
# Purpose
|
|
|
|
**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:
|
|
|
|
```
|
|
make get-deps
|
|
```
|
|
|
|
## To build
|
|
|
|
```
|
|
make build
|
|
```
|
|
|
|
## To run
|
|
|
|
```
|
|
make run_install [BIN_OPTS="<args>"]
|
|
make run_uninstall [BIN_OPTS="<args>"]
|
|
make run_generate [BIN_OPTS="<args>"]
|
|
```
|
|
|
|
or
|
|
|
|
```
|
|
make exec_install [BIN_OPTS="<args>"]
|
|
make exec_uninstall [BIN_OPTS="<args>"]
|
|
make exec_generate [BIN_OPTS="<args>"]
|
|
```
|
|
|
|
# To Test
|
|
|
|
All packages:
|
|
|
|
```
|
|
make test
|
|
```
|
|
|
|
or to test an specific package:
|
|
|
|
```
|
|
make test_<package>
|
|
```
|
|
|
|
Test generate _.coverage.html_ file to view the coverage of test.
|
|
|
|
## To Publish
|
|
|
|
Cf : ../publish
|
|
|
|
## Divers
|
|
|
|
* Latest version for _kubectl_: https://dl.k8s.io/release/stable.txt
|
|
* Release for _helm_: https://github.com/helm/helm/releases
|