From 6eb68c5f1ff8db50488a937f718ad345ffc8e6ea Mon Sep 17 00:00:00 2001 From: bakossandor <30898371+bakossandor@users.noreply.github.com> Date: Fri, 1 Apr 2022 13:57:26 +0200 Subject: [PATCH] AWS Excercises part extended with a simple Elastic Beanstalk application creation (#209) - Excercise and the Solution added --- exercises/aws/README.md | 7 +++ exercises/aws/elastic_beanstalk_simple.md | 18 +++++++ .../aws/solutions/elastic_beanstalk_simple.md | 52 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 exercises/aws/elastic_beanstalk_simple.md create mode 100644 exercises/aws/solutions/elastic_beanstalk_simple.md diff --git a/exercises/aws/README.md b/exercises/aws/README.md index bbc7bdb..cd0e7a3 100644 --- a/exercises/aws/README.md +++ b/exercises/aws/README.md @@ -84,6 +84,13 @@ Failover | Route 53 | [Exercise](route_53_failover.md) | [Solution](solutions/ro | Hello Function | Lambda | [Exercise](hello_function.md) | [Solution](solutions/hello_function.md) | Easy | | URL Function | Lambda | [Exercise](url_function.md) | [Solution](solutions/url_function.md) | Easy | +#### AWS - Elastic Beanstalk + +|Name|Topic|Objective & Instructions|Solution|Comments| +|--------|--------|------|----|----| +| Simple Elastic Beanstalk Node.js app | Elastic Beanstalk | [Exercise](elastic_beanstalk_simple.md) | [Solution](solutions/elastic_beanstalk_simple.md) | Easy | + + #### AWS - Misc |Name|Topic|Objective & Instructions|Solution|Comments| diff --git a/exercises/aws/elastic_beanstalk_simple.md b/exercises/aws/elastic_beanstalk_simple.md new file mode 100644 index 0000000..74264d3 --- /dev/null +++ b/exercises/aws/elastic_beanstalk_simple.md @@ -0,0 +1,18 @@ +## AWS Elastic Beanstalk - Node.js + +### Requirements + +1. Having a running node.js application on AWS Elastic Beanstalk platform + +### Objectives + +1. Create an AWS Elastic Beanstalk application with the basic properties +a. No ALB, No Database, Just use the default platform settings + +### Out of scope + +1. Having ALB attached in place +2. Having custom domain name in place +3. Having automated pipelines in place +4. Having blue-green deployment in place +5. Writing the Node.js application \ No newline at end of file diff --git a/exercises/aws/solutions/elastic_beanstalk_simple.md b/exercises/aws/solutions/elastic_beanstalk_simple.md new file mode 100644 index 0000000..d2f76de --- /dev/null +++ b/exercises/aws/solutions/elastic_beanstalk_simple.md @@ -0,0 +1,52 @@ +## AWS Elastic Beanstalk - Node.js + +### Prerequisites +1. make sure the node.js application has a _npm start_ command specified in the __package.json__ file like the following example +``` +{ + + "name": "application-name", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node app" + }, + "dependencies": { + "express": "3.1.0", + "jade": "*", + "mysql": "*", + "async": "*", + "node-uuid": "*" +} +``` +2. zip the application, and make sure to not zip the parent folder, only the files together, like: + +``` +\Parent - (exclude the folder itself from the the zip) +- file1 - (include in zip) +- subfolder1 (include in zip) +- file2 (include in zip) +- file3 (include in zip) +``` + +### Solution + +1. Create a "New Environment" +2. Select Environment => _Web Server Environment_ +3. Fill the Create a web server environment section +a. Fill the "Application Name" +4. Fill the Environment information section +a. Fill the "Environment Name" +b. Domain - "Leave for autogenerated value" +5. Platform +a. Choose Platform => _node.js_ +6. Application Code => upload the Zipped Code from your local computer +7. Create Environment +8. Wait for the environment to come up +9. Check the website +a. Navigate to the _Applications_ tab, +b. select the recently created node.js app +c. click on the URL - highlighted + +### Documentation +[Elastic Beanstalk / Node.js getting started](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-getstarted.html) \ No newline at end of file