Tutorial to register a DigitalOcean Droplet with Hakuna Cloud

Create a test droplet

The easiest way to test Hakuna Cloud is a Wordpress Droplet. Although Hakuna Cloud should not be used to manage website, Wordpress is an easy test case. It is a complex, multi-tier application, and can be used to test the srtaup time of a droplet.

you can create your own droplet, or choose one of our tutorials

CLI Setup

  • Install the nodejs runtime (version >=8.0) - NodeJS documentation
  • Install the CLI: npm install -g @hakuna.cloud/cli

CLI Configuration

Login/Signup

The first step is to login or signup:

hakuna user login

This command will prompt all instructions to correctly configure an account. An environment with a browser it’s needed to run this command because the authentication will be done through it.

Configuration file

The CLI stores credentials and configuration options in a local file: $HOME/.hakuna/credentials.

Create a new CloudProvider

A CloudProvider is the secure container for the auth tokens to call the cloud vendor APIs on behalf of the user.

Execute hakuna create provider to create a new CloudProvider. Select DigitalOcean as the type, and pick a name to identify this provider in the future.

API token can be generated from the DigitalOcean API Dashboard.

List all your providers by executing hakuna provider list

Create a new VHost

A VHost represent a cloud server managed by Hakuna Cloud. A VHost must belong to a CloudProvider and is identified by an FQDN, which is a domain name like docs.hakuna.cloud. The FQDN is the most important attribute, since it is used by Hakuna Cloud to route the HTTP traffic to your droplet!

Execute hakuna create vhost to create a VHost. The CLI will guide you through the creation of this resource.

Update DNS

Last step is to let Hakuna Cloud handle the traffic. Add a CNAME record that point to eu1.lb.hakuna.cloud. For example:

wordpress.porketta.io. CNAME eu1.lb.hakuna.cloud

That’s it. As soon as the DNS change is propagated (chek it in real time!), Hakuna Cloud will manage the droplet stopping it when there is no thraffic and waking it up when it is needed!

Enjoy!