Service Mesh Autoscale Test
A autoscale, (fully) automated, Infrastructure as code aproach to Istio.
In a world of containers and microservices, the management complexity scalates, understanding complex behaviours under heavy distributed workloads is challenging to say the least, while scaling but don’t overprovision is a must.
Full architectural design can be found in ARCHITECTURE.md
In order to run the following we need a GCP account. And highly recomend the FREE TIER activation https://cloud.google.com/free/docs/gcp-free-tier
IMPORTANT. You must visit the
Kubernetes enginepage in order to enable the API. :face-palm:
Once you get that manual step ready, please fetch the ORG_ID and store it
in the .envrc file in
- make 4.1
- terraform 0.12.7
- gcloud 259.0.0
- kubectl 1.15.3
- curl 7.58.0
- golang 1.12.8
- direnv (you must load manually perform
- helm 2.14.3
# TL; DR make infra make topology make deploy make stress
First time lanching
make infra it will create 2 files,
.envrc for direnv
gcp.json for gcloud credentials. It requires a
with the correct org_id.
.envrcis created by coping
.envrc.tpland letting you edit the file to populate the project_id value.
gcp.jsonis created by first, create a project with terraform in the google acount with the name of
TF_VAR_project_id(default: sm-autoscale) and use the newly created project to generate the gcp.json file and store it
GOOGLE_CREDENTIALSfor later scripts.
make infrawill launch the terraform for create a gke stack with istio.
Once the environment is completed is time to tweack the application to launch.
src folder there is a
service-graph.yaml file that describes a
graph to test istio capabilities. it uses istio-tools/isotope
to quicly draft connectivity graphs. you can uses the examples in the
example-topologies folder of that repo.
As public entrypoint it exposes a fortio app to stress the previosly created graph.
make topologytranslates the
topology-path.yamlautomatically to kubernetes, but it can be translate to graphviz also to see it.
Once you have a target infrastructe and a
topology-path.yaml is time to
upload the application.
make deploywill create the deployment with kubectl, create a autoscale rule and expose the fortio client to in ingress endpoint