Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Latest commit

 

History

History
79 lines (52 loc) · 2.06 KB

DEVELOPMENT.md

File metadata and controls

79 lines (52 loc) · 2.06 KB

m3 (mkube)

To do development for m3 we recommend setup a local Kubernetes cluster. In this guide we do steps on how to use kind.

Prerequisites

A binary release can be downloaded via

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

Installation

go get sigs.k8s.io/[email protected]

Setup a local kubernetes using kind

Provision the local kubernetes cluster for test/development

inside /k8s run:

cd k8s/; ./create-kind.sh

Access Kubernetes dashboard

  • Launch kubectl proxy to access kubernetes dashboard
kubectl proxy
  • Log in to the dashboard at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#!/login

  • To get the access token

kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

Setup m3

(The following instructions assume that you are in the top-level directory of this repository)

  • Build m3 locally
make m3
  • Build m3 local docker image and push it to your local kubernetes
make k8sdev TAG=minio/m3:dev
  • Copy the template located at ./k8s/deployments/m3-deployment.yaml.example into ./k8s/deployments/m3-deployment.yaml
  • Modify ./k8s/deployments/m3-deployment.yaml

Replace all the <TOKENS> with their corresponding values, for example <DEV_EMAIL> with your personal email. A valid smtp account is needed, if you don't have one we recommend you create a gmail account and enable Less Secure Apps access

  • Install the m3 deployment on kubernetes
kubectl apply -f k8s/deployments/m3-deployment.yaml
  • Start m3 development environment
./m3 dev