GreenGuard is prepared to be run using Docker.
These are the commands needed to start a Docker container locally that runs a Jupyter Notebook already configured to run GreenGuard.
docker run -ti -p8888:8888 signalsdev/greenguard:latestThis will start a Jupyter Notebook instance on your computer already configured to use GreenGuard. You can access it by pointing your browser at http://127.0.0.1:8888
Further details about the usage of this image can be found here.
GreenGuard can also be started using Kubernetes.
Here are the minimum steps required to create a POD in a local Kubernetes cluster:
- Create a yaml file with these contents:
For this example, we are assuming that the yaml file is named greegunard-pod.yml.
apiVersion: v1
kind: Pod
metadata:
name: greenguard
spec:
containers:
- name: greenguard
image: signalsdev/greenguard:latest
ports:
- containerPort: 8888- Create a POD:
After creating the yaml file, you can create a POD in your Kubernetes cluster using the kubectl
command:
kubectl apply -f greenguard-pod.yml- Forward the port 8888
After the POD is started, you still need to forward a local port to it in order to access the Jupyter instance.
kubectl port-forward greenguard 8888- Point your browser at http://localhost:8888
NOTE: If GreenGuard is run in a production environment we recommend you to use a service and a deployment instead of just a simple POD. You can find a template of this setup here
If you want to build the Docker image from scratch instead of using the dockerhub image you will need to:
- Clone the repository
git clone git@github.com:signals-dev/GreenGuard.git
cd GreenGuard- Build the docker image using the GreenGuard make command.
make docker-buildFor more details about GreenGuard and all its possibilities and features, please check the project documentation site!