Add a Workload to the Workload Catalog
Workloads can be uploaded to the Workload Catalog for anyone within your organization with the right permissions to access. The process involves the creation of a Workload Manifest, which defines what your Workload is. The Workload Manifest is interpreted by Stax, transformed into a Workload and made available within the Workload Catalog.
A Workload can be uploaded as a new version within an existing Catalog Item or as the first version of a new Catalog Item. Either way, the Workload will be assigned a Workload Catalog ID and Workload Version ID for you to keep track.
Before You Begin
-
Estimated time to complete: 5 minutes
-
Ensure you an Admin in your Stax tenancy
-
Ensure you have a Workload Manifest (see Create a Manifest)
Adding a Workload via the Console
-
Create a Workload Manifest
-
Click on Workloads in the left-hand nav
-
Click Catalog in the sub-menu, beneath Workloads
-
Click + Create catalog item
-
Follow the prompts to create a Catalog Item and upload your Manifest.
If you need to upload artifacts that are referenced by your Manifest, such as CloudFormation templates, you must:
-
Deploy the stax-deployment-bucket Workload from within the Workload Catalog (see Deploy a Workload)
-
Upload your artifacts to the S3 bucket deployed by the stax-deployment-bucket Workload
-
Reference the artifacts in your manifest using the S3 URL where the artifacts are housed
Example
The below Manifest deploys a CloudFormation template called LogGroup.yml. The LogGroup.yml CloudFormation template was uploaded to the S3 bucket created by the stax-deployment-bucket Workload. This S3 bucket was given the name manifest-artifacts upon deployment.
Resources:
- LogGroupStack:
Type: AWS::Cloudformation
TemplateURL: s3://example-artifactbucket/cloudformation/LogGroup.yml
The Workload Name must begin with a letter (a-z).
Adding a Workload via the API
-
Deploy the stax-deployment-bucket Workload within the Workload Catalog (see Deploy a Workload)
-
Upload your Manifest and any additional artifacts to the bucket deployed by the stax-deployment-bucket Workload
-
Make a POST call to the Workload Catalog API:
-
Via the Python SDK (refer to Stax Python SDK
-
Via the API directly using the
POST /20190206/workload-catalogue
request (refer to Stax API) When using thePOST /20190206/workload-catalogue
, you have the option of passing the Manifest withinManifestBody
orManifestURL
, but not both. When passing the Manifest withinManifestBody
, make sure to use valid single line YAML syntax. For example, the LogGroup.yml manifest above would be represented as "Resources:\n - Description: Deploys a Log Group:\n Type: AWS::Cloudformation\n TemplateURL: s3://manifest-artefacts/LogGroup.yml"
Note: The Workload Name must begin with an alphabetical character (a-z)