Skip to content

Commit

Permalink
initial repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallroden committed Sep 20, 2024
1 parent 4c57773 commit 4b8f6b4
Show file tree
Hide file tree
Showing 115 changed files with 12,949 additions and 1 deletion.
394 changes: 394 additions & 0 deletions .github/workflows/aws-pubsub.yaml

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

# Mac OS
.DS_Store

.idea
.venv
# Diagrid
# dev file
*/dev-*.yaml
dev-*.yaml
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*/venv
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb


# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

diagrid-venv/
cdk-graphql-stack/cdk.out/
cdk-infra/cdk.out/

!jest.config.js
*.d.ts
node_modules

# CDK asset staging directory
.cdk.staging
cdk.out
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# catalyst-reference-apps
# Catalyst Cloud Reference Applications

This repo contains deployable reference architectures that leverage the Catalyst APIs from applications and services running in the cloud.

## Getting Started

| Sample Application | Language | Catalyst APIs | Deployment target | Description |
| -------- | ------- | -------- | ------- | ------- |
| Group chat application | Python | Pub/Sub, State | AWS | Interact with an intuitive user interface to send and receive messages |
File renamed without changes.
73 changes: 73 additions & 0 deletions aws-pubsub/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Group Chat Microservice

## Prerequisites

- [Diagrid Account](https://catalyst.diagrid.io/)
- [AWS Account](https://repost.aws/knowledge-center/create-and-activate-aws-account)

Please ensure you have these dependencies configured and installed before proceeding

- [Diagrid CLI](https://docs.diagrid.io/catalyst/references/cli-reference/intro/)
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

### Setup AWS CLI

Retrieve AWS access credentials from the AWS console. From your CLI run these commands, replacing XXX and YYY with the correct values.

```bash
export AWS_ACCESS_KEY_ID=XXX
export AWS_SECRET_ACCESS_KEY=YYY
export AWS_DEFAULT_REGION=us-east-1

aws configure
```

### Log in to Catalyst

Log in using the below command:

```bash
diagrid login
```

If you have more than one Catalyst organization, set the default org:

```bash
diagrid org use [YOUR-ORG-NAME]
```

### Create an API Key

Create an API key which can be used by the Github Action to create and update Catalyst resources in your organization

```bash
diagrid apikey create --name github-action --role cra.diagrid:admin
```

## Running Github Actions

Fork the github project. Navigate to `Settings` -> `Secrets and variables` -> `Actions`.

Click the `New repository secret` button.

Add the following secrets and populate your credentials:

```bash
Name Value
-----
AWS_ACCESS_KEY_ID -------
AWS_ACCOUNT_ID -------
AWS_SECRET_ACCESS_KEY -------
```

Next, select the `Variables` tab and click the `New repository variable` button.

Add the following variables:

```bash
Name Value
-----
CATALYST_PROJECT_NAME Enter a unique project name for your group chat application
```

The Gihub actions pipeline runs everytime you do a push
14 changes: 14 additions & 0 deletions aws-pubsub/cdk-graphql-stack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Welcome to your CDK TypeScript project

This is a blank project for CDK development with TypeScript.

The `cdk.json` file tells the CDK Toolkit how to execute your app.

## Useful commands

* `npm run build` compile typescript to js
* `npm run watch` watch for changes and compile
* `npm run test` perform the jest unit tests
* `npx cdk deploy` deploy this stack to your default AWS account/region
* `npx cdk diff` compare deployed stack with current state
* `npx cdk synth` emits the synthesized CloudFormation template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node
import "source-map-support/register";
import * as cdk from "aws-cdk-lib";
import { CdkGroupChatMicroserviceStack } from "../lib/cdk-group-chat-microservice-stack";

const app = new cdk.App();
new CdkGroupChatMicroserviceStack(app, "CdkGroupChatMicroserviceStack", {});
72 changes: 72 additions & 0 deletions aws-pubsub/cdk-graphql-stack/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"app": "npx ts-node --prefer-ts-exts bin/cdk-group-chat-microservice.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
"@aws-cdk/core:checkSecretUsage": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
"@aws-cdk/aws-iam:minimizePolicies": true,
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
"@aws-cdk/core:enablePartitionLiterals": true,
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
"@aws-cdk/aws-route53-patters:useCertificate": true,
"@aws-cdk/customresources:installLatestAwsSdkDefault": false,
"@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true,
"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true,
"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true,
"@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true,
"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true,
"@aws-cdk/aws-redshift:columnId": true,
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
"@aws-cdk/aws-kms:aliasNameRef": true,
"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true,
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true,
"@aws-cdk/aws-efs:denyAnonymousAccess": true,
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true,
"@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true,
"@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true,
"@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true,
"@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true,
"@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true,
"@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true,
"@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true,
"@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true,
"@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true,
"@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true,
"@aws-cdk/aws-eks:nodegroupNameAttribute": true,
"@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true,
"@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true,
"@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false,
"@aws-cdk/aws-s3:keepNotificationInImportedBucket": false
}
}
8 changes: 8 additions & 0 deletions aws-pubsub/cdk-graphql-stack/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.tsx?$': 'ts-jest'
}
};
Loading

0 comments on commit 4b8f6b4

Please sign in to comment.