Vagrant, Docker 및 Arkade를 활용한 일회용 로컬 개발 환경 (feat. MySQL 설치 5번한 좌충우돌 스토리)

TL;DR 중요한 포인트

호스트 OS 에 설치해야 하는 것들

도커를 호스트 OS 에 설치한 이유

Vagrant 가 사용 되는 방법

$ vagrant plugin install vagrant-vbguest
$ mkdir project-skunkworks
$ cd project-skunkworks
$ vagrant init debian/buster64
# vagrant init centos/7
# vagrant init alpine/alpine64
# etc
Vagrant.configure("2") do |config|
config.vm.box = "debian/buster64"
config.vm.hostname = "skunkworks-01"
config.vm.define "skunkworks-01"
config.vagrant.plugins = ['vagrant-vbguest']
config.vm.network "private_network", ip: "192.168.33.10" config.vm.synced_folder "./", "/home/vagrant/project" config.vm.provider "virtualbox" do |vb|
vb.cpus = 4
vb.memory = "2048"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y curl git cmake tmux vim # ...
SHELL
config.vm.provision "docker" do |d|
d.run "nginx"
end
end

Vagrant 와 Visual Studio Code 원격 개발

Arkade 가 사용 되는 방법

$ curl -sLS https://get.arkade.dev | sudo sh$ arkade --help
$ arkade get kubectl
$ arkade get kind
$ kind create cluster$ arkade install ingress-nginx$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/ingress-nginx-controller-7d98fb5bd-956fq 1/1 Running 0 38s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingress-nginx-controller LoadBalancer 10.96.239.161 <pending> 80:31973/TCP,443:31901/TCP 38s
service/ingress-nginx-controller-admission ClusterIP 10.96.11.19 <none> 443/TCP 38s
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 84s
...

--

--

r&d blog on architecture, software engineering and inspirations

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store