2. Installation

Elephant Shed consists of the following Debian packages and their dependencies:

  • elephant-shed: Metapackage that includes the following packages.
  • elephant-shed-prometheus: Configuration files and helper scripts for Prometheus and its exporters.
  • elephant-shed-cockpit: Configuration files for cockpit and cockpit-ws.
  • elephant-shed-grafana: Preconfigured Prometheus datasource and dashboard that includes various system and PostgreSQL metrics.
  • elephant-shed-pgadmin4: Configuration files for pgAdmin4.
  • elephant-shed-pgbackrest: Systemd service files and generators, helper scripts and preset configuration.
  • elephant-shed-pgbadger: Systemd service files, generators and helper scripts.
  • elephant-shed-portal: Elephant Shed web portal including Apache configuration.
  • elephant-shed-postgresql: Additional preset configuration files for PostgreSQL.
  • elephant-shed-shellinabox: Shell In A Box configuration files.
  • elephant-shed-tmate: Preconfigured tmate installation for easier support.

2.1. Package Installation

Prebuilt packages are available from https://packages.credativ.com/public/postgresql/.

# Install tools
sudo apt-get install curl ca-certificates apt-transport-https

# Use official PostgreSQL repo, apt.postgresql.org
echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

# Use credativ repo, packages.credativ.com
echo "deb https://packages.credativ.com/public/postgresql/ stretch-stable main" | sudo tee -a /etc/apt/sources.list.d/elephant-shed.list
curl https://packages.credativ.com/public/postgresql/aptly.key | sudo apt-key add -

# Install elephant-shed
sudo apt-get update
sudo apt-get install elephant-shed

# Choose desired PostgreSQL versions to install
sudo apt-get install postgresql-10

# Every user in the group "elephant-shed" is allowed to login at the portal
# Add all needed users to this group
sudo adduser <USERNAME> elephant-shed

The repository also contains packages that the elephant-shed packages depend on. This includes packages for Grafana, Cockpit and various python libraries.

2.2. Installation from source

The source code is available on GitHub: https://github.com/credativ/elephant-shed

2.2.1. Build Debian Packages

All Elephant Shed Debian packages can be built using the command make deb.

Requirements:

  • dpkg-dev
  • devscripts
  • jq

2.2.2. Build Documentation

To build the documentation in HTML as well as the PDF format type make README.

Requirements:

  • pandoc
  • texlive-latex-base

2.2.3. Create Testsystem with Vagrant

The make vagrant command builds all components, creates a new virtual machine using Vagrant and deploys the software using Ansible. This can also be used to redeploy a already running machine.

The Vagrant configuration is located in vagrant/Vagrantfile.

Requirements:

  • vagrant
  • virtualbox or libvirt
  • ansible

2.2.4. Deploy on remote machine

To deploy the software on any machine, enter the connection information in the inventory vagrant/inventory. The deployment can than be started with the following command make ansible.

Requirements:

  • ansible