CLOUD PAAS / DEPLOYMENT

SSH Access to GIT Repository

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 SSH Access to GIT Repository 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.

you candeploy applicationeasily from public or private GIT/SVN remote repositories for each supported programming language:Java, PHP, Ruby, Python and Node.js

In order to get more security You can access the private GIT repository via SSH, which makes it easy to clone and update applications. This also allows you to work with those repositories at a private server instead of a typical web hosting service for projects such as GitHub, GitLab, Bitbucket, etc.

Ruk-Com Cloud PaaS procedure screenshot

To access your private GIT repository using the secure SSH protocol, follow the simple steps below:

1.Create an SSH Keychain

2.Add Private SSH Key to Ruk-Com Cloud Account

3.Add Public SSH Key to Git Account

4.Deploy project via SSH

Creating an SSH Keychain

Start by creating an SSH key pair (i.e. 2 related keys: public and private) to bind the GIT repository to your Ruk-Com Cloud account. Please follow the SSH Key generation instructions if you have never created a keychain before.

Note:Your key must not be password protected.(passphrase)To be used to create a connection between your Ruk-Com Cloud account and GIT.

Adding a Private SSH Key to a Ruk-Com Cloud Account

Once you have a pair of SSH keys generated, place each key on the appropriate system. First you need to add your private key to the account.

1. Login to your Ruk-Com Cloud account and go to settings, click the button.Settingsin the upper right corner of the dashboard.

Ruk-Com Cloud PaaS procedure screenshot

2. Within the open User Settings tabUser SettingSwitch to the option.SSH Keys > Private Keysand select the buttonAdd Private Key

Ruk-Com Cloud PaaS procedure screenshot

3. Copy your private SSH key and paste it into the text field, then type.NameFor this key (e.g. git-key) and finish adding with the button.Add

More:If you get an error while adding a key Please make sure it is not password protected.passphraseIf there is, delete it and try again.

4. Wait a moment, your new private key will appear in the corresponding tab.

You can delete your key at any time if you no longer need it, select the red cross button. Deleting a key from the manager does not delete it from the existing GIT project in Ruk-Com Cloud, so you can continue working with it as before.

Add Public SSH Key to Git Account

After uploading your private key to Ruk-Com Cloud, it is time to modify the GIT storage account.

If your GIT repository is at a remote private server, just upload the appropriate SSH public key and add it to the list of allowed keys.

In case you are using web project hosting services, follow the detailed step-by-step instructions below. It includes 3 popular services:

GitHub

1. Log in with your GitHub account using your credentials. Go to your account's settings.Settings(Upper right corner) Select the tab.SSH and GPG keyson the left panel and select the buttonNew SSH keyNew

Ruk-Com Cloud PaaS procedure screenshot

2. Paste your public SSH key into the key entry field and give the key a name (e.g. sshkey). Click when done.Add SSH key

Ruk-Com Cloud PaaS procedure screenshot

3. You can check the newly added key which will appear in the same SSH keys tab.

Ruk-Com Cloud PaaS procedure screenshot

4. To get the SSH link to your project, navigate to the desired storage. (You must be logged in) and change the link type to SSH in the clone URL section on the right pane. Then click the Copy to Clipboard button. (or copy manually)

Ruk-Com Cloud PaaS procedure screenshot

GitLab

1. Log in with your GitLab account. Go to the account settings.Settings(top right corner) and go to the SSH keys tab on the left menu.

Ruk-Com Cloud PaaS procedure screenshot

2. Paste your public SSH key into the key entry field, name the key (e.g. jelastic-sshkey) and enter an expiration date (optional). Click when done.Add SSH key

Note:The expiration date is only informative and cannot prevent you from using the key. For example, an administrator can use it to keep the key rotating.

Ruk-Com Cloud PaaS procedure screenshot
Click the Add Key button.

3. Your key will appear in the SSH keys list below.

Ruk-Com Cloud PaaS procedure screenshot

4. To get the SSH link to your project, navigate to the desired storage. (You must be logged in) Expand menuCloneand copy the linkClone with SSH

Ruk-Com Cloud PaaS procedure screenshot

Bitbucket

1. Log in with your Bitbucket account using your credentials and selectManage AccountFrom the user settings menu in the top right corner

Ruk-Com Cloud PaaS procedure screenshot

2. When opening the pageSettingsThen switch to the SSH Keys tab (inside theSecurity) using the category list on the left, then selectAdd keyin the middle of this page

Ruk-Com Cloud PaaS procedure screenshot

3. In the frame that appears, paste your public SSH key into the Key input field and set a Label name for your key (e.g. jelastic-sshkey) and click the button.Add key

Ruk-Com Cloud PaaS procedure screenshot

4. Verify that your newly added key appears in the same SSH keys tab.

Ruk-Com Cloud PaaS procedure screenshot

5. To get the SSH link to your project Go to the section.Overview(You must be logged in) and change the link type to SSH within the relevant drop-down list at the top of the page. Then copy the displayed string.

Ruk-Com Cloud PaaS procedure screenshot

Deploy project via SSH

Finally, you can proceed to deploy your project over a secure connection.

1. Go toDeployment Managerbottom of dashboard Then click the buttonAdd repoThen specify the following information in the form that opens:

  • Name- Name of your application (Spaces and special characters are not allowed)

  • URL-gitThe appropriate URL to the storage

  • Branch- Required branch of the project (master by default)

  • Put a check mark in the boxUse AuthenticationChoose an optionAccess Typeis an SSH Key andSelect Keyfrom the list
Ruk-Com Cloud PaaS procedure screenshot
Click Add to save your project information.

2. Once the project is added to the Deployment Manager, hover over the project and press the deploy button that appears to deploy your application.

Inside the window that opens You need to specify the deployment target and configure some additional values:

  • environment - Select the desired target environment from the list.

More:For Java-based environments, you must selectbuild nodeMore

Ruk-Com Cloud PaaS procedure screenshot

  • Path- Type the context where you want to deploy your application. (or leave it at default)
  • Hooks- add pre actionpre-and afterpost-deploy (if desired)
  • Check and auto-deploy updates- Enable periodic updates for changes to your project from the repository. (executed only when code changes) with a specified time interval
  • Auto-resolve conflicts- Prevent merge conflicts with the "git reset –hard" command being called during the next project update. (Conflicting files are updated according to the stored version and local changes made are discarded.)
  • Enablezero-downtime deployment- Modified deployment flow to avoid application downtime (for PHP server only)
Ruk-Com Cloud PaaS procedure screenshot

When all information is entered, clickDeployto proceed and wait until your project is successfully deployed.

3. You can make sure your project file is ready to use by opening it.Configuration File ManagerFor your environment, go to the webroot directory and check for folders named after the context specified within (ROOT by default).

Ruk-Com Cloud PaaS procedure screenshot

4. Finally, you can clickOpen in Browserfor your environment and making sure your applications are running

Ruk-Com Cloud PaaS procedure screenshot
Ruk-Com Cloud PaaS procedure screenshot

And this is all! Enjoy highly protected interoperability with version control. Clone and update your project and host it at Ruk-Com Cloud PaaS directly from your private GIT repository via SSH.