「DAY25」雲端時代:Camunda上雲(AWS)

Posted on October 8, 2023 • 1 min read • 79 words
Share via

我們今天要把camunda放到雲端,請準備好您的aws帳號,一起部署吧~

我們今天要把camunda放到雲端,請準備好您的aws帳號,一起部署吧~

打包Camunda

我們到IDEA的File > Project Structure

https://ithelp.ithome.com.tw/upload/images/20231009/20163254ijGW7LsAz6.png

點擊Artifacts>add(+字號)

https://ithelp.ithome.com.tw/upload/images/20231009/20163254wqzwycbtUP.png

選擇JAR > From modules with dependencies

https://ithelp.ithome.com.tw/upload/images/20231009/20163254ea8S1V4Se9.png

配置如下:

https://ithelp.ithome.com.tw/upload/images/20231009/20163254YuiqfRUSG5.png

儲存在my-project根目錄,點擊OK

https://ithelp.ithome.com.tw/upload/images/20231009/20163254STvayw6ZGO.png

接著到Build>Build Artifacts

https://ithelp.ithome.com.tw/upload/images/20231009/20163254KQHAWzWZxu.png

點擊Build

https://ithelp.ithome.com.tw/upload/images/20231009/20163254LnVPog2cIy.png

有看到my-project.jar表示您打包成功。

https://ithelp.ithome.com.tw/upload/images/20231009/201632544AFi31e4S4.png

如果您要按照IDEA
預設的位置存儲是沒有問題的

配置AWS

進入到AWS EC2

https://ithelp.ithome.com.tw/upload/images/20231009/20163254FFmT0NE56W.png

我們生成一個金鑰對

https://ithelp.ithome.com.tw/upload/images/20231009/20163254JflKch7WXz.png

https://ithelp.ithome.com.tw/upload/images/20231009/20163254acVF6S5J9W.png

https://ithelp.ithome.com.tw/upload/images/20231009/20163254HnYxwMCkQZ.png

點選「啟動執行個體」

https://ithelp.ithome.com.tw/upload/images/20231009/201632544YkN1pmllm.png

配置如下:

名稱和標籤: it-camp

應用程式和作業系統映像: Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on 2023-05-16

https://ithelp.ithome.com.tw/upload/images/20231009/20163254a2xDeUpwJu.png

機器選擇免費的t2.micro:

https://ithelp.ithome.com.tw/upload/images/20231009/20163254bQCa19QehQ.png

建立金鑰對

https://ithelp.ithome.com.tw/upload/images/20231009/20163254gmmpP6HbPe.png

網路設定如下

https://ithelp.ithome.com.tw/upload/images/20231009/20163254m1nHEIxCco.png

硬碟如下:

https://ithelp.ithome.com.tw/upload/images/20231009/20163254TV2BJLEuNE.png

這樣就成功部署囉

https://ithelp.ithome.com.tw/upload/images/20231009/201632546hz5qCCBdH.png 接著我們點選右上角的「連線」

https://ithelp.ithome.com.tw/upload/images/20231009/20163254ukeo9PI0va.png

使用預設的連線方式

https://ithelp.ithome.com.tw/upload/images/20231009/20163254raMri8aOtN.png

您會在網頁看到操作介面

https://ithelp.ithome.com.tw/upload/images/20231009/20163254I7TSalGQYl.png

接著我指令碼輸入到命令列

sudo apt update 
sudo apt install openjdk-17-jdk
sudo apt install openjdk-17-jre

輸入 java —version

檢查有沒有出現java 版本17

https://ithelp.ithome.com.tw/upload/images/20231009/20163254p4vZUcDfb4.png

scp /Users/wujunyi/Downloads/my-project/my-project.jar ubuntu@ec2-13-231-239-90.ap-northeast-1.compute.amazonaws.com:/

接著開啟cyberduck

https://ithelp.ithome.com.tw/upload/images/20231009/20163254RN9Z6TnCtg.png

連線配置

https://ithelp.ithome.com.tw/upload/images/20231009/20163254tM0LlJIRwO.png

就會看到系統文件

https://ithelp.ithome.com.tw/upload/images/20231009/201632547xc56rhEvX.png

選擇剛才的jar

https://ithelp.ithome.com.tw/upload/images/20231009/201632547BYtgShQxT.png

接著我們將文件上傳

https://ithelp.ithome.com.tw/upload/images/20231009/20163254uEQHV9PCH3.png

我們輸入ls

https://ithelp.ithome.com.tw/upload/images/20231009/20163254yn0NzH3BzU.png

我們在輸入java -jar my-project.jar

https://ithelp.ithome.com.tw/upload/images/20231009/20163254j0wFOcQhi9.png

這樣就部署成功了

https://ithelp.ithome.com.tw/upload/images/20231009/20163254iOElYXbHMB.png

如果有任何問題歡迎在下方留言!! 筆者頭一回寫技術文如果內容有誤或者內容的呈現上有所缺陷如果您願意歡迎在下方留言給我呦~~

anything.best

這是我的部落格,歡迎點擊閱覽喔~~會不定期更新文章

On this page
Follow me

I work on everything coding and tweet developer memes