Amazon Lightsail For WHMCS
(→About Amazon Lightsail For WHMCS) |
|||
Line 217: | Line 217: | ||
Extracted files in your WHMCS directory should look like this: <br/> | Extracted files in your WHMCS directory should look like this: <br/> | ||
− | '' '''Note:''' The module uses modified AWS files provided by WHMCS in the 'vendor' folder. In order for the module to work properly, it is necessary to overwrite these files with files from the module.<br/> Please keep this in mind | + | '' '''Note:''' The module uses modified AWS files provided by WHMCS in the 'vendor' folder. In order for the module to work properly, it is necessary to overwrite these files with the files from the module.<br/> Please keep this in mind when installing a WHMCS update, because then you may also need to overwrite these files with the files from the module again.'' |
|} | |} | ||
{| | {| | ||
Line 255: | Line 255: | ||
{| | {| | ||
|style="padding: 10px 0px 15px 0px;"|'''Before you can go on, you must generate your Amazon Lightsail access details. You will need them to connect with the server successfully.'''<br/> | |style="padding: 10px 0px 15px 0px;"|'''Before you can go on, you must generate your Amazon Lightsail access details. You will need them to connect with the server successfully.'''<br/> | ||
− | Underneath, you will find instructions where to find | + | Underneath, you will find detailed instructions on where to find this information. |
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 20px 15px;"|'''7. Firstly, log | + | |style="padding: 0px 0px 20px 15px;"|'''7. Firstly, log in to your [https://aws.amazon.com/console/ Amazon AWS Management Console] and find '' 'My Security Credentials' '' section under your account name dropdown. |
|} | |} | ||
{| | {| | ||
Line 264: | Line 264: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 20px 15px;"|'''8. There, move to '' 'Access Keys (access key ID and secret access key) '' section. | + | |style="padding: 0px 0px 20px 15px;"|'''8. There, move to the '' 'Access Keys (access key ID and secret access key) '' section. |
|} | |} | ||
{| | {| | ||
Line 270: | Line 270: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 20px 15px;"|'''9. If you do not have | + | |style="padding: 0px 0px 20px 15px;"|'''9. If you do not have any active keys yet, then press the '' 'Create New Access Key' '' button to generate a new set of details. |
|} | |} | ||
{| | {| | ||
Line 276: | Line 276: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 15px 15px;"|'''10. A modal with Access Key Secret Access Key will appear, copy it and keep safe. You may also download a file with the details. '''<br/> | + | |style="padding: 0px 0px 15px 15px;"|'''10. A modal with Access Key ID and Secret Access Key will appear, so copy it and keep safe. You may also download a suitable file with the details. '''<br/> |
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. | 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. | ||
|} | |} | ||
Line 285: | Line 285: | ||
|style="padding: 0px 0px 20px 15px;"|'''11. Now, log in to your WHMCS and proceed to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Servers' '' and press '' 'Add New Server'.''<br/> | |style="padding: 0px 0px 20px 15px;"|'''11. Now, log in to your WHMCS and proceed to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Servers' '' and press '' 'Add New Server'.''<br/> | ||
− | '' '''Note:''' If you | + | '' '''Note:''' If you have WHMCS V7.8.X or later, we recommend using 'previous experience' of server configuration instead of the new wizard tool.'' |
|} | |} | ||
{| | {| | ||
Line 292: | Line 292: | ||
{| | {| | ||
|style="padding: 0px 0px 15px 15px;"|'''12. Next, enter your server name and select '' 'Amazon Lightsail' '' from the '' 'Type' '' field.<br/> | |style="padding: 0px 0px 15px 15px;"|'''12. Next, enter your server name and select '' 'Amazon Lightsail' '' from the '' 'Type' '' field.<br/> | ||
− | Now, provide the previously generated '' 'Access Key ID' '' and '' 'Secret Access Key'.'' Then check the connection | + | Now, provide the previously generated '' 'Access Key ID' '' and '' 'Secret Access Key'.'' Then, check the connection and if successful, save the changes.<br/> |
− | '' '''Important:''' If you are using '''WHMCS V7.8.X''' then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them. <br/> In this case, try to provide '''anything''' in the hostname field. For this reason, 'Test Connection' may sometimes not work either. Please note that this is a | + | '' '''Important:''' If you are using '''WHMCS V7.8.X''', then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them. <br/> In this case, try to provide '''anything''' in the hostname field. For this reason, 'Test Connection' may sometimes not work either. Please note that this is a bug occurring in WHMCS, not the module itself.'' |
|} | |} | ||
{| | {| | ||
Line 327: | Line 327: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 15px 15px;"|'''17. Once you have a product group, you can create a new product.'''<br /> | + | |style="padding: 0px 0px 15px 15px;"|'''17. Once you have added a product group, you can create a new product.'''<br /> |
To do so, first click on '' 'Create a New Product'.'' | To do so, first click on '' 'Create a New Product'.'' | ||
|} | |} | ||
Line 341: | Line 341: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 15px 15px;"|'''19. Now, go to the '' 'Module Settings' '' section | + | |style="padding: 0px 0px 15px 15px;"|'''19. Now, go to the '' 'Module Settings' '' section and choose your previously created server group from the dropdown menu.'''<br /> |
The module should automatically save and reload the settings. If not, click on the '' 'Save Changes' '' option manually.''' | The module should automatically save and reload the settings. If not, click on the '' 'Save Changes' '' option manually.''' | ||
|} | |} | ||
Line 348: | Line 348: | ||
|} | |} | ||
{| | {| | ||
− | |style="padding: 0px 0px 15px 15px;"|'''20. Now, you can start configuring the settings of the server | + | |style="padding: 0px 0px 15px 15px;"|'''20. Now, you can start configuring the settings of the offered server.'''<br /> |
Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as: | Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as: | ||
− | * '''Region''' - Choose a geographical area with a set of Lightsail resources. The closer instance is to your users, the less latency they will experience. | + | * '''Region''' - Choose a geographical area with a set of Lightsail resources. The closer the instance is to your users, the less latency they will experience. |
* '''Availability Zone''' - Each AWS Region has up to six '' 'Availability Zones' ''. By launching instances in separate '' 'Availability Zones' '', you can protect applications from the failure of a single location. <br/> To ensure that resources are distributed across the '' 'Availability Zones' '' for a region, they are independently mapped to identifiers for each account. <br/> For example, '' 'us-east-2a' '' might not be the same location as '' 'us-east-2a' '' for another account. Learn [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-regions-and-availability-zones-in-amazon-lightsail here] more about '' 'Availability Zones' '' in Amazon Lightsail. | * '''Availability Zone''' - Each AWS Region has up to six '' 'Availability Zones' ''. By launching instances in separate '' 'Availability Zones' '', you can protect applications from the failure of a single location. <br/> To ensure that resources are distributed across the '' 'Availability Zones' '' for a region, they are independently mapped to identifiers for each account. <br/> For example, '' 'us-east-2a' '' might not be the same location as '' 'us-east-2a' '' for another account. Learn [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-regions-and-availability-zones-in-amazon-lightsail here] more about '' 'Availability Zones' '' in Amazon Lightsail. | ||
Line 356: | Line 356: | ||
* '''Platform''' - Lightsail images are available on two platforms: '' 'Linux/Unix' '' or '' 'Windows' ''. Once you choose a platform, you can select a corresponding blueprint of the operating system. | * '''Platform''' - Lightsail images are available on two platforms: '' 'Linux/Unix' '' or '' 'Windows' ''. Once you choose a platform, you can select a corresponding blueprint of the operating system. | ||
− | * '''Blueprint''' - select which base operating system (OS) with or without preinstalled application should be installed. You can select between an Ubuntu Server image with an application or development stack preinstalled, or a Windows OS with SQL Server 2016 Express preinstalled. Note that available options depend on the previously selected '' 'Platform' '' and some blueprints | + | * '''Blueprint''' - select which base operating system (OS) with or without preinstalled application should be installed. You can select between an Ubuntu Server image with an application or development stack preinstalled, or a Windows OS with SQL Server 2016 Express preinstalled. Note that available options depend on the previously selected '' 'Platform' '' and some blueprints cannot be launched with certain Instance Plans. |
− | * '''Instance Plan''' - Select resources available for the instance. Please note that the better instance resources, the higher the monthly costs. Moreover, some blueprints require more powerful resources. You can read more about Amazon Lightsail pricing [https://aws.amazon.com/lightsail/pricing/ here.] | + | * '''Instance Plan''' - Select resources available for the instance. Please note that the better the instance resources, the higher the monthly costs. Moreover, some blueprints require more powerful resources. You can read more about Amazon Lightsail pricing [https://aws.amazon.com/lightsail/pricing/ here.] |
− | * '''Tag Name''' - Define a tag name | + | * '''Tag Name''' - Define a tag name; this label will be assigned to Lightsail resources. |
− | * '''Static IP Address''' - | + | * '''Static IP Address''' - Decide whether to assign to an instance a static, fixed and public IP address. Note that this will be done a moment after instance creation during the next cron execution. You can find out more about Lightsail static IP addresses [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-create-static-ip here.] |
− | * '''User Data''' - You can specify user data to configure an instance or run a configuration script during launch. This field is optional.<br/> Tutorial on how to use this option can be found [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-configure-server-additional-data-shell-script here]. | + | * '''User Data''' - You can specify user data to configure an instance or to run a configuration script during launch. This field is optional.<br/> Tutorial on how to use this option can be found [https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-configure-server-additional-data-shell-script here]. |
* '''Log API Requests''' - Enable to allow storing information on API requests in the '' 'Module Log' '' section in your WHMCS. | * '''Log API Requests''' - Enable to allow storing information on API requests in the '' 'Module Log' '' section in your WHMCS. |
Revision as of 13:57, 26 September 2019
Contents |
About Amazon Lightsail For WHMCS
Amazon Lightsail For WHMCS will enhance your AWS provisioning business by letting you provide and manage Amazon Lightsail instances straight from your WHMCS system. Your clients will receive the chance to handle their machines remotely through start, stop, and reboot options as well as access flexible graphs on their server usage. |
- Admin Area Features:
✔ Create/Suspend/Unsuspend/Terminate Server |
✔ Start/Stop/Reboot Server |
✔ Toggle Static IP Address |
✔ View Server Status And Details |
✔ View Remote Connection Details |
✔ View Assigned Public And Private IP Addresses |
✔ View Attached Disk Details; |
✔ View Scheduled Tasks |
✔ Configure Product Details: |
✔ Choose Region |
✔ Choose Availability Zone |
✔ Choose Platform |
✔ Choose Blueprint |
✔ Choose Instance Plan |
✔ Provide User Data Script |
✔ Toggle Static IP Address |
✔ Toggle API Request Logging |
✔ Choose Client Area Features |
✔ Generate Configurable Options |
✔ Run API Connection Test |
- Client Area Features:
✔ Start/Stop/Reboot Server |
✔ View Server Status And Details |
✔ View Remote Connection Details |
✔ View Assigned Public And Private IP Addresses |
✔ View Attached Disk Details |
✔ View Scheduled Tasks |
✔ View Tasks History |
✔ View Usage Graphs Within Given Time Period |
✔ Provide SSH Key During Order |
- Configurable Options:
✔ Region |
✔ Instance Plan |
✔ Blueprint |
- Available Blueprints:
✔ Linux/Unix Applications: |
✔ Drupal |
✔ GitLab CE |
✔ Joomla |
✔ LAMP (PHP 7) |
✔ MEAN |
✔ Magento |
✔ Nginx |
✔ Node.js |
✔ Plesk Hosting Stack |
✔ Redmine |
✔ WordPress |
✔ WordPress MultiSite |
✔ Linux/Unix OS: |
✔ Amazon Linux |
✔ CentOS |
✔ Debian |
✔ FreeBSD |
✔ openSUSE |
✔ Ubuntu |
✔ Microsoft Windows: |
✔ SQL Server 2016 Express |
✔ Windows Server 2012 R2 |
✔ Windows Server 2016 |
✔ Any Other Applications And OS When Available |
- General Info:
✔ Multi-Language Support |
✔ Supports PHP 7.1 Up To PHP 7.3 |
✔ Supports WHMCS Template Six |
✔ Supports WHMCS V7.7 And Later |
✔ Easy Module Upgrade To Open Source Version |
Installation and Configuration
This tutorial will show you how to successfully install and configure Amazon Lightsail 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: Note: The module uses modified AWS files provided by WHMCS in the 'vendor' folder. In order for the module to work properly, it is necessary to overwrite these files with the files from the module. |
![]() |
3. When you install Amazon Lightsail For WHMCS for the first time, you have to rename the 'license_RENAME.php' file. The file is located in '/yourWHMCS/modules/servers/AmazonLightsail/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. |
![]() |
5. Now, set up the 'storage' folder as recursively writable. This folder is available at '/yourWHMCS/modules/servers/AmazonLightsail/'. |
![]() |
6. The last step is setting up the queue cron job. It will be used to assign IP addresses to created machines as well as to obtain passwords for Windows OS. php -q /yourWHMCS/modules/servers/AmazonLightsail/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 Lightsail access details. You will need them to connect with the server successfully. Underneath, you will find detailed instructions on where to find this information. |
7. Firstly, log in to your Amazon AWS Management Console and find 'My Security Credentials' section under your account name dropdown. |
![]() |
8. There, move to the 'Access Keys (access key ID and secret access key) section. |
![]() |
9. If you do not have any active keys yet, then press the '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 suitable 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'. Note: If you have WHMCS V7.8.X or later, we recommend using 'previous experience' of server configuration instead of the new wizard tool. |
![]() |
12. Next, enter your server name and select 'Amazon Lightsail' from the 'Type' field. Now, provide the previously generated 'Access Key ID' and 'Secret Access Key'. Then, check the connection and if successful, save the changes. Important: If you are using WHMCS V7.8.X, then a fatal error may occur when trying to save server settings without providing any hostname or IP address details, even if the module configuration does not require them. |
![]() |
13. It is time to create a server group. To do so, click on 'Create Server 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 added 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 and 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 offered server. Just like when creating a new virtual machine in your Lightsail panel, here also you can configure such options as:
|
![]() |
21. Next choose which client area features shall be available for your clients. |
![]() |
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. |
![]() |
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. |
![]() |
Finally, when everything is set don't forget to Save Changes. |
In the 'Custom Fields' tab you will find a 'SSH Public Key' field which is displayed to clients on the order form by default. Please be aware, that this field can be left as optional for Linux/Unix as well as Windows platforms. The following formats are supported:
Create an RSA key. Amazon Lightsail 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 Lightsail 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 like:
|
![]() |
Ordering
Owing 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 cliens can also optionally provide their public SSH key. |
![]() |
Client Area
Client area interface of Amazon Lightsail should look like the one on the screen below. As you can see, the control panel contains useful details of a managed server. The module allows your customers to easily start, stop and reboot their server instance through pressing the corresponding buttons. |
![]() |
If the clients want to connect to the instance, by clicking on the 'Connection Details' button, the data will be displayed, which will allow them to make a remote connection. This data will vary depending on whether the instance is based on Linux/Unix or Windows as well as if the public SSH key was provided during the order. To connect to an instance on the Linux/Unix platform, clients can use an SSH client application such as PuTTY (learn more). For Windows-based instances, clients can also connect to their instance using an RDP client such as Remote Desktop Connection (learn more). |
![]() |
Task History
To access the history of a machine, simply press the 'Tasks History' button. Afterward, the customer can see all the actions performed on the instance, as well as their status. |
![]() |
Usage Graphs
Through pressing the 'Usage Graphs' button, clients will be moved to the page with the generated graphs showing the CPU usage, network traffic and check statuses. They can also switch the timeline of graphs by choosing a new one from the 'Edit' dropdown menu. Clients can pick between '1 hour', '6 hours' '1 day', '1 week' and '2 weeks'. |
![]() |
Tips
1. 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. |
2. When you upgrade WHMCS, please be aware that the module uses custom modified AWS files located in the main WHMCS 'vendor' directory, and their unmodified versions are also delivered by WHMCS itself. In this case, the WHMCS upgrade may overwrite these files to their default form and after you will need to overwrite these files again with the files delivered with the module. |
Update Instructions
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! |
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall does not block ports. |
2. If there is a problem with obtaining details in WHMCS for an already existing instance, make sure that the correct region is selected in the product configuration. Otherwise, if the regions do not match, there can be a problem with fetching details of the instance. |
3. If you are using WHMCS V7.8.X a fatal error may occur when trying to save server settings without providing any hostname or IP address details. Our module does not required this field to be full-filed, but in that case, try to provide anything in the hostname field. Please note that this is a WHMCS bug, not the module itself. |