Server Boilerplate

You'll need at least 2 servers. One for building the project, and the other for hosting it. You may need more servers if you want separate environments (staging, qa, etc). You may also need more if you are distributing a single environment across multiple nodes.

Regardless of how many servers you end up with, there are basic steps that you'll want to perform. A lot of this may seem elementary, but flip through it anyway to make sure we are on the same page.

This guide assumes you are using Ubuntu 16.04. Provision an Ubuntu build server and production server (e.g., on Linode or Rackspace). When they are ready, follow these steps on both servers.

Why isn't this automated?

It is! But it isn't pretty. The fabfile where I've scripted all this is hard to read. Plus, it's probably nice to go through each step anyway to understand what's going on.

I plan on creating a bona fide Ansible script in the future for this. Until then, I recommend stepping through the process in this guide. But, if you dare trust my script, you can run the following and then skip this and the following 2 chapters on servers. You will need (and probably already have) pip.

NOT RECOMMENDED AT THIS TIME

pip install Fabric
git clone [email protected]:dustinfarris/ubuntu-boilerplate
cd ubuntu-boilerplate
fab -H root@<prod-server-ip-address> build:phoenix
fab -H root@<build-server-ip-address> build:build

Assuming you did not just do that, SSH into your server as root and lets get started!

results matching ""

    No results matching ""