[Bug 1442743] [NEW] support cloud-init tests for snappy via nocloud datasource

Scott Moser smoser at ubuntu.com
Fri Apr 10 17:44:08 UTC 2015


Public bug reported:

We're wanting to get some automated tests of snappy and cloud-init's
snappy support.  This bug isn't a requeest for specific feature, but
rather a way to accomplish that.

What I have is available at lp:~smoser/+junk/ud-snappy

Thats basically a set of user-datas that excercise cloud-init inside snappy.
To use that, I've been doing something like this:

## build a 'cloud' image (with no nocloud seed inside)
$ sudo ubuntu-device-flash --output=ubuntu-core.img \
   --channel=ubuntu-core/devel-proposed --size=8 --cloud

## create a 'disk.img' backed by the pristine 'ubuntu-core.img'
$ qemu-img create -f qcow2 -b ubuntu-core.img disk.img

## update the metadata.yaml file to have your ~/.ssh/id_rsa.pub for ssh
access

## create a seed.img for one of the user-data.yaml files in the branch above
$ cloud-localds seed.img ud-sideload.yaml metadata.yaml 

## boot the system in kvm, logging to a file.
$ qemu-system-x86_64 -enable-kvm disk.img seed.img \
   -serial file:serial.log -m 768

$ ssh <system> and verify things listed in files
$ look at serial.log to see things expected.


The last 2 steps are manual, but we can certainly put shutdown in the
runcmd that we provide so that the system shuts itself off when it is
done.

Also we can put more runcmd in that assert that the expectations are
met inside the vm ('snappy list' and such) with logging to console, and
then  just check the console after shutdown for the expected messages.

** Affects: autopkgtest (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1442743

Title:
  support cloud-init tests for snappy via nocloud datasource

Status in autopkgtest package in Ubuntu:
  New

Bug description:
  We're wanting to get some automated tests of snappy and cloud-init's
  snappy support.  This bug isn't a requeest for specific feature, but
  rather a way to accomplish that.

  What I have is available at lp:~smoser/+junk/ud-snappy

  Thats basically a set of user-datas that excercise cloud-init inside snappy.
  To use that, I've been doing something like this:

  ## build a 'cloud' image (with no nocloud seed inside)
  $ sudo ubuntu-device-flash --output=ubuntu-core.img \
     --channel=ubuntu-core/devel-proposed --size=8 --cloud

  ## create a 'disk.img' backed by the pristine 'ubuntu-core.img'
  $ qemu-img create -f qcow2 -b ubuntu-core.img disk.img

  ## update the metadata.yaml file to have your ~/.ssh/id_rsa.pub for
  ssh access

  ## create a seed.img for one of the user-data.yaml files in the branch above
  $ cloud-localds seed.img ud-sideload.yaml metadata.yaml 

  ## boot the system in kvm, logging to a file.
  $ qemu-system-x86_64 -enable-kvm disk.img seed.img \
     -serial file:serial.log -m 768

  $ ssh <system> and verify things listed in files
  $ look at serial.log to see things expected.

  
  The last 2 steps are manual, but we can certainly put shutdown in the
  runcmd that we provide so that the system shuts itself off when it is
  done.

  Also we can put more runcmd in that assert that the expectations are
  met inside the vm ('snappy list' and such) with logging to console, and
  then  just check the console after shutdown for the expected messages.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1442743/+subscriptions



More information about the foundations-bugs mailing list