Restructuring Instances With DigitalOcean

Overview

I have been using DigitalOcean for hosting my blog as well as other services for a while now. Not only have there been significant advances with the likes of volumes, firewalls, etc for free the value for money on SSD based storage has been a game changer to the point it changed the ever popular Linode’s pricing and also moving to SSD storage as well. The change in droplet sizes meant I could save some money on my bill by consolidating instances and also test out how easy it was to my persistent data around.

Infrastructure

I use the following technologies below with a summary of my use case / why I use it. They are nothing special so I won’t go into too much detail.

DigitalOcean – As an Infrastructure as a Service (IaaS) it provides good value for money metered plans compared to AWS for a small operation like mine. I use all the free services provided from firewall, Floating IPs (Virtual IPs) to the monitoring and alerting services.

Docker / Docker-Compose – Containerised applications to abstract the application runtime from the Operating System (OS) level.

HAProxy – Manages SSL certificates and load balancing multiple backend services or soon to be a single backend.

MySQL Database – Used to store persistent data.

Execution

It took 30 minutes to move the application which included installing Docker and configuring the firewall.

  1. HAProxy – Ensure backend services are setup ready to root traffic to new host.
  2. Update firewall rules – Ensure traffic can be rooted the the right place and ports before it is moved.
  3. Setup backup jobs – Setup back up jobs so that it’s ready before everything has moved.
  4. Shutdown and move volume – Recommended to shutdown before detaching the volume just in case it’s being used.
  5. Create and mount volume – Create the mount point and mount the volume to the new host
  6. Startup – Start the service backup and hopefully watch everything come up successfully

Summary


This would reduce my instances down to 2 saving on monthly costs. If I wanted to scale back up to more instances I can. The challenge are web assets for the time being and the traffic I get it’s not worth revisiting.

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Infrastructure, Linux and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.