What I had forgot to include in a previous blog post was how I managed to successfully setup poudriere on atlas for use with remote package serving to ichigo. I initially followed a Vermaden blog post Simple FreeBSD poudriere harvester guide which helped me get the majority of the setup configured, adjusted. I attempted to leave a comment on the blog post but for whatever reason it failed, so I am going to provide that here as well. The process is not difficult but there is at least one detail left out which could be discernable to some but it took a little for me to discover.
Vermaden does a very good job for the community to provide insights and guides and is part why I chose to write my own blog as well, beginning years ago. It became obvious to me that writing about my experiences on FreeBSD would help me to remember and help others to find their way more easily. I would recommend to any FreeBSD user to do the same for at least the same or similar reasons, it may seem a no-brainer.
The essentials of Vermaden's blog, what I needed I highlighted:
The /boot/loader.conf file. # cat /boot/loader.conf security.bsd.allow_destructive_dtrace=0 kern.geom.label.disk_ident.enable=0 kern.geom.label.gptid.enable=0 cryptodev_load=YES zfs_load=YES The /etc/rc.conf file. # cat /etc/rc.conf clear_tmp_enable=YES syslogd_flags="-ss" sendmail_enable=NONE hostname=fbsdpr ifconfig_em0="inet 10.0.10.123/24" defaultrouter="10.0.10.1"sshd_enable=YES dumpdev=AUTO zfs_enable=YESnginx_enable=YES memcached_enable=YES memcached_flags="-l localhost -m 8192" The /etc/sysctl.conf file. # cat /etc/sysctl.conf vfs.zfs.min_auto_ashift=12
Those lines will permit a web browser such as firefox to view the progress and results of the current poudriere bulk build, and permit
Now we can add needed packages.
# env ASSUME_ALWAYS_YES=yes \
pkg install -y \
poudriere \
portmaster \
screen \
tmux \
zsh \
beadm \
lsblk \
nginx \
git-lite \
htop \
tree \
ccache-memcached \
memcached \
groffAlthough when I read the blog post I believe I already had those installed and some other things he mentions.
The most important step that I needed was for the pkg signing which is a series of steps, each command as root:
mkdir -p /usr/local/etc/ssl/keys /usr/local/etc/ssl/certs /usr/ports/distfiles chmod 0600 /usr/local/etc/ssl/keys openssl genrsa -out /usr/local/etc/ssl/keys/poudriere.key 4096 openssl rsa -in /usr/local/etc/ssl/keys/poudriere.key -pubout -out /usr/local/etc/ssl/certs/poudriere.cert
I wasn't sure that mkdir would create multiple paths in one command, and I already had
Since I already had poudriere running previously for use on the same machine, a poudriere.conf already existed. I edited the file to be sure to add and revise as needed the lines he provided:
ZPOOL=zroot BASEFS=/usr/local/poudriere ZROOTFS=/dev/null# FREEBSD_HOST=ftp://ftp.freebsd.org POUDRIERE_DATA=/usr/local/poudriere/data CHECK_CHANGED_OPTIONS=verbose CHECK_CHANGED_DEPS=yesPKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key URL_BASE=http://172.16.0.12 USE_TMPFS=all TMPFS_LIMIT=5 MAX_MEMORY=4 MAX_FILES=2048 DISTFILES_CACHE=/usr/ports/distfiles KEEP_OLD_PACKAGES=yes KEEP_OLD_PACKAGES_COUNT=2 CHECK_CHANGED_OPTIONS=verbose CHECK_CHANGED_DEPS=yes CCACHE_DIR=/var/cache/ ccache RESTRICT_NETWORKING=yes
Since I use the same ports tree for the poudriere machine and also for poudriere, I did not create a seperate ports tree for it. I also have the
I setup nginx as described in Vermaden's blog post, possibly from a previous nginx poudriere progress view attempt, only needed to check it was accurate. I have also had ccache setup for ages as well, so did not need to look at that much either.
One of the last steps in this whole process is to define the repos. I had already setup poudriere.conf in
poudriere: {
url : file:///usr/local/poudriere/data/packages/14amd64-default,
signature_type: "pubkey",
pubkey: "/usr/local/etc/ssl/certs/poudriere.cert",
enabled : yes,
priority : 10
}
On the client machine, I needed a new pkg repo configuration file.
atlas: {
url: "http://172.16.0.12/packages/14amd64-default",
signature_type: "pubkey",
pubkey: "/usr/local/etc/ssl/certs/poudriere.cert",
enabled: yes,
priority: 100
}
Since at the time that I originally followed the instructions I missed placing a cert file on my client machine, this setup failed inexplicably. I used
No comments:
Post a Comment