Skip to content

Commit

Permalink
🚧 Improve deployment doc (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakayolo authored Mar 8, 2021
1 parent 8900c42 commit fa81c29
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 63 deletions.
122 changes: 72 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Notes: KintoHub has been tested with argo workflow chart 0.16.6.

#### Install Argo Workflow

Run

```sh
kubectl create namespace argo
helm repo add argo https://argoproj.github.io/argo-helm
Expand All @@ -54,8 +52,6 @@ helm upgrade --install argo \

Check if argo is running fine.

Run

```sh
kubectl get pods -n argo

Expand All @@ -72,8 +68,6 @@ Notes: KintoHub has been tested with cert-manager chart v0.15.0.

##### Install Cert-Manager

Run

```sh
kubectl create namespace cert-manager
helm repo add jetstack https://charts.jetstack.io
Expand All @@ -85,8 +79,6 @@ helm upgrade --install cert-manager \

Check if cert-manager is running fine.

Run

```sh
kubectl get pods -n cert-manager

Expand All @@ -98,48 +90,78 @@ cert-manager-webhook-68d464c8b-hvpf6 1/1 Running 0 33s

### Install KintoHub

Run

```sh
kubectl create ns kintohub
helm repo add kintohub https://kintoproj.github.io/kinto-helm
## Every parameter below (except minio) needs to be changed so that they fit your configuration.
## Check [value.yaml](charts/kinto/values.yaml) file if you want more information about these parameters.
helm upgrade --install kinto \
--set common.domainName='oss.kintohub.net' \
--set common.ssl.enabled=true \
--set common.ssl.issuer.email=devaccounts@kintohub.com \
--set common.ssl.issuer.solver.cloudflare.email=devaccounts@kintohub.com \
--set common.ssl.issuer.solver.cloudflare.cloudflareApiToken=changeme \
--set builder.env.IMAGE_REGISTRY_HOST=kintohub \
--set builder.workflow.docker.registry=https://index.docker.io/v1/ \
--set builder.workflow.docker.email=devaccounts@kintohub.com \
--set builder.workflow.docker.username=changeme \
--set builder.workflow.docker.password=changeme \
--set nginx-ingress-controller.service.type=LoadBalancer \
--set minio.resources.requests.memory=null \
--set minio.makeBucketJob.resources.requests.memory=null \
--namespace kintohub kintohub/kinto
```

Check if kintohub is running fine.

Run

```sh
kubectl get pods -n kintohub

NAME READY STATUS RESTARTS AGE
kinto-builder-64cb848858-vjwp8 1/1 Running 0 56s
kinto-core-7f9b8777c9-pwfv7 1/1 Running 0 56s
kinto-dashboard-645776fc5b-mj2xz 1/1 Running 0 56s
kinto-minio-5fdd9859bd-x5g7n 1/1 Running 0 56s
kinto-nginx-ingress-controller-5774d868cb-mcktf 1/1 Running 0 56s
kinto-nginx-ingress-controller-default-backend-66549b79f8-7cmtx 1/1 Running 0 56s
kinto-proxless-65487b797c-jf7cd 1/1 Running 0 56s
```

#### Configure and Access KintoHub
Run the following steps depending on the setup you want.
Each one of the following steps are "incremental", you must run all the steps prior to the setup you chose.
For example, if you want to enable SSL, you need to run "Minimum Configuration" and "Enable public access to deployed services" first, in the order.

- **Minimum Configuration**

KintoHub is installed on a local cluster with no inbound internet connection.

```sh
export KINTO_ARGS="--set minio.resources.requests.memory=null \
--set minio.makeBucketJob.resources.requests.memory=null \
--set builder.env.IMAGE_REGISTRY_HOST={YOUR_OWN_CONFIG} \
--set builder.workflow.docker.registry={YOUR_OWN_CONFIG} \
--set builder.workflow.docker.email={YOUR_OWN_CONFIG} \
--set builder.workflow.docker.username={YOUR_OWN_CONFIG} \
--set builder.workflow.docker.password={YOUR_OWN_CONFIG}"
```

- **Enable public access to deployed services**

All web services deployed with KintoHub are accessible from internet.

```sh
export KINTO_ARGS="${KINTO_ARGS} \
--set nginx-ingress-controller.service.type=LoadBalancer \
--set common.domainName={YOUR_OWN_CONFIG}"
```

- **Enable HTTPS**

```sh
export KINTO_ARGS="${KINTO_ARGS} \
--set common.ssl.enabled=true \
--set common.ssl.issuer.email={YOUR_OWN_CONFIG} \
--set common.ssl.issuer.solver.cloudflare.email={YOUR_OWN_CONFIG} \
--set common.ssl.issuer.solver.cloudflare.cloudflareApiToken={YOUR_OWN_CONFIG}"
```

- **Expose KintoHub dashboard to Internet**

```sh
export KINTO_ARGS="${KINTO_ARGS} \
--set core.ingress.enabled=true \
--set dashboard.ingress.enabled=true"
```

- **Deploy KintoHub**

```sh
kubectl create ns kintohub
helm repo add kintohub https://kintoproj.github.io/kinto-helm
helm upgrade --install kinto \
$(echo ${KINTO_ARGS}) \
--namespace kintohub kintohub/kinto
```

Check if KintoHub is running fine

```sh
kubectl get pods -n kintohub
NAME READY STATUS RESTARTS AGE
kinto-builder-64cb848858-vjwp8 1/1 Running 0 56s
kinto-core-7f9b8777c9-pwfv7 1/1 Running 0 56s
kinto-dashboard-645776fc5b-mj2xz 1/1 Running 0 56s
kinto-minio-5fdd9859bd-x5g7n 1/1 Running 0 56s
kinto-nginx-ingress-controller-5774d868cb-mcktf 1/1 Running 0 56s
kinto-nginx-ingress-controller-default-backend-66549b79f8-7cmtx 1/1 Running 0 56s
kinto-proxless-65487b797c-jf7cd 1/1 Running 0 56s
```

### Configure and Access KintoHub

Follow the instructions displayed after the chart installation is successful.
Notes: by default, kintohub is only accessible locally and ssl is disabled. Check [value.yaml](charts/kinto/values.yaml) to change this.
Expand Down
2 changes: 1 addition & 1 deletion charts/kinto/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: kinto
home: https://www.kintohub.com/
version: 0.4.2
version: 0.4.3
description: All-in-one deployment platform designed for fullstack developers
dependencies:
- name: nginx-ingress-controller
Expand Down
17 changes: 16 additions & 1 deletion charts/kinto/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@ To learn more about the release, try:
######################################

SETUP:

1. Get the IP of your Load Balancer.

{{- if eq (index .Values "nginx-ingress-controller" "service" "type") "LoadBalancer" }}
NOTE: It may take a few minutes for the LoadBalancer public IP to be available!

You can watch the status of the service by running `kubectl get svc -n {{ .Release.Namespace }} -w {{ .Release.Name }}-nginx-ingress-controller`.
export LB_IP=$(kubectl get service {{ .Release.Name }}-nginx-ingress-controller -n {{ .Release.Namespace }} -o jsonpath="{.status.loadBalancer.ingress[0].ip}")
echo ${LB_IP}
{{- else }}
KintoHub Local setup.
Public Access is not setup, nothing to do.
{{- end }}

2. Configure your DNS provider

{{- if eq (index .Values "nginx-ingress-controller" "service" "type") "LoadBalancer" }}
Create a `A` record with `*.{{ .Values.common.domainName }}` -> `${LB_IP}`.
{{- else }}
KintoHub Local setup.
Public Access is not setup.
Modify your `/etc/hosts` to add your domain name:
- Run `sudo echo "127.0.0.1 *.{{ .Values.common.domainName }} >> /etc/hosts"`.
Port forward nginx to your local machine.
- Run `kubectl port-forward svc/{{ .Release.Name }}-nginx-ingress-controller 80 -n {{ .Release.Namespace }}`.
{{- end }}

3. Access your dashboard

Expand All @@ -33,7 +48,7 @@ SETUP:
Open a browser and access `http://dashboard.{{ .Values.common.domainName }}`.
{{- end }}
{{- else }}
Run the following commands in order to port-forward your kinto core and your kinto dashboard to your local laptop.
Run the following commands in order to port forward your kinto core and your kinto dashboard to your local machine.

kubectl port-forward svc/{{ .Release.Name }}-core 8090 -n {{ .Release.Namespace }}

Expand Down
16 changes: 5 additions & 11 deletions charts/kinto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ builder:

## Image Registry used to push images that are built using KintoHub
## In order for kintohub to gain access over this registry, you must configure `builder.workflow.docker` correctly.
IMAGE_REGISTRY_HOST: eu.gcr.io/kinto-development ## TO BE CHANGED
IMAGE_REGISTRY_HOST: kintohub ## TO BE CHANGED

POLL_LOGS_INTERVAL_SECONDS: 1
USER_FRIENDLY_BUILD_LOGS_ENABLED: false
Expand Down Expand Up @@ -97,17 +97,11 @@ builder:
docker: ## TO BE CHANGED
## No need to provide the rest of the information if `existingSecret` is set
# existingSecret: kinto-builder-workflow-docker ## in `kintohub` namespace
## Using GCR
registry: eu.gcr.io
## Right now, kaniko doesn't support v2 API -> https://github.com/GoogleContainerTools/kaniko/issues/1209
registry: https://index.docker.io/v1/
email: devaccounts@kintohub.com
username: _json_key
password: [GCR_JSON_KEY]
## Using Dockerhub
## Right not kaniko doesn't support v2 API -> https://github.com/GoogleContainerTools/kaniko/issues/1209
# registry: https://index.docker.io/v1/
# email: devaccounts@kintohub.com
# username: kintohub
# password: [DOCKERHUB_API_TOKEN] ## Create access token https://docs.docker.com/docker-hub/access-tokens/
username: kintohub
password: [DOCKERHUB_API_TOKEN] ## Create access token https://docs.docker.com/docker-hub/access-tokens/

dashboard:
replicas: 1
Expand Down

0 comments on commit fa81c29

Please sign in to comment.