ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #11212
Static chroots for SDK
Hi,
The root file system we use to build and package apps with the SDK are
chroots wrapped around with schroot and click. This chroot contains the
application development framework and documentation.
The purpose of this chroot is to make the phone APIs, libraries
available for the developers who might be on Trusty or on Utopic. So the
chroot contains the stuff what is on the real device.
Right now we create these chroots on the first start of the Ubuntu SDK.
There are few problems with this flow:
1. The `click chroot create` uses schroot debootsrap what downloads the
core bootsrap and installs the requested framework. It means about 1.7GB
downloaded data and hundreds of .deb packages. It is a slow and fragile
process.
2. The schroot debootstrap creates the actual snapshot of the Ubuntu
series, so it is working with a rather fluid base. The Utopic based RTM
target is stable, but the development release, as expected is a
constantly changing target. So we hardly have a solid common base.
We have been talking about the possibility of releasing the SDK
frameworks in single downloadable static images.
The benefits of such SDK distribution model are:
1. Smaller and single downloadable root file system
2. Static and versioned images what we could release together with the
device images
I made a simple pilot project to demonstrate how the real implementation
would look [3]
This project have two scripts:
1. create_static_schroot.sh
This script is for
1.1 creating static image: sudo create_static_schroot.sh -c -a armhf -f
ubuntu-sdk-15.04
1.2 installing the created image: sudo create_static_schroot.sh -i
click-ubuntu-sdk-15.04-armhf-amd64.tar.gz
1.3 downloading and installing the image: create_static_schroot.sh -d -a
armhf -f ubuntu-sdk-15.04
The -h parameter shows all the available options.
The static images are hosted on people.canonical.com [2]
Right now there are both i386 and armhf images for 15.04
2. test_static_chroot.sh
This script is for banchmarking the click chroot creation and the
create_static_schroot.sh -d -a armhf -f ubuntu-sdk-15.04
I have asked folks around to help with the benchmarking, because the
chroot creation in any case depends on the bandwidth.
I got results from DanChapman, zbenjamin, kalikiana and zsombi plus my
own test [1]. The result is that downloading from the
people.canonoical.com the image and setting it up for schroot takes
40-60% of the time of creating a click chroot.
Please give these scripts a try and let's discuss about how to go
forward. I would definetly suggest to work out this model a bit more and
start hosting SDK images alongside with the other system images and
teach either the Ubuntu SDK or the click itself to optionally use the
static images instead of the dynamically created bootstraps.
cheers,
bzoltan
[1] http://paste.ubuntu.com/10257872/
http://pastebin.ubuntu.com/10257860/ http://paste.ubuntu.com/10257687/
[2] http://people.canonical.com/~bzoltan/static_chroots/
[3] lp:~bzoltan/+junk/static_chroots
Follow ups