-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JetBrains Tools workspace excluded from project
How To run Oh My GLB documentation Prerequisites setup Local installation See if everything is well installed See if everything running smoothly Cleaning Update main README.md Add terratest into Makefile
- Loading branch information
Showing
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# How to run Oh My GLB locally | ||
|
||
- [Overview](#overview) | ||
- [Environment prerequisites](#environment-prerequisites) | ||
- [Running project locally](#running-project-locally) | ||
- [See if everything is well installed](#see-if-everything-is-well-installed) | ||
- [See if everything running smoothly](#see-if-everything-running-smoothly) | ||
- [Cleaning](#cleaning) | ||
|
||
## Overview | ||
The document helps contributors participating on GSLB to install local environment. | ||
It is not intend to force you to strictly follow the document, but it can help you to | ||
avoid troubles related setup local environment. | ||
|
||
|
||
![](./images/specialist2.jpg) | ||
|
||
## Environment prerequisites | ||
|
||
- install **GO 1.14** | ||
- ensure you have standard GO folder structure created and $GOPATH, $GOROOT are properly set. | ||
|
||
- install **GIT** | ||
- ensure SSH key is set for your account; see https://github.com/settings/keys | ||
|
||
- install **gnu-sed** if you don't have it | ||
- update $PATH in `~/.bash_profile` by sed path `export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH` | ||
|
||
- install **Docker** | ||
- ensure you are able to push/pull from your docker registry | ||
- to run multiple clusters reserve 8GB of memory | ||
|
||
![](./images/docker_settings.png) | ||
|
||
- install **Kubectl** to operate clusters | ||
|
||
- install **Helm** to get charts | ||
- add default repo | ||
```shell script | ||
helm repo add stable https://kubernetes-charts.storage.googleapis.com | ||
``` | ||
|
||
- install **kind** as tool for running local Kubernetes clusters | ||
- follow https://kind.sigs.k8s.io/docs/user/quick-start/ | ||
|
||
|
||
## Running project locally | ||
Follow instructions [here](../README.md) if you are deploying local cluster step by step. You can remove it any time by calling | ||
```shell script | ||
make destroy-local-cluster | ||
``` | ||
|
||
To spin-up local environment you start two clusters deployment with test application on the top of it. Just execute command below and that's all. | ||
```shell script | ||
make deploy-full-local-setup | ||
``` | ||
## See if everything is well installed | ||
If local setup runs well, check if clusters are correctly installed | ||
```shell script | ||
kubectl cluster-info --context kind-test-gslb1 && kubectl cluster-info --context kind-test-gslb2 | ||
``` | ||
Cluster [test-gslb1](../deploy/kind/cluster.yaml) is exposing external DNS on default port `:53` | ||
while [test-gslb2](../deploy/kind/cluster2.yaml) on port `:54`. | ||
```shell script | ||
dig @localhost localtargets.app3.cloud.example.com && dig -p54 @localhost localtargets.app3.cloud.example.com | ||
``` | ||
As expected result you should see **six A records** divided between nodes of both clusters. | ||
```shell script | ||
... | ||
... | ||
;; ANSWER SECTION: | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.2 | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.5 | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.3 | ||
... | ||
... | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.8 | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.6 | ||
localtargets.app3.cloud.example.com. 30 IN A 172.17.0.7 | ||
``` | ||
Both clusters have [podinfo](https://github.com/stefanprodan/podinfo) installed on the top. | ||
Run following command and check if you get two json responses. | ||
```shell script | ||
curl localhost:80 -H "Host:app3.cloud.example.com" && curl localhost:81 -H "Host:app3.cloud.example.com" | ||
``` | ||
## See if everything running smoothly | ||
There is wide range of scenarios which [GSLB](../README.md) provides and all of them are covered within [tests](../terratest). | ||
To check whether everything is running properly execute [terratests](https://terratest.gruntwork.io/) : | ||
```shell script | ||
make terratest | ||
``` | ||
## Cleaning | ||
From any reason you are killing clusters? | ||
```shell script | ||
make destroy-full-local-setup | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.