Skip to content

Commit

Permalink
Build process documented
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Apr 10, 2018
1 parent 01baf3a commit 062967e
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Installed components via Ansible playbook [win.yml](https://github.com/ruzickap/
* VirtualBox Guest Additions


## How to build images
## How to build images remotely
If you want to build the images yourself you will need passwordless ssh access to the latest Fedora server and locally installed Ansible. The server should not have IPs from this range `192.168.121.0/24` - this is used by Vagrant + libvirt by default.

Then you just need to modify the `REMOTE_IP` and `REMOTE_USER` in `build_remote_ssh.sh` file.
Expand All @@ -114,6 +114,51 @@ It will also test the newly created images by Vagrant.
The whole procedure will take several hours.
You can check the progress by sshing to the server and checking the log files in `/tmp/` directory.

## How to build images locally
If you have necessary software installed+configured on your local machine you can use the following commands to build the images.
Here are the examples with build script `build.sh` and "pure packer way":

* Ubuntu:
```
# Ubuntu Server
./build.sh ubuntu-server-18.04:libvirt
NAME=ubuntu-18.04-server-amd64 UBUNTU_VERSION=18.04 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build ubuntu-server.json
./build.sh ubuntu-server-16.04:libvirt
NAME=ubuntu-16.04-server-amd64 UBUNTU_VERSION=16.04.4 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build ubuntu-server.json
./build.sh ubuntu-server-14.04:libvirt
NAME=ubuntu-14.04-server-amd64 UBUNTU_VERSION=14.04.5 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build ubuntu-server.json
# Ubuntu Desktop
./build.sh ubuntu-desktop-18.04:libvirt
NAME=ubuntu-18.10-desktop-amd64 UBUNTU_VERSION=18.10 UBUNTU_TYPE=desktop UBUNTU_ARCH=amd64 packer build ubuntu-desktop.json
./build.sh ubuntu-desktop-17.10:libvirt
NAME=ubuntu-17.10-desktop-amd64 UBUNTU_VERSION=17.10.1 UBUNTU_TYPE=desktop UBUNTU_ARCH=amd64 packer build ubuntu-desktop.json
# Ubuntu Server - customized
./build.sh my_ubuntu-server-18.04:libvirt
NAME=my_ubuntu-18.04-server-amd64 UBUNTU_VERSION=18.04 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build my_ubuntu-server.json
./build.sh my_ubuntu-server-16.04:libvirt
NAME=my_ubuntu-16.04-server-amd64 UBUNTU_VERSION=16.04.4 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build my_ubuntu-server.json
./build.sh my_ubuntu-server-14.04:libvirt
NAME=my_ubuntu-14.04-server-amd64 UBUNTU_VERSION=14.04.5 UBUNTU_TYPE=server UBUNTU_ARCH=amd64 packer build my_ubuntu-server.json
```

* Windows:
```
# Windows Server
./build.sh windows-2012_r2:libvirt windows-2012_r2:virtualbox
NAME=windows-server-2012-r2-standard-x64-eval WINDOWS_VERSION=2012 VIRTIO_WIN_ISO=/var/tmp/packer/virtio-win.iso ISO_CHECKSUM=6612b5b1f53e845aacdf96e974bb119a3d9b4dcb5b82e65804ab7e534dc7b4d5 ISO_URL=http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO packer build -only=qemu windows.json
./build.sh windows-2016:libvirt windows-2016:virtualbox
NAME=windows-server-2016-standard-x64-eval WINDOWS_VERSION=2016 VIRTIO_WIN_ISO=/var/tmp/packer/virtio-win.iso ISO_CHECKSUM=1ce702a578a3cb1ac3d14873980838590f06d5b7101c5daaccbac9d73f1fb50f ISO_URL=http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO packer build -only=qemu windows.json
# Windows 10
./build.sh windows-10:libvirt windows-10:virtualbox
NAME=windows-10-enterprise-x64-eval WINDOWS_VERSION=10 VIRTIO_WIN_ISO=/var/tmp/packer/virtio-win.iso ISO_CHECKSUM=3d39dd9bd37db5b3c80801ae44003802a9c770a7400a1b33027ca474a1a7c691 ISO_URL=http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso packer build -only=qemu windows.json
# Windows 10 - customized
./build.sh my_windows-10:libvirt my_windows-10:virtualbox
NAME=my_windows-10-enterprise-x64-eval WINDOWS_VERSION=10 VIRTIO_WIN_ISO=/var/tmp/packer/virtio-win.iso ISO_CHECKSUM=3d39dd9bd37db5b3c80801ae44003802a9c770a7400a1b33027ca474a1a7c691 ISO_URL=http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso packer build -only=qemu my_windows.json
```

## Helper scripts
* `build.sh` - build single image specified on command line
Expand Down

0 comments on commit 062967e

Please sign in to comment.