Deploy Mainflux on Digital Ocean in 3 Simple Steps
With Digital Ocean’s One-Click Apps, it is really simple to deploy Mainflux — it can be done in less than 5 minutes. We’ll show how in this article.
Step 1 — Digital Ocean Docker One-Click App
Digital Ocean offers Docker pre-set machines as “One-Click App”. Head over there and create a One-Click VM.
You’ll receive root password via e-mail, so use IP address of your newly created machine to login as a root:
We’ll deploy Mainflux under the simple user (not root), so let’s create one user:
In order for this user to be capable to deploy Docker containers, it must be added to a
docker Linux group:
usermod -aG docker mainflux
OK, we’re done as a root, let’s switch to this simple user:
su - mainflux
Now the fun begins ;).
Step 2 — Get Mainflux
Just fetch the latest release tarball from here.
In the moment of writing of this blog post, latest release is 0.5.1, so we’ll execute:
wget -O- https://github.com/mainflux/mainflux/archive/0.5.1.tar.gz | tar xz && cd mainflux-0.5.1
All that’s left now is to launch the system.
Step 3 — Deploy
Again very easy step:
docker-compose -f docker/docker-compose.yml up
And that’s all — you have your Mainflux IoT platform up and running!