Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Objective

You have a shell script in a Git repository. The goal of the tutorial is to execute the shell script.

This process will include:

  • Copy the shell script from a Git repository

  • Execute the shell script

We will walk through each of the FlexDeploy features that will be created/configured to accomplish this goal and Execute the shell script

Checklist

Checklist

Description

Access Key

Access Key ID of IAM user

Access Key

Access Key of the IAM user

AWS CLI installation

AWS CLI needs to be installed on the Target m/c where the plugin operation shall run

AWS CLI in class path

AWS CLI should be added to the classpath in target m/c. Else the path can also be set under FlexDeploy environment level property

Configure cloud account

First, AWS account needs to be configured under Topology. FlexDeploy will connect to the AWS cloud and execute the script

  1. Navigate to the Integrations from the left-hand pane

  2. Navigate to the Cloud tab under Topology

  3. Navigate Create a new Cloud account of provider type “Azure” with the “+” button.

It should have a Client ID, Client Key, Tenant Id, and Subscription Id configured in it.

  1. AWS Access Key is a password field and hence needs to be kept hidden. To update the same click on the pencil icon as shown below

  2. next update the AWS Access Key value under Secret Text. This is to make sure no one else can retrieve the password

Git repository structure

The Git repository should contain shell script to execute.

The Sample Git repository structure is given below:

Build Workflow

Navigate to the Workflows tab and create a workflow using the “+”(Click to create new Workflow) button as highlighted below.

Next, create one Build workflow as shown below. The workflow Type field defines the type of workflow.

Build Workflow

  1. Navigate to the Workflows Tab

  2. Select the “+” button from the left-hand pane to create a new workflow with type as Build.

The Workflow Group and Subgroup define the folder hierarchy. Once both workflows are created it should look like the below. No constraint on workflow or folder naming convention.

The steps of the workflow execution can be configured through the Workflow Definition section.

Below given is a sample build workflow to copy and execute the script.

Step-i: Clone Git Repository

This step will clone the Git repository codebase into the project execution working directory. The Git URL will be retrieved from Source Control configured under Project Configuration.

Step-ii: Copy the script file

The below step will copy the script file.

Step-iiI: execute the script file

Project configuration

Navigate to the Project tab and create a Project with a logical name(AWS-Command in this case)

Configure the Build workflow that has been created in previous steps as shown below.

Source Control

Configure the Source SCM repository under Source Control as shown below.

 

  1. To configure Project specific Source Control one first need to navigate to the Project Configuration tab.

  2. Next, expand the SOURCE CONTROL option from the left-hand pane.

  3. Select the appropriate Source Control Type

  4. Configure Source Repository. For detailed steps of Source Control configuration please refer to Configure Source Control in FlexDeploy

Project Properties

To configure Project specific settings one can navigate to Configuration Properties as shown below.

  1. To configure Project specific settings one can navigate to the Project Configuration tab as shown above.

  2. Next, select the PROPERTIES option from the left-hand pane.

  3. Select the target Azure Cloud Account.

Target Properties

Topology

Navigate to the Topology from the Menu. The Page with the Target Groups, Environments and Endpoints sections will be displayed. Choose a Target Group on the left. You will see a list of Environments on the right with colored circles representing each Target

 

Properties

Mandatory field

Description

AWS ACCOUNT

Optional

AWS cloud account name

AWS CLI

Optional

Directory Where AWS CLI is installed

GIT Path

Optional

Path to the Git executable. Required only if git is not on PATH.

Build Execution

For detailed steps on how to initiate Build and push docker image please refer to https://flexagon.atlassian.net/wiki/spaces/FD65/pages/edit-v2/10197762066?draftShareId

Congratulations! You have successfully completed the Push Image on Amazon Private container registry tutorial.

Now that you have configured FlexDeploy to push image to AWS private container registry, it is extremely easy to replicate the same for other container registry as well. Simply use the Copy Project feature and a new project will be created with all of the configuration completed already. You just need to make the necessary configuration changes.

 

 

 

  • No labels