You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Current »
This component is an example deploying an IguanaX instance on a hosted EC2 instance in AWS using a preconfigured EC2 launch template, given a few queued request parameters (action, email, and cname). You can adapt this component to use in your organization.
At iNTERFACEWARE, we use an adapted version of this component to orchestrate deploying a hosted instance of Iguana X in AWS.
How it works:
Import the Deploy Hosted Instance component using +Component
See Create a Component if you need a refresher on how to import a component.
Custom Fields include configurations for AWS CLI, GoDaddy API and IguanaX admin credentials
DPLclient sets up an adapter framework storing the deployment methods and unique client data
The email and cname from the queued request parameters are stored in the client table.
DPLallocateIp allocates an EC2 Elastic IP and stores it in the client table
The EC2 Library is called to allocate the an EC2 public and routable Elastic IP to be used by our newly deployed EC2 instance. See EC2 AWS CLI Adapter.
Note: No error will be reported about Elastic IP quota exhaustion. If quota is exceeded, the IP is not generated and an instance cannot be deployed and will require manual intervention. There is a note included to guide you on possible enhancements.
Once an IP is allocated, DPLdeployInstance is called to deploy Iguana on an EC2 instance
Iguana is deployed on an EC2 instance using the preconfigured launch template ID and requested client cname.
The instance name will be standardized to “h_<IP address>_<cname>“. It is stored in the client object.
See EC2 AWS CLI Adapter.
DPLassociateIP associates the allocated IP with the newly deployed instance
The newly allocated IP is then associated with the new EC2 instance using the unique EC2 instance ID and the IP address allocation ID.
See EC2 AWS CLI Adapter.
The admin password is then changed and set on the target hosted Iguana
Using the CHGPWD Library, the password is set to a random generated string of numbers and letters.
The GoDaddy DNS record is updated to use the customer specific A record and CNAME record
The generated A record is the same as the EC2 instance name “h_<IP address>_<cname>“. The CNAME is updated to the requested CNAME for the customer to access Iguana at “https://<cname>.interfaceware.net:8080”
If both the A and CNAME records are successfully created in the GoDaddy DNS manager, true is returned, otherwise an error description.
Lastly, the customer's email, target IguanaX URL, username and password are pushed to the queue as JSON
DPLnotifyCustomer generates and queues the JSON object for a downstream component to use as needed.
This step can be modified according to your workflow needs!
{
"password": "a8c7856hF602543H",
"user": "admin",
"email": "no-reply@interfaceware.com",
"url": "https://mycname.interfaceware.net:8080"
}