Set up poudriere on mrmanager.

This commit is contained in:
Tom Alexander 2023-05-29 00:13:57 -04:00
parent 354c6b84ab
commit ab0ab17201
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
18 changed files with 282 additions and 50 deletions

View File

@ -0,0 +1,13 @@
os_flavor: "freebsd"
poudriere_builds:
- jail: 13amd64
ports: default
set: framework
version: 13.2-RELEASE
# - jail: current
# ports: default
# set: framework
# version: CURRENT
# revision: af01b4722577903f91acc44f01bdcb8cdb2d65ad
# kernel: CUSTOM
# branch: main

View File

@ -1,2 +1,9 @@
[vm] [vm]
poudriereodo ansible_user=builder ansible_host=10.213.177.12 poudriereodo ansible_user=builder ansible_host=10.213.177.12
poudrieremrmanager ansible_user=root ansible_host=poudriere
#
# Put in ~/.ssh/config
# Host poudriere
# ProxyJump talexander@mrmanager
# HostName 10.215.1.203
#

View File

@ -55,10 +55,12 @@
roles: roles:
- jail_nat_dhcp - jail_nat_dhcp
- hosts: poudriereodo - hosts: poudriereodo:poudrieremrmanager
vars: vars:
ansible_become: True ansible_become: True
roles: roles:
- sudo # for poudboot script
- fstab
- portshaker - portshaker
- poudriere - poudriere

View File

@ -0,0 +1,2 @@
dependencies:
- fstab

View File

@ -84,37 +84,6 @@
state: absent state: absent
when: rc_conf is not defined when: rc_conf is not defined
- name: Add fstab entries
mount:
name: "{{ item.dst }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts }}"
state: present
loop:
- dst: /tmp
src: tmpfs
fstype: tmpfs
opts: rw,mode=777
- dst: /var/run
src: tmpfs
fstype: tmpfs
opts: rw,mode=755
- name: Add fstab entries
when: efi_dev is defined
mount:
name: "{{ item.dst }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts }}"
state: present
loop:
- dst: /boot/efi
src: "{{ efi_dev }}"
fstype: msdosfs
opts: rw
- name: Install scripts - name: Install scripts
copy: copy:
src: "files/{{ item.src }}" src: "files/{{ item.src }}"

View File

@ -0,0 +1,15 @@
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/linux.yaml
when: 'os_flavor == "linux"'
- include_tasks:
file: tasks/peruser.yaml
apply:
become: yes
become_user: "{{ initialize_user }}"
when: users is defined
loop: "{{ users | dict2items | community.general.json_query('[?value.initialize==`true`].key') }}"
loop_control:
loop_var: initialize_user

View File

@ -0,0 +1,31 @@
- name: Add fstab entries
mount:
name: "{{ item.dst }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts }}"
state: present
loop:
- dst: /tmp
src: tmpfs
fstype: tmpfs
opts: rw,mode=777
- dst: /var/run
src: tmpfs
fstype: tmpfs
opts: rw,mode=755
- name: Add fstab entries
when: efi_dev is defined
mount:
name: "{{ item.dst }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts }}"
state: present
loop:
- dst: /boot/efi
src: "{{ efi_dev }}"
fstype: msdosfs
opts: rw

View File

@ -0,0 +1,29 @@
# - name: Build aur packages
# register: buildaur
# become_user: "{{ build_user.name }}"
# command: "aurutils-sync --no-view {{ item }}"
# args:
# creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
# loop:
# - foo
# - name: Update cache
# when: buildaur.changed
# pacman:
# name: []
# state: present
# update_cache: true
# - name: Install packages
# package:
# name:
# - foo
# state: present
# - name: Enable services
# systemd:
# enabled: yes
# name: "{{ item }}"
# daemon_reload: yes
# loop:
# - foo.service

View File

@ -0,0 +1,2 @@
- import_tasks: tasks/common.yaml
# when: foo is defined

View File

@ -0,0 +1,29 @@
- include_role:
name: per_user
# - name: Create directories
# file:
# name: "{{ account_homedir.stdout }}/{{ item }}"
# state: directory
# mode: 0700
# owner: "{{ account_name.stdout }}"
# group: "{{ group_name.stdout }}"
# loop:
# - ".config/foo"
# - name: Copy files
# copy:
# src: "files/{{ item.src }}"
# dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
# mode: 0600
# owner: "{{ account_name.stdout }}"
# group: "{{ group_name.stdout }}"
# loop:
# - src: foo.conf
# dest: .config/foo/foo.conf
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'
- import_tasks: tasks/peruser_linux.yaml
when: 'os_flavor == "linux"'

View File

@ -5,4 +5,5 @@ mirror_base_dir="/var/cache/portshaker"
ports_trees="main" ports_trees="main"
main_ports_tree="/usr/local/portshaker/trees/main" main_ports_tree="/usr/local/portshaker/trees/main"
main_merge_from="freebsd myrepo" # main_merge_from="freebsd myrepo"
main_merge_from="freebsd"

View File

@ -10,15 +10,16 @@
# poudriere. # poudriere.
# #
#ZPOOL=zroot #ZPOOL=zroot
ZPOOL=zroot # ZPOOL=zroot
### NO ZFS ### NO ZFS
# To not use ZFS, define NO_ZFS=yes # To not use ZFS, define NO_ZFS=yes
#NO_ZFS=yes #NO_ZFS=yes
NO_ZFS=yes
# root of the poudriere zfs filesystem, by default /poudriere # root of the poudriere zfs filesystem, by default /poudriere
# ZROOTFS=/poudriere # ZROOTFS=/poudriere
ZROOTFS=/poudriere # ZROOTFS=/poudriere
# the host where to download sets for the jails setup # the host where to download sets for the jails setup
# You can specify here a host or an IP # You can specify here a host or an IP
@ -196,7 +197,7 @@ PARALLEL_JOBS=1
# If set, failed builds will save the WRKDIR to ${POUDRIERE_DATA}/wrkdirs # If set, failed builds will save the WRKDIR to ${POUDRIERE_DATA}/wrkdirs
# SAVE_WRKDIR=yes # SAVE_WRKDIR=yes
# Choose the default format for the workdir packing: could be tar,tgz,tbz,txz # Choose the default format for the workdir packing: could be tar,tgz,tbz,txz,tzst
# default is tbz # default is tbz
# WRKDIR_ARCHIVE_FORMAT=tbz # WRKDIR_ARCHIVE_FORMAT=tbz
WRKDIR_ARCHIVE_FORMAT=txz WRKDIR_ARCHIVE_FORMAT=txz

View File

@ -6,10 +6,8 @@
# #
# Example from bottom of /usr/share/examples/etc/make.conf # Example from bottom of /usr/share/examples/etc/make.conf
.if ${.CURDIR:N*/lang/gcc48*} && ${.CURDIR:N*/lang/gcc10*} && ${.CURDIR:N*/textproc/ripgrep*} && ${.CURDIR:N*/www/firefox*} .if ${.CURDIR:N*/lang/gcc48*} && ${.CURDIR:N*/lang/gcc10*} && ${.CURDIR:N*/textproc/ripgrep*} && ${.CURDIR:N*/www/firefox*}
# Disabling tigerlake optimizations because qemu's TCG does not support avx512 CPUTYPE?=tigerlake
# #CPUTYPE?=x86-64-v3
#CPUTYPE?=tigerlake
CPUTYPE?=x86-64-v3
.endif .endif
OPTIMIZED_CFLAGS=YES OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES BUILD_OPTIMIZED=YES

View File

@ -0,0 +1,131 @@
archivers/unrar
archivers/unzip
archivers/zip
audio/mixertui
databases/sqlite3
deskutils/xdg-desktop-portal
devel/git
devel/gmake
devel/hs-ShellCheck
devel/libccid
devel/libnotify
devel/py-black
devel/py-isort
devel/py-jmespath
devel/py-ptvsd
devel/py-yamllint
devel/pyenv
dns/coredns
editors/emacs
editors/mg
ftp/wget
graphics/drm-kmod
graphics/evince
graphics/gimp
graphics/graphviz
graphics/igt-gpu-tools
graphics/imv
graphics/inkscape
graphics/qt5-wayland
graphics/vulkan-loader
graphics/vulkan-tools
graphics/vulkan-validation-layers
lang/python
lang/rust-nightly
math/gnuplot
multimedia/libva-intel-driver
multimedia/libva-intel-media-driver
multimedia/libva-utils
multimedia/libvdpau-va-gl
multimedia/mpv
multimedia/pwcview
multimedia/v4l_compat
multimedia/v4l-utils
multimedia/vdpauinfo
multimedia/webcamd
multimedia/wf-recorder
net-mgmt/arpscan
net-mgmt/ipcalc
net/google-cloud-sdk
net/rsync
net/tcpdump
net/wireguard
net/wlvncc
ports-mgmt/pkg
ports-mgmt/pkg-provides
ports-mgmt/portshaker
ports-mgmt/poudriere
print/texlive-full
security/doas
security/git-crypt
security/gnupg
security/libfido2
security/openvpn
security/pcsc-tools
security/pinentry
security/pinentry-qt5
security/sops
security/sudo
security/u2f-devd
shells/bash
shells/zsh
sysutils/ansible
sysutils/ansible-sshjail
sysutils/bhyve-firmware
sysutils/btop
sysutils/ddrescue
sysutils/dsbmd
sysutils/exfat-utils
sysutils/flock
sysutils/fusefs-exfat
sysutils/fusefs-simple-mtpfs
sysutils/fusefs-sshfs
sysutils/helm
sysutils/htop
sysutils/kubectl
sysutils/lscpu
sysutils/lsof
sysutils/moreutils
sysutils/ncdu
sysutils/nvme-cli
sysutils/powermon
sysutils/pstree
sysutils/pv
sysutils/rust-coreutils
sysutils/tmux
sysutils/tree
sysutils/zrepl
textproc/aspell
textproc/colordiff
textproc/en-aspell
textproc/gsed
textproc/jq
textproc/kdiff3
textproc/py-pygments
textproc/ripgrep
www/firefox
x11-fm/pcmanfm
x11-fonts/cascadia-code
x11-fonts/noto
x11-fonts/noto-emoji
x11-fonts/noto-extra
x11-fonts/source-sans-ttf
x11-fonts/sourcecodepro-ttf
x11-wm/sway
x11/alacritty
x11/grim
x11/kanshi
x11/mako
x11/slurp
x11/swaybg
x11/swayidle
x11/swaylock
x11/waybar
x11/wev
x11/wlogout
x11/wofi
x11/wtype
x11/xauth
x11/xdg-desktop-portal-wlr
x11/xeyes
x11/xhost

View File

@ -37,7 +37,7 @@
owner: root owner: root
group: wheel group: wheel
loop: loop:
# - /usr/ports/distfiles - /usr/ports/distfiles
- /opt/poudriere/build_configs - /opt/poudriere/build_configs
- /usr/local/poudriere/data/logs/bulk - /usr/local/poudriere/data/logs/bulk
@ -56,15 +56,15 @@
# - src: poudriere_deploy_ed25519 # - src: poudriere_deploy_ed25519
# dest: /usr/local/etc/poudriere.d/poudriere_deploy_ed25519 # dest: /usr/local/etc/poudriere.d/poudriere_deploy_ed25519
# - name: Install Configuration directory - name: Install Configuration directory
# copy: copy:
# src: "files/{{ item.src }}" src: "files/{{ item.src }}"
# dest: "{{ item.dest }}" dest: "{{ item.dest }}"
# owner: root owner: root
# group: wheel group: wheel
# loop: loop:
# - src: poudriere.d - src: poudriere.d
# dest: /usr/local/etc/ dest: /usr/local/etc/
- name: Install scripts - name: Install scripts
copy: copy:

View File

@ -28,6 +28,8 @@ elif [ "$target" = "jail_homeserver_nat_dhcp" ]; then
ansible-playbook -v -i environments/jail playbook.yaml --diff --limit homeserver_nat_dhcp "${@}" ansible-playbook -v -i environments/jail playbook.yaml --diff --limit homeserver_nat_dhcp "${@}"
elif [ "$target" = "vm_poudriereodo" ]; then elif [ "$target" = "vm_poudriereodo" ]; then
ansible-playbook -v -i environments/vm playbook.yaml --diff --limit poudriereodo "${@}" ansible-playbook -v -i environments/vm playbook.yaml --diff --limit poudriereodo "${@}"
elif [ "$target" = "vm_poudrieremrmanager" ]; then
ansible-playbook -v -i environments/vm playbook.yaml --diff --limit poudrieremrmanager "${@}"
elif [ "$target" = "mrmanager" ]; then elif [ "$target" = "mrmanager" ]; then
ansible-playbook -v -i environments/colo playbook.yaml --diff --limit mrmanager "${@}" ansible-playbook -v -i environments/colo playbook.yaml --diff --limit mrmanager "${@}"
elif [ "$target" = "jail_mrmanager_nat_dhcp" ]; then elif [ "$target" = "jail_mrmanager_nat_dhcp" ]; then