Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix installation instructions #3

Open
wants to merge 2 commits into
base: source
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions site/learn/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ Hkube support two types of APIs, Restful and Cli

### Restful API

Please check out the full Rest API [documentation](http://hkube.io/spec).
Also check the [Swagger-UI](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/kube-HPC/api-server/master/api/rest-api/swagger.json).

Please check out the full Rest API [documentation](http://hkube.io/spec).
Also check the [Swagger-UI](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/kube-HPC/api-server/master/api/rest-api/swagger.json).

### Cli

`hkubectl` is a command-line tool that help you to work with hkube more easily.


#### Download

```console
Expand All @@ -29,14 +27,15 @@ curl -Lo hkubectl https://github.com/kube-HPC/hkubectl/releases/download/v1.1.24

#### Config

`hkubectl` config set endpoint <KUBERNETES-MASTER-IP>
`hkubectl` config set rejectUnauthorized false
```console
hkubectl config set endpoint https://KUBERNETES-MASTER-IP:PORT/
hkubectl config set rejectUnauthorized false
```

#### Syntax

```
hkubectl [type] [command] [name]
```


In the next sections you will learn in details about the pipeline definitions.
In the next sections you will learn in details about the pipeline definitions.
81 changes: 57 additions & 24 deletions site/learn/InstallHkube.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,75 +9,108 @@ next: /learn/api/
---

### Prerequisites

---

1) Install [Kubernetes](https://kubernetes.io/docs/user-journeys/users/application-developer/foundational/#section-1) or [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) or [microk8s](https://microk8s.io/)
1. Install [Kubernetes](https://kubernetes.io/docs/user-journeys/users/application-developer/foundational/#section-1) or [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) or [microk8s](https://microk8s.io/)

> Make sure kubectl is configured to your cluster.
> For collecting algorithm logs, and to create builds, Hkube requires that certain pods will run in privileged security permissions. Consult your kubernetes installation to see how to do that.

> For collecting algorithm logs, and to create builds, Hkube requires that certain pods will run in privileged security permissions.

> #### For Microk8s the follows should be done:
>
> - Add --allow-privileged=true to:
> - kubelet config:
>
> ```console
> sudo vim /var/snap/microk8s/current/args/kubelet
> ```
>
> - kube-apiserver config:
>
> ```console
> sudo vim /var/snap/microk8s/current/args/kube-apiserver
> ```
>
> - Restart services:
>
> ```console
> sudo systemctl restart snap.microk8s.daemon-kubelet.service
> sudo systemctl restart snap.microk8s.daemon-apiserver.service
> ```
>
> If you still facing an issue on configuring it or you ruunnig on k8s cluster please consult your kubernetes installation admin to see how to do that.

## TL;DR;

```console
$ helm repo add hkube http://hkube.io/helm/
$ helm install hkube/hkube
```

## Introduction

The chart is hosted in http://hkube.io/helm/
To add the repo to your helm run

```console
$ helm repo add hkube http://hkube.io/helm/
```

## Installing the Chart

To install the chart with the release name `my-release`:

```console
$ helm install hkube/hkube --name my-release
```

This command installs `hkube` in a minimal configuration for development. See below for production install.

## Uninstalling the Chart

```console
$ helm delete my-release
```

## Configuration

There are two modes to install hkube:
There are two modes to install hkube:

1. minimal install for development
* one node cluster ([minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/), [microk8s](https://microk8s.io/))
* minimal third-party (etcd, redis, jaeger-all-in-one, minio, etc...)
2. production deployment
* etcd cluster (using etcd-operator)
* redis-ha (using sentinel)
* full jaeger deployment
- one node cluster ([minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/), [microk8s](https://microk8s.io/))
- minimal third-party (etcd, redis, jaeger-all-in-one, minio, etc...)
2. production deployment
- etcd cluster (using etcd-operator)
- redis-ha (using sentinel)
- full jaeger deployment

## Production deployment

### prerequisites

1. hkube uses s3 for storage. The minimal installation uses minio hosted in the cluster. For production installations it is recommended to create a dedicated s3 server.

### configuration
Parameter | Description | Default
--- | --- | ---
global.storage.minio.access_key | access key for s3 | hkubeminiokey
global.storage.minio.secret_key | secret key for s3 | hkubeminiosecret
global.storage.minio.url | access url for s3 | http://minio-service:9000
global.production | flag to switch to production install | false
global.clusterName | the name of the kubernetes cluster | cluster-local

| Parameter | Description | Default |
| ------------------------------- | ------------------------------------ | ------------------------- |
| global.storage.minio.access_key | access key for s3 | hkubeminiokey |
| global.storage.minio.secret_key | secret key for s3 | hkubeminiosecret |
| global.storage.minio.url | access url for s3 | http://minio-service:9000 |
| global.production | flag to switch to production install | false |
| global.clusterName | the name of the kubernetes cluster | cluster-local |

```console
$ helm install hkube/hkube \
--set global.production=true \
--set global.clusterName=dev \
--set global.storage.minio.url=http://192.168.10.10:9000 \
--set global.storage.minio.access_key=accesskey \
--set global.storage.minio.secret_key=secretkey
$ helm install hkube/hkube \
--set global.production=true \
--set global.clusterName=dev \
--set global.storage.minio.url=http://192.168.10.10:9000 \
--set global.storage.minio.access_key=accesskey \
--set global.storage.minio.secret_key=secretkey
--name my-release
```


<!-- ```hkube-box
# { "hkube": true, "url": "/learn", "title": "next &rarr;", "text": "Learn More" }
``` -->