This project provides a local development environment for the SLATE project.
- Linux (2 cores, 4GB memory, 15GB storage) or MacOS
- Python (3.9+, 'python' must be in your PATH)
- Docker-Compose (installed with Docker for Mac)
After installing the dependency requirements and pulling the MiniSLATE repository:
Make sure your Docker is running using:
systemctl status docker
To start Docker run:
systemctl enable --now docker
On MacOS make sure the Docker Desktop application is running.
On Linux, the user running MiniSLATE must be a member of the
dockergroup. Users can be added with:
sudo usermod -a -G docker <username>
Configure Shell Aliases (Optional)
The following command will allow you to run the
minislate command and the internal
kubectl commands from any directory:
Initialize the environment with pre-built Docker images:
If you want to map local directories into the SLATE container specify a volume:
./minislate init -v ~/WorkDir:/mnt
Build on-the-fly (Optional)
Alternatively, if you need to perform actions like test different versions of the SLATE Portal code other than what is baked into the pre-built Docker image:
- Modify the
slate/Dockerfilein this repository.
- Build the images from source:
Use SLATE CLI
Run SLATE CLI commands by passing them directly to
./minislate slate ...(cluster list, group list, etc)...
or by starting a shell in the container and running them "natively":
[your@localmachine]$ ./minislate shell slate [root@ceb03bcaca72]$ slate ...(cluster list, group list, etc)...
To completely destroy the environment so that it can be created again run:
To remove the images from your machine entirely add the option:
- This can necessary if there was a failure or error in the build process.
- It is also needed to completely remove MiniSLATE from your machine.
For a more detailed description of each MiniSLATE command view COMMANDS.md
MiniSLATE is a docker-compose orchestrated standard SLATE deployment (with a couple performance tweaks for personal machines). MiniSLATE spins up 4 containers with
docker-compose. These include:
- A Docker-in-Docker Kubernetes node
- A SLATE management container
- A DynamoDB container used by the SLATE API server
- A storage container simulating an NFS share
MiniSLATE also includes a
config.py that may be used to control several parameters including:
Many errors that you will encounter with MiniSLATE are state related. They may be caused by an interruption in the
build process. Unexpected restarts of certain system daemons can also cause problems. Most state related issues can be resolved by re-initializing the environment.
./minislate destroy && ./minislate init
Be sure this process does not get interrupted, or you may have to destroy again. At this point if the initialization fails for any reason, you may be dealing with an issue related to the images themselves. To remove and rebuild container images run the following:
./minislate destroy --rmi && ./minislate init
It may be necessary to spin up MiniSLATE in an automated way. For example, the Selenium portal tests automatically creates a MiniSLATE cluster to test against. These clusters may require that
tty is disabled inside the container.
minislate init can be run with the
-s flag to disable
tty for automated testing.
./minislate init -s