Elastic Beanstalk-CLI搭建环境(java)
以前搭建过 NodeJs 的 EB 环境,本次利用 CLI 发布Java的 EB 环境。
NodeJS搭建参照: Elastic Beanstalk-环境搭建(Nodejs).
安装版本确认
[root@localhost /]# git --version
git version 1.8.3.1
[root@localhost /]# python --version
Python 2.7.5
[root@localhost /]# pip --version
pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
[root@localhost /]# eb --version
EB CLI 3.14.9 (Python 2.7.5)
资源取得
[root@localhost /]# git clone https://github.com/oblily/springBootSample.git
Cloning into 'springBootSample'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 27 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (27/27), done.
[root@localhost /]# ls -la springBoot*
total 40
drwxr-xr-x 5 root root 4096 Jan 17 05:33 .
dr-xr-xr-x. 22 root root 4096 Jan 17 05:33 ..
-rw-r--r-- 1 root root 720 Jan 17 05:33 build.gradle
drwxr-xr-x 8 root root 4096 Jan 17 05:33 .git
drwxr-xr-x 3 root root 4096 Jan 17 05:33 gradle
-rw-r--r-- 1 root root 5296 Jan 17 05:33 gradlew
-rw-r--r-- 1 root root 2260 Jan 17 05:33 gradlew.bat
-rw-r--r-- 1 root root 38 Jan 17 05:33 settings.gradle
drwxr-xr-x 4 root root 4096 Jan 17 05:33 src
ElasticBeanstalk CLI初期化
[root@localhost springBootSample]# eb init
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west