사용자 도구

사이트 도구


packer

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
packer [2018/04/03 17:42]
kwon37xi
packer [2018/04/04 15:47]
kwon37xi [Template Engine]
줄 4: 줄 4:
   *  Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.   *  Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.
  
-====== Install ======+===== Install =====
   * [[https://www.packer.io/downloads.html|Packer downloads]] 에서 적합한 버전을 받아서 ''~/.local/bin'' 등에 복사하고 ''PATH'' 걸어주고 사용한다.   * [[https://www.packer.io/downloads.html|Packer downloads]] 에서 적합한 버전을 받아서 ''~/.local/bin'' 등에 복사하고 ''PATH'' 걸어주고 사용한다.
  
-====== Templates ======+===== Template Engine ===== 
 +  * 기본 템플릿 https://www.packer.io/docs/templates/engine.html 
 +  * 시간 포매팅 2006, 01, 02는 실제 년월일로 자동 대체된다. JSON에서 따옴표는 ''\"''로 지정한다.<code> 
 +{{isotime "2006-01-02"}} 
 +</code> 
 +===== Templates =====
   * [[https://github.com/kaorimatz/packer-templates|Packer Templates for vagrant]]   * [[https://github.com/kaorimatz/packer-templates|Packer Templates for vagrant]]
   * [[https://github.com/geerlingguy/packer-ubuntu-1604|geerlingguy/packer-ubuntu-1604: Packer Example - Ubuntu 16.04 minimal Vagrant Box using Ansible provisioner]]   * [[https://github.com/geerlingguy/packer-ubuntu-1604|geerlingguy/packer-ubuntu-1604: Packer Example - Ubuntu 16.04 minimal Vagrant Box using Ansible provisioner]]
  
-====== AWS AMI Builder ======+===== AWS AMI Builder =====
   * ''vpc_ic'', ''subnet_id'' 등을 명시하지 않으면 ''Error launching source instance: VPCIdNotSpecified: No default VPC for this user'' 같은 오류가 발생할 수 있다.   * ''vpc_ic'', ''subnet_id'' 등을 명시하지 않으면 ''Error launching source instance: VPCIdNotSpecified: No default VPC for this user'' 같은 오류가 발생할 수 있다.
 +  * public IP가 있어야 외부 패키지 설치가 가능한 경우등에는(defualt VPC가 아니라면) 다음 필요<code>
 +associate_public_ip_address": true
 +</code>
 +===== Provisioners =====
 +==== file ====
 +  * 파일 복사시에 디렉토리로 복사할 경우 destination의 끝에 ''/''가 있어야 한다.<code>
 +{
 +  "type": "file",
 +  "source": "./welcom.txt",
 +  "destination": "/home/ec2-user/"
 +},
 +</code>
 +
  
 ===== 참조 ===== ===== 참조 =====