-
clone and run razeedash
git clone https://github.com/razee-io/Razeedash.git cd razeedash meteor npm install meteor
-
clone and run razeedash-api
git clone https://github.com/razee-io/Razeedash-api.git cd razeedash-api npm install npm start
-
edit your hosts file (/etc/hosts on mac and linux) and add:
192.168.99.1 minikube-host
-
Install minikube on your laptop
For macs:
brew cask install virtualbox brew cask install minikube minikube start 😄 minikube v1.1.0 on darwin (amd64) 💡 Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one. 🔄 Restarting existing virtualbox VM for "minikube" ... ⌛ Waiting for SSH access ... 🐳 Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6 🔄 Relaunching Kubernetes v1.14.2 using kubeadm ... ⌛ Verifying: apiserver proxy etcd scheduler controller dns 🏄 Done! kubectl is now configured to use "minikube"
-
Configure minikube
- Make sure your KUBECONFIG is pointing to your minikube cluster
kubectl create namespace razee
- kubectl apply this yaml:
kind: Service apiVersion: v1 metadata: name: minikube-host namespace: razee spec: type: ExternalName externalName: minikube-host
-
Access the welcome screen of your RazeeDash instance.
-
Register RazeeDash as an
OAuth
application in GitHub.- From the RazeeDash welcome screen, click Sign in.
- Click Configure GitHub Login. A pop-up window opens.
- Follow the link in the pop-up window to register a new
OAuth
application in GitHub. Enter a name for your GitHub application, a description, and the Homepage URL and Authorization callback URL that are displayed in the pop-up window. - Click Register application.
- Copy the Client ID and the Client Secret and add these values to the pop-up window.
- Click Save configuration.
-
Grant RazeeDash access to your organization in GitHub.
- If you do not own a GitHub organization, create one.
- From the RazeeDash welcome screen, click Sign in with GitHub. A pop-up window opens.
- In the Organization access section, find your organization and click Grant.
- Click Authorize github_user_name. The RazeeDash console opens and shows the name of the organization that you granted access to.
-
Install Watch Keeper in your cluster.
-
From the RazeeDash console, click the Register button that you can find next to your GitHub organization.
-
Click the Manage button.
-
In a new terminal session connect to your cluster and copy the Install Razee Agent
kubectl
command. -
run the command in your cluster to create the Watch Keeper component. change the port from 3000 to 3333 and then use the orgApiKey that was generated for you
for example:
kubectl apply -f "http://localhost:3333/api/install/razeedeploy-job?orgKey=<use_the_value_shown_in_razeedash>"
Example output:
configmap/watch-keeper-config created secret/watch-keeper-secret created clusterrole.rbac.authorization.k8s.io/cluster-reader created serviceaccount/watch-keeper-sa created clusterrolebinding.rbac.authorization.k8s.io/watch-keeper-rb created networkpolicy.networking.k8s.io/watch-keeper-deny-ingress created deployment.apps/watch-keeper created Error from server (AlreadyExists): namespaces "razee" already exists
-
Wait for Watch Keeper to finish.
kubectl get deployment -n razee | grep watch-keeper
Example output:
watch-keeper 1/1 1 1 2m5s
-
-
update the watch-keeper-config to point to your local razeedash api (change the value of
RAZEEDASH_URL
):kubectl edit -n razee cm/watch-keeper-config
apiVersion: v1 data: RAZEEDASH_URL: http://minikube-host:3333/api/v2 START_DELAY_MAX: "0" kind: ConfigMap metadata: creationTimestamp: "2019-06-05T15:55:39Z" name: watch-keeper-config namespace: razee resourceVersion: "4564" selfLink: /api/v1/namespaces/razee/configmaps/watch-keeper-config uid: 5d447e9c-87aa-11e9-a98b-6ae9411411a9
-
restart watch-keeper so the config-map changes will be put in place
kubectl delete pod -n razee $(k get pods -n razee | grep watch-keeper | awk '{ print $1}')
-
From the RazeeDash console click the
RazeeDash
link in the header to open the RazeeDash details page and verify that you can see deployment information for your Watch Keeper pod.
-
install bunyan to get better looking meteor logs by starting razeedash with
meteor --raw-logs | bunyan
-
To have multiple clusters reporting to your razeedash use the
profile
option of minikube to setup multiple minikube clusters on your development machine. For example:$> minikube start -p test2 😄 minikube v1.1.0 on darwin (amd64) 🔥 Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ... 🐳 Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6 🚜 Pulling images ... 🚀 Launching Kubernetes ... ⌛ Verifying: apiserver proxy etcd scheduler controller dns 🏄 Done! kubectl is now configured to use "test2" $> kubectl config use-context minikube (to switch back to your first cluster)
- If you ever find yourself on localhost and are not able to authenticate with github then you may need to delete the document from the
meteor_accounts_loginServiceConfiguration
collection. Deleting this document will force RazeeDash to show you theConfigure GitHub Login
screen again. At this point you would need to enter your GitHub OAuth appsClient ID
andClient Secret
again.
- remove all of the CRDs from the razee namespace