Created
March 17, 2014 19:41
-
-
Save lopesivan/9606747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOX = ~/precise32.box | |
VM = precise32 | |
cookbooks = lopesivan/chef | |
OUT = backup | |
all: status | |
new: | |
@vagrant box add $(VM) $(BOX) | |
status: | |
@vagrant status | |
provision: | |
@vagrant reload --provision | |
destroy: | |
@vagrant destroy --force | |
halt: | |
@vagrant halt | |
reload: | |
@vagrant reload | |
suspend: | |
@vagrant suspend | |
up: | |
@echo Copia a imagem para o virtualizador. | |
@vagrant up | |
list: | |
@vagrant box list | |
remove: | |
@vagrant box remove $(VM) | |
clean: destroy | |
shutdown: halt | |
get-environment: | |
@git clone https://github.com/$(cookbooks) recipes | |
recipes: get-environment | |
vms: | |
@VBoxManage list vms | |
vms-delete: | |
@VBoxManage unregistervm $(VM) --delete | |
export: | |
@mkdir -p $(OUT) | |
@vagrant package | |
@mv package.box $(OUT)/$(VM).box | |
@cp Vagrantfile Makefile provision.sh $(OUT)/ | |
@sed 's/precise32/p&/g' -i $(OUT)/Vagrantfile $(OUT)/Makefile $(OUT)/provision.sh | |
@tar cvzf $(VM)_$(shell date +"%d_%b_%Y_%H_%M_%S").tgz $(OUT)/ | |
@rm -rf $(OUT) | |
config: | |
@echo ~/.ssh/config | |
vagrant ssh-config --host vbox.$(VM).local | |
ssh: | |
@echo ssh -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -o IdentitiesOnly=yes -i ~/.vagrant.d/insecure_private_key vagrant@127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment