|
|
Line 334: |
Line 334: |
| {| | | {| |
| |style="padding: 0px 0px 15px 15px;"|'''19. At the end of the configuration you can decide if you want to generate configurable options for the product.'''<br/> | | |style="padding: 0px 0px 15px 15px;"|'''19. At the end of the configuration you can decide if you want to generate configurable options for the product.'''<br/> |
− | The configurable options can be used by your clients to select each Droplet parameters individually during order placement.<br/>Otherwise if not created, then the fixed parameters specified in the eariel configuration will be used.<br/> More information about the WHMCS configuration options can be found [https://docs.whmcs.com/Addons_and_Configurable_Options here]. | + | The configurable options can be used by your clients to select each Droplet parameters individually during order placement.<br/>Otherwise, if not created, then the fixed parameters specified in the eariel configuration will be used.<br/>More information about the how to use configuration options can be found [https://www.docs.modulesgarden.com/General#How_To_Use_Configurable_Options here] or in the official WHMCS [https://docs.whmcs.com/Addons_and_Configurable_Options documentation]. |
| |} | | |} |
| {| | | {| |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_18.png]] | + | |style="padding: 0px 0px 30px 25px;"|[[File:DOD_18.png]] |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|'''20. Mark a security group from '' 'Use Security Groups' '' and select '' 'Console Type' ''.'''<br />
| + | |
− | If you wish to use SSH keys, leave '' 'Inject SSH Key' '' marked (virtualization has to support the '' 'Inject File' '' feature).<br />
| + | |
− | In order to use passwords for your VM, leave '' 'Password Management' '' marked (virtualization has to support the '' 'Set Admin Pass' '' feature).<br />
| + | |
− | Please make sure, that virtualization used by you supports mentioned actions.<br />
| + | |
− | Full list of supported features can be found [https://wiki.DigitalOcean.org/wiki/HypervisorSupportMatrix here].<br />
| + | |
− | '' '''Important:''' It is recommended to leave '' 'Delete SSH Private Key' '' marked.''<br/>
| + | |
− | The following types of console can be chosen: '' 'VNC', 'RDP', 'SPICE' '' and '' 'Serial' ''.
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_17_1.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|'''21. You can also take advantage of the dedicated Volume and set it as the location of your Virtual Machine Disk''',
| + | |
− | To do so, make sure to tick the ''Use Volumes'' checkbox and enter the desired number into the ''Default Volume Size'' field.<br />
| + | |
− | Note that once this option is enabled, your clients will no longer have access to the ''Backup'' and ''Rescue'' functions, so you may as well leave the respective fields empty.
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_17_2.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|'''22. Next, select features available at the client area.'''<br />
| + | |
− | Mark the checkbox next to a feature in order to enable it.
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_19.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|'''23. In addition, you can also choose whether you want to send a welcome email after the VM has been succesfully created by cron.'''<br />
| + | |
− | This feature can prove useful if you want clients to receive the notification once their VM is ready rather than immediately after product activation.<br/>If you decide on this option, we suggest that you also set the standard WHMCS configuration of the 'Welcome Email' to 'None' in the '' 'Details' '' tab of a product.<br/>Otherwise, the customer will receive both emails - after the product has been activated and after the VM has been succesfully created on DigitalOcean.
| + | |
− | <br/><br/>
| + | |
− | Press '' 'Save Changes' '' when you are done.
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 30px 25px;"|[[File:DOD_20.png]]
| + | |
− | |}
| + | |
− | | + | |
− | ===VPS With Predefined Resources===
| + | |
− | {|
| + | |
− | |style="padding: 10px 0px 15px 15px;"|Our module allows you to offer DigitalOcean Droplets to your clients in two ways, with either predefined or configurable resources.<br />
| + | |
− | In this section we will show you configuration of VPS with predefined resources.<br />
| + | |
− | Detailed information about configuration of VPS with resources chosen by a client can be found [http://www.docs.modulesgarden.com/DigitalOcean_VPS_For_WHMCS#VPS_With_Configurable_Resources here].
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|'''23. Select a '' 'Default Flavor' '' and '' 'Default VM Image' ''.'''<br />
| + | |
− | '' 'Default Flavour' '' defined resources assigned to a VM while '' 'Default VM Image' '' allows you to choose the VM image used to create a new VM.
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_19.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 30px 15px;"|'''Congratulations! You have just finished the installation and configuration of the module with predefined resources.'''
| + | |
− | |}
| + | |
− | | + | |
− | ===VPS With Configurable Resources===
| + | |
− | {|
| + | |
− | |style="padding: 10px 0px 15px 15px;"|'''24. Preparing VPS with configurable options consists of pressing '' 'Generate default' '' as shown on the following screen.'''<br />
| + | |
− | It will prepare default configurable options which can be afterward easily edited as described in [http://www.docs.modulesgarden.com/General#How_To_Use_Configurable_Options this article].<br />
| + | |
− | '''Important''' Configurable option '' 'flavor|Flavor' '' will be overwritten by '' 'disc|Disc' '', '' 'ram|RAM' '' and '' 'vcpus|VCPUs' ''.<br />
| + | |
− | Therefore, you can solve this in three ways:
| + | |
− | *Remove '' 'disc|Disc' '', '' 'ram|RAM' '' and '' 'vcpus|VCPUs' '' configurable option and rely completely on '' 'flavor|Flavor' ''.
| + | |
− | *Remove '' 'disc|Disc' '' and '' 'vcpus|VCPUs' '', and allow '' 'flavor|Flavor' '' being overwritten by '' 'ram|RAM' '' (multiple combinations allowed here).
| + | |
− | *Remove '' 'flavor|Flavor' '' and rely completely on '' 'disc|Disc' '', '' 'ram|RAM' '' and '' 'vcpus|VCPUs' ''.
| + | |
− | ''Note: The second and the third options results in creation of a new flavor on your server each time a new order is made.''
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 30px 25px;"|[[File:DOD_20.png]]
| + | |
− | |}
| + | |
− | | + | |
− | ===Custom Config Scripts===
| + | |
− | {|
| + | |
− | |style="padding: 10px 0px 15px 15px;"|'''25. In this area, you can write a custom script using [https://raymii.org/s/tutorials/Automating_DigitalOcean_with_Cloud_init_run_a_script_on_VMs_first_boot.html Cloud-Init] and arrange it to be executed on newly created VMs.'''<br />
| + | |
− | This way you can automate your work instead of making all kinds of specific images for specific tasks manually. <br /><br />
| + | |
− | '''Important notes:'''
| + | |
− | *Scripts can be written in standards like '''Bash''' or '''[http://www.yaml.org/about.html YAML]'''.
| + | |
− | *Initial scripts have to be supported by VPS operating system to be executed properly.
| + | |
− | *Scripts should be used only by advanced users. The incorrect usage of the scripts may damage your system!
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_44.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|On the example below, we will show an examplary script responsible for setting the password to '' 'newpass01' '' for the Ubuntu root user.<br />
| + | |
− | You can achieve it by writing:
| + | |
− | chpasswd:
| + | |
− | list: |
| + | |
− | ubuntu:newpass01
| + | |
− | expire:False
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_45.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 15px 15px;"|You can configure scripts in the same format, but for clients' individual choice when ordering the product.<br />
| + | |
− | All you need to do is add a new configurable option and assign it to the DigitalOcean Droplets product.<br />
| + | |
− | ''Note: these scripts are executed regardless of the script specified in the module settings.''<br />
| + | |
− | The easiest way is through the edition of existing 'Configurable options for the DigitalOcean Droplets' group, and adding the new configurable option there.<br />
| + | |
− | For example, if you want to offer the pre-installed PHP version depending on a client's choice, you can add a new option named '''script_PHP|PHP version''' and then define multiple options, like on the screenshot below:
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_46.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 15px;"|Afterward, your clients can choose during the ordering process:
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 20px 25px;"|[[File:DOD_47.png]]
| + | |
− | |}
| + | |
− | {|
| + | |
− | |style="padding: 0px 0px 30px 15px;"|
| + | |
− | Using this method, you can perform assorted actions on newly created machines, e.g.: modifying files, preinstalling & preconfiguring software, executing any statements that would normally be executed via the terminal.<br /><br />
| + | |
− | The general rule is that configurable option names should begin with '''script_prefix''' to be recognized as containing a custom script.<br />
| + | |
− | Then, choices under the option have their own names which are matched with a name of existing file with the corresponding script under the
| + | |
− | '''yourWHMCS/modules/servers/DigitalOceanDroplets/scripts''' path.<br />
| + | |
− | Note that files with scripts have to have '''exactly''' extension corresponding to the given entries in the configurable options.<br /><br />
| + | |
− | In the example above, there are two options: '''php5.yml''' and '''php7.yml''', therefore it makes the module read corresponding files:<br />
| + | |
− | *modules/servers/DigitalOceanDroplets/scripts/php5.yml
| + | |
− | or
| + | |
− | *modules/servers/DigitalOceanDroplets/scripts/php7.yml
| + | |
− | You can add many scripts in the exact way.
| + | |
| |} | | |} |
| | | |