From 19bc1fa8bfa1dc28dfa890706ae7d3b23eeba7ae Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 20 Mar 2023 20:00:10 +0800 Subject: [PATCH 01/63] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 99522fd..37f7b6e 100644 --- a/README.md +++ b/README.md @@ -115,16 +115,19 @@ sudo ln -s "$(which pm2)" /sbin/pm2 ### 8 Starting the app as sudo (Run nodejs in background and when server restart) ```sh sudo pm2 start app.js --name=nodejs-express-app +pm2 start app.js --name=nodejs-express-a ``` ```sh sudo pm2 save # saves the running processes # if not saved, pm2 will forget # the running apps on next boot +pm2 save ``` #### 8.1 IMPORTANT: If you want pm2 to start on system boot ```sh sudo pm2 startup # starts pm2 on computer boot +pm2 startup ``` ### 9. Install aws code deploy agent From 87ff83315df26cda8be97b4c5ddf6b7102fc0b20 Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 20 Mar 2023 20:01:33 +0800 Subject: [PATCH 02/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37f7b6e..28e0a6b 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ sudo ln -s "$(which pm2)" /sbin/pm2 ### 8 Starting the app as sudo (Run nodejs in background and when server restart) ```sh sudo pm2 start app.js --name=nodejs-express-app -pm2 start app.js --name=nodejs-express-a +pm2 start app.js --name=nodejs-express-app ``` ```sh sudo pm2 save # saves the running processes From 583cd22e197a711f873f5dff5e176782a6eb18f3 Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 20 Mar 2023 20:03:54 +0800 Subject: [PATCH 03/63] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 28e0a6b..5c7f91d 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ cd /home/ec2-user ```sh git clone https://github.com/saasscaleup/nodejs-aws-codedeploy-pipeline.git +get clone https://github.com/jipx/nodejs-aws-codedeploy-pipeline.git ``` ### 5. Run node app.js (Make sure everything working) From dc485438e6ce93ea667fed34c2b4f3e6f19d93d6 Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 20 Mar 2023 20:23:17 +0800 Subject: [PATCH 04/63] Create userData --- userData | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 userData diff --git a/userData b/userData new file mode 100644 index 0000000..a0c214f --- /dev/null +++ b/userData @@ -0,0 +1,5 @@ +#!/bin/bash +yum install -y aws-cli +cd /home/ec2-user/ +aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1 +yum -y install codedeploy-agent.noarch.rpm From 8863c64b7535023425782edac26d4ceb768f0ada Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 20 Mar 2023 20:36:33 +0800 Subject: [PATCH 05/63] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5c7f91d..1579b84 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,10 @@ sudo ./install auto ```sh sudo service codedeploy-agent start ``` +```sh +sudo service codedeploy-agent status +``` + verify the status ### 10. Continue in AWS console... From f6dc93d1bdf61a77fd08525b3c4a1308c3d8dbbb Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 09:58:46 +0800 Subject: [PATCH 06/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1579b84..513e8ce 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ sudo ./install auto sudo service codedeploy-agent start ``` ```sh -sudo service codedeploy-agent status +sudo service codedeploy-agent status #check the service status ``` verify the status From 17440fa13092646ce554194f49692b0d6e307cdb Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 15:34:33 +0800 Subject: [PATCH 07/63] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 513e8ce..d715b1c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ How to set ci/cd for nodejs app with aws codeDeploy and aws codePipeline ## Installation instructions ### 1. Launch amazon linux server in aws +Amazon Linux 2 (ARM, x86) + Supported Amazon EC2 AMI operating systems ### 2. ssh to linux to install packages From e0bafde290bc1e3037f41fe27c2e23d13eb98aa1 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 15:36:03 +0800 Subject: [PATCH 08/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d715b1c..f028e9a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ How to set ci/cd for nodejs app with aws codeDeploy and aws codePipeline ### 1. Launch amazon linux server in aws Amazon Linux 2 (ARM, x86) - Supported Amazon EC2 AMI operating systems + Supported Amazon EC2 AMI operating systems ### 2. ssh to linux to install packages From 4984f9823758cf0eaa6c70355976b1873ea738ab Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 15:48:50 +0800 Subject: [PATCH 09/63] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f028e9a..49a68a6 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ cd /home/ec2-user ```sh git clone https://github.com/saasscaleup/nodejs-aws-codedeploy-pipeline.git -get clone https://github.com/jipx/nodejs-aws-codedeploy-pipeline.git +git clone https://github.com/jipx/nodejs-aws-codedeploy-pipeline.git ``` ### 5. Run node app.js (Make sure everything working) From 26d098346344997833e66c504a9823e429005cf6 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 16:02:02 +0800 Subject: [PATCH 10/63] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49a68a6..e832e0e 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,8 @@ nvm --version #### 3.4 Install node ```sh -nvm install --lts # Latest stable node js server version +nvm install --lts # Latest stable node js server version 18.15.0, which is not well-supported, install a version which is active +nvm install 16.0.0 ``` #### 3.5 Check nodejs installed From bb9ec1eecffb22efad61b182307c83e8ba5ca17b Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 17:19:34 +0800 Subject: [PATCH 11/63] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 2aaad68..20516e4 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '3,000,000'; +const version = '2.0.1.12'; app.get('/', (req, res) => { // set response content From 85ca9f9cdf82fc1d02bc383c93f4906ea735cc44 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 17:59:59 +0800 Subject: [PATCH 12/63] Update deploy.yml --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8563e33..58c4fee 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: id: deploy run: | aws deploy create-deployment \ - --application-name nodejs-express-app \ + --application-name nodejs-express-app\ --deployment-group-name nodejs-express-app-cd1 \ --deployment-config-name CodeDeployDefault.OneAtATime \ - --github-location repository=${{ github.repository }},commitId=${{ github.sha }} \ No newline at end of file + --github-location repository=${{ github.repository }},commitId=${{ github.sha }} From 333556438ad4874dbf59ab8d7116f7cfaa4b811b Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 18:00:32 +0800 Subject: [PATCH 13/63] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 58c4fee..2cc553b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,6 @@ jobs: run: | aws deploy create-deployment \ --application-name nodejs-express-app\ - --deployment-group-name nodejs-express-app-cd1 \ + --deployment-group-name nodejs-express-app-cd1\ --deployment-config-name CodeDeployDefault.OneAtATime \ --github-location repository=${{ github.repository }},commitId=${{ github.sha }} From 7d96eeb6b41c54bb40211a06c843c56c5ffa22a6 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 18:10:41 +0800 Subject: [PATCH 14/63] change version --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 20516e4..eefc5ec 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '2.0.1.12'; +const version = '2.0.1.12-333'; app.get('/', (req, res) => { // set response content From 00b3a99a765d5d1b83463ab903e21011fc1de397 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 18:13:11 +0800 Subject: [PATCH 15/63] change --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index eefc5ec..46bafea 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '2.0.1.12-333'; +const version = '2.0.1.12-3334'; app.get('/', (req, res) => { // set response content From 69bde059c7cabb2b6031bd1191563cec98dcda9f Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:12:03 +0800 Subject: [PATCH 16/63] commitjipx --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 46bafea..11bddac 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get('/', (req, res) => { // set response content res.send(` -

[Version ${version}]: THis is AMAZING!!! Like & Subscribe!

+

[Version ${version}]: jipx,THis is AMAZING!!! Like & Subscribe!

From 79890ef831e69569c45f4ea1bf0c5817a5ecab13 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:20:22 +0800 Subject: [PATCH 17/63] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2cc553b..3b84301 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ jobs: # Step 2 - name: Set AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From b3f739a1e56e8092ee775b45f833ed9bac6e9649 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:25:41 +0800 Subject: [PATCH 18/63] Update deploy.yml --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b84301..5ddcb62 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,7 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-session-token: ${{secrets.AWS_SESSION_TOKEN}} aws-region: us-east-1 # Step 3 From 18b3d3b5c1b5e9e5c68568783727f563acb83e33 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:36:09 +0800 Subject: [PATCH 19/63] test 3 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 11bddac..2a0a6dd 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '2.0.1.12-3334'; +const version = '3.0.1.12-3334'; app.get('/', (req, res) => { // set response content From d6f369f9143bab16cb4263ebc673eddd972c50e4 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:40:18 +0800 Subject: [PATCH 20/63] update yaml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5ddcb62..7e78864 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,5 +26,5 @@ jobs: aws deploy create-deployment \ --application-name nodejs-express-app\ --deployment-group-name nodejs-express-app-cd1\ - --deployment-config-name CodeDeployDefault.OneAtATime \ + --deployment-config-name CodeDeployDefault.OneAtATime\ --github-location repository=${{ github.repository }},commitId=${{ github.sha }} From 1ee34737ffc01203ea3973962a8fb654b053f66d Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:42:10 +0800 Subject: [PATCH 21/63] test4 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 2a0a6dd..b33f385 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '3.0.1.12-3334'; +const version = '4.0.1.12-3334'; app.get('/', (req, res) => { // set response content From 2fc05af2cee4a551424f2ac3ecaf565c5de971a7 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:44:34 +0800 Subject: [PATCH 22/63] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7e78864..678f40e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: - name: Create CodeDeploy Deployment id: deploy run: | - aws deploy create-deployment \ + aws deploy create-deployment\ --application-name nodejs-express-app\ --deployment-group-name nodejs-express-app-cd1\ --deployment-config-name CodeDeployDefault.OneAtATime\ From 54c4c20180cf95c193d7b272f9d7006f69a88210 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:55:03 +0800 Subject: [PATCH 23/63] Update deploy.yml --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 678f40e..f54fc48 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,8 +23,8 @@ jobs: - name: Create CodeDeploy Deployment id: deploy run: | - aws deploy create-deployment\ - --application-name nodejs-express-app\ - --deployment-group-name nodejs-express-app-cd1\ - --deployment-config-name CodeDeployDefault.OneAtATime\ + aws deploy create-deployment \ + --application-name nodejs-express-app \ + --deployment-group-name nodejs-express-app-cd1 \ + --deployment-config-name CodeDeployDefault.OneAtATime \ --github-location repository=${{ github.repository }},commitId=${{ github.sha }} From 3bfb580d3be8738a0ca788cd60291eb0b0c5ac9a Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 19:56:14 +0800 Subject: [PATCH 24/63] test5 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index b33f385..a0ab61f 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get('/', (req, res) => { // set response content res.send(` -

[Version ${version}]: jipx,THis is AMAZING!!! Like & Subscribe!

+

[Version ${version}]: Mr.jipx,THis is AMAZING!!! Like & Subscribe!

From 73767e0e0c15b2880147cc70f52dcf579aaf9a3d Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 21 Mar 2023 20:00:55 +0800 Subject: [PATCH 25/63] test6 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index a0ab61f..e0ef116 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = '127.0.0.1'; // Your server ip address const port = 3000; -const version = '4.0.1.12-3334'; +const version = '5.0.1.12-3334'; app.get('/', (req, res) => { // set response content From ac55d28842a42dd027731faba42b571c8f10cc26 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 09:28:29 +0800 Subject: [PATCH 26/63] change home page css to style relative --- app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index e0ef116..4422b5e 100644 --- a/app.js +++ b/app.js @@ -10,7 +10,10 @@ app.get('/', (req, res) => { res.send(`

[Version ${version}]: Mr.jipx,THis is AMAZING!!! Like & Subscribe!

-
+
From 08d511ea1ceb465129b80e9957037c27077e14b0 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 09:35:00 +0800 Subject: [PATCH 27/63] test --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 4422b5e..a19d0a7 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get('/', (req, res) => { // set response content res.send(` -

[Version ${version}]: Mr.jipx,THis is AMAZING!!! Like & Subscribe!

+

[Version ${version}]
Mr.jipx,THis is AMAZING!!! Like & Subscribe!

{ - // set response content - res.send(` +app.get("/", (req, res) => { + // set response content + res.send(`

[Version ${version}]
Mr.jipx,THis is AMAZING!!! Like & Subscribe!

-
- +
+
`); - - console.log(`[Version ${version}]: New request => http://${hostname}:${port}`+req.url); -}) + console.log( + `[Version ${version}]: New request => http://${hostname}:${port}` + req.url + ); +}); app.listen(port, () => { - console.log(`[Version ${version}]: Server running at http://${hostname}:${port}/`); -}) + console.log( + `[Version ${version}]: Server running at http://${hostname}:${port}/` + ); +}); From 74d1a7c46697ebf2d929a45f66ee79cad1a56590 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:14:51 +0800 Subject: [PATCH 29/63] change random images --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 1276183..09857d0 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - +
`); From db8c458b5a73b723909fbf66490715fd5bdce7bc Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:20:45 +0800 Subject: [PATCH 30/63] change random images --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 09857d0..888d538 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - +
`); From 65844a52da2bb05c94600db9346f67649b537f1b Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:26:14 +0800 Subject: [PATCH 31/63] revert back --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 888d538..d6dc3a5 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - +
`); From 4a14197b3d49c4f6109544ac7db1a82b03226039 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:29:47 +0800 Subject: [PATCH 32/63] change random image --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index d6dc3a5..1f77bff 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - + `); From 7a7479fa4a232f634fe3664a9356b4c4b14324ca Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:31:16 +0800 Subject: [PATCH 33/63] add random to image selection --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 1f77bff..e62f000 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - + `); From 263c5be20a5c3077958e11fdb84106ebc09f82f1 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:32:59 +0800 Subject: [PATCH 34/63] add random selection of image --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index e62f000..09857d0 100644 --- a/app.js +++ b/app.js @@ -14,7 +14,7 @@ app.get("/", (req, res) => { width: 60%; border: 3px solid #73AD21; padding: 10px;"> - + `); From 1ad19ff5b5609ea9b56ec7ec4f900bd7541f1511 Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 10:58:50 +0800 Subject: [PATCH 35/63] chage to assumrole --- .github/workflows/deploy.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f54fc48..8599e08 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,13 +10,20 @@ jobs: - name: Checkout to repo uses: actions/checkout@v2 - # Step 2 +# # Step 2 +# - name: Set AWS credentials +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} +# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# aws-session-token: ${{secrets.AWS_SESSION_TOKEN}} +# aws-region: us-east-1 + + # Step 2 - name: Set AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-session-token: ${{secrets.AWS_SESSION_TOKEN}} + role-to-assume: arn:aws:iam::530095765619:role/LabRole aws-region: us-east-1 # Step 3 From 514c442c9a17fe30cdd72f38c61532a10306e7cd Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 11:22:54 +0800 Subject: [PATCH 36/63] update yaml with permissions --- .github/workflows/deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8599e08..e076f01 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,10 @@ on: jobs: deploy: runs-on: ubuntu-latest + # These permissions are needed to interact with GitHub's OIDC Token endpoint. + permissions: + id-token: write + contents: read steps: # Step 1 - name: Checkout to repo From e6b2213d847b8a2328ef26c14dec86068f98d6ac Mon Sep 17 00:00:00 2001 From: jipx Date: Wed, 22 Mar 2023 11:27:20 +0800 Subject: [PATCH 37/63] syn with repo --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 09857d0..0e3c167 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "5.0.1.12-3334"; +const version = "6.0.1.12-3334"; app.get("/", (req, res) => { // set response content From d6fd92899f8d0a415ad2f010f001bdc271702fe6 Mon Sep 17 00:00:00 2001 From: jipx Date: Thu, 23 Mar 2023 09:36:10 +0800 Subject: [PATCH 38/63] change to version 7 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0e3c167..d624762 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "6.0.1.12-3334"; +const version = "7.0.1.12-3334"; app.get("/", (req, res) => { // set response content From 01d513786a243cd027e815af0c9578620a9dd19b Mon Sep 17 00:00:00 2001 From: jipx Date: Thu, 23 Mar 2023 09:39:49 +0800 Subject: [PATCH 39/63] version 8 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index d624762..8ae6e45 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "7.0.1.12-3334"; +const version = "8.0.1.12-3334"; app.get("/", (req, res) => { // set response content From 8fee9bbb943b156a6f03cfe3323b6868abf43de1 Mon Sep 17 00:00:00 2001 From: jipx Date: Thu, 23 Mar 2023 10:02:06 +0800 Subject: [PATCH 40/63] change yml file to store credential instead of openID --- .github/workflows/deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e076f01..0207a42 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,21 +14,21 @@ jobs: - name: Checkout to repo uses: actions/checkout@v2 -# # Step 2 -# - name: Set AWS credentials -# uses: aws-actions/configure-aws-credentials@v2 -# with: -# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} -# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} -# aws-session-token: ${{secrets.AWS_SESSION_TOKEN}} -# aws-region: us-east-1 - - # Step 2 - - name: Set AWS credentials + # Step 2 +- name: Set AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: - role-to-assume: arn:aws:iam::530095765619:role/LabRole - aws-region: us-east-1 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-session-token: ${{secrets.AWS_SESSION_TOKEN}} + aws-region: us-east-1 + +# Step 2 +# - name: Set AWS credentials +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# role-to-assume: arn:aws:iam::530095765619:role/LabRole +# aws-region: us-east-1 # Step 3 - name: Create CodeDeploy Deployment From 74b8cf8c4ccdf16b8f336ee8ecdc4c63b9b4c7e9 Mon Sep 17 00:00:00 2001 From: jipx Date: Thu, 23 Mar 2023 10:04:52 +0800 Subject: [PATCH 41/63] correct yaml file error in alignment --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0207a42..f621291 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v2 # Step 2 -- name: Set AWS credentials + - name: Set AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} From c8dd77170135679d13a2dc4f7a940c5f52bd850e Mon Sep 17 00:00:00 2001 From: jipx Date: Thu, 23 Mar 2023 11:02:09 +0800 Subject: [PATCH 42/63] EC2 profile --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 8ae6e45..0119243 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get("/", (req, res) => { // set response content res.send(` -

[Version ${version}]
Mr.jipx,THis is AMAZING!!! Like & Subscribe!

+

[Version ${version}]
Mr.jipx,THis is AMAZING!!! EC2 needs to have profile

{ // set response content res.send(` -

[Version ${version}]
Mr.jipx,THis is AMAZING!!! EC2 needs to have profile

+

[Version ${version}]
Mr.jipx,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

{ // set response content From b4f8a61b5aef4faca581427de0f627468ffe2969 Mon Sep 17 00:00:00 2001 From: jipx Date: Sat, 25 Mar 2023 21:37:03 +0800 Subject: [PATCH 45/63] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0769189..dfd3005 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3.25.1.12-3334"; +const version = "4.25.1.12-3334"; app.get("/", (req, res) => { // set response content From 6ef2911d0285a5913c2373c56bb12e7390487a6a Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 13:44:30 +0800 Subject: [PATCH 46/63] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index dfd3005..06170ba 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get("/", (req, res) => { // set response content res.send(` -

[Version ${version}]
Mr.jipx,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

+

[Version ${version}]
Mr.jipx1,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

{ // set response content res.send(` -

[Version ${version}]
Mr.jipx,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

+

[Version ${version}]
Mr.jipx @library,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

{ // set response content res.send(` -<<<<<<< HEAD

[Version ${version}]
Mr.jipx @library,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

-======= -

[Version ${version}]
Mr.jipx1,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

->>>>>>> 6ef2911d0285a5913c2373c56bb12e7390487a6a
{ // set response content From ec3daac8e683669f3d68370f1d17882509755a7b Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 16:11:53 +0800 Subject: [PATCH 50/63] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0ae8030..fcfe9fa 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3.26.1.12.3334"; +const version = "4.26.1.12.3334"; app.get("/", (req, res) => { // set response content From 6a90f9ed4d72c92c05ff5a3de9a9784ad460a1cd Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 17:41:41 +0800 Subject: [PATCH 51/63] change version number --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0ae8030..392d2aa 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3.26.1.12.3334"; +const version = "13.26.1.12.3334"; app.get("/", (req, res) => { // set response content From bc275fe2f1a863a576124a7875e4391dd1a7c689 Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 21:18:11 +0800 Subject: [PATCH 52/63] change version number --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0ae8030..fcfe9fa 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3.26.1.12.3334"; +const version = "4.26.1.12.3334"; app.get("/", (req, res) => { // set response content From 167de9108c797386cc120432f161bbe55421f529 Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 22:11:18 +0800 Subject: [PATCH 53/63] version numbner --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index fcfe9fa..c470d98 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "4.26.1.12.3334"; +const version = "5.26.1.12.3334"; app.get("/", (req, res) => { // set response content From e9b2b1e200a1bdb9dcb7c0bad28b2399f1429943 Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 22:33:33 +0800 Subject: [PATCH 54/63] Update app.js --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index c470d98..19efa59 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "5.26.1.12.3334"; +const version = "6.26.1.12.3334"; app.get("/", (req, res) => { // set response content From b360c9e744551d29a5c766e803d9ae248ec61081 Mon Sep 17 00:00:00 2001 From: jipx Date: Sun, 26 Mar 2023 22:39:53 +0800 Subject: [PATCH 55/63] change version --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index c470d98..a395582 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "5.26.1.12.3334"; +const version = "7.26.1.12.3334"; app.get("/", (req, res) => { // set response content From 277cbc8e4988117be94e0d95a6cb3ccfe6a70b7f Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 02:21:47 +0800 Subject: [PATCH 56/63] greeting --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index c470d98..4a9e7de 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ app.get("/", (req, res) => { // set response content res.send(` -

[Version ${version}]
Mr.jipx @library,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

+

[Version ${version}]
Good Night,Mr.jipx @library,THis is AMAZING!!! EC2 needs to have a profile to do the tasks

{ // set response content From d324098c5cceab1f33871165de6ddcca0431848a Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 12:50:12 +0800 Subject: [PATCH 58/63] change version --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 58a99aa..597e521 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3.27.1.12.3334"; +const version = "03.27.1.12.3334"; app.get("/", (req, res) => { // set response content From 286375fc98ce9888b0dbb3148801368ba3978953 Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 13:47:43 +0800 Subject: [PATCH 59/63] version number --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 597e521..858beb6 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "03.27.1.12.3334"; +const version = "21.27.1.12.3334"; app.get("/", (req, res) => { // set response content From 4e94e833ef78d074f18cc3939cd9110b7b9f509e Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 13:57:17 +0800 Subject: [PATCH 60/63] version change --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 858beb6..0e49cf6 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "21.27.1.12.3334"; +const version = "210.27.1.12.3334"; app.get("/", (req, res) => { // set response content From 8e367208d1496b9d2122a873122a8ff09f9f01fb Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 14:07:02 +0800 Subject: [PATCH 61/63] change verions number --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 0e49cf6..429d4fd 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "210.27.1.12.3334"; +const version = "310.27.1.12.3334"; app.get("/", (req, res) => { // set response content From a2e3942715658e3573d60e34579ab7de2c44874d Mon Sep 17 00:00:00 2001 From: jipx Date: Mon, 27 Mar 2023 14:11:17 +0800 Subject: [PATCH 62/63] version changes --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 429d4fd..5e1bc82 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "310.27.1.12.3334"; +const version = "3210.27.1.12.3334"; app.get("/", (req, res) => { // set response content From bd44467e65ec47d7bc3aef845d63d3d545e57a45 Mon Sep 17 00:00:00 2001 From: jipx Date: Tue, 28 Mar 2023 15:00:07 +0800 Subject: [PATCH 63/63] version number updated --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 5e1bc82..185480e 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,7 @@ const app = express(); const hostname = "127.0.0.1"; // Your server ip address const port = 3000; -const version = "3210.27.1.12.3334"; +const version = "3.28.1.12.3334"; app.get("/", (req, res) => { // set response content