Agree, it's nice to get the server ready for the tasks. Installed ISPmanager will allow you to immediately begin placing the site. Teamspeak - organize WoT training without spending time on installation.
Providers through this increase revenue. Today they offer not just machines with a clean OS, but accounting, trading, and game servers. "Pre-sales training" increases customer loyalty and reduces the burden on technical support.
Initially this was implemented in our products by installing the necessary packages through the OS Template. The problem is that templates require significant costs to create, support and update. Everything gets worse when a client asks to preinstall an unpopular set of packages. For example, BigBlueButton, a platform for conducting webinars. The user orders a VDS and conducts video conferences, but only once every 3 months. He does not want to spend 30 minutes to install the software with each order of a dedicated server. Provider such requests are not always interesting. A highly specialized template sometimes incurs unjustified costs.
Under the cut, we will talk about how to solve such problems with the help of recipes - scripts that perform automatic software installation in VMmanager and DCImanager.First, we dwell on OS Templates. With the advent of recipes, their popularity is reduced, and here's why.
- If the installed software supports multiple operating systems, each will have to make its own template. The recipe can be one on several OS.
- If we are talking about KVM or a dedicated server, then to install additional packages you need to make changes to install.cfg (answer file). If about OpenVZ, then you need to rebuild the entire container, adding the necessary files to it. And in the case of a recipe, simply open the browser menu in VMmanager or DCImanager and insert the code in the input field.
Thus, it turns out that additional software can now be installed with templates and recipes, but the latter are easier to use. At the moment we are using templates to add new operating systems, and recipes for installing additional packages.
')
You can write a recipe in any language, you just need the OS to have the necessary interpreter. After the installation of the operating system is completed and the server is rebooted, this file is copied over SSH to the temporary directory and runs as root.
The recipe must have a block of metadata at the beginning of the body.
The recipe menu is available from admin level:
- “Cluster settings” → “Recipes” in VMmanager.
- “Settings” → “Recipes” in DCImanager.
BILLmanager, in turn, receives a list of recipes from these panels and displays it when a customer orders a service.
You can also make different tariffs for servers: with and without recipes. The necessary settings are made when creating the handler, see the spoiler.
If you need to close for all clients access to the installation of a particular software, for example, to correct errors in the recipe, it is also possible. Process description on the example of VMmanager - under another spoiler.
Configuring the service handlerTo create a handler, go to the “Integration” → “Service Processors” menu under the administrator and click the “Create” button.

Then, at the integration setup stage, check or uncheck the box.

And when creating a tariff, select the desired handler.

How to close access to the recipeWe perform authorization in the panel under a user with administrator rights. Go to the menu "Cluster Settings" → "Recipes", select the desired recipe and click "Properties".

Select the desired access level from the drop-down list and click “Ok”.

In case the client often installs software that is not very popular and wants to automate the process, our products have the ability to give end users the right to create their own, local, recipes. To do this, go to
/ usr / local / mgr5 / etc and add the line Option UserRecipes to the file
vmmgr.conf or
dcimgr.conf , then restart the panel with the command
/ usr / local / mgr5 / sbin / mgrctl -m vmmgr exit or
/ usr / local / mgr5 / sbin / mgrctl -m dcimgr exit, respectively.
At the user level, the menu item “Management” → “Recipes” will appear in the panel, which means that you can create your own recipes and use them when reinstalling the OS of a virtual or dedicated server.
Manual
Now let's try to write a recipe in practice and give it access to end users. For example, let's take a VB product deployment of BigBlueButton 1.0, a platform for conducting webinars. Under the spoiler, a description of the process with screenshots.
Recipe creationWe perform authorization in the VMmanager panel as a user with administrator rights, go to “Cluster settings” → ”Recipes”.

Click the "Create" button.

Specify the name of the file in which the recipe will be located, write / paste the script into the input field, fill in the metadata block and click “OK”.

The created recipe appears in the list.

The result - when ordering a service, the client hosting provider sees another version of the pre-installed software.

Those interested in the source code invite another under one spoiler.
So, a new recipe is available for customers. Now, if someone needs, for example, to hold an urgent webinar or a meeting, he can in a short time arrange a platform for a meeting. As you can see, nothing complicated.
Those who wish to use our products and recipes in particular, we recall references to
VMmanager and
DCImanager , as well as to the
documentation for recipes .
Satisfied customers!
PS The article uses the illustration of Anton Kuryatnikov.Source link