scripts/vagrant: allow password authentication
Add password authentication to vagrant for future boxes building functionality Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Iad9c3c4000ac43243900ee6b5396863b9ab820ff Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477062 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
f1539c2820
commit
3d2ee8d1ce
4
scripts/vagrant/Vagrantfile
vendored
4
scripts/vagrant/Vagrantfile
vendored
@ -112,6 +112,10 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
config.ssh.forward_agent = true
|
||||
config.ssh.forward_x11 = true
|
||||
if ENV['VAGRANT_PASSWORD_AUTH'] == "1"
|
||||
config.ssh.username = "vagrant"
|
||||
config.ssh.password = "vagrant"
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||
|
@ -37,6 +37,7 @@ display_help() {
|
||||
echo " --vhost-vm-dir=<path> directory where to put vhost dependencies in VM"
|
||||
echo " --qemu-emulator=<path> directory path with emulator, default: ${SPDK_QEMU_EMULATOR}"
|
||||
echo " --vagrantfiles-dir=<path> directory to put vagrantfile"
|
||||
echo " -u allow password authentication to vagrant box"
|
||||
echo " -r dry-run"
|
||||
echo " -l use a local copy of spdk, don't try to rsync from the host."
|
||||
echo " -d deploy a test vm by provisioning all prerequisites for spdk autotest"
|
||||
@ -75,8 +76,9 @@ NVME_DISKS_NAMESPACES=""
|
||||
NVME_FILE=""
|
||||
NVME_AUTO_CREATE=0
|
||||
VAGRANTFILE_DIR=""
|
||||
VAGRANT_PASSWORD_AUTH=0
|
||||
|
||||
while getopts ":b:n:s:x:p:vcrldh-:" opt; do
|
||||
while getopts ":b:n:s:x:p:u:vcrldh-:" opt; do
|
||||
case "${opt}" in
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
@ -123,6 +125,9 @@ while getopts ":b:n:s:x:p:vcrldh-:" opt; do
|
||||
b)
|
||||
NVME_FILE+="${OPTARG#*=} "
|
||||
;;
|
||||
u)
|
||||
VAGRANT_PASSWORD_AUTH=1
|
||||
;;
|
||||
*)
|
||||
echo " Invalid argument: -$OPTARG" >&2
|
||||
echo " Try: \"$0 -h\"" >&2
|
||||
@ -232,6 +237,7 @@ export DEPLOY_TEST_VM
|
||||
export NVME_DISKS_TYPE
|
||||
export NVME_DISKS_NAMESPACES
|
||||
export NVME_FILE
|
||||
export VAGRANT_PASSWORD_AUTH
|
||||
|
||||
if [ -n "$SPDK_VAGRANT_PROVIDER" ]; then
|
||||
provider="--provider=${SPDK_VAGRANT_PROVIDER}"
|
||||
|
Loading…
Reference in New Issue
Block a user