... | ... | @@ -43,17 +43,17 @@ This is the only step that requires network access. |
|
|
Once the Vagrant box is downloaded, any number of VM instances can be created on the local host without requiring network connection.
|
|
|
The command to download a Vagrant box for VirtualBox onto the local host is as follows:
|
|
|
```
|
|
|
vagrant box add https://minio.hq.eso.org/eltdev/vagrant/eltdev.json --provider=virtualbox
|
|
|
vagrant box add eltdev/eltdev-4 --provider=virtualbox
|
|
|
```
|
|
|
Note that this step can take a long time, since a complete OVA image of the virtual machine with preinstalled OS and ELT software is downloaded to the local host.
|
|
|
However, once downloaded this step does not need to be repeated.
|
|
|
|
|
|
If a specific version of the ELT DevEnv is needed, e.g. 2.2.4-2, then the `--box-version` option can be used as follows:
|
|
|
If a specific version of the ELT DevEnv is needed, e.g. 4.1.0, then the `--box-version` option can be used as follows:
|
|
|
```
|
|
|
vagrant box add https://minio.hq.eso.org/eltdev/vagrant/eltdev.json --provider=virtualbox --box-version=2.2.4-2
|
|
|
vagrant box add eltdev/eltdev-4 --provider=virtualbox --box-version=4.1.0
|
|
|
```
|
|
|
|
|
|
To see a list of available box versions simply view https://minio.hq.eso.org/eltdev/vagrant/eltdev.json in a web browser.
|
|
|
To see a list of available box versions simply view https://app.vagrantup.com/eltdev in a web browser.
|
|
|
|
|
|
## Creating a new VM instance
|
|
|
|
... | ... | @@ -69,13 +69,13 @@ A file named _Vagrantfile_ must be created within the working directory. |
|
|
This file can be created and edited manually (see the Vagrant documentation for the supported syntax),
|
|
|
or alternatively a default version can be created with the following command:
|
|
|
```
|
|
|
vagrant init eltdev
|
|
|
vagrant init eltdev/eltdev-4
|
|
|
```
|
|
|
Note that the generated _Vagrantfile_ can be modified after the above command is run to customise the VM configuration before creating it.
|
|
|
|
|
|
If multiple versions of the _eltdev_ box have been downloaded and registered with Vagrant it may be necessary to select a specific version with the following example command:
|
|
|
```
|
|
|
vagrant init eltdev --box-version 2.2.4-2
|
|
|
vagrant init eltdev --box-version 4.1.0
|
|
|
```
|
|
|
|
|
|
The next step is to run the following command that creates the new VM instance and boots the OS:
|
... | ... | @@ -148,14 +148,14 @@ Since the linked-clones mechanism is used with Vagrant and VirtualBox, |
|
|
one first needs to delete the base VM instance in VirtualBox that Vagrant creates.
|
|
|
To identify this instance look at the contents of the _master_id_ file for the corresponding Vagrant box under the _$VAGRANT_HOME_ directory.
|
|
|
This usually defaults to _~/.vagrant.d/_.
|
|
|
As an example, for a default installation and configuration of Vagrant, the location of the _master_id_ file for the _eltdev_ box version 2.2.4-2 is found under:
|
|
|
As an example, for a default installation and configuration of Vagrant, the location of the _master_id_ file for the _eltdev_ box version 4.1.0 is found under:
|
|
|
```
|
|
|
~/.vagrant.d/boxes/eltdev/2.2.4-2/virtualbox/master_id
|
|
|
~/.vagrant.d/boxes/eltdev-VAGRANTSLASH-eltdev-4/4.1.0/virtualbox/master_id
|
|
|
```
|
|
|
This file will contain a UUID that can be passed to the VirtualBox `VBoxManage` command as follows:
|
|
|
|
|
|
```
|
|
|
VM_UUID=$(cat ~/.vagrant.d/boxes/eltdev/2.2.4-2/virtualbox/master_id)
|
|
|
VM_UUID=$(cat ~/.vagrant.d/boxes/eltdev-VAGRANTSLASH-eltdev-4/4.1.0/virtualbox/master_id)
|
|
|
VBoxManage unregistervm $VM_UUID --delete
|
|
|
```
|
|
|
|
... | ... | @@ -169,7 +169,7 @@ It is also possible to delete the base VM instance using the VirtuaBox GUI appli |
|
|
Once the base VM is unregistered with VirtualBox, the box can then be unregistered with Vagrant.
|
|
|
This is done with the following example command to unregister a specific version of the box:
|
|
|
```
|
|
|
vagrant box remove eltdev --provider=virtualbox --box-version=2.2.4-2
|
|
|
vagrant box remove eltdev --provider=virtualbox --box-version=4.1.0
|
|
|
```
|
|
|
Note that the box version must correspond to the one that was unregistered earlier from VirtualBox.
|
|
|
|
... | ... | |