CLI Tutorial: Install JPS
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 CLI Tutorial: Install JPS 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.
In this article we will show you how to install it.JPS packageThrough the CLI, such steps might include creating a new environment with pre-configuration (such as deploying and configuring applications) or performing certain operations on an existing instance.
Start byinstallProper package by running the JPS package and all parameters:
~/jelastic/marketplace/jps/install --jps {jps} [--envName {envName}] [--settings {settings}] [--nodeGroup {nodeGroup}] [--displayName {displayName}] [--region {region}] [--envGroups {envGroups}] [--ownerUid {ownerUid}] [--logsPath {logsPath}] [--loggerName {loggerName}] [--skipNodeEmails {skipNodeEmails}]
Parameters in square brackets [ ] are optional:
- jps- link toManifest fileor your content
- Specific settings forjpsType: Installmanifest (new environment)
- [displayName] - aliasFor creating the environment
- [region] -The specific name of eachRegion(e.g. get it with the GetRegions method) that will create the environment
- [envGroups]- List ofenv groupThe created environment should be included. (specified as a JSON array, e.g.["mygroup", "group/subgroup"])
- Specific settings forjpsType: Updatemanifest (add-ons for existing environment)
- [nodeGroup]- environment layer that add-ons should be used with (bl, cp, cache, sqldb, nosqldb, storage, vps, created or definedDocker containermanually)
- envName- Name of newly created env/target for installing the application/add-on accordingly.
- [settings]- List of settings required by the package (specified as a JSON object with key/value pairs).
- [ownerUid]- User ID of the shared account where the JPS package should be installed.
- [loggerName]- The name displayed next to the timestamp of each operation in the JPS installation log file (learn more aboutloggerName)
- [logsPath]- Path to log file to record JPS installation (cs.log by default)
- [skipNodeEmails]- Enable (trueby default) or disabled (false) Email notification about new node creation for this package. (Learn more aboutskipNodeEmails)
Now you can proceed with a real case example:
- Installing the TimeZone Change add-on via URL
- Installing JPS using a configuration file with parameters
Installing the TimeZone Change add-on via URL
The TimeZone Change add-on makes it easy to change the time on a container to the desired zone. The add-on's source information and manifest files can be found in the repository.Jelastic JPS CollectionIn GitHub
1. Install Jelastic CLI and log into your account. You can see the method atmanualthis
2. Call the methodinstallWith the necessary parameters:
~/jelastic/marketplace/jps/install --jps {jps} --envName {envName} --settings {settings} --nodeGroup {nodeGroup}
where:
- {jps}- Link to the TimeZone Change manifest add-on file, e.g.https://raw.githubusercontent.com/jelastic-jps/time-zone-change/master/manifest.jps
- {envName}- Name of the existing environment, e.g.my-app
- {settings}- As the list shows, this add-on requires specifying one additional parameter -timezonedesired such as{“dashoard_url”:"America/New_York"}
- {nodeGroup}- environment target layer
- If there are no problems The script will respond with "result": 0 (the operation was successful).
3. For this add-on program You can check the details of the results in the file./var/log/jpsaddon.logBy typing the command:
~/jelastic/environment/file/read --envName {envName} --path "/var/log/jpsaddon.log" --nodeGroup {nodeGroup}
You will see the timezone is already set as specified in the previous step. America/New_York The local time on the relevant container will be adjusted to this new time zone.
Installing JPS using a configuration file with parameters
You can specify all parameters within a single file and reference them when calling CLI methods.
By creating a JSON file (using the desired editor) with the required parameters, in our case we will run a simple JPS which will save the values of the provided parameters.
{
"jps": {
"type": "update",
"name": "JPS Example",
"onInstall": {
"log": "${settings.param1}"
}
},
"envName": "my-app",
"settings": {
"param1": "value1"
},
"nodeGroup": "cp"
}
Tips:You can specify the URL to your manifest file instead of specifying it explicitly in the jps parameter (similar to the TimeZone example).
2. The next step calls the method.installBy using the generated configuration file
~/jelastic/marketplace/jps/install --myparams {myparams.json}
Tips:You can specify explicit parameters to configure within a new file, for example changing the environment name without having to manually adjust the configuration file:
~/jelastic/marketplace/jps/install --myparams {myparams.json} --envName {envName}
3. You can check that the values of the specified parameters have been successfully saved through the platform console by clicking on the link.https://app.manage.Ruk-Com.cloud/consoleto view log
Using configuration files With a predefined list of parameters, it's a great way to simplify and automate frequent calls.