사용자 도구

사이트 도구


aws:elasticbeanstalk

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
aws:elasticbeanstalk [2018/08/21 12:06]
kwon37xi 만듦
aws:elasticbeanstalk [2021/10/09 23:34] (현재)
kwon37xi
줄 1: 줄 1:
-====== AWS ElasticBeansTalk ======+====== AWS ElasticBeansTalk EBT ====== 
 +  * [[aws:code_deploy|AWS Code Deploy]] 로 전환할것. 
 +  * [[https://aws.amazon.com/ko/documentation/elastic-beanstalk/|ElasticBeansTalk Documentation]] 
 +  * [[https://docs.aws.amazon.com/quickstarts/latest/webapp/welcome.html|Getting Started with Web App Deployment on Elastic Beanstalk - AWS Quick Start]] 
 +  * [[https://docs.aws.amazon.com/ko_kr/elasticbeanstalk/latest/dg/GettingStarted.html|ElasticBeansTalk Getting Started]] 
 +  * [[https://github.com/awsdocs/elastic-beanstalk-samples|awsdocs/elastic-beanstalk-samples: This repository contains code and configuration samples (e.g. .ebextensions) for AWS Elastic Beanstalk.]] 
 + 
 +===== Custom Platform ===== 
 +  * [[https://docs.aws.amazon.com/ko_kr/elasticbeanstalk/latest/dg/custom-platforms.html|사용자 지정 플랫폼 - AWS Elastic Beanstalk]]
  
 ===== Java Process ===== ===== Java Process =====
   * [[https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-procfile.html|Configuring the Application Process with a Procfile - AWS Elastic Beanstalk]]   * [[https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-procfile.html|Configuring the Application Process with a Procfile - AWS Elastic Beanstalk]]
-  * Log 파일 경로는 ''process이름-1.log'', ''process이름-1.error.log'' +  * Log 파일 경로는 ''process이름-1.log'', ''process이름-1.error.log'' Standard output and error streams from processes started with a Procfile are captured in log files named after the process and stored in /var/log. For example, the web process in the preceding example generates logs named web-1.log and web-1.error.log for stdout and stderr, respectively. 
->> Standard output and error streams from processes started with a Procfile are captured in log files named after the process and stored in /var/log. For example, the web process in the preceding example generates logs named web-1.log and web-1.error.log for stdout and stderr, respectively.+ 
 +===== ebextensions ===== 
 +  * [[https://docs.aws.amazon.com/ko_kr/elasticbeanstalk/latest/dg/customize-containers-ec2.html|Linux 서버에서 소프트웨어 Customize]] 
 + 
 +==== 특정 패키지 설치 ==== 
 +  * yum, rubygems, python 및 rpm 등의 패키지 관리자를 지원합니다. 패키지는 rpm, yum, rubygems 및 python의 순서대로 처리됩니다. rubygems와 python 간에는 순서가 없습니다. 각 패키지 관리자에서 패키지 설치 순서는 보장되지 않습니다. 
 + 
 +<code> 
 +packages:  
 +  yum: 
 +    libmemcached: []  
 +    ruby-devel: [] 
 +    gcc: [] 
 +  rpm: 
 +    epel: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm 
 +  rubygems:  
 +    chef: '0.10.2' 
 +</code> 
 + 
 + 
 +==== 조건적 명령 실행 ==== 
 +  * ''test: 테스트 shell script'' 사용. 결과가 ''true''(즉, ''0'')일때 command 실행. [[linux:test|test]] 
 +  * [[https://stackoverflow.com/a/27409532/1051402|How to use conditional in .ebextensions config (AWS Elastic Beanstalk)]] 
 + 
 +<code> 
 +commands: 
 +  01_create_dir: 
 +    test: test ! -d "${DIR}" 
 +    command: mkdir "${DIR}" 
 +     
 +# 아래와 같은 식도 가능 
 +    test: "[ -x /usr/bin/python ]" # 파이썬이 존재하면 실행 
 +</code> 
 +  * ''rpm -q wget'' : ''wget'' 패키지가 설치돼 있으면 ''true/0'' 
 +==== leader_only ==== 
 +  * 특정 EBT 환경에 설정한 특정 단일 인스턴스에서만 명령 실행 
 +  * ''test:''와 함께 사용 불가
  
 +<code>
 +container_commands:
 +  collectstatic:
 +    command: "django-admin.py collectstatic --noinput"
 +  01syncdb:
 +    command: "django-admin.py syncdb --noinput"
 +    leader_only: true
 +</code>
  
 +===== 참고 =====
 +  * [[http://blog.saltfactory.net/how-to-start-java-web-application-on-beanstalk/|AWS Elastic Beanstalk 시작하기 - 1. 설치 및 소스코드 Deploy (Free Tier)]]
 +  * [[http://blog.saltfactory.net/how-to-use-rds-mysql-with-mybatis-in-aws-elastic-beanstalk/|AWS Elastic Beanstalk 시작하기 - 2. RDS 연동하기]]
 +  * [[https://hackernoon.com/jack-and-the-elastic-beanstalk-easily-manage-aws-environments-3ab496f08ad2|Jack and the Elastic Beanstalk —Easy Way to Manage AWS Elastic Beanstalk Environments]]
 +  * [[https://medium.com/boltops/trying-to-speed-up-aws-elastic-beanstalks-eb-deploy-d9fc781c85e8|Speeding Up AWS Elastic Beanstalk’s eb deploy]]
aws/elasticbeanstalk.1534820788.txt.gz · 마지막으로 수정됨: 2018/08/21 12:06 저자 kwon37xi