Re: Building cloud images using Debian infrastructure

2018-08-09 Thread Noah Meyerhans
On Wed, Aug 08, 2018 at 05:47:06PM -0400, Jimmy Kaplowitz wrote:
> > No, the main reason it isolation.  The builds take some global
> > resources, loop devices, and may not return them in case of some errors.
> 
> Google builds their official GCE Debian images inside transient GCE
> instances, solely for isolation purposes (they use the Debian cloud team
> build tools, probably still bootstrap-vz until we get FAI sufficiently
> working). To be clear, nothing about that needs to be in GCE, except for
> a few implementation details of their particular build harness. Regular
> VMs work fine.

At the Microsoft-hosted cloud sprint I proposed using cloud-provider VMs
for builds targeting that provider. This is not because of any
provider-specific behavior, but rather because the cloud providers
provide all the isolation, resource management, and automation hooks
that we could ask for.  I still maintain that it's the better approach,
but was told at the time that the builds need to happen on Debian-owned
hardware, and that we had users specifically insisting on this. I'm not
convinced by that argument, nor have I heard anything from AWS users
expressing concern that the images are being built on AWS.  Meanwhile I
have been building all the AWS images using small (t2.micro), transient
EC2 instances and a small shell script to handle the VM lifecycle and
have managed to completely avoid the complexity of that giant whiteboard
drawing from the sprint...

https://salsa.debian.org/noahm/ec2-image-builder/blob/master/bin/launch-fai-builder.sh

> I support the goal of isolation, but transient VMs can serve the same
> purpose in a workflow that's more easily portable between casulana,
> GitLab CI (I presume?), a personal dev laptop, and anywhere else one
> might want to reproduce the flow. Which seems like a win for maximizing
> how easy it is for people to hack on this - and also for companies like
> Google to converge further with us on tooling.

Indeed. Some time ago, I posted on my blog about how users can use our
build tooling to generate their own custom AMIs that derive from our FAI
configs. The workflow is identical, because it uses common
infrastructure. A build process that relies on custom Debian
infrastructure is not going to be useful to users, meaning they'll have
to use a different workflow to build images, with different bugs, edge
cases, failure modes, etc. (Note that the post was written before the
above mentioned small shell script was written, so there are more steps.
I should update that post...)

https://noah.meyerhans.us/blog/2017/02/10/using-fai-to-customize-and-build-your-own-cloud-images/

noah



signature.asc
Description: PGP signature


Re: Building cloud images using Debian infrastructure

2018-08-09 Thread Bastian Blank
On Wed, Aug 08, 2018 at 05:47:06PM -0400, Jimmy Kaplowitz wrote:
> I support the goal of isolation, but transient VMs can serve the same
> purpose

This setup uses transient VM to do isolation.  Isolation is the goal,
transient VM are the way to do it.

On casulana it only can run qemu directly.  On GCE it would just start a
VM on the platform.

> purpose in a workflow that's more easily portable between casulana,
> GitLab CI (I presume?), a personal dev laptop, and anywhere else one
> might want to reproduce the flow.

A user will have the following ways to build it:
- Push into the cloud-team repo and the builder on casulana will pick it
  up.
- Push into a private repo and the shared builder will pick it up.  This
  does not yet work due to a missing config option and tags on the
  builders.
- Use "gitlab-runner exec docker --docker-privileged $job" to run it
  from the checkout on her own Docker instance.
- Use "gitlab-runner exec shell $job" or "gitlab-runner exec ssh $job"
  to do the same either on the local machine or another one.
- Use "make $job" to run it by hand from the working copy.  We need to
  rename stuff a bit for that.

All of that need documentation, including information how to setup a
capable runner.  I'm currently trying to convince gitlab.com to change
their config a bit to make the build working without changes.

Regards
Bastian

-- 
The sooner our happiness together begins, the longer it will last.
-- Miramanee, "The Paradise Syndrome", stardate 4842.6