scripts/vagrant: Add fc28 image and update docs.
Keeping consistent with the distributions we support in the build pool. Change-Id: Iec13686507f890e9e18ecd5a1f4f238b2370f1d7 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/427161 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
6695ac2797
commit
b7ceb7508f
@ -1,6 +1,6 @@
|
||||
# SPDK Vagrant and VirtualBox
|
||||
|
||||
The following guide explains how to use the scripts in the `spdk/scripts/vagrant`. Both Mac and Windows platforms are supported.
|
||||
The following guide explains how to use the scripts in the `spdk/scripts/vagrant`. Mac, Windows, and Linux platforms are supported.
|
||||
|
||||
1. Install and configure [Git](https://git-scm.com/) on your platform.
|
||||
2. Install [VirtualBox 5.1](https://www.virtualbox.org/wiki/Downloads) or newer
|
||||
@ -38,6 +38,10 @@ Quick start instructions for OSX:
|
||||
- Note: VirtualBox requires virtualization to be enabled in the BIOS.
|
||||
- Note: You should disable Hyper-V in Windows RS 3 laptop. Search `windows features` uncheck Hyper-V, restart laptop
|
||||
|
||||
## Linux Setup
|
||||
|
||||
Following the generic instructions should be sufficient for most Linux distributions. For more thorough instructions on installing VirtualBox on your distribution of choice, please see the following [guide](https://www.virtualbox.org/wiki/Linux_Downloads).
|
||||
|
||||
## Configure Vagrant
|
||||
|
||||
If you are behind a corporate firewall, configure the following proxy settings.
|
||||
@ -64,27 +68,34 @@ Use the `spdk/scripts/vagrant/create_vbox.sh` script to create a VM of your choi
|
||||
- ubuntu18
|
||||
- fedora26
|
||||
- fedora27
|
||||
- fedora28
|
||||
- freebsd11
|
||||
|
||||
```
|
||||
$ spdk/scripts/vagrant/create_vbox.sh -h
|
||||
Usage: create_vbox.sh [-n <num-cpus>] [-s <ram-size>] [-x <http-proxy>] [-hvr] <distro>
|
||||
Usage: create_vbox.sh [-n <num-cpus>] [-s <ram-size>] [-x <http-proxy>] [-hvrld] <distro>
|
||||
|
||||
distro = <centos7 | ubuntu16 | ubuntu18 | fedora26 | fedora27 | freebsd11>
|
||||
distro = <centos7 | ubuntu16 | ubuntu18 | fedora26 | fedora27 | fedora28 | freebsd11>
|
||||
|
||||
-s <ram-size> in kb default: 4096
|
||||
-n <num-cpus> 1 to 4 default: 4
|
||||
-x <http-proxy> default: ""
|
||||
-p <provider> libvirt or virtualbox
|
||||
--vhost-host-dir=<path> directory path with vhost test dependencies
|
||||
(test VM qcow image, fio binary, ssh keys)
|
||||
--vhost-vm-dir=<path> directory where to put vhost dependencies in VM
|
||||
-r dry-run
|
||||
-l use a local copy of spdk, don't try to rsync from the host.
|
||||
-d deploy a test vm by provisioning all prerequisites for spdk autotest
|
||||
-h help
|
||||
-v verbose
|
||||
|
||||
Examples:
|
||||
|
||||
spdk/scripts/vagrant/create_vbox.sh -x http://user:password@host:port fedora27
|
||||
spdk/scripts/vagrant/create_vbox.sh -s 2048 -n 2 ubuntu16
|
||||
spdk/scripts/vagrant/create_vbox.sh -rv freebsd
|
||||
spdk/scripts/vagrant/create_vbox.sh fedora26
|
||||
./scripts/vagrant/create_vbox.sh -x http://user:password@host:port fedora27
|
||||
./scripts/vagrant/create_vbox.sh -s 2048 -n 2 ubuntu16
|
||||
./scripts/vagrant/create_vbox.sh -rv freebsd
|
||||
./scripts/vagrant/create_vbox.sh fedora26
|
||||
```
|
||||
|
||||
It is recommended that you call the `create_vbox.sh` script from outside of the spdk repository. Call this script from a parent directory. This will allow the creation of multiple VMs in separate <distro> directories, all using the same spdk repository. For example:
|
||||
@ -98,11 +109,12 @@ This script will:
|
||||
1. create a subdirectory named <distro> in your $PWD
|
||||
2. copy the needed files from `spdk/scripts/vagrant/` into the <distro> directory
|
||||
3. create a working virtual box in the <distro> directory
|
||||
4. rsycn the `~/.gitconfig` file to `/home/vagrant/` in the newly provisioned virtual box
|
||||
5. rsync a copy of the source `spdk` repository to `/home/vagrant/spdk_repo/spdk`
|
||||
4. rsync the `~/.gitconfig` file to `/home/vagrant/` in the newly provisioned virtual box
|
||||
5. rsync a copy of the source `spdk` repository to `/home/vagrant/spdk_repo/spdk` (optional)
|
||||
6. rsync a copy of the `~/vagrant_tools` directory to `/home/vagrant/tools` (optional)
|
||||
7. execute vm_setup.sh on the guest to install all spdk dependencies (optional)
|
||||
|
||||
This arrangement allows the provisioning of multiple, different VMs within that same directory hiearchy using the same spdk repository. Following the creation of the vm you'll need to ssh into your virtual box and finish the VM initializaton.
|
||||
This arrangement allows the provisioning of multiple, different VMs within that same directory hierarchy using the same spdk repository. Following the creation of the vm you'll need to ssh into your virtual box and finish the VM initializaton.
|
||||
|
||||
```
|
||||
$ cd <distro>
|
||||
@ -123,7 +135,7 @@ The `update.sh` script completes initialization of the VM by automating the foll
|
||||
2. Runs the scripts/pdkdep.sh script
|
||||
3. Installs the FreeBSD source in /usr/sys (FreeBSD only)
|
||||
|
||||
This only needs to be done once.
|
||||
This only needs to be done once. This is also not necessary for Fedora VMs provisioned with the -d flag. The `vm_setup` script performs these operations instead.
|
||||
|
||||
## Post VM Initializtion
|
||||
|
||||
@ -157,17 +169,9 @@ Following VM initializtion you must:
|
||||
$ sudo ./hello_bdev
|
||||
```
|
||||
|
||||
## Additional Setup for Fedora 26
|
||||
|
||||
As of this writing the `vm_setup.sh` script only supports Fedora 26. To complete the full installation of all packages needed to run autotest.sh on your fedora26 VM, run the `spdk/test/common/config/vm_setup.sh` script. Note: this will take some time. It is recommended that the output of vm_setup.sh is captured in a script log.
|
||||
|
||||
```
|
||||
$ script -c 'spdk_repo/spdk/test/common/config/vm_setup.sh -i -t librxe,iscsi,rocksdb,fio,flamegraph,libiscsi' vm_setup.log
|
||||
```
|
||||
|
||||
### Running autorun.sh with vagrant
|
||||
|
||||
After running vm_setup.sh the `run-autorun.sh` can be used to run `spdk/autorun.sh` on a Fedora 26 vagrant machine. Note that the `spdk/scripts/vagrant/autorun-spdk.conf` should be copied to `~/autorun-spdk.conf` before starting your tests.
|
||||
After running vm_setup.sh the `run-autorun.sh` can be used to run `spdk/autorun.sh` on a Fedora vagrant machine. Note that the `spdk/scripts/vagrant/autorun-spdk.conf` should be copied to `~/autorun-spdk.conf` before starting your tests.
|
||||
|
||||
```
|
||||
$ cp spdk/scripts/vagrant/autorun-spdk.conf ~/
|
||||
|
5
scripts/vagrant/Vagrantfile
vendored
5
scripts/vagrant/Vagrantfile
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
|
||||
# Pick the right distro and bootstrap, default is ubuntu1604
|
||||
# Pick the right distro and bootstrap, default is fedora26
|
||||
distro = ( ENV['SPDK_VAGRANT_DISTRO'] || "fedora26")
|
||||
case distro
|
||||
when "centos7"
|
||||
@ -27,6 +27,9 @@ Vagrant.configure(2) do |config|
|
||||
when "fedora27"
|
||||
#See: https://app.vagrantup.com/generic/boxes/fedora27
|
||||
config.vm.box = "generic/fedora27"
|
||||
when "fedora28"
|
||||
#See: https://app.vagrantup.com/generic/boxes/fedora28
|
||||
config.vm.box = "generic/fedora28"
|
||||
when "freebsd11"
|
||||
#See: https://app.vagrantup.com/generic/boxes/freebsd11
|
||||
config.vm.box = "generic/freebsd11"
|
||||
|
@ -122,6 +122,9 @@ case "$SPDK_VAGRANT_DISTRO" in
|
||||
fedora27)
|
||||
export SPDK_VAGRANT_DISTRO
|
||||
;;
|
||||
fedora28)
|
||||
export SPDK_VAGRANT_DISTRO
|
||||
;;
|
||||
freebsd11)
|
||||
export SPDK_VAGRANT_DISTRO
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user