Go to file
Cat /dev/Nulo 46d08afd90 hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
alpine/keys rootfs básico 2023-03-23 00:49:54 -03:00
.gitignore make it work 2023-04-05 17:25:45 -03:00
.npmrc hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
index.js hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
package.json hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
pnpm-lock.yaml hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
readme.md hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00
tsconfig.json hopefully computers don't exist in the real world 2023-08-09 18:42:57 -03:00

readme.md

woodpecker-in-a-vm

  1. script que genera una vm con woodpecker agent adentro
  2. lo configuré para que borre en el disco real si se borra algo dentro de la vm
  3. como woodpecker-agent no tiene state, puedo regenerar la vm con el script las veces que quiera
  4. no tengo que exponer mi docker real al agent porque está en una vm con el suyo

compilar imágen

node index.js

copiar initramfs-virt vmlinuz-virt vm.qcow2 al servidor a /var/lib/libvirt/images

definir vm

virsh shutdown woodpecker-in-a-vm
virsh undefine woodpecker-in-a-vm
virt-install --name woodpecker-in-a-vm \
  --osinfo alpinelinux3.16 \
  --memory 4096 --vcpus 4 \
  --import \
  --disk path=/var/lib/libvirt/images/vm.qcow2,format=qcow2 \
  --boot kernel=/var/lib/libvirt/images/vmlinuz-virt,initrd=/var/lib/libvirt/images/initramfs-virt,kernel_args="console=/dev/ttyS0 quiet root=/dev/vda rw modules=ext4 tiny_power_button.power_signal=12" \
  --noautoconsole