migrate to vagrant 2.1

This commit is contained in:
Rui Lopes 2018-05-06 20:50:23 +01:00
parent 9a13c7888e
commit 12e20c2647
2 changed files with 5 additions and 8 deletions

View File

@ -30,18 +30,14 @@ Build and install the [Ubuntu Base Box](https://github.com/rgl/ubuntu-vagrant).
Build and install the [Windows Base Box](https://github.com/rgl/windows-2016-vagrant). Build and install the [Windows Base Box](https://github.com/rgl/windows-2016-vagrant).
Install the required Vagrant plugins:
```bash
vagrant plugin install vagrant-triggers # see https://github.com/emyl/vagrant-triggers
```
Add the following entry to your `/etc/hosts` file: Add the following entry to your `/etc/hosts` file:
``` ```
192.168.56.3 nexus.example.com 192.168.56.3 nexus.example.com
``` ```
Install Vagrant 2.1+.
Run `vagrant up --provider=virtualbox # or --provider=libvirt` to launch the environment. Run `vagrant up --provider=virtualbox # or --provider=libvirt` to launch the environment.
See its output to known how to login at the See its output to known how to login at the
[local Nexus home page](https://nexus.example.com) as `admin` (you can also login with [local Nexus home page](https://nexus.example.com) as `admin` (you can also login with

5
Vagrantfile vendored
View File

@ -56,8 +56,9 @@ Vagrant.configure(2) do |config|
config.vm.provision :shell, path: 'provision/windows/ps.ps1', args: ['use-npm-repository.ps1', nexus_domain] config.vm.provision :shell, path: 'provision/windows/ps.ps1', args: ['use-npm-repository.ps1', nexus_domain]
end end
config.trigger.before :up, :vm => ['nexus'] do config.trigger.before :up do |trigger|
trigger.only_on = 'nexus'
ldap_ca_cert_path = '../windows-domain-controller-vagrant/tmp/ExampleEnterpriseRootCA.der' ldap_ca_cert_path = '../windows-domain-controller-vagrant/tmp/ExampleEnterpriseRootCA.der'
run "sh -c 'mkdir -p shared && cp #{ldap_ca_cert_path} shared'" if File.file? ldap_ca_cert_path trigger.run = {inline: "sh -c 'mkdir -p shared && cp #{ldap_ca_cert_path} shared'"} if File.file? ldap_ca_cert_path
end end
end end