Quantcast
Viewing latest article 17
Browse Latest Browse All 33

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

Image may be NSFW.
Clik here to view.

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.


Viewing latest article 17
Browse Latest Browse All 33

Trending Articles