Many software developers find learning about the entire software development life cycle to be interesting. If you’re beginning a startup, or just want a good development playground to host your projects, this tutorial will show you an easy way, using free and open source software, to host your apps in a stable, scalable, secure environment using Gitlab and Kubernetes. You will pay for the servers and hosting services, but will own the entire stack that your code goes through. The monthly cost comes out to ~$57/month. This setup is meant for development, but can be updated for production environments as well.
Whenever we want to make our own website, we need to purchase our own .com. There are many websites that do this. You may have heard of some like GoDaddy, Namecheap. We’re using Google domains, because they offer free privacy support.
This process usually involves making an account, adding payment information (we’re not going to share this part), and buying the domain. Afterwards, you are left with a web application that you can make changes to the configuration of your domain.
Once you have a Digitalocean account, this page will explain how to:
When you buy a domain from a company like Google, Google would provide you with a way to update your domain settings. There are a variety of settings, but you can think of the settings simply as “When people visit 80pxtesting.com, which server IP address do I point that to?” You can simply manage this on Google’s website, or we can change the nameserver’s for the domain to use Digitalocean’s control panel. The latter is nice, because you can change anything about your architecture in one control panel, while still having a fall back on your original domain registrar as well.
Using this Digitalocean tutorial on how to install Gitlab as a base:
We’re going to install and configure Gitlab, including some of the open source software bundled like Mattermost, but also set up S3 storage.
Once you have a Digitalocean account, you can add an SSH key to your account. Then, Digitalocean will assist you by adding your public SSH key to the server, so that when you go to log in as the initial
root user, you can be allowed in based on your private key.
Digitalocean is a web hosting company where you can purchase servers, load balancers, s3 storage, database services, and more.
Creating an account is similar to buying a domain— you create an account and add payment information. Then you can create whatever services you want from Digitalocean, and you’ll be billed based on how much you use.
Kubernetes is a way to deploy applications using docker registry images, deployment specifications, instructions, and more to a group, of computers all working together. Under the hood there is a lot to learn about kubernetes if you are from a traditional server management role. We’re going to use Gitlab to push our applications up to the cluster. Fortunately for us, gitlab does a lot of the heavy lifting when it comes to interacting with kubernetes. We just need to create a cluster, and connect it to our gitlab instance where ever we would like it to have access. (The entire gitlab instance, a group of projects, or a single repository)
S3 storage was invented as a way to securely store static data over the web. Some applications, like Gitlab, can use it to store static data like backups. Once you have a Digitalocean account, this page will explain how to:
Very generally, a private key is a way to hide something. In computer security, we can sometimes think of the lock as the public key. The public and private keys must work together to be allowed access. SSH is an acronym for
secure shell which is basically a security protocol to give us secure terminal access (access to the computer or server) over the web.
After you have installed Gitlab and reconfigured it with a Mattermost URL as well, we can additionally save mattermost data to Digitalocean Spaces S3 storage.
To do this, we have to update a Mattermost config file on our gitlab server, then restart Mattermost. It’s pretty simple, so let’s get started.
When you have a set of data, you often need to sort it. Before we had computers to help, we were doing this by hand. While humans are very good at making broad visual comparisons, using programming to sort data saves incredible amounts of time. This post looks at one of the most common starter sorting algorithms — bubble sort.