Skip to content

Commit 163dac6

Browse files
committed
release updated
0 parents  commit 163dac6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2637
-0
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PWB_LICENSE=XXXX
2+
PCO_LICENSE=XXXX
3+
PPM_LICENSE=XXXX

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.js
2+
!jest.config.js
3+
*.d.ts
4+
node_modules
5+
.editorconfig
6+
.eslintrc.yml
7+
package-lock.json
8+
9+
10+
# CDK asset staging directory
11+
.cdk.staging
12+
cdk.out

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.ts
2+
!*.d.ts
3+
4+
# CDK asset staging directory
5+
.cdk.staging
6+
cdk.out

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
opensource-codeofconduct@amazon.com with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributing Guidelines
2+
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we greatly value feedback and contributions from our community.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7+
information to effectively respond to your bug report or contribution.
8+
9+
10+
## Reporting Bugs/Feature Requests
11+
12+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13+
14+
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16+
17+
* A reproducible test case or series of steps
18+
* The version of our code being used
19+
* Any modifications you've made relevant to the bug
20+
* Anything unusual about your environment or deployment
21+
22+
23+
## Contributing via Pull Requests
24+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25+
26+
1. You are working against the latest source on the *main* branch.
27+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29+
30+
To send us a pull request, please:
31+
32+
1. Fork the repository.
33+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34+
3. Ensure local tests pass.
35+
4. Commit to your fork using clear commit messages.
36+
5. Send us a pull request, answering any default questions in the pull request interface.
37+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38+
39+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41+
42+
43+
## Finding contributions to work on
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
45+
46+
47+
## Code of Conduct
48+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50+
opensource-codeofconduct@amazon.com with any additional questions or comments.
51+
52+
53+
## Security issue notifications
54+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55+
56+
57+
## Licensing
58+
59+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

LICENSE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MIT No Attribution
2+
3+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
13+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
14+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
15+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# POSIT SCE on AWS EKS
2+
3+
This repository provides a simple and automated way to install the POSIT toolchain on AWS EKS (Elastic Kubernetes Service) for SCE (Statistical Compute Environment). The solution includes a one-click deployment and destroy option, making it easy to set up and tear down the POSIT-SCE environment on AWS EKS for enterprise use.
4+
5+
## Features
6+
7+
- **One-Click Deploy**: Deploy the POSIT-SCE toolchain on AWS EKS with a single command.
8+
- **One-Click Destroy**: Easily tear down the POSIT-SCE environment on AWS EKS with a single command.
9+
- **Enterprise-Ready**: The solution is designed and configured for enterprise use, ensuring scalability, security, and compliance.
10+
- **Automated Setup**: The deployment process automates the installation and configuration of the POSIT toolchain, saving time and reducing manual effort.
11+
- **Customizable**: The solution can be customized to meet specific requirements, such as resource allocation, networking, and security settings.
12+
13+
## Prerequisites
14+
15+
Before deploying the POSIT-SCE on AWS EKS, ensure you have the following prerequisites:
16+
17+
- AWS Command Line Interface (CLI) installed and configured with appropriate permissions.
18+
- AWS Cloud Development Kit (CDK) is installed
19+
- An AWS account with sufficient permissions to create and manage EKS clusters, EC2 instances, and related resources.
20+
- Homebrew, Kubernetes CLI (KubeCTL), Helm and Node installed.
21+
- [Windows Only] A installed and configured WSL (Windows Subversion Linux)
22+
23+
## Getting Started
24+
25+
1. Clone this repository:
26+
27+
```bash
28+
mwinit #Make sure you are authenticated into Midway TODO: Remove before publish
29+
git clone git@ssh.gitlab.aws.dev:open-source/posit-sce.git
30+
cd posit-sce
31+
```
32+
33+
2. Install the required dependencies:
34+
35+
```bash
36+
# Install dependencies if applicable
37+
brew install node
38+
brew install awscli
39+
brew install aws-cdk
40+
brew install kubernetes-cli
41+
brew install helm
42+
43+
#Install node modules
44+
npm install
45+
```
46+
47+
Be sure to authenticate the AWS CLI, please see [this link](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for guidance.
48+
 
49+
50+
3. Deploy the POSIT-SCE on AWS EKS:
51+
Configure the POSIT licenses, with your license keys
52+
You can reach out to POSIT team [here]((mailto:info@posit.co)).
53+
54+
```bash
55+
# Edit the .env file to include the license keys.
56+
PWB_LICENSE=xxx
57+
PCO_LICENSE=xxx
58+
PPM_LICENSE=xxx
59+
```
60+
61+
```bash
62+
# One-click deploy command
63+
bash ./run.sh deploy
64+
```
65+
66+
Note: If you are running authenticated to the CLI using an assumed role - specify the ARN of the role that has been assumed where prompted to accept the role ARN.
67+
68+
This script will run all required commands for the setup.
69+
The entire deployment is idem-potent and the initial configuration takes ~40 minutes.
70+
 
71+
72+
73+
### Destroy the POSIT-SCE environment:
74+
75+
```bash
76+
# One-click destroy command
77+
bash ./run.sh destroy
78+
```
79+
80+
This command will initially reset the EKS cluster and provide the option to also destroy the infrastructure stack. If you make changes to the infrastructure outside of the CDK stack you might get destroy errors as there are untracked dependencies.
81+
82+
## FAQ
83+
84+
How do I deploy the solution to a different AWS region
85+
: Change the region by running the ```export AWS_REGION=xxx``` command before the deploy script. Replace xxx with your region like us-east-1 or eu-west-1.
86+
87+
How can I make changes to the deployment
88+
: All components of the solution are idempotent, meaning you can make a change to the CDK, install scripts and .env file and re-run the deploy script. As long as there are no breaking changes they will propagate to your deployment.
89+
90+
Will the solution auto-scale?
91+
: Currently the EKS cluster will scale horizontally with M5.XLARGE and M5.8XLARGE instances using Cluster Autoscaler. You can change this in the CDK deployment code.
92+
93+
Can I use my own domain name?
94+
: Yes! The setup will ask you for the FQDN and configure posit accordingly. You will have to manually add the HTTPS listener to the Load Balancer as it requires your SSL certificate for SSL termination and configure your DNS settings to point to the LB.
95+
96+
Can I use my own domain name?
97+
: Yes! The setup will ask you for the FQDN and configure posit accordingly. You will have to manually add the HTTPS listener to the Load Balancer as it requires your SSL certificate for SSL termination and configure your DNS settings to point to the LB.
98+
99+
## Contibutors
100+
Michael Rupprecht - Sr. Mgr. Solution Architecture
101+
Modood Alvi - Senior Solution Architect
102+
Sam Kool - Senior Solution Architect
103+
104+
105+
## Support
106+
107+
108+
## Known Issues
109+
Currently you have to run the bash ./run.sh deploy twice to get the Application Load Balancer deployed.
110+

bin/posit-sce.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env node
2+
import 'source-map-support/register'
3+
import * as cdk from 'aws-cdk-lib'
4+
import { PositSceStack } from '../lib/posit-sce-stack'
5+
import { Aspects } from 'aws-cdk-lib';
6+
7+
import { AwsSolutionsChecks } from 'cdk-nag'
8+
const app = new cdk.App()
9+
10+
Aspects.of(app).add(new AwsSolutionsChecks({ verbose: true }))
11+
const stackName = app.node.tryGetContext('stackName')
12+
new PositSceStack(app, stackName, { description: 'Posit SCE Stack' })

cdk.context.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"clusterName": "posit-sce",
3+
"stackName": "posit-sce",
4+
"databaseName": "rstudio",
5+
"databaseUsername": "rstudio",
6+
"efsCsiDriverServiceAccountName": "efs-csi-controller-sa",
7+
"vpcCniDriverServiceAccountName": "aws-node",
8+
"albControllerServiceAccountName": "aws-load-balancer-controller"
9+
}

cdk.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"app": "npx ts-node --prefer-ts-exts bin/posit-sce.ts",
3+
"watch": {
4+
"include": [
5+
"**"
6+
],
7+
"exclude": [
8+
"README.md",
9+
"cdk*.json",
10+
"**/*.d.ts",
11+
"**/*.js",
12+
"tsconfig.json",
13+
"package*.json",
14+
"yarn.lock",
15+
"node_modules",
16+
"test"
17+
]
18+
},
19+
"context": {
20+
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
21+
"@aws-cdk/core:checkSecretUsage": true,
22+
"@aws-cdk/core:target-partitions": [
23+
"aws",
24+
"aws-cn"
25+
],
26+
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
27+
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
28+
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
29+
"@aws-cdk/aws-iam:minimizePolicies": true,
30+
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
31+
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
32+
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
33+
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
34+
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
35+
"@aws-cdk/core:enablePartitionLiterals": true,
36+
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
37+
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
38+
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
39+
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
40+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
41+
"@aws-cdk/aws-route53-patters:useCertificate": true,
42+
"@aws-cdk/customresources:installLatestAwsSdkDefault": false,
43+
"@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true,
44+
"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true,
45+
"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true,
46+
"@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true,
47+
"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true,
48+
"@aws-cdk/aws-redshift:columnId": true,
49+
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
50+
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
51+
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
52+
"@aws-cdk/aws-kms:aliasNameRef": true,
53+
"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true,
54+
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true,
55+
"@aws-cdk/aws-efs:denyAnonymousAccess": true,
56+
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true,
57+
"@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true,
58+
"@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true,
59+
"@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true,
60+
"@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true,
61+
"@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true,
62+
"@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true
63+
}
64+
}

0 commit comments

Comments
 (0)