Amazon EC2 For WHMCS
From ModulesGarden Wiki
(Difference between revisions)
|
|
Line 405: |
Line 405: |
| =Update Instructions= | | =Update Instructions= |
| {| | | {| |
− | |style="padding: 10px 0px 30px 15px;"|Essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/><br/> | + | |style="padding: 10px 0px 30px 15px;"|An essential guidance through the process of updating the module is offered '''[https://www.docs.modulesgarden.com/How_To_Update_WHMCS_Module here]'''.<br/><br/> |
| Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!<br/> | | Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!<br/> |
| To take advantage of it, simply use the '''License Upgrade''' button located on the product's page and a discounted invoice will be generated automatically.<br/> | | To take advantage of it, simply use the '''License Upgrade''' button located on the product's page and a discounted invoice will be generated automatically.<br/> |
| |} | | |} |
| + | |
| =Common Problems= | | =Common Problems= |
| {| | | {| |
Revision as of 11:20, 7 January 2020
Amazon EC2 For WHMCS will boost your AWS provisioning business by allowing automated management of Amazon EC2 instances in your WHMCS system.
Your clients will be empowered to remotely start, stop, and reboot the server, as well as preview the assignment of IP addresses.
In addition, the module will let you easily control product features, and supervise the status of each sold machine.
|
✔ Create/Suspend/Unsuspend/Terminate Server
|
✔ Start/Stop/Reboot Server
|
✔ View Server Status And Details
|
✔ View Assigned Network Interfaces And IP Addresses Details
|
✔ Configure Product Details:
|
✔ Choose Amazon Machine Image (AMI)
|
✔ Select From Amazon Database
|
✔ Add Own Image By Providing AMI ID
|
✔ Provide Custom Names For Added Images
|
✔ Define Number Of IPv4 Addresses
|
✔ Provide User Data Script
|
✔ Toggle Capacity Reservation
|
✔ Toggle API Request Logging
|
✔ Generate Configurable Options
|
✔ Run API Connection Test
|
✔ Start/Stop/Reboot Server
|
✔ View Server Status And Details
|
✔ View Assigned Network Interfaces And IP Addresses Details
|
✔ Provide SSH Key During Order
|
✔ Provide SSH Key To Decode Windows Password
|
✔ Amazon Machine Image (AMI)
|
✔ Number Of IPv4 Addresses
|
✔ Integrated With Server Allocator For WHMCS - Automatic Assignment Of Most Suitable Servers To Products (read more)
|
✔ Supports PHP 7.1 Up To PHP 7.3
|
✔ Supports WHMCS Template Six
|
✔ Supports WHMCS V7.6 And Later
|
Installation and Configuration
This tutorial will show you how to successfully install and configure Amazon EC2 For WHMCS smoothly.
We will guide you step by step through the whole process.
|
Installation
1. Log in to our client area and download the module.
|
2. Upload and extract the extension into the main WHMCS directory.
Extracted files in your WHMCS directory should look like this:
|
3. When you install Amazon EC2 For WHMCS for the first time, you have to rename the 'license_RENAME.php' file.
The file is located in '/yourWHMCS/modules/servers/AwsEc2/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.
|
4. In order to configure your license key, you have to edit the previously renamed 'license.php' file.
Enter your license key between the quotation marks as presented on the following screen.
You can find your license key in our client area → 'My Products'.
|
5. Now, set up the 'storage' folder as recursively writable.
This folder is available at '/yourWHMCS/modules/servers/AwsEc2/'.
|
6. The last step is setting up the queue cron job.
It will be used to execute module commands such as: create, terminate or change package.
php -q /yourWHMCS/modules/servers/AwsEc2/cron/cron.php queue
It is suggested to run the cron every 5 minutes.
|
Configuration of Server
Before you can go on, you must generate your Amazon EC2 access details. You will need them to connect with the server successfully.
Underneath, you will find instructions where to find them.
|
7. Firstly, log into your Amazon EC2 account and find 'My Security Credentials' section under your account name dropdown.
|
8. There, move to 'Access Keys (access key ID and secret access key) section.
|
9. If you do not have yet any active keys, then press 'Create New Access Key' button to generate a new set of details.
|
10. A modal with Access Key ID and Secret Access Key will appear, so copy it and keep safe. You may also download a file with the details.
Note that this is the only place where you can later on find the corresponding secret key, it will not be visible next to the Key ID in the panel.
|
11. Now, log in to your WHMCS and proceed to 'Setup' → 'Products/Services' → 'Servers' and press 'Add New Server'.
|
12. Next, enter your server name and select 'Amazon EC2' from the 'Type' field.
Now, provide the previously generated 'Access Key ID' and 'Secret Access Key'. Then check the connection. If successful, save the changes.
|
13. It is time to create a server group. To do so, click on 'Create New Group' .
|
14. Enter a name, click on your previously created server, press 'Add' and afterward 'Save Changes' .
|
Configuration of Product
15. In order to create and configure a product, go to 'Setup' → 'Products/Services' → 'Products/Services'.
Click on 'Create a New Group'.
|
16. Enter your product group name and press 'Save Changes'.
|
17. Once you have a product group, you can create a new product.
To do so, first click on 'Create a New Product'.
|
18. Afterward, choose your product type, enter your product name, choose module and the product group from the dropdown menus. Press 'Continue'.
|
19. Now, go to the 'Module Settings' section, choose your previously created server group from the dropdown menu.
The module should automatically save and reload the settings. If not, click on the 'Save Changes' option manually.
|
|
20. Now, you can start configuring the settings of the server you sell.
Just like when creating a new virtual machine in your EC2 panel, here also you can configure such options as:
- Region - Choose a geographical area with a set of EC2 resources
- Amazon Machine Image (AMI) - An AMI is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance.
You must have previously added any AMIs into the Selected Images table to be able to select any here
- Instance Type - Select instance type based on the requirements of the application or software that you plan to run on your instance
- Security Groups - A named set of allowed inbound network connections for an instance. Each security group consists of a list of protocols, ports, and IP address ranges
- Tag Name - Define a tag name, this label will be assigned to EC2 resources
- Number of IPv4 Addresses - Enter a maximum number of allowed, public IP addresses (Elastic IP) - once assigned, are not removed when stopping the machine.
If entered "0" value, EC2 will assign a random IP address from one of the default EC2 subnets - such IP is deleted after stopping the machine.
- User Data - You can specify user data to configure an instance or run a configuration script during launch. This field is optional.
Tutorial on how to use this option can be found here.
- Capacity Reservation - Capacity Reservations reserve capacity for your EC2 instances in a specific Availability Zone.
You can launch instances into a Capacity Reservation if they have matching attributes (instance type, platform, and Availability Zone), and available capacity
- Hibernation - Enable to allow hibernating your instance. Hibernation stops your instance and saves the contents of its RAM to the root volume.
You cannot enable or disable hibernation after launch Note: It is possible to hibernate only some of the instances. In case your client's machine does not support hibernation, this option will be disabled.
- Log API Requests - Enable to allow storing information on API requests in the 'Module Log' section in your WHMCS.
|
|
21. The following section is dedicated to Images.
Here, you may look for and then select single images to be added to the list. They will be available to choose from in the Amazon Machine Images (AMI) field in the main configuration of the product.
First of all, enter as many details as possible to find the images you are interested in. Press search button when ready.
|
When the list of available images appears, press 'Add' next to the one you wish to add to the list of selected.
|
Enter custom name if you wish and confirm the action.
|
On the list of selected, there are all images that you have added, and which will be available to select from when setting up the Amazon Machine Images (AMI) configuration field.
It is also possible to add images manually here. Simply enter the image ID.
|
When found, press the 'Add' button.
|
22. At the end of the configuration process, you can decide whether you want to generate configurable options for the product.
Configurable options can be used by your clients to select each virtual machine parameters individually during order placement. Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.
|
If you decide to use configurable options, press on the 'Create' button and select which options you want to generate. Note that the configuration for disabled options will still be taken from the configuration of the main product. More information about how to use configurable options can be found here or in the official WHMCS documentation.
|
SSH Keys
In the 'Custom Fields' tab you will find the 'SSH Public Key' field which is displayed to clients on the order form by default.
The following formats are supported:
- OpenSSH public key format (the format in ~/.ssh/authorized_keys)
- Base64 encoded DER format
- SSH public key file format as specified in RFC4716
- SSH private key file format must be PEM (for example, use ssh-keygen -m PEM to convert the OpenSSH key into the PEM format)
Create an RSA key. Amazon EC2 does not accept DSA keys. The supported lengths are 1024, 2048, and 4096.
If you would like to limit the possibility of entering the key e.g. only to the 'ssh-rsa' format, you can use the regular expression in the validation field, such as:
#ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?#
Remember that API allows such action only once, during the initial VM creation.
|
Management
Admin Area
Amazon EC2 For WHMCS allows you to monitor and manage your customer server instance from the admin area of your WHMCS system.
This includes supervision of such features as:
- Configurable options which enable you to view the chosen server details
- Module commands to allow easy and quick management of the server
Important: In order to successfully complete the change package action, the machine must be previously stopped by your client.
- Service actions, including: Start, Stop and Reboot the server
- Instance details that provide the current status, resources and options set.
- Interfaces details
- List of scheduled tasks with their specified type, status and date.
|
Ordering
Thanks to configurable options, you are able to offer a product which your clients can tailor according to their needs. Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.
At this moment you also have to provide the SSH key. Note that this key should be in one of the OpenSSH standard formats which are supported by API, e.g. ssh-rsa.
|
Client Area
Client area interface of Amazon EC2 should look like the one on the screen below. As you can see, the control panel contains useful details of the managed server.
The module allows your customers to easily start, stop and reboot their server instance through pressing the corresponding buttons.
Clients can also check the server status with its details, view assigned network interfaces and assigned IP addresses details as well as control the list of currently scheduled tasks.
|
Tips
1. Firsdtly, you must stop the machine to let the change package action be successfuly completed.
|
2. In case you need to generate any of the configurable options once again, you must delete the previously created one. Only then it will be possible to generate a new configurable option. Read more about configurable options here.
|
Update Instructions
An essential guidance through the process of updating the module is offered here.
Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.
|
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
|