Working with Templates

Templates listed in the corresponding JCA section are provided in the environment wizard at the dashboard for end used to create software container instances on their basis.

Within the Templates section, you can see and manage stack templates that are available in your Jelastic cluster. Here, the following information is provided:
  • Name - displays stack name with its unique identifiers in brackets; such ID is used as the nodeType parameter when referring to this template in API, JPS packages, CS scripts, etc
  • Version - shows version of software
  • Node Mission - defines a section in the environment topology wizard where a template appears. Here, the following identifiers are used:
    • bl - load balancer
    • cp - application server
    • cache - cache node
    • sqldb - SQL database
    • nosqldb - NoSQL database
    • storage - storage node
    • vds - virtual private server
    • build - Maven build node
    • docker - Docker container
  • Type - contains a template type (NATIVE, DOCKERIZED, CARTRIDGE or DOCKER for Storage)
  • Published - denotes whether a particular template is published (✔) or not (-), and therefore available/unavailable for all the users via dashboard
  • In pool - provides the number of created template instance
  • In queue - lists the number of template instances that are in process of creation
  • Manifest URL - appears for CARTRIDGEs to provide a link to the source manifest file

Each template (with at least one instance created) has an expandable list of hardware nodes where its instances are placed - click the triangle before a particular template Name to see the list.

You can manage available templates in the following ways:

Within the Templates section, you can also add Docker registry for it to be used as a trusted source while integrating your custom dockerized template.

Add Template

In the Templates section, you can integrate your custom stacks by expanding the Add menu and selecting one of the following locations:

From Docker Repository

Note: If your Docker image is located in a custom repository (not Docker Hub), you need to add registry to the list of known hosts beforehand, so it can be used as a template source. When the registry is added, proceed to the following steps.

1. In the Add Template dialog box, select the Registry you’ve added earlier and specify the Repository where your template is stored.

Сlick Next and system will start fetching the required image data.

2. The default Settings and Tags will be automatically set according to the template parameters.

Here, you can adjust the following settings before publishing a template:
  • Display Name - server name that is displayed within JCA and end-user dashboard
  • Icons - images that are used for a stack
    • 16✕16 - for display throughout JCA and end-user dashboard
    • 32✕32 - for environment wizard at the dashboard
  • Auto-selection of provisioned tags - option that enables automatic update and delivery of template versions to end users. If not enabled, you’ll need to update the provisioned tags manually. Here, the following options are available:
    • Keep previously selected tags published - use to prevent unpublishing any of the previously provided tags during the daily auto-selection procedure
    • Allow system to switch the ‘Default’ tag - select to enable the system to run the latest available version as the default tag; clear the checkbox to select another default tag

      Note: As a result of the auto-selection procedure, the latest three minor versions within each major release are provided on the end-user dashboard, unless you keep previously selected tags published. To change the default number of minor versions, go to JCA > System Settings (expert mode) > jelastic and edit the jelastic.templates_update.minor_versions.number setting.

      You can also change the default frequency of auto-update (once a day) by editing the qjob.templates_update.cron_schedule setting.
  • Tags - server versions that will be available for end users (can be provided selectively by marking the required checkboxes) with a single Default one (will be automatically chosen for server creation until any other is specified). Here, you can also Include to List (“+”) and Exclude from List (“-”) the available tags.
  • Renew tags list now - click to initiate the auto-selection procedure immediately after saving changes to a template (also, you can run the same operation via Actions > Re-import Template from the top pane)

When you are finished, click Add and a new template will appear in the common software stack list, being automatically marked as unpublished. Before publishing the template, you can edit it or perform some additional actions.

From Cartridge Manifest

In the same way as with dockerized custom stacks, you can create a cartridge and provide it on the end-user dashboard. When you are ready, add a cartridge to your platform by following the linked guidance.

Note: While working with custom cartridges, take into consideration the following:

  • republish a cartridge template again after each import
  • learn more on preparing your own custom stack, adding it to JCA, and making it available for end users by following the dedicated guides

Edit Template

It is possible to change settings within dockerized templates (both default and custom) by selecting the required instance and clicking Edit on the top pane.

In the Edit Template dialog box, you can adjust the settings you specified during a template addition.

The settings that appear dimmed in the box (i.e. Registry, Repository, Node Mission, Node Type, and Engine Type) are fetched automatically from a template and can not be edited.

When you are finished with editing, click Save and before publishing a template you can perform some additional actions.

Run Additional Actions

While working with templates, you can perform some additional operations by expanding the Actions menu.

Here, the following options are available:
  • Regenerate Pool for a currently selected template or for all of them, using respectively Regenerate Current and Regenerate All options
  • Preview Unpublished template by being redirected to your dashboard with all the available templates listed in the environment topology wizard (no matter whether they are published or not). Click Open in popup to open your dashboard in a pop-up window instead of a new browser tab
  • Re-import Template to update your custom template with changes committed to its registry

Now, if everything looks fine, you can publish your custom template to make it available for end users.

Publish/Unpublish Template

You can Publish your custom stack with the appropriate button on the top pane to make it available for end users.

Confirm your action by clicking the Yes button.

In the same way you can Unpublish a template, so that it will be no longer available for end users.

Confirm unpublishing of a template by click the Yes button.

Proceed to the next section in case you want to delete your custom dockerized stack or cartridge.

Remove Template

To delete your custom dockerized template or cartridge, select it from the list and click Remove on the top pane.

Confirm the removal by clicking Yes.

When a template is removed, you can Refresh a list to update it.

That’s all you can do while managing templates via your JCA panel. Within the next section, you can add your custom Docker registry for it to be acknowledged as a trusted source of a template.

Docker Registries

In the Docker Registries section, you can Add your public or private registry to the list of known hosts so it can be used as a trusted source while integrating your custom dockerized template to JCA.

In the Add Registry box, the following details are required:
  • Name - specify a name to identify your registry
  • Host/IP - insert a URL of the host or IP address
  • Login / Password - type credentials for your account

When you are finished, click Add and your custom registry will appear in the list.

You can click Edit to change the earlier provided information or Remove your registry, using the buttons from the top pane.

Note: When you Edit the registry, you need to obligatory type the corresponding Password again. Otherwise, the information will be overwritten and an error will occur while importing templates from the registry.