CLOUD PAAS / DEVELOPMENT TOOLS

Parameters for CreateEnvironment API

This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.

Click or tap a screenshot to view it at its original size.

Objective

This guide explains how to use Parameters for CreateEnvironment API on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.

Before you begin

  • Sign in with an account permitted to manage the relevant environment.
  • Confirm the target environment, region and resources before saving changes.
  • Create a backup or rollback plan before changing a production system.

Creating a new environment within Ruk-Com Cloud PaaS can be automated in several different ways, such as usingCLIdirectly throughAPI requestor declare the appropriate parameters via the JPS manifest. Although this is a relatively simple operation, many parameters can be combined for precise topology definition.

So below we'll explain all the settings and give an example using the CLI, divided into three main sections based on an array of methods.~/jelastic/environment/control/createenvironmentThey are named after the appropriate array type - two general and one specific list of parameters for building Docker containers:

General configuration for the Environment

The parameters below must be specified within the array.env(CLI command or JSON file) and configure general environment values such as programming language, name, region, etc.:

For example:–env ‘{“region”: “default_hn_group”, “ishaenabled”: “false”, “engine”: “java7”, “displayName”: “my-env-alias”, “sslstate”: “true”, “shortdomain”: “my-cli-env”}'

Node configuration

In terms ofnodesSettings can be further refined to define server parameters including type, number, number of reserved/dynamic cloudlets defined and more.

For example,nodes ‘[{“extip”: “true”, “count”: “2”, “fixedCloudlets”: “16”, “flexibleCloudlets”: “32”, “displayName”: “my-node-alias”, “nodeType”: “docker”, “docker”: {…}}]'

Configuring Docker-Based Environment

The docker section is intended to specify special docker container parameters required for deployment.

For example,docker”: {“cmd”: “run.sh”, “image”: “jelastic/tomcat8:latest”, “nodeGroup”: “cp”, “links”: […], “env”: {…}, “registry”: {…}, “volumes”: […], “volumeMounts”: {…}, “volumesFrom”: [{…}]}

  • Linking configuration - for creating connections between Docker containers within the scope of a single environment.

For example,“links”: [“cp:alias”, “sqldb:DB”]

  • Configuring environment variables - for specifying environment variables in the Docker container.

For example,“env”: [{“var1”: “value1”}, {“var2”: “value1 \value2 \value3”}]

  • Registry configuration - for connecting to a private registry

For example, “env”: [{“var1”: “value1”}, {“var2”: “value1 \value2 \value3”}]“registry”: {“password”: “passw0rd”, “user”: “admin”, “url”: “http://example.com/private-registry”}

  • local volumes - List of volumes on which to create a local file system in the docker container.

For example,“volumes”: ["/volume1", “/volume2”, “/volume3”**]

  • mount points - a group of parameters that define folders with data that must be attached from other servers.

For example,“volumeMaunts”: {"/data": {“sourcePath”: “/exported”, “sourceNodeId”: “693215”, “readOnly”: “true”}}

  • account volumes - List of nodes in the current account for volumes imported from.

For example,“volumesFrom”: [{“sourceNodeGroup”: “cp”, “volumes”: ["/master", “/local”], “readOnly”: “true”}]