Page tree
Skip to end of metadata
Go to start of metadata

You can create and use recipes for Unix (Linux and FreeBSD) and Windows virtual servers, smart servers, baremetal servers, virtual server templates, Compute zones and the control panel server. For details, refer to the relevant sections of the Admin guide:

Adding a recipe consists of two stages:

  1. creating a recipe
  2. creating a recipe step

Create recipe

To create a recipe:

  1. Go to your Control Panel's Recipes menu.
  2. Click the "+" button.
  3. Fill in the recipe creation form:

    Properties

    Label -give your recipe a label

    Description - provide a short recipe description (optional)

    Unix compatible - move this slider to the right to use this recipe for Unix virtual servers.

    Windows compatible - move this slider to the right to use this recipe for Windows virtual servers.

    For Windows compatible recipe, specify the script type. You can select the following scrip types:

    • BAT
    • VBS
    • PowerShell v1.0

  4. Click Save.

After that, you'll be redirected to the recipe details screen where you can add steps to this recipe.

Create steps

To create a new recipe step:

  1. Click the "+" button in the upper right corner of the Steps screen.
  2. In the pop-up window, specify step details as required:

    Script - input the recipe code.

    Result source - specify the step result source:

    • Exit code - an exit code, for example, 0 is the default value returned on success.

      To use exit code in the VBS or PowerShell scripts, you have to specify it directly in the script. For example:

      VBS
      Script:
      WScript.Echo "test"
      WScript.Quit 95

      PowerShell
      Script:
      get-date -displayhint date
      exit 227

    • STDOUT - standard output.
    • STDERR - standard error
    • STDOUT and STDERR - standard output and standard error.

    Pass values - specify the pass output value, for example, 0.

    You cannot specify both pass and fail values for one recipe step.

    You can specify multiple recipe values. In this case you have to specify each value from a new line.

     

    On success - the recipe behavior on success:

    • Proceed - proceed to the next step.
    • Fail - terminate the recipe and mark it as failed.
    • Stop- terminate the recipe and mark it as successful.
    • Go to step - specify the step to proceed to. If you specify the nonexistent step, the recipe will be stopped.


    On failure

    Specify the recipe behavior on failure.

    In case you have already specified the recipe pass value, leave these fields empty and tick the Anything Else checkbox.

    You can specify multiple recipe values. In this case you have to specify each value from a new line.

    Pass values - specify the pass output value.

    On failure - the recipe behaviour on failure

    • Proceed - proceed to the next step.
    • Fail - terminate the recipe and mark it as failed.
    • Stop- terminate the recipe and mark it as successful.
    • Go to step - specify the step to proceed to. If you specify the nonexistent step, the recipe will be stopped.

  3. Press Save.

    Drag and drop steps to change their order. To do so:

    1. Select the required step and hold it down with the left mouse button.
    2. Drag the recipe up to the required position and release the mouse button to drop it.