Revision history [back]

click to hide/show revision 1
initial version

packstack --allinone vagrant setup - setting root password

I'm trying to setup packstack --allinone from a vagrant provision shell script, but the script prompts for a password:

[vagrant@localhost ~]$ packstack --allinone 
Welcome to Installer setup utility

Installing: Clean Up...                
[ DONE ] Setting up ssh keys...root@10.0.2.15's password:

How can I set the root password from the script? I've tried the following, but this does not work:

echo 'vagrant\n' | packstack --allinone

My full Vagrantfile is below:

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
set -e
set -x

sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm 
sudo yum install -y openstack-packstack 
echo 'vagrant\n' | packstack --allinone 
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "centos64"   
  config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box"

  config.vm.provider :virtualbox do |vb|
     vb.customize ["modifyvm", :id, "--memory", "5120"]
  end 
  config.vm.provision "shell", inline: $script 
end

packstack --allinone vagrant setup - setting root password

I'm trying to setup packstack --allinone from a vagrant provision shell script, but the script prompts for a password:

[vagrant@localhost ~]$ packstack --allinone 
Welcome to Installer setup utility

Installing: Clean Up...                
[ DONE ] Setting up ssh keys...root@10.0.2.15's password:

How can I set the root password from the script? I've tried the following, but this does not work:

echo 'vagrant\n' | packstack --allinone

My full Vagrantfile is below:

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version.  VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
set -e
set -x

sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm 
sudo yum install -y openstack-packstack 
echo 'vagrant\n' | packstack --allinone 
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "centos64"   
  config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box"

  config.vm.provider :virtualbox do |vb|
     vb.customize ["modifyvm", :id, "--memory", "5120"]
  end 
  config.vm.provision "shell", inline: $script 
end

packstack --allinone vagrant setup - setting : how to pass in root passwordpassword?

I'm trying to setup packstack --allinone from a vagrant provision shell script, but the script prompts for a password:

[vagrant@localhost ~]$ packstack --allinone 
Welcome to Installer setup utility

Installing: Clean Up...                
[ DONE ] Setting up ssh keys...root@10.0.2.15's password:

How can I set the root password from the script? I've tried the following, but this does not work:

echo 'vagrant\n' | packstack --allinone

My full Vagrantfile is below:

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. 
VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
set -e
set -x

sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm 
sudo yum install -y openstack-packstack 
echo 'vagrant\n' | packstack --allinone 
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "centos64"   
  config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box"

  config.vm.provider :virtualbox do |vb|
     vb.customize ["modifyvm", :id, "--memory", "5120"]
  end 
  config.vm.provision "shell", inline: $script 
end