diff --git a/site/learn/API.md b/site/learn/API.md index 7dab3659..703691bb 100644 --- a/site/learn/API.md +++ b/site/learn/API.md @@ -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 @@ -29,8 +27,10 @@ curl -Lo hkubectl https://github.com/kube-HPC/hkubectl/releases/download/v1.1.24 #### Config -`hkubectl` config set endpoint -`hkubectl` config set rejectUnauthorized false +```console + hkubectl config set endpoint https://KUBERNETES-MASTER-IP:PORT/ + hkubectl config set rejectUnauthorized false +``` #### Syntax @@ -38,5 +38,4 @@ curl -Lo hkubectl https://github.com/kube-HPC/hkubectl/releases/download/v1.1.24 hkubectl [type] [command] [name] ``` - -In the next sections you will learn in details about the pipeline definitions. \ No newline at end of file +In the next sections you will learn in details about the pipeline definitions. diff --git a/site/learn/InstallHkube.md b/site/learn/InstallHkube.md index 04d04c82..64cb0ab2 100644 --- a/site/learn/InstallHkube.md +++ b/site/learn/InstallHkube.md @@ -9,13 +9,37 @@ 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; @@ -23,61 +47,70 @@ next: /learn/api/ $ 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 ``` -