devlog #0: Starting DevOps
2023-07-11
I’ve been taking DevOps courses recently. I’m almost done with all the most important courses. Now I’m starting to experiment with DevOps tools. I intend to share my journey in my devlogs while working on tools and projects.
I’m starting with a not-so-complex architecture. This is the project diagram:
So there will be a load balancer that will handle users’ requests and redirect them to the app servers. The app servers will use the one and only db server.
Today I’ve written some Terraform scripts to create the infrastructure of Load balancer, app01, and db01 servers. Then, I wrote some Ansible playbooks that will configure the servers.
The cloud provider
With my prepaid credit card, I couldn’t buy any compute instance from any cloud provider, except one. Thanks to Linode for accepting prepaid credit cards for payments. I also got $100 free credits when I signed up on the platform.
Setting up infrastructure
With Terraform, I provisioned load_balancer, app01, and db01 very easily. I used the g6-nanode-1 instance type, that provides 1 CPU code and 1GB RAM. Just good enough for experimenting. I chose centos7 OS for every server.
Then after finishing up the creation process of the servers, I set up the configurations in each server with Ansible. At first, I had to add a firewall rule for port 80. For the database, it’s 27017, because the db01 server will serve a MongoDB connection.
Then I had to install packages and start services on the servers with Ansible.
With Ansible, it feels powerful to do so much stuff very quickly. I can apply the same procedures on the other servers.
Next plan
I want to configure the db01 with Ansible and then configure the app servers for using the db01 server’s connection. After the app servers are ready, I will configure the load_balancer server, which is just another Linode instance (not a NodeBalancer) that is using nginx for load balancing.
GitHub repo
All my code related to the infrastructures can be found in this repository.


