Difference between revisions of "Howto build VyOS 1.2 ISO image and VMWare .OVF"

From VyOS Wiki
Jump to: navigation, search
(Executive Summary)
Line 1: Line 1:
Please Note This is a work in progress. Expect to be completed by 3 July 2017
 
 
 
== Executive Summary ==
 
== Executive Summary ==
  
This HowTo describes how to build VyOS 1.2 from source.  
+
This HowTo describes how to build VyOS 1.2 from source. It assumes you are familiar with installing Linux and are comfortable working in a Unix shell/command line. The HowTo is based upon the readme file from the VyOS github site and adds some details and other observations which might not be that obvious.
 
 
I am a long time fan of VyOS. I was an early adopter of Vyatta. I have been stymied by the current VyOS 1.1.x builds specifically that it has been build on Debian 6, which has limited my ability to deploy it as widely as I would like. I started looking at VyOS 1.2. Building VyOS 1.2 has a lot of little "bits" and while these are documented in the various readme files I did not find the process as easy and streamlined as possible. so I created this document.
 
 
 
This HowTo assumes you are familiar with installing Linux and are comfortable working in a command line.
 
  
=== 20,000 Foot Overview ===
+
== Step 1: Create Build Machine Setup ==
  
# Create VyOS build machine
+
For my testing I created a Debian 8 "jesse" virtual machine for building VyOS 1.2. You could use VMWare Workstation, VMWare Fusion, Virtual Box, HyperV or similar. For my testing I used an ESXi server in my lab environment.
# Download and install prerequisite software
 
# Build ISO image
 
# Build qemu image
 
# Build vmware image
 
 
 
== Create and Basic Build Machine Setup ==
 
  
 
# Download Debian 8 "jesse" (https://www.debian.org/releases/jessie/)
 
# Download Debian 8 "jesse" (https://www.debian.org/releases/jessie/)
 
# Install Debian either on a dedicated machine or as a virtual machines.
 
# Install Debian either on a dedicated machine or as a virtual machines.
  
Once the build machine is created install sudo, open-vm-tools (if running in a VMWare virtual machine, which is not strictly necessary and it makes life a bit easier) and your preferred text editor.
+
<br>
'''Aside:''' There are two types of Unix heads in the world...those that use vi and those that use emacs. I am in the latter camp. To quote my college friend Steph Baily, "One should know vi well enough to compile and run emacs."
+
----
 +
'''Note:''' Install Gnome, KDE or your favorite windowing system. Most of the build process can be done via the command line. However, troubleshooting the qemu build process requires vncview, so it is recommended that you install a windowing system when you install Debian. I think I used Cinnamon.
 +
----
 +
<br>
  
'''NOTE:''' ''The following commands should be run as root.''
+
Once Debian was installed I logged and ran the following commands as root:
  
 
  apt-get install sudo
 
  apt-get install sudo
 
  apt-get install open-vm-tools
 
  apt-get install open-vm-tools
 
  apt-get install emacs
 
  apt-get install emacs
 +
 +
=== Comments ===
 +
 +
* sudo is not strictly necessary, but is useful.
 +
* open-vm-tools was needed for running my build machine under ESXi.
 +
* emacs any text editor will do. I think nano is installed by default with Debian. Install your editor of choice.
 +
 +
At this point you should have a pretty clean install of Debian. If you are running a virtual machine and your environment allows for snapshooting now might be a good time to take a snapshot in case you make a mistake and need to revert.
  
 
== Install Required Software ==
 
== Install Required Software ==
  
When I was going through the process of building VyOS 1.2 I discovered that there are a lot of little "bits" of software needed to compile and build the ISO, qemu and VMWare files. This is covered in the readme file associated with the VyOS 1.2 source, but many details were not so easy to follow, so I thought I would create this doc.
+
In addition to all the "standard" tools required to build VyOS there are a few others which are required to build VyOS 1.2:
  
 +
* Packer
 +
* VMWare open-vmdk
 +
* VMWare ovftool
 +
 +
First install the git and all the other linux tools needed:
  
 
  sudo apt-get install git autoconf automake dpkg-dev syslinux genisoimage qemu jq libz-dev zip python3 live-build pbuilder devscripts python3-pystache
 
  sudo apt-get install git autoconf automake dpkg-dev syslinux genisoimage qemu jq libz-dev zip python3 live-build pbuilder devscripts python3-pystache
  
 
=== Download & Install Packer ===
 
=== Download & Install Packer ===
 +
 +
Never heard of Packer before, neither had I...it is a pretty cool tool. You can download it here form https://www.packer.io/
 +
 +
* Transfer .zip to your build machine
 +
* unzip
 +
* copy to /usr/local/bin
 +
 +
 +
  
 
=== Download & Compile VMWare open-vmdk ===
 
=== Download & Compile VMWare open-vmdk ===

Revision as of 15:47, 30 June 2017

Executive Summary

This HowTo describes how to build VyOS 1.2 from source. It assumes you are familiar with installing Linux and are comfortable working in a Unix shell/command line. The HowTo is based upon the readme file from the VyOS github site and adds some details and other observations which might not be that obvious.

Step 1: Create Build Machine Setup

For my testing I created a Debian 8 "jesse" virtual machine for building VyOS 1.2. You could use VMWare Workstation, VMWare Fusion, Virtual Box, HyperV or similar. For my testing I used an ESXi server in my lab environment.

  1. Download Debian 8 "jesse" (https://www.debian.org/releases/jessie/)
  2. Install Debian either on a dedicated machine or as a virtual machines.



Note: Install Gnome, KDE or your favorite windowing system. Most of the build process can be done via the command line. However, troubleshooting the qemu build process requires vncview, so it is recommended that you install a windowing system when you install Debian. I think I used Cinnamon.



Once Debian was installed I logged and ran the following commands as root:

apt-get install sudo
apt-get install open-vm-tools
apt-get install emacs

Comments

  • sudo is not strictly necessary, but is useful.
  • open-vm-tools was needed for running my build machine under ESXi.
  • emacs any text editor will do. I think nano is installed by default with Debian. Install your editor of choice.

At this point you should have a pretty clean install of Debian. If you are running a virtual machine and your environment allows for snapshooting now might be a good time to take a snapshot in case you make a mistake and need to revert.

Install Required Software

In addition to all the "standard" tools required to build VyOS there are a few others which are required to build VyOS 1.2:

  • Packer
  • VMWare open-vmdk
  • VMWare ovftool

First install the git and all the other linux tools needed:

sudo apt-get install git autoconf automake dpkg-dev syslinux genisoimage qemu jq libz-dev zip python3 live-build pbuilder devscripts python3-pystache

Download & Install Packer

Never heard of Packer before, neither had I...it is a pretty cool tool. You can download it here form https://www.packer.io/

  • Transfer .zip to your build machine
  • unzip
  • copy to /usr/local/bin



Download & Compile VMWare open-vmdk

Download & Install VMWare ovftool

Download VyOS Source

Generate Private Key

Build VyOS