Register an AWS EC2 instance as VHost
This tutorial will help you to register an AWS EC2 instance as Hakuna Cloud VHost. Once it is registered, a process that may take 5 minutes, you will start saving money, paying only when you need the instance.
You can create your own instance, or choose one of our examples.
Create a new
hakuna create provider to create a new provider. Select
awsec2 as the type, and pick a
name to identify this provider in the future.
hakuna CLI will ask for credentials. AWS Credentials can be generated from the AWS Console in the IAM section.
Create a new VHost
VHost must belong to a
provider and is identified by an FQDN, which is a domain name like
docs.hakuna.cloud. In this tutorial we will configure the Proxy Trigger, so the FQDN is the most important attribute since it is used by Hakuna Cloud to route the HTTP/S traffic to your instance.
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 instance without any modification on the running services.
VHostcreation, will not be registered by Hakuna Cloud. If you need to make changes on the instance, you should delete the old
VHostand create a new one.
Last step is to let eu1-42.lb.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 instance stopping it when there is no thraffic and waking it up when it is needed!