Merge branch 'bullseye' into 'master'

Bullseye

Closes #24

See merge request fablab/labsync!67
This commit is contained in:
jalr 2022-01-04 11:13:27 +00:00
commit 82eb6ca0a7
8 changed files with 29 additions and 26 deletions

View file

@ -74,7 +74,7 @@ security_scanner:
services:
- docker:dind
script:
- scripts/packer.sh debian-buster
- scripts/packer.sh debian-bullseye
- aws --endpoint-url "$AWS_ENDPOINT_URL" s3 cp images/ "s3://$AWS_BUCKET/$CI_COMMIT_REF_SLUG/$CI_JOB_ID/" --recursive --no-progress
artifacts:
paths:

View file

@ -22,7 +22,7 @@ qemu_network = 10.2.2.0
qemu_netmask = 24
qemu_vm_ip = 10.2.2.10
qemu_disk = tmp/qemu-disk.img
qemu_target ?= debian-buster
qemu_target ?= debian-bullseye
qemu_kernel = $(qemu_target).linux
qemu_torrent = $(qemu_target).torrent
qemu_initramfs = $(shell \
@ -35,7 +35,7 @@ fi \
ci_environment=$(shell env | sed -n 's/^\(CI_.*\)=.*/-e \1/p')
.PHONY: default
default: builderimg images/debian-buster.squashfs
default: builderimg images/debian-bullseye.squashfs
.PHONY: clean
clean:
@ -60,7 +60,7 @@ images:
[ ! -d "$@" ] && mkdir "$@"
touch "$@"
images/debian-buster.squashfs: images
images/debian-bullseye.squashfs: images
docker run \
--rm \
-v /var/run/docker.sock:/var/run/docker.sock \
@ -72,9 +72,9 @@ images/debian-buster.squashfs: images
$(ci_environment) \
"$(DOCKER_IMAGE_BUILDER)" \
scripts/packer.sh \
debian-buster
debian-bullseye
images/debian-buster.torrent: images
images/debian-bullseye.torrent: images
docker run \
--rm \
-v "${PWD}:${PWD}" \
@ -82,7 +82,7 @@ images/debian-buster.torrent: images
-e "WEBSEED=$(WEBSEED)" \
"$(DOCKER_IMAGE_BUILDER)" \
scripts/torrent.sh \
debian-buster
debian-bullseye
.PHONY: ansible
ansible:
@ -104,24 +104,24 @@ ansible:
# updates the initramfs
# only used for development
images/debian-buster.initramfs.dev: tmp/initramfs-extracted/debian-buster packer/initramfs/labsync
cp packer/initramfs/labsync tmp/initramfs-extracted/debian-buster/scripts/labsync
(cd tmp/initramfs-extracted/debian-buster && find . | cpio -H newc -o | gzip > $(CWD)/images/debian-buster.initramfs.dev)
images/debian-bullseye.initramfs.dev: tmp/initramfs-extracted/debian-bullseye packer/initramfs/labsync
cp packer/initramfs/labsync tmp/initramfs-extracted/debian-bullseye/scripts/labsync
(cd tmp/initramfs-extracted/debian-bullseye && find . | cpio -H newc -o | gzip > $(CWD)/images/debian-bullseye.initramfs.dev)
tmp:
[ ! -d "$@" ] && mkdir "$@" || true
tmp/initramfs-extracted/debian-buster: images/debian-buster.initramfs
rm -rf tmp/initramfs-extracted/debian-buster
mkdir -p tmp/initramfs-extracted/debian-buster
(cd tmp/initramfs-extracted/debian-buster && zcat "$(CWD)/images/debian-buster.initramfs" | cpio -i)
touch tmp/initramfs-extracted/debian-buster
tmp/initramfs-extracted/debian-bullseye: images/debian-bullseye.initramfs
rm -rf tmp/initramfs-extracted/debian-bullseye
mkdir -p tmp/initramfs-extracted/debian-bullseye
(cd tmp/initramfs-extracted/debian-bullseye && zcat "$(CWD)/images/debian-bullseye.initramfs" | cpio -i)
touch tmp/initramfs-extracted/debian-bullseye
$(qemu_disk): tmp
qemu-img create "$@" 20G
tmp/netboot.tar.gz: tmp
wget -c -O "$@" https://cdn-aws.deb.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/netboot.tar.gz
wget -c -O "$@" https://cdn-aws.deb.debian.org/debian/dists/bullseye/main/installer-amd64/current/images/netboot/netboot.tar.gz
touch "$@"
tmp/tftproot: tmp/netboot.tar.gz

@ -1 +1 @@
Subproject commit 8afe49a2a52bb13bb2a34331e7c9625fb05529bf
Subproject commit 05d9c57336b13028c01c5bfd850431708c934016

View file

@ -1,8 +1,8 @@
---
- name: install python-usb and usbip
- name: install python3-usb and usbip
apt:
name:
- python-usb
- python3-usb
- usbip
state: present

View file

@ -1,7 +1,7 @@
---
- name: install python-apt
- name: install python3-apt
apt:
name: "python-apt"
name: "python3-apt"
state: present
- name: clear sources.list
@ -26,5 +26,5 @@
- name: configure security updates repo
apt_repository:
filename: "{{ ansible_lsb.codename }}-security"
repo: "deb {{ debian_mirror_security }} {{ ansible_lsb.codename }}/updates {{ debian_sections | join(' ') }}"
repo: "deb {{ debian_mirror_security }}/debian-security/ {{ ansible_lsb.codename }}-security {{ debian_sections | join(' ') }}"
state: present

View file

@ -20,7 +20,7 @@ variables:
builders:
- discard: true
image: debian:buster
image: debian:bullseye
type: docker
volumes:
'{{user `images`}}': /tmp/images
@ -65,6 +65,9 @@ provisioners:
- playbook_file: ansible/playbook.yml
type: ansible
user: root
ansible_env_vars:
- "ANSIBLE_SSH_ARGS='-o HostkeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa'"
- "ANSIBLE_PYTHON_INTERPRETER=/usr/bin/python3"
- inline:
- rm /boot && mkdir /boot
type: shell

View file

@ -1,4 +1,4 @@
FROM debian:buster-slim
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get -y install \

View file

@ -1,7 +1,7 @@
label labsync
menu label ^labsync
kernel images/debian-buster.linux
append initrd=images/debian-buster.initramfs.dev boot=labsync labsync_disk=sda labsync_partsize_boot=512 labsync_torrent=http://10.2.2.1/debian-buster.torrent quiet vga=792 ip=10.2.2.10:::255.255.255.0:qemu-host:ens3:off labsync_wait=pause
kernel images/debian-bullseye.linux
append initrd=images/debian-bullseye.initramfs.dev boot=labsync labsync_disk=sda labsync_partsize_boot=512 labsync_torrent=http://10.2.2.1/debian-bullseye.torrent quiet vga=792 ip=10.2.2.10:::255.255.255.0:qemu-host:ens3:off labsync_wait=pause
label install
menu label ^Install