X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=packer%2FREADME.md;h=874730572b9dda63aaf1091b817e0bcfaef7e2c0;hb=9a51086452eaf7ee39c485246c7bcc4a4481efae;hp=267d9aca1ba033a6c9a2c3bc0a4e7c8af245d6e8;hpb=8ac0f088f6d30ee030f1ef6fe768da2f242c5046;p=osm%2Fdevops.git diff --git a/packer/README.md b/packer/README.md index 267d9aca..87473057 100644 --- a/packer/README.md +++ b/packer/README.md @@ -1,35 +1,31 @@ # Creation of standard VM images with Packer -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ## Reference These Packer templates are derived from the templates for building Vagrant boxes for various OS produced by the [Bento Project](https://github.com/chef/bento), produced under Apache 2 license. +## Pre-requirements + +- Hypervisor installed to generate the required type of boxes (e.g. VirtualBox, VMware, Parallels, etc.) +- Packer >=1.6.5 +- Optional: + - Vagrant >=2.2 + - An Openstack cloud available. + ## How to build images from Packer templates Example 1: How to build an OSM box just for the VirtualBox provider: ```bash cd packer_templates/osm -packer build -only=virtualbox-iso osm-7.0.1-amd64.json +packer build -only=virtualbox-iso osm-8.0.4-amd64.json ``` Example 2: How to build an OSM VM with the OpenStack provider: ```bash source openrc.sh # This is only needed the first time -jq 'del(."post-processors")' osm-7.0.1-amd64.json > tmp.json +jq 'del(."post-processors")' osm-8.0.4-amd64.json > tmp.json packer build -only=openstack tmp.json rm tmp.json ``` @@ -44,7 +40,7 @@ As it can be seen, this type of build needs some additional details and commands 1. Import the local box into Packer: ```bash cd ../../builds - vagrant box add --name osm/osm-rel7 osm-7.0.1.virtualbox.box + vagrant box add --name osm/osm-rel8 osm-8.0.4.virtualbox.box ``` 2. Use the example at `vagrant_tests` to test it: ```bash @@ -55,7 +51,7 @@ As it can be seen, this type of build needs some additional details and commands 3. In case the local image is no longer needed, it can be removed by: ```bash vagrant destroy - vagrant box remove osm/osm-rel7 + vagrant box remove osm/osm-rel8 ``` ## How to upload boxes to Vagrant Cloud