X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=packer%2FREADME.markdown;h=e31c3231a78414a16a7cca4ab5a046fca6e8b8ca;hb=4c12eab7cc5c4c03bae996a23468faa82baad3a7;hp=8c92cd0a391d770828968b7517624bd5643dce59;hpb=30ca50ddb0481bf6e0d58d5a8a3f09c04667243d;p=integration%2Fpackaging.git diff --git a/packer/README.markdown b/packer/README.markdown index 8c92cd0..e31c323 100644 --- a/packer/README.markdown +++ b/packer/README.markdown @@ -3,7 +3,7 @@ [Packer][1] is a tool for automatically creating VM and container images, configuring them and post-processing them into standard output formats. -We currently build OpenDaylight's Vagrant base box and Docker image via Packer. +We build OpenDaylight's Vagrant base boxes and Docker images via Packer. ## Building @@ -16,19 +16,19 @@ a variable file. For example, to build a LibVirt-based Vagrant base box with ODL Beryllium and CentOS 7.2.1511: ``` -packer build -var-file=vars/opendaylight-4.0.0-centos-7.2.1511.json templates/libvirt.json +packer build -var-file=vars/opendaylight-4.0.0.json -var-file=vars/centos-7.2.1511.json templates/libvirt.json ``` To build the same box with VirtualBox as the virtualization provider: ``` -packer build -var-file=vars/opendaylight-4.0.0-centos-7.2.1511.json templates/virtualbox.json +packer build -var-file=vars/opendaylight-4.0.0.json -var-file=vars/centos-7.2.1511.json templates/virtualbox.json ``` To build a Beryllium SR1 Docker container: ``` -packer build -var-file=vars/opendaylight-4.1.0-centos-7.2.1511.json templates/docker.json +packer build -var-file=vars/opendaylight-4.1.0.json -var-file=vars/centos-7.2.1511.json templates/docker.json ``` Note that LibVirt, VirtualBox and Docker will need to work on your local system @@ -37,14 +37,14 @@ enabling the other. From a high level, the builds: -* Download and verify the CentOS ISO specified in the variables file. -* Boot the ISO and do low-level configuration via a Kickstart template. -* Run a set of shell scripts, listed in the template's shell provisioner +- Download and verify the CentOS ISO specified in the variables file. +- Boot the ISO and do low-level configuration via a Kickstart template. +- Run a set of shell scripts, listed in the template's shell provisioner section, to do any configuration required by the builder (VBox, Docker), other provisioners (Ansible) or post-processors (Vagrant, Docker). -* Install and configure the version of OpenDaylight specified in the variables +- Install and configure the version of OpenDaylight specified in the variables file using the [ansible-opendaylight role][3]. -* Export, compress and package the VM as a Vagrant base box or Docker image. +- Export, compress and package the VM as a Vagrant base box or Docker image. ## Running @@ -107,15 +107,18 @@ end #### Docker Images -OpenDaylight's [official DockerHub account][7] is very out-of-date. The -Integration/Packaging project will eventually take control and update it, -but for now pre-built Docker images can be pulled from [dfarrell07/odl][5], -which is the account of the [Int/Pack PTL][6]. +Up-to-date Docker images can be pulled from [OpenDaylight's DockerHub][5]. -Download an image and start a container with ODL running: +Download the latest image and start a container with ODL running: ``` -$ docker run -ti dfarrell07/odl /opt/opendaylight/bin/karaf +$ docker run -ti opendaylight/odl /opt/opendaylight/bin/karaf +``` + +To run a specific version, include a tag: + +``` +$ docker run -ti opendaylight/odl:4.1.0 /opt/opendaylight/bin/karaf ``` ### Locally Built @@ -197,11 +200,12 @@ to run OpenDaylight as the container's process. $ docker run -ti opendaylight/odl:4.1.0 /opt/opendaylight/bin/karaf ``` - [1]: https://www.packer.io/ + [2]: https://www.packer.io/intro/getting-started/setup.html -[3]: https://github.com/dfarrell07/ansible-opendaylight + +[3]: https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging/ansible-opendaylight.git + [4]: https://atlas.hashicorp.com/opendaylight/boxes/odl -[5]: https://hub.docker.com/r/dfarrell07/odl/tags/ -[6]: https://wiki.opendaylight.org/view/User:Dfarrell07 -[7]: https://hub.docker.com/r/opendaylight/ + +[5]: https://hub.docker.com/r/opendaylight/