This manual provides detailed instructions for setting up and deploying the E2E-Platform project on AWS EC2.
Before setting up the project, ensure you have the following installed:
- Node.js (v14.x or higher)
- Python (v3.8 or higher)
- AWS CLI
- Docker
-
Clone the Repository
git clone https://github.com/Naihe0/E2E-Platform.git cd E2E-Platform
-
Install Backend Dependencies
cd backend pip install -r requirements.txt cd ..
-
Install Frontend Dependencies
cd frontend npm install cd ..
-
Start the Project
- On Windows:
./start.bat
- On Unix-based systems:
./start.sh
- On Windows:
-
Set Up AWS CLI
- Configure your AWS CLI with the required credentials:
aws configure
- Configure your AWS CLI with the required credentials:
-
Create an EC2 Instance
- Launch a new EC2 instance from the AWS Management Console.
- Select an Amazon Machine Image (AMI), such as Amazon Linux 2 or Ubuntu.
- Choose an instance type (e.g., t2.micro for testing).
- Configure security groups to allow HTTP (port 80) and SSH (port 22) access.
- Launch the instance and connect to it using SSH.
-
Install Docker on the EC2 Instance
sudo apt-get update sudo apt-get install -y docker.io sudo systemctl start docker sudo systemctl enable docker
-
Transfer Project Files to EC2
- Use SCP to transfer the project files to the EC2 instance:
scp -i path/to/your-key-pair.pem -r E2E-Platform/ ec2-user@<ec2-public-dns>:/home/ec2-user/
- Use SCP to transfer the project files to the EC2 instance:
-
Build and Run Docker Containers
- SSH into the EC2 instance and navigate to the project directory:
ssh -i path/to/your-key-pair.pem ec2-user@<ec2-public-dns> cd E2E-Platform
- Build and run the Docker containers:
sudo docker-compose up --build -d
- SSH into the EC2 instance and navigate to the project directory:
-
Access the Application
- Obtain the public DNS of the EC2 instance and access the application through your browser.
By following this manual, you should be able to set up and deploy the E2E-Platform project on AWS EC2 successfully.