Users can manually install PeerOS through the Advanced Install option, which allows flexibility in that you can specify the configurations to be included in the setup. This guide describes the recommended way of installing Subutai PeerOS on a fresh Debian system. Alternatively, the Quick Install option is also available, which uses the default setup and settings.
Subutai, which is based on Debian, has its own Debian repository. Setting up the Debian system involves the following procedures:
Don’t forget to set aside extra disk, partition, or volume.
Unlimited hardware configuration options are possible. However, when setting up a peer with a single resource host, we recommend running it on a virtual machine with the following minimum requirements:
When running Subutai on a virtual machine, take note of the following guidelines with regard to hardware:
Review these general caveats and requirements for the operating system on which you want to install Subutai:
If not possible, be sure to disable dnsmasq on desktop editions. Refer to the instructions below, Using a desktop operating system.
Before installing Subutai, verify that the required network ports listed below are not used:
To verify, run sudo lsof -i :53
, for example.
/etc/profile
file:
echo “ulimit -n 65535”
Using a guest virtual machine allows for maximum flexibility to install a stock unmodified guest VM operating system, and reduces complications. Debian is our recommended operating system.
Virtual or not, desktop editions should be avoided. Besides unnecessarily wasting resources for the windowing system, they use NetworkManager that installs dnsmasq on port 53. If you do need to use a desktop operating system, here are the procedures to ensure that dnsmasq is disabled:
Check if port 53 is already bound:
sudo lsof -i :53
Any output from lsof
means that port 53 is being used.
After verifying that port 53 is already bound, you must stop dnsmasq permanently. Doing so is safe and won’t affect the general use of your system. Here’s how you do that::
sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop
Edit /etc/NetworkManager/NetworkManager.conf
and then change the DNS property in the [main]
section so that it is set to default: dns=default
.
Here's how the file may look after you have added or modified the DNS property:
[main]
plugins=ifupdown, keyfile
dns=default
[ifupdown]
managed=false
Remove resolv.conf
and then restart NetworkManager:
sudo rm /etc/resolv.conf
sudo service network-manager restart
sudo killall dnsmasq
The last killall
command is just a precaution, don't worry if it says, “no such process”. Another lsof
for port 53
should not produce any output now, which means you’re ready to go on.
If NetworkManager is not configured properly, after restart, you may need to add your nameserver into the /etc/resolv.conf
file it generates. It’s best to add this to the NetworkManager connection configuration if you don’t want the resolv.conf
file to be overwritten.
All files must be run as root or sudo user.
Add the contrib
and non-free
components from both stretch and stretch-updates.
For example, sed -i 's/main/main contrib non-free/g' /etc/apt/sources.list
Run: apt update
Install zfs-dkms
:
apt install zfs-dkms
WARNING: The
apt nstall zfs-dkms
command may partially fail on the first try. Dependencies from zfs-dkms require loading the zfs module. Loading the zfs module does not occur resulting in a failure to build dependencies. As a result, the install reports a failure. Issuing a/sbin/modprobe zfs
right after this failed attempt succeeds. The zfs module builds successfully on the failing first install. Anotherapt install zfs-dkms
after loading the zfs module will succeed building all dependencies properly. If you encounter a failure on the first try, use this workaround to fix it:
/sbin/modprobe zfs && apt install zfs-dkms
Run: /sbin/modprobe zfs
Create your storage partition using ZFS
:
zpool create -f subutai /<path to your device>
(for example, /dev/xvdb
).
Create your mountpoint:
zfs create -o mountpoint="/var/lib/lxc" -o acltype=posixacl subutai/fs
Install lxc
: apt install lxc
Add the Subutai repository to apt
:
echo "deb http://deb.subutai.io/subutai prod main" > /etc/apt/sources.list.d/subutai.list
Make sure dirmngr
is installed:
apt install dirmngr
Add security keys:
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C6B2AC7FBEB649F1
Update apt
and install Subutai:
apt update && apt install subutai
✔️ Make sure /etc/subutai/agent.conf
has the appropriate CDN URL and step #8 above use the proper master
/dev
string in place of prod
in the sources.list file. If not, edit and restart: systemctl restart subutai.service
.
In case you notice a failed status for setting up rng-tools, take note that this is due to the original rng-tools.service requiring a hardware random generator installed. This is handled automatically by the installer, by starting an instance of subutai-rng.service when a generator is not present in your system.
To recover from an error during installation, you can manually run:
dpkg --configure spl-dkms
dpkg --configure zfs-dkms
Now that you have successfully installed Subutai, and have an active RH, you can import the management software and its console to convert this host into a peer:
subutai import management
Restart services to make sure all goes smoothly:
systemctl stop nginx && systemctl disable nginx && apt-get update && apt-get upgrade && systemctl restart subutai-nginx && systemctl status subutai-nginx
When installing directly on a desktop edition, the NetworkManager configuration may not configure the /etc/resolv.conf file properly to resolve CDN addresses causing and displaying - “CDN unreachable errors” - with the import command. If this happens, you must configure NetworkManager to use the right nameserver. For more information, refer to the note on step 1.d.
Command will return the Subutai Console’s access URL, as shown in the screenshot below (within the red box).
Using this URL, you can access the Management Console and manage the peer. On the output stream, the default admin password, "secret", is also provided. On your first login, you can assign your own admin password.
✔️ Before you log in, make sure that you have also installed the Subutai E2E Browser Plugin with at least one PGP key.