Overview

The Callgoose automation runner is a small Java program you run inside your network. It connects out to SQIBS over HTTPS, fetches the automation jobs for its runner profile and runs them locally, so your servers never need to accept connections from outside.

You need
A Linux, Unix or Windows host with Java 17, and a runner profile
Where
Your network, behind your firewall
Result
SQIBS workflows run on your systems
SQIBS
Workflow starts
From an incident, a request or the API.
Runner
Fetches the job
Outbound HTTPS only, port 443.
Your network
Runs the actions
Scripts, SSH, Ansible, kubectl, Terraform.
SQIBS
Gets the result
The workflow continues, and the incident can resolve.

Step 1: Get the key file and the runner

  1. Create a runner profile and download its key file, cg-automation-runner-creds.yaml.
  2. In Automation > Profiles, use Download Runner JAR to get cg-automation-runner.jar.
  3. Install Java 17 on the host. See Java installation.

Step 2: Install on Linux

  1. Create a user and the folders, and copy the files in. The key file goes into .conf with a leading dot in its name:
sudo useradd -m cgautouser
sudo -u cgautouser mkdir -p /home/cgautouser/cg-automation-runner/.conf
sudo cp cg-automation-runner.jar /home/cgautouser/cg-automation-runner/
sudo cp cg-automation-runner-creds.yaml /home/cgautouser/cg-automation-runner/.conf/.cg-automation-runner-creds.yaml
sudo chown -R cgautouser: /home/cgautouser/cg-automation-runner
sudo chmod 600 /home/cgautouser/cg-automation-runner/.conf/.cg-automation-runner-creds.yaml
  1. Try it once by hand:
sudo -iu cgautouser
cd ~/cg-automation-runner && java -jar cg-automation-runner.jar
  1. Run it as a service. Create /etc/systemd/system/cg-automation-runner.service:
[Unit]
Description=Callgoose automation runner
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=cgautouser
Group=cgautouser
WorkingDirectory=/home/cgautouser/cg-automation-runner
ExecStart=/usr/bin/java -jar /home/cgautouser/cg-automation-runner/cg-automation-runner.jar
Restart=on-failure
RestartSec=30
LimitNOFILE=64000

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now cg-automation-runner
sudo systemctl status cg-automation-runner

Step 2 (Windows): Install on Windows

  1. Create C:\callgoose\cg-automation-runner and C:\callgoose\cg-automation-runner\.conf. Copy the JAR to the first, and the key file to .conf as .cg-automation-runner-creds.yaml.
  2. Optional: create a local user for the service. Enter the password when asked, so it never sits in a script:
New-LocalUser -Name "cgautouser" -Password (Read-Host -AsSecureString "Password") -FullName "Callgoose automation runner"
  1. Run it as a service with WinSW: place WinSW-x64.exe in the folder, rename it cg-automation-runner.exe, and create cg-automation-runner.xml next to it:
<service>
  <id>cg-automation-runner</id>
  <name>Callgoose automation runner</name>
  <description>Runs the Callgoose automation runner</description>
  <executable>java</executable>
  <arguments>-jar C:\callgoose\cg-automation-runner\cg-automation-runner.jar</arguments>
  <workingdirectory>C:\callgoose\cg-automation-runner</workingdirectory>
  <logpath>C:\callgoose\cg-automation-runner\log</logpath>
  <log mode="roll"/>
  <startmode>Automatic</startmode>
</service>
  1. In PowerShell as Administrator:
cd C:\callgoose\cg-automation-runner
.\cg-automation-runner.exe install
.\cg-automation-runner.exe start
sc.exe query cg-automation-runner

Step 3: Check it is connected

The runner writes log/cg-automation-runner.log in its folder. A good start looks like this:

[ INFO  ] Starting cg-automation-runner <version>
[ INFO  ] Database initialized successfully.
[ INFO  ] Syncing profile details
[ INFO  ] Internal profile details updated successfully.
[ INFO  ] The Runner JAR is running smoothly.

In SQIBS, the runner profile changes from inactive to active. If it does not, check the log and that the host can reach SQIBS on port 443 (firewall requirements).

Keep it safe

  • Run the runner as its own user, with only the rights your actions need.
  • Protect the key file (chmod 600 on Linux). If it leaks, delete the runner profile and create a new one.
  • The runner needs no inbound ports.