IBM Cloud Onboarding
Onboarding your IBM Cloud account to Klarity ImageFactory enables the automated creation and distribution of custom virtual server images. This guide explains the prerequisites and the configuration required to integrate your IBM Cloud environment.
Prerequisites
Before you begin the onboarding process, ensure you have the following:
- An active IBM Cloud account.
- An IBM Cloud API Key with permissions to manage VPC infrastructure and Cloud Object Storage.
- A Cloud Object Storage (COS) bucket to store temporary image artifacts.
- A Resource Group where the build resources will be provisioned.
Required Credentials
To connect ImageFactory to your IBM Cloud account, you must provide the following information:
apikey: Your IBM Cloud API Key.region: The IBM Cloud region where the build process will take place (e.g.,eu-de).cosBucket: The name of the Cloud Object Storage bucket used for image transfers.resourceGroupName: The name of the resource group for your build resources.resourceGroupId: The unique ID of the resource group.
Required Permissions
The API key used by ImageFactory must have the following access:
| Service | Role | Purpose |
|---|---|---|
| VPC Infrastructure | Editor | Create and manage build instances and images. |
| Cloud Object Storage | Writer | Upload and manage image files in the COS bucket. |
| IAM | Viewer | Access resource group information. |
Step-by-Step Guide
Using the Onboarding Script (Recommended)
The ImageFactory UI provides a ready-made shell script that automates the IBM Cloud setup. This is the fastest way to onboard.
- Navigate to Cloud Credentials in the sidebar and click Add Credentials.
- Select IBM Cloud as the provider.
- Enter your Account ID.
- In step 2, you'll see the onboarding script displayed with a copy button. Run this script in the IBM Cloud Console (Cloud Shell). The script automatically:
- Creates an API key with the required permissions
- Sets up a Cloud Object Storage bucket
- Configures the resource group
- Outputs all the credential values you need
- Copy the output values into the corresponding fields in the ImageFactory form.
The IBM Cloud Console script handles all resource creation automatically. You don't need to manually create any of the prerequisites listed above.
Manual Setup
If you prefer to set up resources manually, follow these steps:
1. Create an API Key
Log in to the IBM Cloud console. Navigate to Manage > Access (IAM) > API keys. Click "Create an IBM Cloud API key", give it a name like imagefactory-integration, and save the key securely.
2. Set Up Cloud Object Storage
Create a Cloud Object Storage instance if you don't have one. Create a new bucket in the same region where you plan to build your images. Note the bucket name.
3. Identify Your Resource Group
Navigate to Manage > Account > Resource groups. Find the resource group you want to use and note both its name and its ID.
4. Add Account in ImageFactory
Use the ImageFactory console or the GraphQL API to submit your credentials. Ensure all fields match your IBM Cloud configuration exactly.
API Example
You can onboard an IBM Cloud account using the following GraphQL mutation:
mutation CreateIbmCloudAccount {
createAccount(input: {
name: "Production-IBM"
provider: IBM
ibmConfig: {
apikey: "your-ibm-api-key"
region: "eu-de"
cosBucket: "if-build-artifacts"
resourceGroupName: "Default"
resourceGroupId: "your-resource-group-id"
}
}) {
id
status
}
}
Image Distribution on IBM Cloud
Once a build is complete, ImageFactory creates a custom image in your VPC infrastructure. This image is registered in the specified resource group and is available for provisioning new virtual server instances. The platform handles the transfer of the image from the COS bucket to the VPC image registry.
Verifying the Connection
After adding the account, ImageFactory will validate the API key and check access to the COS bucket and resource group. Check the account status in the dashboard. A status of ACCESS_SUCCESS indicates that the integration is successful and you can proceed to create image templates.