Kubernetes
Datagen is provided as a packaged docker image and along with deployment files. Hence, this docker image can be use to run datagen on any kubernetes environment.
Download
Download latest image and extract it with following commands:
wget https://datagen-repo.s3.eu-west-3.amazonaws.com/1.0.0/docker/datagen-k8s.tar.gz
tar -xvzf datagen-k8s.tar.gz
cd datagen_k8s-1.0.0/
Load the image with following command:
docker load --input datagen-docker-image-v1.0.0.tar
(Optional): Login to docker registry
If there is an internal docker registry, easier method is to login to docker registry with following example command:
docker login ${INTERNAL_DOCKER_REGISTRY}
Then push image with following command:
docker image tag localhost/datagen:v1.0.0 ${INTERNAL_DOCKER_REGISTRY}/datagen:v1.0.0
docker push ${INTERNAL_DOCKER_REGISTRY}/datagen:v1.0.0
Once image is pushed to internal registry, all machines connected to that registry can now pull this image, making it widely available
One may need to register the docker registry to the kubernetes cluster:
kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD
Run datagen
In the deployment, identify the part for the service and replace this
Finally, run datagen docker with following commands:
kubectl create configmap app-properties --from-file=./application-standalone.properties
kubectl create configmap logback-xml --from-file=./logback-spring.xml
kubectl apply -f datagen_deployment.yml