ZDenizYStenhaug / swe573-Project

Project repository for SWE573 - Software Development Practice
0 stars 0 forks source link

Research deployment with AWS #18

Closed ZDenizYStenhaug closed 2 years ago

ZDenizYStenhaug commented 2 years ago

Deployment of the dockerized project to AWS EC2 server. To do this, first research how the EC2 servers work. If there's any time left, automizing this process could be researched.

ZDenizYStenhaug commented 2 years ago

Managed the deployment!! Steps to do it again:

  1. create an ec2 instance. install docker on it and log in.
  2. download the .pem file of the instance. Put it in a seperate folder. (you'll use this to connect to the server from your local. Might need to change the security settings of the file. just make your user the owner and remove all inherited settings)
  3. Copy the link from ssh connect option and run it in the same folder that you put the .pem file.
  4. To transfer docker-compose.yml to the ec2 server, run this command in your local (might want to changethe link / user for the ec2 server and the name of the .pem file) scp -i swe573-akita1.pem docker-compose.yml ec2-user@ec2-54-93-164-124.eu-central-1.compute.amazonaws.com:/home/ec2-user/docker-compose.yml
  5. create the image for Akita with the command docker build -t zeynepdyilmaz/akita:latest .
  6. using docker desktop, push the image to docker hub.
  7. run sudo docker-compose up in the server.