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
- Install the nodejs runtime (version >=8.0) - NodeJS documentation
- Install the CLI:
npm install -g @hakuna.cloud/cli
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.
The CLI stores credentials and configuration options in a local file:
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.
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
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!
hakuna create vhost to create a VHost. The CLI will guide you through the creation of this resource.
Hakuna Cloud will create an internal representation of the selected droplet without any modification on the running services.
Last step is to let Hakuna Cloud handle the traffic.
CNAME record that point to
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!