From ab88ae810cd4034296a924231ec7deb40a48aaf9 Mon Sep 17 00:00:00 2001 From: Pjv93 <135752326+Pjv93@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:40:38 -0400 Subject: [PATCH] Create contentspec.yaml for Workshop Studio Compatibility --- contentspec.yaml | 214 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 contentspec.yaml diff --git a/contentspec.yaml b/contentspec.yaml new file mode 100644 index 0000000..ca75aea --- /dev/null +++ b/contentspec.yaml @@ -0,0 +1,214 @@ +# We only support version 2.0. +version: 2.0 + +# Default locale code of the content ,formatted as languageCode-countryCode. +defaultLocaleCode: en-US + +# A list of all of the supported locale codes, formatted as languageCode-countryCode. +localeCodes: + - en-US + - fr-FR + +# A dictionary of arbitrary parameters that can be referenced in the workshop guide +# using the params directive. +params: + key1: value1 + key2: 5 + +# List of links to display in the workshop guide. Will be rendered on the left hand side navigation menu. +additionalLinks: + - title: AWS Documentation Homepage + link: https://docs.aws.amazon.com/ + +awsAccountConfig: + + # A list of valid account sources that are compatible for this content. + # Only the following values are accepted: + # - `workshop_studio`: Accounts will be provisioned for the event by Workshop Studio. + # - `customer_provided`: Customer is responsible for using their own accounts. + # Note: An event can be configured to have a mix of values mentioned above. + accountSources: + - workshop_studio + - customer_provided + + # List of valid IAM service linked roles (SLRs) that need to be provisioned for accounts provisioned for this event. + # SLRs will be automatically created by Workshop Studio when provisioning accounts. + # NOTE: SLRs may not all be deleted during account recycling, so it's possible that accounts in your event contain additional SLRs. + serviceLinkedRoles: + - appsync.amazonaws.com + + # The following configuration is specific to the ParticipantRole's scoped permissions. + # This role is assumed by Participants when accessing an account provisioned by Workshop Studio. + participantRole: + + # List of paths to files containing valid IAM policies that are to be attached to the account's ParticipantRole. + # Paths need to be relative to the root of the content's repository and must be located in the `static/` directory. + # Note: At this moment, only IAM policies defined in JSON format are supported. + iamPolicies: + - static/iam_policy.json + + # List of valid IAM managed policies to be attached to the account's ParticipantRole. Only AWS managed policies are supported at this moment (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) + managedPolicies: + - "arn:aws:iam::aws:policy/IAMReadOnlyAccess" + + # List of valid trusted principals to be referenced in the ParticipantRole's trust policy + trustedPrincipals: + + # List of AWS service principals + service: + - ec2.amazonaws.com + - lambda.amazonaws.com + + # If set to `true`, an EC2 KeyPair called `ws-default-keypair` will be created in the AWS Account and the private key material + # will be made available to the Participant via the Participant APIs and Participant interface. + ec2KeyPair: true/false (default false) + + # Defines a set of accessible and deployable regions for events leveraging this content. + regionConfiguration: + + # The minimum number of regions an event operator must choose. Valid range: 1 to 3 + minAccessibleRegions: 1 + + # The maximum number of regions an event operator can choose. Valid range: 1 to 3 + maxAccessibleRegions: 3 + + # [OPTIONAL] Regions defined under `accessibleRegions` are regions that can be made accessible to Participants. + # Note: + # - No resources will be deployed to these regions by Workshop Studio. + # - If deployableRegions are defined, the deployment region is accessible by participants without additional configuration. + accessibleRegions: + + # Note: Although all keys below are optional, you must define at least one of the three keys if accessibleRegions is defined. + + # [OPTIONAL] Set of regions an event's provisioned account must have access to. + required: + - us-east-1 + + # [OPTIONAL] Set of regions that should be accessible by an event's provisioned account as a recommendation. + recommended: + - us-east-1 + + # [OPTIONAL] Set of regions that event operators' could allow access to by event's Participants. + optional: + - us-east-2 + - us-west-2 + + # Set of regions where the configured CloudFormation templates will be deployed to. + # Note: Only 1 deployment region is supported currently. + deployableRegions: + + # Note: Although all keys below are optional, you must define at least one of the three keys if deployableRegions is defined. + + # [OPTIONAL] Set of regions an event's cloudformation templates should be deployed to. + # Note: Only 1 deployment regions is supported currently. Meaning no more than 1 region can be required. + # Use this sparingly and only when strictly required for the Workshop content, as this will prevent the content from being run in any other region. + required: + - us-east-1 + + # [OPTIONAL] Set of regions an event's cloudformation templates should be deployed to as a recommendation, such as due to having more capacity. + # Note: Providing two or more validated deployable regions is recommended for content resiliency. + recommended: + - us-east-1 + - us-east-2 + + # [OPTIONAL] Set of regions an event's cloudformation templates could be deployed to as optional. + # Note: Providing two or more validated deployable regions is recommended for content resiliency. + optional: + - us-east-2 + - us-west-2 + +infrastructure: + + # A list of CloudFormation templates that are present in the content's repository. + # These CloudFormation templates will be used by Workshop Studio's provisioning process and will be deployed to AWS accounts. + # Note: The order of CloudFormation templates defined here will be the same order that Workshop Studio will deploy them to + # the AWS accounts. Make sure the CloudFormation templates are in the correct order if some depend on others. + cloudformationTemplates: + + # The template's location relative to the root of the content's repo. + # Note: Templates must be located in the `static/` directory + - templateLocation: static/ec2-stack.json + + # Friendly name for the corresponding cloudformation template. + label: EC2 Stack + + # [OPTIONAL] List of tags to apply to the stacks. + tags: + - key: TagKey1 + value: TagValue1 + + # [OPTIONAL] List of parameters defined within the corresponding stack alongside + # the value that should be used for them. Any CloudFormation parameter that does not + # have a default value should be defined here with a default value. + parameters: + # The parameter name present in the corresponding CloudFormation template + - templateParameter: MyEnvVar + # [OPTIONAL] The parameter's default value to be used for this parameter + defaultValue: Hello, world! + + # Workshop Studio supports "Magic Variables" in the `defaultValue` of CloudFormation template parameters + - templateParameter: ParticipantRoleArn + defaultValue: "{{.ParticipantRoleArn}}" + - templateParameter: AssetsBucketName + defaultValue: "{{.AssetsBucketName}}" + - templateParameter: AssetsBucketPrefix + defaultValue: "{{.AssetsBucketPrefix}}" + + # [Optional] Set of limited resources that are required as part of any event using this content + requiredCapabilities: + + # Defines the set of GPU instance types that are used by the CloudFormation template(s), and are required to be reserved + # for any event using this content + # Note: This is purely informational and will be used a demand-signal to help coordinate capacity + # planning and may be used in the future to provide other automation. + # Note: Specifying GPU instance types here WILL NOT make that instance type available. + # All Workshop Studio accounts have a containment score of 301 and support only small GPU instance. + gpu: + + # Define a list GPU instance types that need to be reserved for an event, along with the quantity + ec2Requirements: + - type: g4dn.xlarge + quantity: 1 + + # Define list of Sagemaker instance types that need to be reserved for an event, along with quantity + sagemakerRequirements: + - type: ml.g4dn.xlarge + quantity: 1 + +# [Optional] Only define this section if you plan to use a central account in your workshop +centralAccountInfrastructure: + + # A list of CloudFormation templates that are present in the content's repository. + # These CloudFormation templates will be used by Workshop Studio's provisioning process and will be deployed to AWS accounts. + # Note: The order of CloudFormation templates defined here will be the same order that Workshop Studio will deploy them to + # the AWS accounts. Make sure the CloudFormation templates are in the correct order if some depend on others. + cloudformationTemplates: + + # The template's location relative to the root of the content's repo. + # Note: Templates must be located in the `static/` directory + - templateLocation: static/central-account-stack.json + # Friendly name for the corresponding cloudformation template. + label: Sample Stack + + # [OPTIONAL] List of tags to apply to the stacks. + tags: + - key: TagKey1 + value: TagValue1 + + # [OPTIONAL] List of parameters defined within the corresponding stack alongside + # the value that should be used for them. Any CloudFormation parameter that does not + # have a default value should be defined here with a default value. + parameters: + # The parameter name present in the corresponding CFT + - templateParameter: MyAssetsBucketName + # [OPTIONAL] The parameter's default value to be used for this parameter + # Workshop Studio supports "Magic Variables" in the `defaultValue` of CloudFormation Template parameters for central accounts + defaultValue: "{{.AssetsBucketName}}" + - templateParameter: MyAssetsBucketPrefix + defaultValue: "{{.AssetsBucketPrefix}}" + - templateParameter: WSEventsAPIEndpoint + defaultValue: "{{.WSEventsAPIEndpoint}}" + - templateParameter: NotificationBusArn + defaultValue: "{{.NotificationBusArn}}" + - templateParameter: WksEventsRegion + defaultValue: "{{.WSEventsAPIRegion}}"