Change-Id: If730d42fb2f798f94ad4df5ce1bf848277b3da70
Signed-off-by: Patrick Laurin <plaurin@inocybe.com>
$ vagrant status
Current machine states:
$ vagrant status
Current machine states:
-centos not created (virtualbox)
+fedora not created (virtualbox)
ubuntu not created (virtualbox)
```
ubuntu not created (virtualbox)
```
$ vagrant up <name of box>
```
$ vagrant up <name of box>
```
-For example, to start the CentOS tools VM:
+For example, to start the Fedora tools VM:
```
#### Connecting to boxes
```
#### Connecting to boxes
$ vagrant ssh <name of box>
```
$ vagrant ssh <name of box>
```
-For example, to connect to the CentOS tools VM:
+For example, to connect to the Fedora tools VM:
-$ vagrant ssh centos
-[vagrant@tools-centos ~]$
+$ vagrant ssh fedora
+[vagrant@tools-fedora ~]$
```
#### Cleaning up boxes
```
#### Cleaning up boxes
# Initial Vagrant configuration
Vagrant.configure(2) do |config|
# Initial Vagrant configuration
Vagrant.configure(2) do |config|
- # --------------------------------
- # Shared VirtualBox configuration
- # --------------------------------
+ # ---------------------
+ # Shared configurations
+ # ---------------------
+
+ # Enables SSH X11 forwarding
+ config.ssh.forward_x11 = "true"
+
+ # VirtualBox configuration
config.vm.provider "virtualbox" do |vb|
# Set RAM in MB
vb.memory = $MEMORY
config.vm.provider "virtualbox" do |vb|
# Set RAM in MB
vb.memory = $MEMORY
- # --------------------------
- # Configuration for CentOS 7
- # --------------------------
- config.vm.define "centos" do |centos|
- # Build Vagrant box based on CentOS 7
- centos.vm.box = "chef/centos-7.0"
+ # ---------------------------
+ # Configuration for Fedora 20
+ # ---------------------------
+
+ # Multi-machine definition for Fedora
+ config.vm.define "fedora" do |fedora|
+ # Build Vagrant box based on Fedora 20
+ fedora.vm.box = "chef/fedora-20"
- centos.vm.hostname = "tools-centos"
- # Enable X11 SSH forwarding for GUI applications
- config.ssh.forward_x11 = "true"
+ fedora.vm.hostname = "tools-fedora"
+ # Use PTY for provisionning
+ fedora.ssh.pty = "True"
# Use shell provisioner to install additional packages
# Use shell provisioner to install additional packages
- centos.vm.provision "shell", path: "scripts/centos.sh"
+ fedora.vm.provision "shell", path: "scripts/fedora.sh"
# Install OpenDaylight using its Puppet module
# Install OpenDaylight using its Puppet module
- centos.vm.provision "puppet" do |puppet|
+ fedora.vm.provision "puppet" do |puppet|
puppet.module_path = ["modules"]
puppet.manifest_file = "odl_install.pp"
end
# VirtualBox configuration specific to this box
puppet.module_path = ["modules"]
puppet.manifest_file = "odl_install.pp"
end
# VirtualBox configuration specific to this box
- centos.vm.provider "virtualbox" do |vb|
- # Name of VirtualBox guest machine
- vb.name = "Integration Tools: CentOS-7"
+ fedora.vm.provider "virtualbox" do |vb|
+ # Name for guest machine
+ vb.name = "Integration Tools: Fedora 20"
end
end
# ----------------------------------
# Configuration for Ubuntu 14.04 LTS
# ----------------------------------
end
end
# ----------------------------------
# Configuration for Ubuntu 14.04 LTS
# ----------------------------------
+
+ # Multi-machine definition for Ubuntu
config.vm.define "ubuntu" do |ubuntu|
# Build Vagrant box based on Ubuntu 14.04
ubuntu.vm.box = "ubuntu/trusty64"
# Set hostname of box
ubuntu.vm.hostname = "tools-ubuntu"
config.vm.define "ubuntu" do |ubuntu|
# Build Vagrant box based on Ubuntu 14.04
ubuntu.vm.box = "ubuntu/trusty64"
# Set hostname of box
ubuntu.vm.hostname = "tools-ubuntu"
- # Enable X11 SSH forwarding for GUI applications
- ubuntu.ssh.forward_x11 = "true"
# Use shell provisioner to install additional packages
# Use shell provisioner to install additional packages
- #ubuntu.vm.provision "shell", path: "scripts/ubuntu.sh"
+ ubuntu.vm.provision "shell", path: "scripts/ubuntu.sh"
# VirtualBox configuration specific to this box
ubuntu.vm.provider "virtualbox" do |vb|
# VirtualBox configuration specific to this box
ubuntu.vm.provider "virtualbox" do |vb|
- # Name of VirtualBox guest machine
- vb.name = "Integration Tools: Ubuntu-14.04"
+ # Name for guest machine
+ vb.name = "Integration Tools: Ubuntu 14.04"
-# External shell script for the vagrant shell provisioner
-# This applies for the CentOS VM
+#!/usr/bin/env bash
+
+# --------------------------------------------
+# External shell provisioner script for Fedora
+# --------------------------------------------
# Add EPEL repo for access to Puppet, git-review, etc.
sudo yum install -y epel-release
# Add EPEL repo for access to Puppet, git-review, etc.
sudo yum install -y epel-release
# Install other packages (must be done after EPEL repo add)
sudo yum install -y \
puppet \
# Install other packages (must be done after EPEL repo add)
sudo yum install -y \
puppet \
- git \
- git-review \
- vim \
- nano
-# External shell script for the vagrant shell provisioner
-# This applies for the Ubuntu VM
+# --------------------------------------------
+# External shell provisioner script for Ubuntu
+# --------------------------------------------
+
+# Install initial softwares:
+apt-get update
+apt-get install -y \
+ openjdk-7-jre \
+ openjdk-7-jdk \
+ git
+
+# Install Maven
+wget -nv http://apache.sunsite.ualberta.ca/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz
+mkdir -p /usr/local/apache-maven
+tar -C /usr/local/apache-maven/ -xzf apache-maven-3.3.1-bin.tar.gz
+echo "export PATH=$PATH:/usr/local/apache-maven/apache-maven-3.3.1/bin" >> /home/vagrant/.bash_profile
+echo "MAVEN_OPTS=\"-Xms256m -Xmx512m\"" >> /home/vagrant/.bash_profile