Morio Cluster Node Installation Guide
This guide covers the various ways you can install a Morio cluster node, from fully automated, to completely manual.
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.
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:
- Configuration resides in
/etc/morio/moriod
. See theMORIO_CONFIG_ROOT
preset for details. - Data resides in
/var/lib/morio/moriod
. See theMORIO_DATA_ROOT
preset for details. - Logs are written to
/var/log/morio/moriod
. See theMORIO_LOGS_ROOT
preset for details.
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
- Install Morio from packages
- Install Morio by hand
- Run Morio without installing it
Install Morio via the installer scriptβ
To install Morio, run this command as a user with sudo
permissions:
- Stable Channel
- Canary Channel
- Testing Channel
curl -fsSL https://install.morio.it/cluster | bash
curl -fsSL https://install.morio.it/cluster/canary | bash
curl -fsSL https://install.morio.it/cluster/testing | bash
This will run through the following steps:
- Ensure
systemd
is available - Detect the package type
- Download and install the
morio-repo
package - Update the list of available software
- Install the
moriod
package
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 - Detect the package type
- Download the
morio-repo
package - Update the list of available software
- Install the
moriod
package
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
.
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.
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:
- On APT-based systems
- On RPM-based systems
curl https://apt.repo.morio.it/setup-morio-repo.deb -o ./setup-morio-repo.deb
sudo apt install -y ./setup-morio-repo.deb
curl https://rpm.repo.morio.it/setup-morio-repo.rpm -o ./setup-morio-repo.rpm
sudo yum install -y ./setup-morio-repo.rpm
The first line downloads the package from these URLs:
- For APT-based systems: https://apt.repo.morio.it/setup-morio-repo.deb
- For RPM-based systems: https://rpm.repo.morio.it/setup-morio-repo.rpm (planned)
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:
- On APT-based systems
- On RPM-based systems
sudo apt update
sudo yum clean expire-cache
sudo yum check-update
Install the moriod
packageβ
Now we can install the moriod
package:
- On APT-based systems
- On RPM-based systems
sudo apt install -y moriod
sudo yum 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:
File | Target Folder | Description | Download Link |
---|---|---|---|
moriod.service | /etc/systemd/system | Moriod service file | on GitHub |
modiod.env | /etc/morio/moriod | Moriod presets | on GitHub |
channel.env | /etc/morio/moriod | Moriod release channel | on GitHub |
Note that you will need to update the channel.env
file, and replace these placeholders:
Placeholder | Description | Example value |
---|---|---|
__MORIO_CONTAINER_TAG__ | The container tag to load | v0.8.1 |
__MORIO_RELEASE_CHANNEL__ | The release channel to use | stable |
Alternatively, you can modify the moriod.service
file to hard-code these values.
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.
- Without data persistence
- With data persistence
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
Map in folders for config and data to persist your data after the container exits:
docker run --rm --init \
--name=morio-core \
--hostname=core \
--network-alias=core \
-v "/var/run/docker.sock:/var/run/docker.sock" \
-v "/etc/morio/moriod:/etc/morio" \
-v "/var/lib/morio/moriod:/morio/data" \
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
andmoriod
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