Before setting up, we’ll need to break down what we want to do in the first place. My distribution of choice is Ubuntu, mostly because it is supported by a lot of providers out of the box, but also rather simple to set up. With a little experience in other *nix distributions you should be able to quickly adapt the required steps provided in the articles.
I’ll assume you have an Ubuntu Desktop PC running during the setup process. You can easily install it side by side to another operating system. Once a certain point during the setup is reached, we’ll manage the desktop machine itself via Ansible– Scripts.
So, let’s see what we need and chose the software. We will come back to this list quite often later on, so keep it around.
- Base Hardware 1&1 (This is a referral link, I get a variable bonus for products purchased via this link) or DigitalOcean (This is a referral link, you get $10 bonus, I get a one time payment of $25 once you spend $25)
- Domain Management: External service that provides control over nameserver entries. This is required for enhanced security measures. I use INWX.
- Base Operating system: Ubuntu 16.04 LTS with encryption
- Setup and installation automation: Ansible and GIT
- Web: NGINX with Encryption and PHP 7
- Mail: Postfix and Dovecot with Encryption and assorted Spam protection measures.
- Database: SQL with Percona
- GIT for managing software projects, configurations and scripts
- CI: Jenkins and assorted plug-ins/tools for PHP (PHPUNIT, PHPCPD, PHPMD, PHPCS, Selenium and others)
For simplicity, everything will be installed on one physical “root” server. The scripts and articles will work for virtual instances and multiple servers as well and can be easily adapted. The goal is to provide a very flexible setup that can scale with growth and performance requirements. You can start out with one virtual machine for non critical services and expand to multiple cloud instances, redundant mail servers, replicated database hosts, etc.
Personally, I use dedicated root servers from 1&1 Germany (This is a referral link, I get a variable bonus for products purchased via this link) for my setup. Especially for training purposes a cloud instance will be more than enough. I use DigitalOcean (This is a referral link, you get $10 bonus, I get a one time payment of $25 once you spend $25) for this purpose. Their smallest instance for $5/month can be used for starting up and even be shut down while not working on it keeping the costs down. I don’t store sensitive information in a cloud container for security reasons, so please carefully consider the implications of storing your production databases or mails there.
The next step will be creating our initial environment on our desktop machine.