Fix bug in deployment procedure in AWS CDK and support HTTPS (#1491)
* add cloudfront * modify: healthcheck disable * modify: health check option * modify nodejsbuild * add nodejs version * endpoint configuration * set axios url * remote console.log VITE_PROXY_TARGET * create alb stack * add alb to origin * alb build success * remote baseURL setting * add redirect * change responseHttpStatus to 200 * modify output and readme * modify architecture * add health check path route to cloudfront routing * modified: c9 env name in deploy langflow section * modified : package dependency for pymysql * modified: deploy procedure * modified: deploy procedure (ja) --------- Co-authored-by: nsxshota <nsxshota@amazon.co.jp> Co-authored-by: ymkazuki <ymkazuki@amazon.co.jp> Co-authored-by: Shota Nakamoto <53632932+nsy0328@users.noreply.github.com>
This commit is contained in:
parent
7363df6293
commit
3eeda84d28
18 changed files with 678 additions and 271 deletions
|
|
@ -9,11 +9,9 @@ This tutorial assumes you have an AWS account and basic knowledge of AWS.
|
|||
|
||||
The architecture of the application to be created:
|
||||

|
||||
|
||||
[Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/?nc1=h_ls), [AWS Fargate](https://aws.amazon.com/fargate/?nc2=type_a) and [Amazon Aurora](https://aws.amazon.com/rds/aurora/?nc2=type_a) are created by AWS CDK.
|
||||
The aurora's secrets are managed by [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/?nc2=type_a).
|
||||
The Fargate task is divided into a frontend and a backend, which communicate through service discovery.
|
||||
If you just want to deploy resources, you do not need in-depth knowledge of each of the above services.
|
||||
Langflow is deployed using AWS CDK. The application is distributed via [Amazon CloudFront](https://aws.amazon.com/cloudfront/?nc1=h_ls), which has two origins: the first is [Amazon Simple Storage Service](https://aws.amazon.com/s3/?nc1=h_ls) (S3) for serving a static website, and the second is an [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/?nc1=h_ls) (ALB) for communicating with the backend. [AWS Fargate](https://aws.amazon.com/fargate/?nc2=type_a), where FastAPI runs and [Amazon Aurora](https://aws.amazon.com/rds/aurora/?nc2=type_a), the database, are created behind the ALB.
|
||||
Fargate uses a Docker image stored in [Amazon Elastic Container Registry](https://aws.amazon.com/ecr/?nc1=h_ls) (ECR).
|
||||
Aurora's secret is managed by [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/?nc2=type_a).
|
||||
|
||||
# How to set up your environment and deploy langflow
|
||||
|
||||
|
|
@ -22,13 +20,14 @@ If you just want to deploy resources, you do not need in-depth knowledge of each
|
|||
```shell
|
||||
git clone https://github.com/aws-samples/cloud9-setup-for-prototyping
|
||||
cd cloud9-setup-for-prototyping
|
||||
cat params.json | jq '.name |= "c9-for-langflow"'
|
||||
./bin/bootstrap
|
||||
```
|
||||
1. When you see `Done!` in Cloudshell, open `cloud9-for-prototyping` from [AWS Cloud9](https://us-east-1.console.aws.amazon.com/cloud9control/home?region=us-east-1#/).
|
||||
1. When you see `Done!` in Cloudshell, open `c9-for-langflow` from [AWS Cloud9](https://us-east-1.console.aws.amazon.com/cloud9control/home?region=us-east-1#/).
|
||||

|
||||
1. Run the following command in the Cloud9 terminal.
|
||||
```shell
|
||||
git clone -b aws-cdk https://github.com/logspace-ai/langflow.git
|
||||
git clone https://github.com/logspace-ai/langflow.git
|
||||
cd langflow/scripts/aws
|
||||
cp .env.example .env # Edit this file if you need environment settings
|
||||
npm ci
|
||||
|
|
@ -38,7 +37,7 @@ If you just want to deploy resources, you do not need in-depth knowledge of each
|
|||
1. Access the URL displayed.
|
||||
```shell
|
||||
Outputs:
|
||||
LangflowAppStack.NetworkURLXXXXXX = http://alb-XXXXXXXXXXX.elb.amazonaws.com
|
||||
LangflowAppStack.frontendURLXXXXXX = https://XXXXXXXXXXX.cloudfront.net
|
||||
```
|
||||
1. Enter your user name and password to sign in. If you have not set a user name and password in your `.env` file, the user name will be set to `admin` and the password to `123456`.
|
||||

|
||||
|
|
@ -49,5 +48,6 @@ If you just want to deploy resources, you do not need in-depth knowledge of each
|
|||
```shell
|
||||
bash delete-resources.sh
|
||||
```
|
||||
1. Open [AWS CloudFormation](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/getting-started), select `aws-cloud9-cloud9-for-prototyping-XXXX` and delete it.
|
||||
1. Open [AWS CloudFormation](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/getting-started), select `aws-cloud9-c9-for-langflow-XXXX` and delete it.
|
||||

|
||||
s
|
||||
Loading…
Add table
Add a link
Reference in a new issue