This project let you provision employee shift scheduling application using Amazon ECS. The application provides REST API using a private loadbalancer. The infrastructure code is using AWS Cloud Development Kit(AWS CDK), and the DevOps pipeline is configured using AWS CodePipeline.
.
├── infra (cdk application to deploy cloud resources)
├── docs (detailed documentation)
└── opt_engine (optimization engine)
-
Create an AWS Profile on your development machine to deploy this project (e.g.:
my-deployment-profile) -
Navigate to
infra/config- Copy the
default.ymlfile to a new filelocal-XXXXXXXXXXXX.ymlwhereXXXXXXXXXXXXis your AWS ACCOUNT ID - Replace the config settings to your own values. Mandatory changes to
account,administratorEmailfields
- Copy the
-
Make sure you have all the required tools installed on your dev machine (tested on mac).
-
Check project config
-
Navigate to the root of the project and edit the variables of
deploy_stacks.sh.IMPORTANT: Make sure the
namespacevalues match ininfra/configand in thedeploy_stacks.shscript -
Then run the deployment script
./deploy_stacks.sh
-
Check project config
-
Navigate to the root of the project and edit the variables of
destroy_stacks.sh. -
Then run the deployment script
./destroy_stacks.sh
-
Check project config
-
Navigate to
opt_eingie/core/core-impl/src/main/resources- edit profile and region values in file
application.properties
- edit profile and region values in file
-
Navigate to
opt_eingie/apps/schedule-optimization-app/src/main/resources- edit profile and region values in file
application.properties
- edit profile and region values in file
-
Navigate to
opt_eingie/apps/schedule-optimization-app- unlock comment on line 77 to 79
<systemProperties> blockin filepom.xml
- unlock comment on line 77 to 79
-
Build and Run application
- navigate to opt_engine
- build maven project or run
build_schedule_optimization_app.sh - navigate to
opt_engine/apps/schedule-optimization-app/target - run
java -jar opt-engine-runner.jar - navigate to
opt_engine/scripts - run
rest_solve.sh
nvmwith nodejsv16installedyarndockerzipjqopenjdkversionv11or higher (jdk17 preffered)vscodewitheslintplugin (preferred)
- AWS Account Access (setup) with enough permission to deploy the application
- AWS CLI version 2 with named profile setup
This sample project is licensed under the MIT-0 License. See the LICENSE file.