Creating the image (disk.raw)
raw
image
aws
Creating the image (disk.raw)
TL;DR:
Login to an existing FreeBSD system and run:
fetch -qo - https://raw.githubusercontent.com/fabrik-red/images/master/fabrik.sh | sh
or
curl -sL https://raw.githubusercontent.com/fabrik-red/images/master/fabrik.sh | sh
The fastest way of doing this (less than 1 hour) is to use AWS and chose the c4.8xlarge instance, at the moment of writhing this, is an instance with 36 vCPU / 60 RAM, the important thing to check for, is the amount of cores not really the memory. After finishing building, stop or terminate the build instance, mainly because is a very expensive instance and in best scenario you just want to do all this in less than 1 hour.
buildworld & buildkernel within a c4.8xlarge can be done in less than 7min.
Creating the image within AWS
Boot using an existing FreeBSD AMI
Tip, search for Colin Percival AMI’s
The idea is to have a working FreeBSD AMI up and running the one will be just used for creating the new AMI.
To create, upload the custom image is recommended to do it in US East (N. Virginia), for now, seems to be the only region where custom AMI’s could be uploaded, once you have tested your image and are happy with it, you can copy it to other AWS zones.
fabrik.sh
Login to your FreeBSD server (AWS, VirtualBox, etc) and fetch the fabrik.sh script:
fetch --no-verify-peer https://rawgit.com/fabrik-red/images/master/fabrik.sh -o /fabrik.sh
or run directly by using:
curl -sL https://raw.githubusercontent.com/fabrik-red/images/master/fabrik-aws.sh | sh
Run the script, preferably under a tmux/screen session just in case, since it could take some minutes, hours to finish.
sh /fabrik.sh
The script behind scenes will update the sources, build the world,
kernel and custom world for the base jails, once done it will create a
disk.raw located in
/fabrik/disk.raw