-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added commands to run project locally in README.md; fixed image name …
…in statefulset.yaml; added logging instead of println
- Loading branch information
1 parent
eb68724
commit 941cfc4
Showing
7 changed files
with
59 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,40 @@ | ||
# -distributed-cache-on-k8s-poc | ||
[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes and AWS | ||
# distributed-cache-on-k8s-poc | ||
[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes | ||
|
||
# Running it locally (On Mac) with docker images from local registry | ||
|
||
`git clone https://github.com/sharma-rohit/distributed-cache-on-k8s-poc.git` | ||
|
||
1. Install minikube: `brew cask install minikube` | ||
2. Inatall kubectl: `brew install kubectl` | ||
3. Start minikube with --insecure-registry option: | ||
|
||
`minikube start --insecure-registry localhost:5000` | ||
4. Setup minikube Ingress controller: | ||
|
||
`minikube addons enable ingress` | ||
5. To make the local `docker` command use the minikube vm as docker host and all commands starting with `docker` affecting the minikube vm not the host computer run: | ||
|
||
`eval $(minikube docker-env)` | ||
|
||
6. `docker run -d -p 5000:5000 --restart=always --name registry -v /data/docker-registry:/var/lib/registry registry:2` | ||
|
||
7. To build and publish docker image to local registry of minikube run: | ||
|
||
`sbt docker:publish` | ||
|
||
8. Create kubernetes manifests: | ||
|
||
`kubectl create -f kubernetes/statefulset.yaml` | ||
|
||
`kubectl apply -f kubernetes/service.yaml` | ||
|
||
`kubectl apply -f kubernetes/headless_service.yaml` | ||
|
||
`kubectl apply -f kubernetes/ingress.yaml` | ||
|
||
9. To redirect traffic from the domain "distributed-cache.com" stated in ingress.yaml to our minikube cluster run: | ||
|
||
`echo "$(minikube ip) distributed-cache.com" | sudo tee -a /etc/hosts` | ||
|
||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 0.13.17 | ||
sbt.version = 1.1.0 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.3") |
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