Skip to main content

Morio Cluster Node Installation Guide

This guide covers the various ways you can install a Morio cluster node, from fully automated, to completely manual.

Morio is always a cluster

If you are looking to deploy a single-node Morio instance, do not let the word cluster scare you away, you came to the right place. Morio always runs as a cluster, even if it happens to be a 1-node cluster (which it often is).

Before you start​

Morio Cluster Node vs Morio Client​

This guide covers the installation of a Morio cluster node, also known as installing moriod.

For installation of the Morio client, please refer to the Morio Client Installation guide.

Morio Release Channels​

Morio releases are provided through different channels that each serve their specific purpose. You should use the stable channel unless you have specific reasons not to.

πŸ“¦ Stable

The stable channel provides stable releases that have been tested and gone through an incubation period in the canary channel.

tip

The stable channel is the default release channel. We recommend to use stable unless you have specific reasons not to.

🐣 Canary

The canary channel provides early access to releases. When no issues come up during a canary release's incubation period, it is promoted to stable.

The canary releases allow you to test an upcoming stable release in your specific environment, and limits the blast radius in case a problem is not caught in testing. For this reason, we recommend to run the canary release on a staging instance.

πŸ’£ Testing

The testing channel is not intended to be used for real deployments. Instead, this channel is used for our integration tests, as well as by developers of and contributors to Morio to validate fixes or new features.

When a release in testing is validated, it graduates to canary.

Filesystem Layout​

Morio uses one folder for configuration, one for data, and another one for its logs. By default, they are laid out as such:

In addition, Morio needs access to the Docker socket. See the MORIO_DOCKER_SOCKET for details.

Install Morio​

There are 3 ways to install Morio, and a bonus fourth way allows you to run it without any install step:

Install Morio via the installer script​

This is the recommended way to install a Morio Cluster Node.

To install Morio, run this command as a user with sudo permissions:

curl -fsSL https://install.morio.it/cluster | bash

This will run through the following steps:

Alternatively, you can run all of these steps manually, as outlined below.

Install Morio from packages​

To install Morio from packages, we will go through the same steps as the install script, but instead run them by hand:

Ensure systemd is available​

To install Morio using our packages, systemd is a dependency.

Make sure your system has systemd by running:

systemctl -h

If you get a bunch of output on how to use systemctl, you have systemd.

tip

If you do not have systemd on your system, you can still do a fully manual install of Morio.

Determine the package type​

We provide .deb packages for APT-based systems, like Debian or Ubuntu.

warning

We will will also provide .rpm packages for RPM-based systems like RedHat, RockyLinux, or Fedora, in the future, but currently we do not yet provide those.

apt -h

If you get a bunch of output about apt packages, you are on an APT-based system. If not, you are probably on an RPM-based system.

Download and install the morio-repo package​

Download the morio-repo package, and then install it:

curl https://apt.repo.morio.it/setup-morio-repo.deb -o ./setup-morio-repo.deb
sudo apt install -y ./setup-morio-repo.deb

The first line downloads the package from these URLs:

The second line installs it.

Update the list of available software​

The morio-repo package we just installed adds a new software repository. Before we can install software from it, we need to update the list of available packages:

sudo apt update

Install the moriod package​

Now we can install the moriod package:

sudo apt install -y moriod

This will create a new systemd service that will start Morio.

Install Morio by hand​

Installing Morio by hand gives you even more control and allows installing Morio on systems that do not support APT or RPM packages, or do not use systemd.

Let’s see how we can accomplish that.

Create folder structure​

You’ll need to create Morio’s Filesystem Layout. To do so, you can run these commands:

sudo mkdir -p /etc/morio/moriod
sudo mkdir -p /var/lib/morio/moriod
sudo mkdir -p /var/log/morio/moriod

For each of these folders, holding configuration, data, and logs respectively, you can change their location. However, if you do so, you should also update them in the commands below.

Create the moriod service​

You can reuse the files that are inside the packages we provide to get a similar experience. They are hosted on GitHub, so you can download them from there.

Note that apart from the systemd service file, we also use two environment files so you need to copy those too:

FileTarget FolderDescriptionDownload Link
moriod.service/etc/systemd/systemMoriod service fileon GitHub
modiod.env/etc/morio/moriodMoriod presetson GitHub
channel.env/etc/morio/moriodMoriod release channelon GitHub

Note that you will need to update the channel.env file, and replace these placeholders:

PlaceholderDescriptionExample value
__MORIO_CONTAINER_TAG__The container tag to loadv0.8.1
__MORIO_RELEASE_CHANNEL__The release channel to usestable

Alternatively, you can modify the moriod.service file to hard-code these values.

tip

Morio is now installed, you can start the moriod service:

sudo systemctl start moriod

Run Morio without installing it​

Last but not least, you can run Morio without installing anything.

To kick the tires, all you need to start Morio is this command:

docker run --rm --init \
--name=morio-core \
--hostname=core \
--network-alias=core \
-v "/var/run/docker.sock:/var/run/docker.sock" \
itsmorio/core:latest

If you want to clean up after stopping Morio, make sure to remove all its containers:

docker rm -f morio-core morio-api morio-ca morio-broker morio-db morio-console morio-ui morio-proxy morio-connector morio-dbuilder morio-watcher morio-web 2>/dev/null

Uninstall Morio​

To uninstall Morio and remove it from your system, follow these steps:

  • Stop moriod:
sudo systemctl stop moriod
  • Remove all morio-* containers:
docker stop $(docker ps -q --filter "name=morio-")
  • Remove the morio-repo and moriod packages (if you installed using our packages):
sudo apt purge -y morio-repo moriod
  • Remove the 3 folders holding configuration, data, and logs. If you do not have the Morio client installed, you can remove everything under morio:
sudo rm -rf /etc/morio /var/log/morio /var/lib/morio
  • If you do have the Morio client installed (and want to keep it), remove everything under morio/moriod instead:
sudo rm -rf /etc/morio/moriod /var/log/morio/moriod /var/lib/morio/moriod