-
Notifications
You must be signed in to change notification settings - Fork 0
pmrich/tools
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Examples of various python and scala applications.
folder structure:
build.sbt - used to build the scala programs and a sbt docker image
project/
plugins.sbt - plugins required for the sbt docker image
docker/
python thespian example with docker images using docker-compose
different image than the one controlled by sbt.
django website included in the image
src/main/
python/
portping.py - ping a port by connecting to it with a 4 second timeout.
scala/Tools/
Node.scala - simple program that prints "Node"
Docker: To run the docker image, build the image and run it.
sbt docker
docker run -i tools/tools
Minikube(Bash): To run Akka in kubernetes, run the below.
minikube start --memory 4gb
eval $(minikube docker-env)
sbt docker:publishLocal
kubectl apply -f k8s/simple-cluster-rbac.yml
kubectl apply -f k8s/simple-cluster-deployment.yml
kubectl apply -f k8s/simple-cluster-service.yml
KUBE_IP=$(minikube ip)
MANAGEMENT_PORT=$(kubectl get svc akka-simple-cluster -ojsonpath="{.spec.ports[?(@.name==\"management\")].nodePort}")
echo $KUBE_IP $MANAGEMENT_PORT
curl http://$KUBE_IP:$MANAGEMENT_PORT/cluster/members | jq
Minikube(Xonsh): To run Akka in kubernetes, run the below.
minikube start --memory 4gb
minikube docker-env - > /tmp/minikube_docker-env
source-bash /tmp/minikube_docker-env
sbt docker:publishLocal
kubectl apply -f k8s/simple-cluster-rbac.yml
kubectl apply -f k8s/simple-cluster-deployment.yml
kubectl apply -f k8s/simple-cluster-service.yml
$KUBE_IP=$(minikube ip).strip()
$MANAGEMENT_PORT=$(kubectl get svc akka-simple-cluster -ojsonpath='{.spec.ports[?(@.name=="management")].nodePort}').strip('\'')
echo $KUBE_IP $MANAGEMENT_PORT
curl http://$KUBE_IP:$MANAGEMENT_PORT/cluster/members | jq
Watching the cluster:
kubectl get all --all-namespaces
#then use one of the akka-simple-cluster to watch the log
kubectl -n default logs pod/akka-simple-cluster-cb8dd844b-6c4v5 -fAbout
Tools for doing stuff!
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published