5. Deploying Gort
This guide will instruct you through the process of installing the Gort controller.
The Gort controller is the core Gort service, which relays messages to and from the chat providers, manages relay command instructions, and exposes the REST administration API. See Gort Architecture for more information.
5.1. Running Gort in Kubernetes
If you have an existing Kubernetes cluster (or are using something like Minikube or Docker Desktop Kubernetes). you can deploy Gort there. The easiest way to do this is to use the included Helm chart.
You’ll need to have Helm installed. If you don’t, you can follow the instructions here.
Installing the Helm chart is fairly straight-forward:
helm install gort helm/gort
5.2. Running Gort in Docker
If you don’t have Go installed, you can run Gort with Docker.
5.2.1. Building Your Own Gort Image (Optional)
If you want to use the most absolutely bleeding-edge version of Gort, you can build your own local Gort image. If you don’t mind using the stable version, you can skip this step and Docker will automatically download it for you.
To build your own local image you can use the
make file included in
the root of the Gort repository:
You can verify that this was successful by using the
docker image ls
$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE getgort/gort 0.9.0 66fca0b90847 5 seconds ago 109MB getgort/gort latest 66fca0b90847 5 seconds ago 109MB
This should indicate the presence of two images (actually, one image
tagged twice) named
Now you can check the version of your installation by passing it the
version command (which is equivalent to executing
$ docker run getgort/gort version Gort ChatOps Engine v0.9.0
5.2.2. Starting Containerized Gort
Finally, from the root of the Gort repository, you can start Gort by
docker compose as follows:
docker compose up
If everything works as intended, you will now be running three containers:
Gort (listening on port 4000)
Postgres (a database, to store user and bundle data)
Jaeger (for storing trace telemetry)
Finally, you should see some output similar to the following:
INFO  Loaded configuration file file=config.yml INFO  Starting Gort version=0.8.0-alpha.0 INFO  Installing adapter adapter.name=Gort INFO  Connection to data source established type=postgres.PostgresDataAccess INFO  Gort controller is starting address=":4000" INFO  Connecting to Slack provider adapter=Gort provider=Gort INFO  Connection established to provider adapter.name=Gort adapter.type=slack event=connected
As you may have noticed, this command opens port 4000. This allows the Gort controller to access the administration API, which is required to bootstrap your Gort instance.
Congratulations, you now have a running Gort controller!
5.3. Running Gort as a Native Gort Binary
5.3.1. Installing Gort via
If you have Go installed, you can
build and install Gort in one command using the
go install command.
go install github.com/getgort/gort@latest
When installed this way, Gort will be installed to the directory named
GOBIN environment variable, which defaults to
$HOME/go/bin if the
GOPATH environment variable is not set.
5.3.2. Building Gort From Source
If you prefer (if you have Go installed), you can also build Gort from the source code.
To do this, you must first clone the
getgort/gort repository and
git clone email@example.com:getgort/gort.git cd gort
Once you’re in the Gort code repository, you can use
go build to
build the Gort binary.
You should now have an executable binary named
gort in your working
directory. You can either run it in place, or move it a directory on
your command path.
5.3.3. Executing a Native Binary
If you installed or built Gort using
go, you can run that binary,
pointing to the location of the configuration file.
gort --config ./config.yml