|
| 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 | + |
0 commit comments