In the previous post, I discussed how to set up SSH CA and use it to access remote hosts. In that, I briefly mentioned auto-renewal abilities. This is a crucial step to take as usual certificates by SmallStep only last for about a month. The renewal process is quite easy, just the following line. In… Continue reading Step CA: Add Auto-Renew to Host certificates
Category: DevOps
Ansible: Automating server initialization tasks
Now that we have ansible working, we can do some housekeeping of the server. I took most of the playbook(with some modifications) from @jigarwala from his repo at github. He has also written a blog on the topic on medium The kind of tasks that come under this are: Update the apt package cache listing… Continue reading Ansible: Automating server initialization tasks
Configuring Ansible to run commands on the provisioned resources
This is part 3 of the my series on automating my Home Lab. In this chapter, we will be integrating the inventory that was generated by terraform in the last episode. At the end of the exercise, the repository will look something like this with these changes. Ansible Setup You need to install Ansible using… Continue reading Configuring Ansible to run commands on the provisioned resources
Automatic Creation of Inventory from Terraformer
To use ansible on the resources provisioned by Terraformer, ansible needs to know the ips of the provisioned resources. We will be leveraging the local provider. This will allow us to create the inventory file using the output of terraformer. Add the following block to end of outputs.tf This requires the template file inventory.tmpl which… Continue reading Automatic Creation of Inventory from Terraformer
Setting up Terraform to provision a DigitalOcean Droplet
By following the example repo, I managed to setup a simple example app by following Hashicorps guide. I am summarizing the steps I took here for reference. For a more concrete explanation, check out the example docs. Get a DigitalOcean Token from here Run export DIGITALOCEAN_ACCESS_TOKEN=<API TOKEN> in your local shell cd terraform Generate a… Continue reading Setting up Terraform to provision a DigitalOcean Droplet