Deploying RedSkull


Currently deployment is relatively simple. The first, and most important, thing you need to know is that currently redskull looks for the HTML directory in the same directory as the binary as the default but it can be configured to be elsewhere. The second is that I’ve not written a startup script for it yet.

For this guide I will assume you are building and deploying to a Unix system. If deploying to a Linux server, build on Linux. If deploying to OSX, build on OSX. You get the picture here. Alternatively you could use Go’s crosscompile capabilities but I leave that to you. I’ll also assume you know the basic tools for your OS. If you are not comfortable and capable at the command line, find and study some guides or tutorials for your OS.

Creating a Tarball

After you’ve cloned the repo, changed into it’s top-level directory, and ensured you have Go installed where you’re building Redskull then run go build. It shan’t take long. Next up do the following:

mkdir -p dist/usr/redskull dist/etc/supervisord/
cp -a redskull html dist/usr/redskull
cp docker/supervisord/redskull.conf
cd dist
tar -czf redskull.tar.gz usr/

Now you have a tarball you can extract in the root of your server. Deploy it to your sentinel servers and extract it to the root. Next up is configuring it.

“Configuring” RedSkull

RedSkull require no configuration provided you are OK with the following:

  • It listens on port 8000
  • Your sentinels’ configuration file is /etc/redis/sentinel.conf

If you’re location is different, place it in the environment variable REDSKULL_SENTINELCONFIGFILE and fire up redskull.

Start on Bootup

I recommend using supervisord, and in the docker directory you’ll find a supervisord directory with a redskull.conf file containing a configuration for supervisord to run Redskull. It makes the following assumptions:

  • There is a directory /usr/redskull
  • The redskull binary is in this directory
  • You’ve copied the html directory from the repo’s root this directory, resulting in /usr/redskull/html/ existing.
  • You have supervisord installed and working.

The first three items can be handled by extracting the tarball on the Sentinel server. At this point you can user supervisord to start and manage the running of your Redskull service. I reccommend running Sentinel the same way.

Guide Contents

Article Info

Published: Oct 7 2014