Skip to content

Releases: tomkat-cr/genericsuite-be-scripts

1.0.12

09 Oct 15:46
946173e
Compare
Choose a tag to compare

1.0.12 (2024-10-07)


New

Add ".nvmrc" file to set the repo default node version.
Add DynamoDB database running along with MongoDB in a docker container when running the App in the "dev" stage [GS-102].
Add local DynamoDB tables generation in "generate_dynamodb_cf.py" [GS-102].
Add DynamoDB docker container to "mongodb_stack_for_test.yml" [GS-102].
Add DynamoDB local workbench manager (taydy/dynamodb-manager) to the "mongodb_stack_for_test.yml" [GS-102].
Add DYNAMDB_PREFIX envvar to the "run_aws.sh" script with the value "${APP_NAME_LOWERCASE}${STAGE}" [GS-102].
Add GS_LOCAL_ENVIR envvar to detect a local database running in a docker container [GS-102].
Add "run_mongo_docker.sh" runs "generate_dynamodb_cf.sh create_tables dev" to create the DynamoDB tables in the local Docker container [GS-102].
Add "/users/current_user_d" endpoint [GS-2].

Changes

Make DynamoDb tables with prefix work with the GS DB Abstraction [GS-102].
Makefile "mongo_docker" runs the MongoDB and DynamoDB docker containers without calling "make run" by default [GS-102].

Fixes

Fix error in "run_mongo_docker.sh" starting containers when Docker Desktop is not running [GS-102].

1.0.11

19 Jul 13:37
55bdef6
Compare
Choose a tag to compare

1.0.11 (2024-07-19)


New

Add EC2+ALB App deployment using AWS CloudFormation (EBS volume encryption postponed) [GS-96].
Add password and API Keys to AWS Secrets using AWS CloudFormation [GS-41].
Add DynamoDB tables creation from the JSON configs using AWS CloudFormation [GS-84].
Add: "scripts/aws_dynamodb/generate_dynamodb_cf/generate_dynamodb_cf.py" and its ".sh" to generate the "cf-template-dynamodb.yml" file in the project's scripts directory [GS-84].
Add: "scripts/aws_dynamodb/run-dynamodb-deploy.sh" to deploy generated "cf-template-dynamodb.yml" [GS-84].
Add: GET_SECRETS_CRITICAL and GET_SECRETS_CRITICAL envvars to fine-grained disabling of cloud secrets manager for critical secrets and plain envvars [GS-41].
Add aws_secrets to Makefile to deploy envvars to the AWS Secrets manager [GS-41].
Add depLoy_ec2 to Makefile [GS-96].
Add deploy_ecr_creation to Makefile to build the FastAPI docker image [GS-96].
Add: generate_cf_dynamodb and deploy_dynamodb to Makefile [GS-84].
Add "scripts/aws_cf_processor/run-cf-deployment.sh" to standarize all Cloudformation calls [GS-96].
Add: "run-cf-deployment.sh" enhanced to simulate the EC2 + ALB in AWS LocalStack [GS-97].
Add: Secret and KMS access policies to the "template-sam.yml" file [GS-41].
Add: "scripts/aws_cf_processor/test_localstack.sh" to test localstack EC2 functionality with the LOCALSTACK_AUTH_TOKEN envvar [GS-97].
Add LOCAL_DNS_DISABLED and BRIDGE_PROXY_DISABLED envvars to disable local services working on the road.
Add NGROK_ENABLED envvar to enable/disable Ngrok service in the URL_MASK_EXTERNAL_HOSTNAME and DEV_MASK_EXT_HOSTNAME assignments on "scripts/get_domain_name_dev.sh".

Changes

Change APP_STAGE dynamic assignment in run_aws.sh, set_chalice_cnf.sh, and big_lambdas_manager.sh, and secure_local_server/docker_entrypoint.sh [GS-41].
pycache removal simplified in big_lambdas_manager.sh [GS-96].
APP_DB_URI and the secrets assignment removed in big_lambdas_manager.sh, docker-compose-big-lambda-AL2.yml, docker-compose-big-lambda-Alpine.yml [GS-41].
Remove all envvars from "template-sam.yml" [GS-96].
Change: set APP_DB_URI when GET_SECRETS_ENABLED=0 or GET_SECRETS_CRITICAL=0 in "run_aws.sh" [GS-41].
Change "scripts/aws/update_additional_envvars.sh" to be called from both "scripts/aws_secrets/aws_secrets_manager.sh" and "scripts/aws/set_chalice_cnf.sh", conditioning the config file variables replacement when 1st parameter (CONFIG_FILE) is passed, and setting the App specific secrets list (separated by blanks) in a export APP_SECRETS="..." used by the aws_secrets_manager [GS-41].
Check the CLOUD_PROVIDER variable in big_lambdas_manager.sh and avoid execution if not set.

Fixes

Fix 'USER_AGENT environment variable not set...' LangSmith warning message removed in run_aws.sh, big_lambdas_manager.sh, aws_big_lambda/template-sam.yml, and secure_local_server/docker_entrypoint.sh.
Fix: issue reporting the "_placeholder" missing parameter in the SAM template in verify_base_names() of big_lambdas_manager.sh.
Fix: API_GATEWAY_PORT report in pre-process summary in big_lambdas_manager.sh.
Fix: replace the fixed "us-east-1" region by $AWS_REGION on the AWS_DOCKER_IMAGE_URI_BASE assignment in big_lambdas_manager.sh.

1.0.10

07 Jun 01:47
b6a9a10
Compare
Choose a tag to compare

1.0.10 (2024-05-18)


New

Add "verify_base_names()" to "big_lambdas_manager.sh", to check mandatory env. vars. to have the "*_placeholder" in the SAM template.yml before deployment.
Add "clean_ecr_images.sh" to keep only 2 AWS ECR images for each App/Stage [GS-80].
Add DynamoDB tables creation from the JSON configs to the SAM template [GS-84].
Add "sam_run_local" to big lambdas to test the API Gateway and Lambda function with SAM local.

Changes

Enhance "secure_local_server/run.sh" to resume the sls-backend docker image logs if it's already running (avoiding reinstall all dependecies), and also allows to have the local GE BE and BE AI repos for faster development.
Standarize BACKEND_LOCAL_PORT and FRONTEND_LOCAL_PORT env. vars.
Ignore the ".chalice/deployment/deployment.zip" file in big lambdas.

Fixes

Fix the "/var/scripts/get_domain_name.sh not found" error running the development backend environment over https.
Fix error "cp: /tmp/sls/nginx.conf.tmp: No such file or directory" running the app over https.

1.0.9 (2024-05-17)


New

Add "set_app_dir_and_main_file.sh" to load the ".env" file and set APP_DIR, APP_MAIN_FILE and APP_HANDLER environment variables with the Python entry point for uvicorn and gunicorn [FA-248].
Add ".npmignore" to the ".chalice" and "scripts/aws_big_lambda" directories [FA-258].
Add "get_domain_name_dev.sh" to support mask the S3 URL and avoid AWS over-billing attacks [GS-72].
Add STORAGE_URL_SEED and APP_HOST_NAME env. vars. to ".env.example", big lambda deployment, run_aws, secure_local_server and Chalice config [GS-72].
Add "run_generate_seed.sh" and "generate_seed.py" to suggest the STORAGE_URL_SEED value.
Add "show_date_time.sh" to replace the repetitive code to show current date/time in bash scripts.

Changes

Change "run_aws.sh", "secure_local_server/run.sh" and "big_lambdas_manager.sh" to implement "set_app_dir_and_main_file.sh" [FA-248] and [FA-98].
Change "run_aws.sh" to call "secure_local_server/run.sh" for "gunicorn" and "uvicorn" RUN_METHODs and "https" RUN_PROTOCOL [FA-248].
Change "big_lambdas_manager.sh" and "run_local_dns.sh" to build templates and configuration files in "/tmp" [FA-248] and [FA-98].
Redirect README instructions to the GenericSuite Documentation [GS-73].
Unify the domain name getting with "get_domain_name.sh".
Change the way "big_lambdas_manager.sh" replace env. vars. using "*_placeholder".
Local DNS configuration /tmp/named-to-add.conf is added to /etc/bind/named.conf.local instead of /etc/bind/named.conf.
"db_mongo_backup.sh" and "db_mongo_restore.sh" enhanced to handle zip files.

Fixes

Fix error "KeyError: 'APP_DB_NAME'" starting the app with "secure_local_server/docker_entrypoint.sh" by setting APP_DB_ENGINE, APP_DB_NAME, APP_DB_URI, APP_CORS_ORIGIN, AWS_S3_CHATBOT_ATTACHMENTS_BUCKET env. vars. before calling uvicorn and gunicorn [FA-248].
Fix the lack of responses issue calling the backend over https for "gunicorn" and "uvicorn" RUN_METHODs, by removing the SSL certificates path parameters in uvicorn and gunicorn calls in "secure_local_server/docker_entrypoint.sh", because the Nginx service takes care about SSL handling [FA-248].
Fix the frontend "Network error" running the app over local MongoDB when APP_CORS_ORIGIN is "*".

1.0.8

07 May 02:20
Compare
Choose a tag to compare

1.0.8 (2024-04-26)


New

Add "npm_remove_ignored.sh" to remove files in ".gitignore" or ".npmigonore".

Changes

Change "npm_publish.sh" to implement "npm_remove_ignored.sh".