Re: Debian Stretch on GCE

2017-03-29 Thread Noah Meyerhans
On Wed, Mar 29, 2017 at 10:18:36AM -0700, Zach Marano wrote:
>Yeah I guess I'm asking what the official Debian cloud image build process
>is looking like (or if its been started at all).

The current FAI config has at least some support for GCE, but
unfortunately I don't think anybody has done any meaningful work on the
it since November. I've done a fair bit of work on generic image content
and some AWS details, and am currently working on more complete
automation around the build process. This same work will need to be
adapted to GCE/Azure/etc, but that really shouldn't be very difficult
for somebody familiar with the services and their APIs. 

I've attached a short writup of the tool that I'm currently thinking
about. My intent is to build it in such a way that support for
additional platforms can be added relatively easily, but if nobody else
is working on these platforms I may cut some corners initially.

Alternatively, if someone want to start hacking on GCE support in the
FAI configs without waiting for that whole tool to exist, you can start
by reading my blog post on using FAI to generate AWS images and adapting
it for GCE. Simply replacing occurrances of EC2 with GCE in the FAI
class lists will likely get you a long way toward generating basic
images. 

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

You'll likely want to implement a GCE version of the AMI registration
script if you do that:

https://anonscm.debian.org/cgit/cloud/fai-cloud-images.git/tree/volume-to-ami.sh

noah

# Debian FAI Cloud Image Builder

## Synopsis

./generate-image CONFIGFILE

## Description

This tool is intended to be used to generate official and unofficial
(Derivative, Custom, etc) Debian AMIs for use on AWS.

In order to accomplish this, the tool performs the following steps:

1. Launch an EC2 instance with the following properties:
  * Instance has a public IP mapped to it.
  * Instance's security group permits ssh access.
  * Instance is configured with a cloud-init userdata script (see below).
  * Instance has a secondary EBS volume attached.
2. Run FAI to generate a disk image.
3. 'dd' the disk image to the attached EBS volume.
4. Snapshot the EBS volume.
5. Register the snapshot as an AMI.
6. Perform validation steps on the AMI.
7. Publish the AMI to supported AWS regions.
8. Mark the AMI as public.

The workflow may split AMI creation, validation, and publication into
discrete steps if we want to require manual confirmation before proceding.

## Configuration

Configuration of this tool is performed via configuration files; there are
no command-line options. Configuration files use the YAML syntax and
consist of three sections:

1. AWS Global configuration:
  * What AWS profile to use?
  * What region to run it?
2. Instance configuration:
  * Security group and subnet.
  * ssh keypair name
  * Instance type
  * AMI ID
3. Image configuration:
  * Git repository and commit ID for FAI configuration.
  * FAI class list.

## See also

## Author

## Copyright


Re: Debian Stretch on GCE

2017-03-29 Thread Thomas Lange
> On Wed, 29 Mar 2017 09:17:18 -0700, Zach Marano  said:

> Yes we are still using bootstrap-vz for our builds at this time. What is 
the state of the Debian official builds for cloud images?
> Has anyone worked on getting Fai builds working yet? We have not had time 
to take this on ourselves yet.
IIRC, jimmy had a done the image creation using FAI during the cloud sprint.

-- 
regards Thomas



Re: vmdb2: vmdebootstrap rewrite in progress

2017-03-29 Thread Vincent Bernat
 ❦ 29 mars 2017 14:04 +0300, Lars Wirzenius  :

> Current status is that it builds a Debian image (assuming you're
> running vmdb2 on amd64), but doesn't install a bootloader. My attempts
> to get grub-install to work have resulted in my laptop's bootloader
> being inadvertently reinstalled. If anyone would like to help with
> that, I'd be most grateful.

Maybe you can find some clues here:
 
http://sources.debian.net/src/openstack-debian-images/1.17/build-openstack-debian-image/#L597
-- 
Indent to show the logical structure of a program.
- The Elements of Programming Style (Kernighan & Plauger)


signature.asc
Description: PGP signature


vmdb2: vmdebootstrap rewrite in progress

2017-03-29 Thread Lars Wirzenius
I've started rewriting vmdebootstrap, with the aim of a simpler,
cleaner, more flexible tool. The rewrite is named vmdb2 so it will be
possible to co-install it with vmdebootstrap. The code is here:

http://git.liw.fi/cgi-bin/cgit.cgi/vmdb2/

Once I'm able to make a bootable image with it, I'll make the first
release and publish a .deb package as well. Until then, it's easy
enough to run from the source tree.

Current status is that it builds a Debian image (assuming you're
running vmdb2 on amd64), but doesn't install a bootloader. My attempts
to get grub-install to work have resulted in my laptop's bootloader
being inadvertently reinstalled. If anyone would like to help with
that, I'd be most grateful.

Other than bootloaders, if you want to give it a try and tell me what
you think, it'd be nice. See README for a very short tutorial. I've
set replies to go to the debian-cloud list.

Happy hacking.

-- 
I want to build worthwhile things that might last. --joeyh


signature.asc
Description: PGP signature


Re: Debian Stretch on GCE

2017-03-29 Thread kuLa
On 2017-03-29 10:49:12, Thomas Lange wrote:
> > On Tue, 28 Mar 2017 13:28:22 -0700, Zach Marano  
> > said:
> 
> > We published the first GCE Debian 9 Stretch image to the 
> `debian-cloud-testing` project. We will be maintaining this image as best as 
> we can until Stretch becomes Debian Stable and continue to
> > use this project to publish Debian Testing images as time moves on. Let 
> me know if you have any feedback.
> Again, I'm confused were we (the cloud team) put the FAI configs for
> our official cloud image. Zach, where is the FAI config space you are
> using for building the stretch images? Do you use this repository?
> git://anonscm.debian.org/cloud/fai-cloud-images.git 

I think Zach is still using bootstrap-vz and for it manifests will end up in
the git repo and then in the package.
-- 

|_|0|_|  |
|_|_|0|  "Panta rei" |
|0|0|0|  kuLa    |

gpg --keyserver pgp.mit.edu --recv-keys 0x686930DD58C338B3
3DF1  A4DF  C732  4688  38BC  F121  6869  30DD  58C3  38B3


signature.asc
Description: PGP signature


Re: Debian Stretch on GCE

2017-03-29 Thread Thomas Lange
> On Tue, 28 Mar 2017 13:28:22 -0700, Zach Marano  said:

> We published the first GCE Debian 9 Stretch image to the 
`debian-cloud-testing` project. We will be maintaining this image as best as we 
can until Stretch becomes Debian Stable and continue to
> use this project to publish Debian Testing images as time moves on. Let 
me know if you have any feedback.
Again, I'm confused were we (the cloud team) put the FAI configs for
our official cloud image. Zach, where is the FAI config space you are
using for building the stretch images? Do you use this repository?
git://anonscm.debian.org/cloud/fai-cloud-images.git 

-- 
regards Thomas