
If ! File.exist?("dbserver#/db_install.1. I added additional virtual disks because I wanted to separate data file destination from fast recovery area destination. Vagrant ssh dbserver1 Than you can switch to user oracle ( password = welcome1 ) or root (default password for vagrant boxes vagrant) su - oracle or directly connect with ssh ssh -p 2222 -i /home/user/.vagrant.d/insecure_private_key IdentityFile /home/user/.vagrant.d/insecure_private_key You should be able to reach your guest server without password with user vagrant Vagrant ssh-config The important lines from the output are: The Vagrant box comes already with ssh key configuration and – if security does not matter in your demo environment – the easiest way to configure ssh connection to your guest nodes is to use the same ssh key for all created virtual hosts.Ĭ_key = false # Use the same insecure key provided from box for each machine After bringing up the virtual servers you can display the ssh settings: Vagrant plugin install vagrant-hostmanager The corresponding part in the Vagrantfile will look like this:Ĭ_private_ip = false # include private IPs of your VM'sĬonfig.vm.network "private_network", ip: "192.168.56.31" I have chosen a private network for the virtual servers and use vagrant hostmanager plugin to take care of the /etc/hosts files on all guest machines (and optionally your localhost) => dbserver1: Importing base box 'boxcutter/centos72'. => dbserver1: Successfully added box 'boxcutter/centos72' (v2.0.21) for 'virtualbox'! => dbserver1: Adding box 'boxcutter/centos72' (v2.0.21) for provider: virtualbox => dbserver1: Loading metadata for box 'boxcutter/centos72' => dbserver1: Box 'boxcutter/centos72' could not be found. I used a box with CentOS 7.2 which you can find among other vagrant boxes here Ĭonfig.vm.box = "boxcutter/centos72" If you start vagrant up the first time it will download the vagrant boxīringing machine 'dbserver1' up with 'virtualbox' provider.īringing machine 'dbserver2' up with 'virtualbox' provider.

When this has been finished Vagrant calls Ansible for provisioning which configures the linux servers, installs the Oracle software and creates your databases on the target servers in parallel.Īll the configuration for Vagrant is in one file called Vagrantfile Vagrant up starts Vagrant which will setup two virtual servers using a sample box with CentOS 7.2. Than you can just start to build your Test Infrastructure with the simple call vagrant upĬleanup is also easy- stop the vagrant machines and deletes all traces: If you have prepared your environment with Ansible, Vagrant and Oracle Virtual Box installed – and provided the Oracle software zip files – Remember all the files for this example are available here Last week in the first part of this blog we have seen a short introduction how to setup an Oracle Infrastructure with Vagrant and Ansible.
