Christian Pape 7 years ago
parent
commit
22524a92eb
  1. 11
      gns3-qemu.json
  2. 4
      gns3/create-appliance-file.sh
  3. 3
      gns3/opennms-horizon.gns3a

11
gns3-qemu.json

@ -42,6 +42,13 @@
} }
], ],
"post-processors": [ "post-processors": [
{
"type": "checksum",
"checksum_types": [
"md5"
],
"output": "opennms-horizon/opennms-horizon.qcow2.md5sum"
},
{ {
"type": "compress", "type": "compress",
"output": "opennms-horizon/opennms-horizon.qcow2.gz" "output": "opennms-horizon/opennms-horizon.qcow2.gz"
@ -50,9 +57,9 @@
"type": "shell-local", "type": "shell-local",
"inline": [ "inline": [
"cd opennms-horizon", "cd opennms-horizon",
"mv packer-qemu opennms-horizon.qcow2",
"md5sum opennms-horizon.qcow2.gz > opennms-horizon.qcow2.gz.md5sum", "md5sum opennms-horizon.qcow2.gz > opennms-horizon.qcow2.gz.md5sum",
"../gns3/create-appliance-file.sh {{user `onms-version`}} > opennms-horizon.log",
"rm packer-qemu"
"../gns3/create-appliance-file.sh {{user `onms-version`}} > opennms-horizon.log"
] ]
} }
] ]

4
gns3/create-appliance-file.sh

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
VERSION="$1" VERSION="$1"
MD5SUM="`cat opennms-horizon.qcow2.gz.md5sum | awk '{print $1}'`"
FILESIZE="`wc -c opennms-horizon.qcow2.gz | awk '{print $1}'`"
MD5SUM="`cat opennms-horizon.qcow2.md5sum | awk '{print $1}'`"
FILESIZE="`wc -c opennms-horizon.qcow2 | awk '{print $1}'`"
echo "Creating new opennms-horizon.gns3a appliance file:" echo "Creating new opennms-horizon.gns3a appliance file:"
echo "- OpenNMS version.: $VERSION" echo "- OpenNMS version.: $VERSION"

3
gns3/opennms-horizon.gns3a

@ -6,7 +6,8 @@
"images": [ "images": [
{ {
"md5sum": "${md5sum}", "md5sum": "${md5sum}",
"download_url": "http://opennms.org/opennms-horizon.qcow2",
"direct_download_url": "http://opennms.org/opennms-horizon.qcow2.gz",
"compression": "gzip",
"filename": "opennms-horizon.qcow2", "filename": "opennms-horizon.qcow2",
"version": "${version}", "version": "${version}",
"filesize": ${filesize} "filesize": ${filesize}

Loading…
Cancel
Save