CLOUD PAAS / DEVELOPMENT TOOLS

CLI Tutorial: VCS Project Deployment

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: VCS Project Deployment 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.

Deploying via VCS is a popular and convenient method for integrating projects into the cloud. This is because it makes it easier to work with your app's source and easily update versions. VCS deployment can be controlled automatically (manually or automatically at intervals) and multiple options for managing VCS deployment via CLI, giving you full control over your app.

1. As an example, create a new project by running the following command:

~/jelastic/environment/vcs/createproject --envName  {env_name} --type  {type} --context  {context} --url  {url} [--branch  {branch}] --autoupdate {true/false} [--interval  {interval}] --autoResolveConflict {true/false} --zdt {true/false}

The list of parameters is grouped as follows:

  • Main configuration
  • {env_name}- name of your environment
  • {type}- Type of VCSgitorsvn; In the first case, the parameters are required.{branch}Added to point to the corresponding project version.
  • {context}- Context name for new project.
  • {url}- Link to appropriate storage
  • Additional options (Activation is determined by the value {true/false})
  • autoupdate- Activateautomatic updatesFor deploying projects, if enabled, parameters must be used.{interval}Additional settings for redeploy frequency
  • autoResolveConflict- Toggle this radio button to ON.
  • zdt- Allow to enableZDT deploymentFor PHP projects

More:In case you want to connect to a private repository, you should add additional authentication parameters to the main command.[–login{login}] [–password{password}] [–keyId{keyId}]You must specify options.{login}(to specify your VCS account login) and add the following settings based on the desired access type. (password or SSH key):

{password}- Corresponding VCS account password
{keyId}- The name of the private SSH key that you specified while adding it to the dashboard which will help create it.secure connectionto the repo by attaching the paired public SSH key.

After doing so, you will see a short response message about creating the project.

Tips:The commands described above correspond to the functionality of adding a project to the dashboard frame. So you can go back to the GUI control panel and click the button.EditNext to the newly appeared project You will see all the appropriate options used within the settings. If the project isn't showing, refresh your dashboard.

2. The next step is to run the update command to apply these settings and make your project work.

~/jelastic/environment/vcs/update  --envName  {env_name} --context  {context}

Set the parameters as in the previous step.

Subsequently, this command can also re-deploy your app based on the updated VCS source.

3. In case you want to edit project settings (such as changing the version), you should proceed as follows.

~/jelastic/environment/vcs/editproject --envName  {env_name} --type  {type} --oldcontext  {oldcontext} --newcontext  {newcontext} --url  {url} [--branch  {branch}] --autoupdate {true/false} [--interval  {interval}] --autoResolveConflict {true/false} --zdt {true/false}

Added parameters

  • {oldcontext}- The name of the project (i.e. context) that should be changed.
  • {newcontext}- Context for new projects (Required to specify You can specify the same as{oldcontext})

The remaining value options can be changed according to your needs.

Note:This command updates the associated project settings while the device should run the update method. (in step 2)

And here are all the steps. You can now create and manage your own VCS projects through your terminal.