Development-Hub

Introduction

The Development-Hub can be used to manage the development cycle of an app. The Hub contains one or more Development Environments - one for each app under development - which consists of a Git repository and an corresponding build job on a Continuous Integration (CI) server. Changes to the repository trigger builds on the CI server and the resulting apps are automatically uploaded to the Relution store in Development release state. Once inside the store, these apps can be approved or rejected using an App Release Workflow

To be able to use the Development-Hub, the following requirements must be met and the Relution settings configured accordingly:

  • The user account is in the “Administrator” or “Appstore Manager” group

  • At least one Repository (provider) must be configured in Relution. Relution currently supports AWS CodeCommit and GitLab as repository providers.

  • Using a continuous integration server with the Relution Development-Hub is optional. Relution currently supports GitLab and Jenkins as a CI server providers.

Prerequisites for using an AWS CodeCommit repository

An Amazon Web Service account is necessary to use AWS CodeCommit, additionally an AWS user must be created having the following policies in order to integrate it with Relution:

  • IAMFullAccess

  • AmazonCodeCommitFullAccess

  • AmazonSNSFullAccess

  • AmazonSQSFullAccess

Amazon recommends to create a group in AWS Identity and Access Management (IAM) that has the above policies attached and to add the user to this group. Please be aware that by adding the IAMFullAccess policy, a user gets permission to manage other users, including itself. This means this user account should be kept secret and not be shared throughout your organization.

If your Relution instance is not running on AWS, you have to create an Access Key for your AWS Account and provide the credentials in the Relution Development Hub settings.

Prerequisites for using a GitLab repository

  • A GitLab server must be available

  • A GitLab user with privileges to create, delete and modify settings, projects, groups and users must be available (preferably with admin rights)

Prerequisites for using GitLab CI

  • The requirements are the same as when using the GitLab repository

Prerequisites for using Jenkins CI

The AWS SQS Build Trigger Plugin ensures that Jenkins is notified when changes are pushed to a Git repository, so a build of the related Jenkins job can be started. This means AWS needs to be configured to provide an Amazon Simple Queue Service (SQS) queue the plugin can interact with.

The Environment Injector Plugin ensures that environment variables can be set inside the build job. This is required for the auto-generated build jobs to work correctly.

The Relution Enterprise Appstore Publisher plugin ensures that the built apps are uploaded to a specified Relution instance and are linked to the corresponding Development Environment.

The YML Plugin ensures that build jobs on Jenkins can be configured using YML configuration files. Relution provides these files inside the Git repository. This allows developers to configure build jobs by changing these files.

Development-Hub Settings

The Development-Hub settings allow to define multiple repository/CI providers by entering a provider name and filling in the required data, like connection credentials. These providers can be used to create environments in the Apps > Development-Hub menu. This menu item is visible to all users which are members of the Developer group. Developers can also upload their public SSH key using the user account menu item in the top right corner. This key is required to access the repository.

NOTE: The managed Development Environments with CI are using a technical user called devHubTechUser to upload build apps into Relution appstore, please do not delete or modify this user in any way.

image image

Development Environments

Users with the Reviewer permission can either link an existing app project as unmanaged Development Environment or request a new managed Development Environment.

  • Unmanaged Development Environments are created right away by linking an existing project from the repository and fetching its data. Optionally a CI integration can be requested, by selecting a CI provider during the linking process. Relution then creates a merge request (MR), containing YAML files, in the Git repository. After accepting the merge request, the YAML files are used to setup a build job, which enables the Continuous Integration on the server.

  • Managed Development Environments are created in two steps. First it needs to be request by an Reviewer. After the environment is requested, Appstore Managers will be notified via email and can approve or reject the requested Development Environment. When an environment is approved, a new repository project is created using the repository provider. Optionally, the Continuous Integration is enabled for this project using the configured CI provider. The CI is enabled in a similar way like for the unmanaged Development Environment, but without need to accept any merge request. After the environment is set up, the requesting user is notified and becomes a Development Environment owner. An owner is granted permission to manage their Development Environment, which allows them also to assign developers. To clone the Git repository, developers need to upload their public SSH key to Relution. This key is automatically added to the repository provider, which allows them to access the repository using their private SSH key. Once this is done, Relution displays the necessary information required to access the repository, which depends on the repository provider. For CodeCommit this is the repository URL, including the user’s API access key ID, and for GitLab it is the clone URL. By default, a new build on the Continuous Integration server is triggered when a developer pushes changes to the master branch. The build artifacts (apps) created by a successful build will be uploaded to Relution and are linked to the corresponding Development Environment. Uploaded apps are visible in the Relution App Store or via the Development Hub, by selecting the according Development Environment in the Relution Portal.

Relution provides YAML configuration files for the supported Continuous Integration server. With these files, which are located in the Git repository, developers are able to manage the CI build job and the installed plugins.

A requested Development Environment can also be rejected by the Appstore Managers. The requesting user will be notified via email and will no longer be able to manage the Development Environment.

It is also possible to delete a Development Environment at any time. If it is a managed environment and it has been approved, then the repository project and any files in it will be deleted. THIS DATA CANNOT BE RESTORED. Make sure to create a backup of these files before you delete an environment. Repository project data of an unmanaged environment is not affected by the environment deletion.

image

SSH public keys

App Developers have the possibility to upload their SSH public keys. If they are assigned to a Development Environment, their keys will be uploaded to the respective repository provider. This ensures that they are able to clone and access the corresponding Git repository, and push and pull code changes.

To create your own private/public key pair, follow these steps:

  • Create the keypair

    • On GNU/Linux / macOS:

      ssh-keygen -t rsa -C "MyKeyName" -b 4096

    • On Windows:

      • On Windows, you will need to download and install PuttyGen

      • In PuttyGen, create an SSH-2 RSA key with a length of 4096 bytes.

  • Copy your public key (located at ~/.ssh/id_rsa.pub) to the clipboard

  • Paste it into the Relution SSH key menu (available by clicking on your user name in the top right corner of the portal)

image

Comprehensive instructions on how to a generate private/public key-pair on a *nix system can be found here. Instructions for Windows can be found here.