First Pass
Posted by: Mark Bools on 2019-06-13 What are the first things we want to build. I want to put two things together initially; A website An e-mail server To do this though we have a few things to think about first. Yes, you’re looking at a website reading this and it may be the ‘old’ website on which we started but most likely it will be on the new website we’re about to build from scratch. Let’s start from the end and work backwards. Okay, what are the requirements for our website? We need somewhere to host it and we need to set up a system to serve that website. While it is simple, and common, for smaller projects to use a provider like GitHub or a CMS provider like Wordpress, SquareSpace, or Wix, we’re not going to go down that path. Two reason; it’s boring, with few learning opportunities, and secondly it ties us to that supplier and whatever options they offer. So, we’ll create our own website from scratch and host it on our own webserver. Since we want it to be available all the time this means finding a host provider for our webserver. There are many options here, but for simplicity (and because I know their service is reasonably priced and reliable) we’ll use DigitalOcean. Okay, what about producing the website? We could use a self hosted CMS (there are lots to choose from, but there are two reasons to not do this (at least for now); it’s overkill, we only need a simple static website at the moment, and it denies us learning opportunities for basic web topics such as HTML, CSS, and some JavaScript, not to mention all the issues about performance, security, and running a webserver. For these reasons we will create a static website. How should we generate the static website? We could manually create the whole thing (write every page from scratch) but this is tedious and error-prone especially when, as we shall see, there is a lot of boilerplate involved. We could use a static site generator (in fact I used Middleman for early versions of this site). These site generators have many merits and we may revisit them, but in the interests of learning the basics we’ll consider other ‘homegrown’ approaches first. Once we start developing our website we will want to automate the process of assembling and testing it. Once it is mature enough we will want to automate the deployment too, so the sooner we consider the issues involved in managing the host server and how our website will be delivered, the better. This will involve setting up some management systems (spoiler alert, we’re going to the SaltStack) and a build deployment system (another spoiler alert, we’re going to use Concourse-CI). We also want to keep control of all our source code, the natural choice here (at least in 2019) is git. Now, it would be easy to default to using GitHub or GitLab for our central repository but, again in the interests of learning opportunities, we’ll set up something a little more sophisticated. That brings us to the e-mail server. Sure we could use something like GMail, but there are many reasons to avoid this (although you may notice that SaltyVagrant used a GMail address for a while before we stood up our own e-mail server). Again, setting up and administering our own e-mail server offers a lot of learning opportunities and it’s too good to resist. As with creating our website we could use a number of pre-rolled e-mail server setups but while these are interesting and useful in their own right I think we’ll learn more setting up our own from scratch. As with the webserver we’ll do this with automation in mind using our Concourse-CI to automate build, test, and deployment, and our SaltStack to manage our e-mail system. So you can see that even with two simple, and common, requirements we have a lot of work ahead and plenty of learning opportunities. Of course all this is dependent on our development environment, and this is where we start…Problem
Solution
Discussion