-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #506 from umccr/feature/umccrise-pipeline-manager
initialised umccrise pipeline manager
- Loading branch information
Showing
12 changed files
with
880 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { | ||
AppStage, | ||
eventBusName, | ||
icaEventPipeStackName, | ||
icav2AccessTokenSecretName, | ||
dragenIcav2ReferenceUriMappingSSMParameterPath, | ||
umccriseIcav2PipelineIdSSMParameterPath, | ||
umccriseIcav2PipelineManagerDynamodbTableName, | ||
umccriseIcav2PipelineWorkflowType, | ||
umccriseIcav2PipelineWorkflowTypeVersion, | ||
umccriseIcav2ServiceVersion, | ||
umccriseIcav2ReadyEventSource, | ||
umccriseIcav2EventSource, | ||
umccriseIcav2EventDetailType, | ||
umccriseStateMachinePrefix, | ||
umccriseDefaultGenomeVersion, | ||
umccriseDynamoDbTableSSMArn, | ||
umccriseDynamoDbTableSSMName, | ||
} from '../constants'; | ||
import { UmccriseIcav2PipelineManagerConfig } from '../../lib/workload/stateless/stacks/umccrise-pipeline-manager/deploy'; | ||
import { UmccriseIcav2PipelineTableConfig } from '../../lib/workload/stateful/stacks/umccrise-pipeline-dynamo-db/deploy/stack'; | ||
|
||
// Stateful | ||
export const getUmccriseIcav2PipelineTableStackProps = (): UmccriseIcav2PipelineTableConfig => { | ||
return { | ||
umccriseIcav2DynamodbTableArnSsmParameterPath: umccriseDynamoDbTableSSMArn, | ||
umccriseIcav2DynamodbTableNameSsmParameterPath: umccriseDynamoDbTableSSMName, | ||
dynamodbTableName: umccriseIcav2PipelineManagerDynamodbTableName, | ||
}; | ||
}; | ||
|
||
// Stateless | ||
export const getUmccriseIcav2PipelineManagerStackProps = ( | ||
stage: AppStage | ||
): UmccriseIcav2PipelineManagerConfig => { | ||
return { | ||
/* ICAv2 Pipeline analysis essentials */ | ||
icav2TokenSecretId: icav2AccessTokenSecretName[stage], // "/icav2/umccr-prod/service-production-jwt-token-secret-arn" | ||
pipelineIdSsmPath: umccriseIcav2PipelineIdSSMParameterPath, // List of parameters the workflow session state machine will need access to | ||
/* Table to store analyis metadata */ | ||
dynamodbTableName: umccriseIcav2PipelineManagerDynamodbTableName, | ||
/* Internal and external buses */ | ||
eventBusName: eventBusName, | ||
icaEventPipeName: `${icaEventPipeStackName}Pipe`, | ||
/* Event handling */ | ||
workflowType: umccriseIcav2PipelineWorkflowType, | ||
workflowVersion: umccriseIcav2PipelineWorkflowTypeVersion, | ||
serviceVersion: umccriseIcav2ServiceVersion, | ||
triggerLaunchSource: umccriseIcav2ReadyEventSource, | ||
internalEventSource: umccriseIcav2EventSource, | ||
detailType: umccriseIcav2EventDetailType, | ||
/* Names for statemachines */ | ||
stateMachinePrefix: umccriseStateMachinePrefix, | ||
/* SSM Workflow Parameters */ | ||
defaultReferenceVersion: umccriseDefaultGenomeVersion, | ||
referenceUriSsmPath: dragenIcav2ReferenceUriMappingSSMParameterPath, | ||
}; | ||
}; |
54 changes: 54 additions & 0 deletions
54
lib/workload/stateful/stacks/umccrise-pipeline-dynamo-db/deploy/stack.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
import * as ssm from 'aws-cdk-lib/aws-ssm'; | ||
import { DynamodbPartitionedPipelineConstruct } from '../../../../components/dynamodb-partitioned-table'; | ||
|
||
export interface UmccriseIcav2PipelineTableConfig { | ||
dynamodbTableName: string; | ||
umccriseIcav2DynamodbTableArnSsmParameterPath: string; | ||
umccriseIcav2DynamodbTableNameSsmParameterPath: string; | ||
} | ||
|
||
export type UmccriseIcav2PipelineTableStackProps = UmccriseIcav2PipelineTableConfig & | ||
cdk.StackProps; | ||
|
||
export class UmccriseIcav2PipelineTable extends cdk.Stack { | ||
public readonly umccriseIcav2DynamodbTableArnSsmParameterPath: string; | ||
public readonly umccriseIcav2DynamodbTableNameSsmParameterPath: string; | ||
|
||
constructor(scope: Construct, id: string, props: UmccriseIcav2PipelineTableStackProps) { | ||
super(scope, id, props); | ||
|
||
/* | ||
Initialise dynamodb table, where portal_run_id is the primary sort key | ||
*/ | ||
const dynamodb_table = new DynamodbPartitionedPipelineConstruct( | ||
this, | ||
'umccrise_icav2_pipeline_table', | ||
{ | ||
tableName: props.dynamodbTableName, | ||
} | ||
); | ||
|
||
/* | ||
Generate a ssm parameter to store the table arn so it can be referred to be other stacks | ||
*/ | ||
this.umccriseIcav2DynamodbTableArnSsmParameterPath = new ssm.StringParameter( | ||
this, | ||
'umccrise_icav2_pipeline_table_arn_ssm_path', | ||
{ | ||
parameterName: props.umccriseIcav2DynamodbTableArnSsmParameterPath, | ||
stringValue: dynamodb_table.tableNameArn, | ||
} | ||
).parameterName; | ||
|
||
this.umccriseIcav2DynamodbTableNameSsmParameterPath = new ssm.StringParameter( | ||
this, | ||
'umccrise_icav2_pipeline_table_name_ssm_path', | ||
{ | ||
parameterName: props.umccriseIcav2DynamodbTableNameSsmParameterPath, | ||
stringValue: props.dynamodbTableName, | ||
} | ||
).parameterName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.