IoT server installation and setup

After my server had twice a new installation made necessary by a hardware defect of the system hard drive. The backup was already several weeks old and therefore had to be extensively reconfigured, I decided to change my complete setup on Ansible. In conjunction with Vagrant, even the possibility to automatically test updates beforehand in a VM.

In short, it is automated smarthome server setup, which gives you access to a 100% pre-installed and configured system virtually at the touch of a button. In conjunction with Vagrant even gives the opportunity to test the whole in a virtual machine.

The required Ansible scripts and the Vagrant script can be obtained and tested under the following url.

Just clone, install Vagrant and run:

vagrant up

How it works

Vagrant will create a virtual machine if it does not exists or will start a already existing virtual machine. At the end it will run the ansible script inside to install and configure the system. Later you can also run the ansible script by yourself to apply updates if you made changes to the configuration. If anything goes wrong in case of an error (Most of the cases are network issues where an external server are not reachable) ansible can continue at any point. Just rerun the script. In my case, I use Vagrant to test everything and call ansible directly on my production machine.

One thing you should keep in mind. You must be more strict if you make changes to your system. You should never configure your system directly. All changes should happen inside the ansible configurations and ansible applies them to the server. There are 2 place where you should take a look. The first one is the config folder. It contains variables for usernames, password, file pathes, ports etc. The second one is the role folder. It contains ansible roles which contains the logic how to setup and install individual parts.

To see a list of deployed services, you can check the ansible role folder on github

Additionally there is a uncomplete (work in progress) wiki documentation