forked from verma-kunal/AWS-Session
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb074f4
commit e2ed6bd
Showing
9 changed files
with
82 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,72 @@ | ||
# AWS Deployment Automation | ||
Deployment automation on AWS using Jenkins CI/CD | ||
# Deploying a Node Js Application on AWS EC2 | ||
|
||
### Testing the project locally | ||
|
||
1. Clone this project | ||
``` | ||
git clone https://github.com/verma-kunal/AWS-Session.git | ||
``` | ||
2. Setup the following environment variables - `(.env)` file | ||
``` | ||
DOMAIN= "" | ||
PORT=3000 | ||
STATIC_DIR="./client" | ||
PUBLISHABLE_KEY="" | ||
SECRET_KEY="" | ||
``` | ||
3. Initialise and start the project | ||
``` | ||
npm install | ||
npm run start | ||
``` | ||
|
||
### Set up an AWS EC2 instance | ||
|
||
1. Create an IAM user & login to your AWS Console | ||
- Access Type - Password | ||
- Permissions - Admin | ||
2. Create an EC2 instance | ||
- Select an OS image - Ubuntu | ||
- Create a new key pair & download `.pem` file | ||
- Instance type - t2.micro | ||
3. Connecting to the instance using ssh | ||
``` | ||
ssh -i instance.pem ubunutu@<IP_ADDRESS> | ||
``` | ||
|
||
### Configuring Ubuntu on remote VM | ||
|
||
1. Updating the outdated packages and dependencies | ||
``` | ||
sudo apt update | ||
``` | ||
3. Install Git - [Guide by DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-22-04) | ||
4. Configure Node.js and `npm` - [Guide by DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-22-04) | ||
|
||
### Deploying the project on AWS | ||
|
||
1. Clone this project in the remote VM | ||
``` | ||
git clone https://github.com/verma-kunal/AWS-Session.git | ||
``` | ||
2. Setup the following environment variables - `(.env)` file | ||
``` | ||
DOMAIN= "" | ||
PORT=3000 | ||
STATIC_DIR="./client" | ||
PUBLISHABLE_KEY="" | ||
SECRET_KEY="" | ||
``` | ||
> For this project, we'll have to set up an [Elastic IP Address](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) for our EC2 & that would be our `DOMAIN` | ||
3. Initialise and start the project | ||
``` | ||
npm install | ||
npm run start | ||
``` | ||
|
||
> NOTE - We will have to edit the **inbound rules** in the security group of our EC2, in order to allow traffic from our particular port | ||
### Project is deployed on AWS 🎉 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters