Commit 0d589d3d authored by Reimar Stier's avatar Reimar Stier

Add notes on retaining attached storage when destroying vagrant box

parent f1c8c01d
...@@ -8,7 +8,7 @@ BOX_NAME = "devbox" ...@@ -8,7 +8,7 @@ BOX_NAME = "devbox"
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.box = "geerlingguy/debian10" config.vm.box = ENV["DEVBOX_BASE_BOX"] || "geerlingguy/debian10"
config.vm.network "private_network", ip: ENV["DEVBOX_IP"] || "192.168.200.4", adapter: 2 config.vm.network "private_network", ip: ENV["DEVBOX_IP"] || "192.168.200.4", adapter: 2
config.vm.hostname = "devbox.devops.detss.corpintra.net" config.vm.hostname = "devbox.devops.detss.corpintra.net"
......
...@@ -35,9 +35,10 @@ Issues with nvidia graphics card (NVIDIA Corporation GK106GLM [Quadro K2100M]). ...@@ -35,9 +35,10 @@ Issues with nvidia graphics card (NVIDIA Corporation GK106GLM [Quadro K2100M]).
# base boxes # base boxes
* geerlingguy https://app.vagrantup.com/geerlingguy * geerlingguy https://app.vagrantup.com/geerlingguy
* gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10) * gerlingguy/debian10 (https://github.com/geerlingguy/packer-debian-10) `tested`
* geerlingguy/ubuntu1804
* Ubuntu https://app.vagrantup.com/ubuntu/ * Ubuntu https://app.vagrantup.com/ubuntu/
* ubuntu/bionic64 (Ubuntu 18.04) * ubuntu/bionic64 (Ubuntu 18.04) `DID NOT BOOT v20190918.0.0`
* Generic https://app.vagrantup.com/generic/ * Generic https://app.vagrantup.com/generic/
* Roboxes (https://roboxes.org/) is a project that encapsulates Packer templates for building base boxes suitable for use with Vagrant, Docker, or as generic open virtualization appliances. A subset of the templates are built and available from the Vagrant Cloud. * Roboxes (https://roboxes.org/) is a project that encapsulates Packer templates for building base boxes suitable for use with Vagrant, Docker, or as generic open virtualization appliances. A subset of the templates are built and available from the Vagrant Cloud.
......
# List of improvements to this setup
### Vagrant
Improvements relating to vagrant and its configuration.
#### Do not destroy attached storage disks
https://stackoverflow.com/questions/45038248/vagrant-detach-vdi-file-before-destroy-or-just-dont-remove-it
https://stackoverflow.com/a/51859546
* Does not work yet
```
# detach drives before destroying box to ensure home partition will survive
config.trigger.before :destroy do
# info "dettaching drives"
DISKS.each do |disk|
vb.customize ['storageattach', "devbox", '--storagectl', 'SATA Controller', '--port', disk["port"], '--device', 0, '--type', 'hdd', '--medium', "none"]
end
end
```
\ No newline at end of file
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
- name: "IntelliJ IDEA Ultimate" - name: "IntelliJ IDEA Ultimate"
- name: "PyCharm Professional" - name: "PyCharm Professional"
pre_tasks: pre_tasks:
- name: "Update apt cache"
apt:
update_cache: yes
cache_valid_time: 86400 # one day
- import_tasks: tasks/partitioning.yml - import_tasks: tasks/partitioning.yml
tags: partition tags: partition
roles: roles:
...@@ -31,4 +27,4 @@ ...@@ -31,4 +27,4 @@
- name: post install tasks - name: post install tasks
block: block:
- import_tasks: tasks/install_kubectl.yml - import_tasks: tasks/install_kubectl.yml
tags: post_install tags: post_install
\ No newline at end of file
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
loop_control: loop_control:
loop_var: disk loop_var: disk
- name: "Update apt cache"
apt:
update_cache: yes
cache_valid_time: 86400 # one day
- name: Install rsync - name: Install rsync
package: package:
name: ["rsync", "parted"] name: ["rsync", "parted"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment