Advertisement
hjysy

How to implement feature management in WHM/cPanel?

Sep 12th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. How to implement feature management in WHM/cPanel?
  2. I have developed a plugin for WHM/cPanel and want to provide an ability to manage its features through the Hosting Packages + package extensions in the WHM/cPanel. I'm a bit new to this so I'd appreciate any feedback or suggestions based on general use-case scenario for shared hosters (how they sell features within Service Plans). These are my questions:
  3.  
  4. ++++++++++++++
  5. If You want to buy cheap web hosting then visit http://Listfreetop.pw and select the cheapest hosting. it can be suitable for all your needs.
  6.  
  7. Top 200 best traffic exchange sites http://Listfreetop.pw/surf
  8.  
  9. list of top gpt sites
  10. list of top ptc sites
  11. list of top ptp sites
  12. list of top crypto currency Wallets sites
  13. Listfreetop.pw
  14. Listfreetop.pw
  15. Listfreetop.pw
  16.  
  17. +++++++++++++++
  18. 1. If I have two features in the plugin (for example, "Feature 1" and "Feature 2") and each of them may have 3 states ("Mode 1", "Mode 2", "Off"). Shall I create a separate package extensions for "Feature 1" and "Feature 2" or I can put it under a single package extension so hosting provide will configure each Service Plan with both? I'm thinking about the case when hosters may want to sell those features separately in difference Service Plans. For example, "Service Plan 'Starter'" could have "Feature 1" with default value "Mode 2". But "Service Plan 'Business'" could have "Feature 1" with default value "Mode 1" and "Feature 2" with default value "Mode 2".
  19.  
  20. 2. How hosters with 20+ servers configure Packages across their servers? Is there any special software for WHM/cPanel that could automate configuring Service Packages and package extensions (most likely that could be done via WHMCS but AFAIK WHMCS cannot configure WHM Service Packages with package extensions and package extensions separately).
  21.  
  22. 3. Some of WHM/cPanel hosters have package extras (upselling current service plan with some additional services). Just curios if those "package extras" are managed using the same Hosting Package+package extension or somehow separately?
  23.  
  24. Sorry for newbie questions and thank you for any comments / ideas / suggestions on the topic.
  25.  
  26. 1. You're being a little too vague for me to wrap my head around what you're saying. I wish I could be more helpful. Perhaps somebody else will understand.
  27.  
  28. 2. When it comes to managing packages across a fleet of servers I imagine most providers use something like puppet/chef/ansible to both place the files as well as keep them up to date.
  29.  
  30. 3. It varies - depending on the package and the upgrade/extra. Many providers use WHMCS and WHMCS has fairly good documentation on most of their stuff.
  31.  
  32. Congrats on developing a cPanel & WHM plugin! First, I recommend taking a look at our documentation and blog post on package extensions if you haven't already done so:
  33.  
  34. https://documentation.cpanel.net/dis...age+Extensions
  35. https://blog.cpanel.com/improvements...ge-extensions/
  36.  
  37. This will provide you with a general understanding of how package extensions work. Onto your questions:
  38.  
  39. 1. You can add multiple feature settings to a single extension. For example, let's say your plugin is named "dog". Here's how you'd add three different settings to the package extension for the "dog" plugin:
  40.  
  41. Code:
  42. # cat /var/cpanel/packages/extensions/dog
  43. dog_tail_length=normal
  44. dog_species=Dalmatian
  45. dog_spots=y
  46. _NAME=Dog Settings
  47. You can then define the defaut settings for the "dog" package extension across multiple packages when you create them through WHM >> Packages >> Add a Package. Here's an image of how this would look in the WHM UI:
  48.  
  49. https://imgur.com/a/zn0ZD3S
  50.  
  51. Thus, you can create multiple packages, each having custom settings defined for the individual package extension.
  52.  
  53. 2. Can you clarify a bit what you mean by "Service Package" in this instance?
  54.  
  55. 3. It depends on how the individual provider chooses to implement upgrade options, however natively through cPanel & WHM you could simply create separate packages for each upgrade path and assign that specific package to the account upon the requested upgrade.
  56.  
  57. Thank you.
  58.  
  59. I'll add that cPanel support tends to be very good so if you have any questions, you can always reach out to them directly for assistance
  60.  
  61. Highly appreciated to all of you for the answers.
  62.  
  63. I don't have questions regarding cPanel API, creating package extensions in general - it's done already. My main question is about common use-case scenario by shared hosting that use WHM/cPanel.
  64.  
  65. Basically, which of two options is more preferable for hosters: 1) to have package extension with two features settings as part of WHM/cPanel Hosting Package or 2) to have CLI interface for plugin configuration to config it on per-user basis.
  66. If let's say hoster uses WHMCS then which of two options is better (convenient) for him to use in order to create Service Plans with enabled and configured 3rd party plugin?
  67.  
  68. udomain webmail
  69. lucky 7 make money
  70. robthebank.info
  71. YaBB.pl
  72. bitcoinget.com
  73. virtono.com
  74. tropico 5 make money
  75. with google make money
  76. make money editing
  77. power host forum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement