This role configures a machine for building Debian packages with sbuild. There is no support for automated building, just chroots for manually triggered builds.
Spare block device(s) are needed, to host a LVM VG. On an EC2 instance, the ephemeral storage is a good choice.
By default, chroots are created for Debian unstable (i386, amd64, and
arm64).
This can be customised by setting the sbuild_chroots
variable. e.g.
---
sbuild_chroots:
- sid-amd64
By default, all block devices after sda
will be formed into an LVM
Volume Group.
If you want to provide a list of block devices for LVM, set them in this
list, without the leading /dev/
. e.g.
sbuild_lvm_block_devices:
- sda2
- sdb2
This role has no dependencies outside of the core ansible modules.
There are some example playbooks in the playbooks
directory.
cp playbooks/ec2-config.yml.sample playbooks/ec2-config.yml
- Set all of the variables in
ec2-config.yml
:key_name
: EC2 keypair name.image
: AMI ID.ssh_user
: Username for the admin user (e.g.admin
on a Debian image).region
: AWS Region.vpc_subnet_id
: VPC Subnet ID.group_id
: Security Group ID.instance_type
: EC2 Instance size.volumes
: Additional storage devices (instance storage / EBS)
- Put some EC2 credentials in
~/.boto
- Set list of desired releases in
defaults/main.yml
. - If necessary, update
sbuild_lvm_block_devices
indefaults/main.yml
. ansible-playbook -i ./playbooks/localhost -v playbooks/ec2-spawn.yml
- If it fails, you can create an inventory pointing at the machine (in
the
sbuild
group and runansible-playbook -i my-inventory -v playbooks/sbuild.yml
This software is released under the ISC license, see COPYING.
By Stefano Rivera.