Note |
---|
Note that this functionality is available in MettleCI Release 1.3 onwards. |
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Configuring your Bamboo build environment
Prerequisite steps
The instructions on this page depend upon the following prerequisite steps:
Enable and download one or more Bamboo remote agents.
On your Mettle Agent Host …
Install one or more of your Bamboo remote agents.
Configure your Bamboo agents' DataStage Capabilities.
Create and Populate Repositories
Start by deploying the supplied repository template files to your selected Git hosting solution.
Info |
---|
Note:
|
Link repositories to Bamboo
Next, you need to tell Bamboo where your code repositories (called Linked Repositories) are located by selecting menu item Bamboo Administration → Linked Repositories → Add Repository.
Whether you elect to make the repository linkage available globally within your Bamboo installation, or whether you restrict the linkage to a specific plan, is a organizational decision. Both options will work. You can leave all Advanced options with their default values. You will set up Bamboo spec scanning in a later step, so leave that option unchecked for now.
Create some Shared Credentials
Next, create two sets of Bamboo Shared Credentials to protect access your Bamboo and DataStage resources:
SSH Credentials
These credentials are used by your Bamboo Specs pipeline to deploy DataStage configuration and file system assets to a remote host.
...
Enter an (arbitrary) name for your SSH credentials.
Enter the private key from your SSH key pair in the SSH Key field.
If you gave your SSH key pair a passphrase then enter it in the SSH Passphrase field.
Configure your Git repository platform with the associated public key of your new key pair.
For more background on the use of SSH keys within MettleCI see SSH Configuration and Using SSH keys in MettleCI pipelines.
Username and password
These credentials authenticate an Information Server user and are used by your Bamboo Specs pipeline to deploy assets into a specified target DataStage project.
...
Enter an (arbitrary) name for your DataStage credentials.
Enter the username and password of the Information Server account you want your Bamboo pipeline to use for interacting with your DataStage environments.
Identify Plan variables
The example build plans shipped with MettleCI use a number of Plan variables which you will need to provide before you can use the examples on your environment. Bamboo Plan variables override any variables of the same name that have been established at the Global or Project levels.
Variable name | Example Value | Description |
---|---|---|
DomainName |
| The URL and port of your DataStage services tier |
ServerName |
| The URL of your DataStage engine tier |
EnvironmentID |
| project suffix indicated the environment to be built |
ProjectName |
| your-datastage-project |
ServerUsername |
| your-username-for-the-engine-tier-server |
SshCredentials | IBM117 Lance Short can we choose a better value for this example? | your-bamboo-shared-credential-for-ssh |
DatastageCredentials | DataStage v11.7 Test2 Lance Short can we choose a better value for this example? | your-datastage-login-shared-credentials |
Register your DataStage project with Workbench
If you have not already done so, register your DataStage project with your MettleCI Workbench instance, ensuring you connect the DataStage and Compliance repositories you established in the steps above.
Create Bamboo Project
Create a Bamboo project in the normal way. Leave it empty for now but it is needed in the following steps.
Configure your Bamboo specs build plans
Bamboo is capable of using YAML-based pipeline definitions, examples of which ship with MettleCI. The files that comprise your Bamboo pipeline definition exist within a bamboo-specs
directory in the root of your DataStage repository:
...
Add these two YAML files to the bamboo-specs directory of your DataStage assets repository.
Commit your changes.
Add Compliance repository to the project’s Bamboo Specs repositories
DO NOT ADD the DataStage Asset repository. We will do that differently in a later step that will trigger build creation. The name you choose here should match the one you used above.
...
select your compliance repository and add it.
Grant access to the DataStage Asset repository from your Compliance repository
Go to Administration >> Linked Repositories
Choose your Compliance Repository. (for example,
Compliance_LS
, the name you used above)Choose Permissions from the tabs.
Scroll down to Bamboo Specs repositories access. Choose your DataStage Asset repository from the list. (for example,
myproject
)Click Add
Allow project creation from DataStage Asset repository
Go to Administration >> Linked Repositories
Choose your DataStage Repository. (for example,
myproject
)Choose Bamboo Specs from the tabs.
In the Scan for Bamboo Specs section, check Allow Bamboo to scan this repository… If you get a tutorial dialog you can close it or review the tutorial at this point.
In the Access section, check Project creation allowed
Set DataStage Asset Repository as the Specs repository
By default Bamboo will not look for Bamboo Specs in the Git repository until your explicitly tell it to do so.
...
We recommend that you get this plan to run correctly before you go on to the next step, setting up the deployment plan. This may take some debugging, which is out of scope for this document, but start with a careful review of the information you gathered and entered, as well as the error messages you received.
Deployment Plan
Once your build plan is running correctly (and the CI DataStage project is getting correctly updated with newly committed changes) you will set up the Deployment Plan
...