oc-deploy/src/README.md

80 lines
1.9 KiB
Markdown
Raw Normal View History

2024-09-12 13:27:47 +02:00
# 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