사용자 도구

사이트 도구


vagrant

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
vagrant [2018/09/03 14:52]
kwon37xi [Hyper-V]
vagrant [2019/11/10 21:55]
kwon37xi [Install]
줄 3: 줄 3:
   * [[http://www.vagrantbox.es/|A list of base boxes for Vagrant - Vagrantbox.es]]   * [[http://www.vagrantbox.es/|A list of base boxes for Vagrant - Vagrantbox.es]]
   * 개발 서버 환경 구축하기   * 개발 서버 환경 구축하기
-  * https://github.com/box-cutter+  * [[https://github.com/boxcutter|Box Cutter Community-driven templates and tools for creating cloud, virtual machines, containers and metal operating system environments]]
  
 +===== Install =====
 +  * debian 은 https://www.vagrantup.com/downloads.html 에서 다운로드 하거나 ''vagrant'' 패키지를 설치하면 됨
 +  * [[https://wiki.archlinux.org/index.php/Vagrant|Arch Linux Vagrant]]<code sh>
 +sudo pacman -S vagrant
 +</code>
 +  * 기본 Provider 지정. Default 설정을 해두면 ''%%--%%provider'' 옵션 불필요<code sh>
 +export VAGRANT_DEFAULT_PROVIDER=virtualbox
 +</code>
 +===== libvirt =====
 +
 +  * [[https://github.com/vagrant-libvirt/vagrant-libvirt|ᅟvagrant-libvirt]]
 +  * [[https://computingforgeeks.com/using-vagrant-with-libvirt-on-linux/|How to Use Vagrant with Libvirt on Linux - Computing for Geeks]]
 +  * [[https://blog.scottlowe.org/2017/12/06/using-vagrant-with-libvirt-on-fedora/|Using Vagrant with Libvirt on Fedora 27 - Scott's Weblog - The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking]]
 +  * Linux 상에서  ''libvirt'' + [[qemu|QEMU]]가 실행 성능이 더 좋다고함(거의 Native 수준).
 +  * [[linux:arch|Arch Linux]] 에서 설치하기<code sh>
 +# libvirtd 는 ebtables, dnsmasq 가 떠있ᅟ는 상태에서 실행해야 함.
 +sudo pacman -S libvirt qemu ebtables dnsmasq
 +
 +# enable libvertd.servcie
 +sudo systemctl enable --now libvertd.service
 +
 +# 플러그이 설치
 +vagrant plugin install vagrant-libvirt
 +# 잘 설치됐는지 확인
 +vagrant plugin list
 +
 +# 실행시 --provider=libvirt 지정
 +vagrant up --provider=libvirt
 +</code>
 + * [[https://superuser.com/questions/1063240/libvirt-failed-to-initialize-a-valid-firewall-backend|networking - libvirt: "Failed to initialize a valid firewall backend" - Super User]]
 ===== 기본 사용 ===== ===== 기본 사용 =====
   * 박스를 검색해서 찾은뒤 사용법을 따라하면 된다.   * 박스를 검색해서 찾은뒤 사용법을 따라하면 된다.
-  * [[https://app.vagrantup.com/ubuntu/boxes/trusty64|Ubuntu trusty 64bit]] 띄우기<code> +  * [[https://app.vagrantup.com/ubuntu/boxes/trusty64|Ubuntu trusty 64bit]], [[https://app.vagrantup.com/debian/boxes/buster64|debian buster 64bit]] 띄우기<code> 
-# vagrant 관련 설정을 넣어둘 디렉토리로 이동 +# vagrant 관련 설정을 넣어둘 디렉토리로 이동하여 Vagrantfile 생성 
-vagrant init ubuntu/trusty64 # 자동으로 본 Vagrantfile 생성+# for ubuntu 
 +vagrant init ubuntu/trusty64 
 +for debian 
 +vagrant init debian/buster64 
 + 
 +# 띄우
 vagrant up vagrant up
 +
 +# 종료
 +vagrant halt
 +
 +# 완전삭제
 +vagrant destroy
 </code> </code>
   * SSH 접속<code sh>   * SSH 접속<code sh>
줄 30: 줄 71:
   * [[windows:hyper_v|Hyper-V]] Provider   * [[windows:hyper_v|Hyper-V]] Provider
   * https://www.vagrantup.com/docs/hyperv/   * https://www.vagrantup.com/docs/hyperv/
-  * Default 설정을 해두면 ''--provider'' 옵션 불필요<code> 
-VAGRANT_DEFAULT_PROVIDER=hyperv 
-</code> 
 <code sh> <code sh>
 # 관리자 권한으로 # 관리자 권한으로
줄 39: 줄 77:
  
 </code> </code>
 +
 +===== vagrant-aws =====
 +  * [[https://github.com/mitchellh/vagrant-aws|vagrant-aws]]
 +  * vagrant 로 AWS EC2 인스턴스 제어
  
 ===== 참조 ===== ===== 참조 =====