Add ODL Beryllium QEMU Vagrant base box Packer def 40/35340/2
authorDaniel Farrell <dfarrell@redhat.com>
Tue, 23 Feb 2016 23:43:22 +0000 (18:43 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 24 Feb 2016 16:05:51 +0000 (16:05 +0000)
Uses the Packer QEMU builder to define a CentOS 7.2.1511 Minimal box
provisioned by the opendaylight-ansible Ansible role using OpenDaylight
Beryllium 4.0.0.

Change-Id: Ia9d051449923d5d6b82aa7126412b3523395891d
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
packer/centos.json
packer/config_ansible.sh
packer/packer_vars.json

index cd2f42069b69fc86a5578e6e8915725e7f408beb..bfdac91c498e9097c0ea0ea1756a37008c6641b2 100644 (file)
@@ -5,6 +5,28 @@
     "docker_name": null
   },
   "builders": [
+    {
+      "type": "qemu",
+      "iso_urls":
+        [
+          "http://mirrors.rit.edu/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
+          "http://mirrors.usc.edu/pub/linux/distributions/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
+          "http://centos.eecs.wsu.edu/7.2.1511/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
+          "http://mirror.lug.udel.edu/pub/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso",
+          "http://mirror.cc.columbia.edu/pub/linux/centos/7.2.1511/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso"
+        ],
+      "iso_checksum": "f90e4d28fa377669b2db16cbcb451fcb9a89d2460e3645993e30e137ac37d284",
+      "iso_checksum_type": "sha256",
+      "ssh_username": "vagrant",
+      "ssh_password": "vagrant",
+      "ssh_wait_timeout": "20m",
+      "shutdown_command": "sudo shutdown -P now",
+      "http_directory": ".",
+      "boot_command":
+        [
+        "<tab>text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos_kickstart.cfg<enter>"
+        ]
+    },
     {
       "type": "virtualbox-iso",
       "guest_os_type": "RedHat_64",
     }
   ],
   "provisioners": [
+    {
+      "type": "shell",
+      "scripts":
+        [
+          "config_vagrant.sh",
+          "config_ansible.sh"
+        ],
+      "only":
+        [
+          "qemu"
+        ]
+    },
     {
       "type": "shell",
       "scripts":
     {
       "type": "vagrant",
       "compression_level": "9",
-      "output": "opendaylight-{{ user `box_version` }}-centos-1503.box",
+      "output": "opendaylight-{{ user `box_version` }}-centos-7.2.1511-libvirt.box",
+      "only": ["qemu"]
+    },
+    {
+      "type": "vagrant",
+      "compression_level": "9",
+      "output": "opendaylight-{{ user `box_version` }}-centos-1503-virtualbox.box",
       "only": ["virtualbox-iso"]
     },
     {
index 20796323851e9aff45eae34bd8982cd0520b8169..a8d5f3578c137f669e8809c8f84e0784436ef1ba 100644 (file)
@@ -10,8 +10,9 @@ set -x
 sudo yum install -y epel-release
 
 # Install Ansible, required for Packer's ansible-local provisioner
+# Recent versions of Ansible require ansible-playbook
 # Git is required by the ansible-galaxy tool when installing roles
-sudo yum install -y ansible git
+sudo yum install -y ansible ansible-playbook git
 
 # Install the latest release of ODL's Ansible role from Ansible Galaxy
 # The `ansible-galaxy` tool was installed by Ansible's RPM
index 8a5fa2bf65c082ce8772a6d92b40aaef5ba27a2c..bd8a8d6b7e77c984fe87f0fc54eb6c017f0f54f0 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "box_version": "3.0.0",
-  "docker_version": "3.0.0",
+  "box_version": "4.0.0",
+  "docker_version": "4.0.0",
   "docker_name": "opendaylight/odl"
 }