Side - Project 점심이(3 / 3)

김종찬·2023년 2월 20일
0

오늘은 간단한 AWS EC2를 이용하여 간단한 배포까지 해보도록 하겠습니다.

아래 코드는 https://github.com/bellCold/slack-lunch-commend 에서 모두 보실수 있습니다!

aws를 이용하기 위해서는 계정이 있어야합니다. 프리티어는 1년간 계정 생성후 1년간 무료
계정 생성후 EC2에서 인스턴스를 생성해줍니다. 쉽게말해 클라우드에서 사용할 컴퓨터를 만든다고 생각하면 될것같습니다.

프리티어 아무거나 사용하면 될것같습니다.

인스턴스에 연결하기 위해서는 키가 있어야합니다. 키가 없으신분은 키를 생성하셔서 선택해주면 되겠습니다.
여기서 생성된 키는 잘 들고 있어야합니다 인스턴스에 접속시 필요합니다.

설정 완료후 우측에 인스턴스 시작을 누르면 정상적으로 인스턴스가 생성된것을 알 수 있습니다.

이제 해당 인스턴스에 접속하여 깃허브에 있는 프로젝트를 클론하여 빌드 해보겠습니다.
접속하기 위해서는 밑에 퍼블릭 주소와 인스턴스 생성당시 키가 필요합니다.

ssh -i [키이름] ec2-user@[퍼블릭주소] 를 통해 접속해줍니다.
아마 처음할때 키에 권한부여를 해줘야하는걸로 알고있습니다.

이제 프로젝트를 빌드를 위해 필요한 것들을 받아줍니다. (git, java)
$ sudo yum install -y git
$ sudo apt-get update
$ sudo apt-get install openjdk-11-jdk

--version 명령어를 통해 정상적으로 설치가 완료되었음일 알수있습니다.

프로젝트를 깃허브 레포짓토리에서 클론해줍니다.

clone후 git ignore로 properties값이 없으므로 직접 resources file을 vim 에디터를 통해 properties file과 값들을 설정해줍니다.

./gradlew build 명령어를 통해 빌드를 하면 정상적으로 빌드가 된것을 볼 수 있습니다.

/build/libs 경로를 통해 들어가 jar file을 java -jar lunch-0.0.1-SNAPSHOT.jar 명령어를 통해 실행하면 정상적으로 실행이 되고 슬랙 메시지가 발송되는 것을 볼수 있습니다.

profile
봄이 오길

1개의 댓글

comment-user-thumbnail
2023년 7월 20일

Most people get into a marriage with high and full spirits. They know full well what they are getting into and accept this with an open heart. While you may say that there is a lot of hype in marriages especially on the days leading up to the wedding day, it can get a bit frustrating to have a misunderstanding in your relationship. I have been through hell with my husband for a very long time. With the help of the great spell caster, I was able to resolve my marriage issue and now I finally find happiness in my marriage. For anyone going through any kind of relationship issue or you like to get back with your ex, I will suggest getting in touch with the best relationship advice specialist that will bring happiness back into your home. You can get in touch with The Great Dr.Jumba relationship and affair advisor on WhatsApp: +27723955865 or wiccalovespelltools@gmail.com . He is always ready to help people and bring back happiness into your life.

Website : https://drjumbaspellhome.wordpress.com

Vanny Carl .
From Austin Texas

답글 달기