User Tools

Site Tools


automation:vagrant

This is an old revision of the document!


JUNIPER VAGRANT CLOUD:

dnf install Git
sudo dnf -y install vagrant 
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -P /etc/yum.repos.d
dnf update 
dnf install @development-tools
dnf install kernel-devel kernel-headers dkms qt5-qtx11extras  elfutils-libelf-devel zlib-deve
dnf install VirtualBox-5.2   ## Important, doesn't work with 6 yet
usermod -a -G vboxusers jaime
dnf install ansible
pip install --upgrade pip
pip3 install junos-eznc 
pip3 install jxmlease
ansible-galaxy install   / ansible-galaxy install Juniper.junos -c
dnf install python3-lxml
git clone https://github.com/grigorenkoae/vqfx10k-vagrant.git
cd [to directory]

Increase config.vm.boot_timeout value in Vagrantfile.

config.vm.provider :virtualbox do |vb|
  v.gui = true
end

https://github.com/Juniper/ansible-junos-stdlib/issues/412
https://github.com/Juniper/vqfx10k-vagrant/issues/5
This is to force ansible to use python3.7. If we don't do it ansible will error with messages like : ImportError: No module named plugins.action.normal

cat > pb.conf.all.commit.yaml
  - Juniper.junos
vars:
  ansible_python_interpreter: "/usr/bin/python3.7"

https://github.com/Juniper/vqfx10k-vagrant/issues/5

 vagrant up --provider=virtualbox    # delete .vagrant if having issues with running it under normal user (not root)
 vagrant destroy 
 ls host_vars/
 vagrant ssh vqfx1
 
 

Other commands:

vagrant up --provider=virtualbox--debug
vagrant halt
vagrant up --no-provision
vagrant destroy
vboxmanage list runningvms

—-

ADD LINUX BOX:

vagrant box add centos/7
vagrant box list
automation/vagrant.1571755008.txt.gz · Last modified: (external edit)