Return to Video

FAI.me - A Build Service for Installation and Cloud Images

  • 0:06 - 0:13
    Today, I talk about FAI.me, which is a
    build server for images.
  • 0:15 - 0:20
    First, anybody that never heard anything
    about FAI?
  • 0:22 - 0:23
    Ok
  • 0:24 - 0:27
    I started this project in 1999.
  • 0:29 - 0:31
    I'm not sure…
  • 0:32 - 0:36
    No, I'm sure that during those times, the
    Debian installer did not have
  • 0:36 - 0:40
    the preseeding stuff, so we needed
    something automatically.
  • 0:43 - 0:50
    I installed the first cluster with FAI and
    I always do talks on FAI or
  • 0:50 - 0:54
    today in the lightning talks, I talk
    a little bit about dracut,
  • 0:54 - 0:56
    which is used in FAI.
  • 0:57 - 0:59
    So, what was the motivation.
  • 0:59 - 1:03
    A neighbour of mine, she came to me with
  • 1:03 - 1:08
    "My Windows desktop is broken,
    can you reinstall it?"
  • 1:08 - 1:14
    And in the end, I installed her Linux,
    and I was shortly thinking about
  • 1:14 - 1:18
    "Should I use FAI for installing her
    desktop with Linux?"
  • 1:19 - 1:25
    And in the end, I did not use it because
    FAI is too complicated,
  • 1:25 - 1:31
    like the Debian installer, I guess it's
    not really that easy for beginners
  • 1:31 - 1:33
    because there are a lot of questions
  • 1:33 - 1:35
    but also FAI is not really for beginners.
  • 1:36 - 1:39
    So this was the motivation about thinking
    about FAI.
  • 1:40 - 1:44
    The target group was always advanced
    sysadmins
  • 1:44 - 1:49
    but I thought maybe it's possible to make
    FAI usable also for people
  • 1:49 - 1:52
    that are not that advanced sysadmins.
  • 1:54 - 1:59
    The idea is that an installer should cover
    most installations.
  • 1:59 - 2:03
    The Debian installer is really perfect
    because I think it covers
  • 2:03 - 2:07
    all different kinds and strange environments
  • 2:07 - 2:14
    You can do a lot of things, you can configure
    very strange combination of language,
  • 2:14 - 2:16
    keyboard layout and so on
  • 2:17 - 2:23
    but I was thinking about an installer
    that covers 90 or 95% of the installations
  • 2:25 - 2:32
    A lot of special cases can be ignored and
    since the Debian installer has like
  • 2:33 - 2:38
    more than 20 questions, I thought it would
    be much nicer if there were only
  • 2:38 - 2:46
    3 to 5 questions and I looked at Linux Mint
    and Mageia installers, CentOS installer,
  • 2:46 - 2:50
    and they all ask much less questions.
  • 2:52 - 2:57
    In the Debian installer, we sometimes
    have also things that are asked
  • 2:57 - 3:02
    during the installation, so not everything
    is asked at the very beginning.
  • 3:02 - 3:06
    For example, the task selection, where you
    select your desktop,
  • 3:06 - 3:09
    is done after the base installation.
  • 3:09 - 3:13
    This was also very important, I would like
    to have something that
  • 3:13 - 3:15
    asks everything at the very beginning.
  • 3:17 - 3:22
    Then, maybe some tool could create
    a customized installation image
  • 3:22 - 3:27
    and this installation image should run
    then completely unattended
  • 3:27 - 3:32
    so you can get yourself a coffee and
    when you come back, your machine is ready.
  • 3:33 - 3:38
    There are 3 things to customize installation
    image,
  • 3:38 - 3:43
    you just put this image, you do not have
    to touch anything, and then it's ready.
  • 3:44 - 3:48
    I thought "Oh yes, this is FAI, maybe
    FAI can do this."
  • 3:50 - 3:57
    As I said, FAI is only, or was until now
    only a tool for experienced sysadmins
  • 3:57 - 4:02
    and you have to adjust several config
    files, these are ASCII files
  • 4:02 - 4:09
    but still you have to touch 5 to 10
    config files to make a customization.
  • 4:10 - 4:13
    So, how can I make FAI usable for
    beginners?
  • 4:13 - 4:15
    That's the beginning of FAI.me.
  • 4:18 - 4:21
    There's a web page, we'll show it
    in more detail later,
  • 4:21 - 4:27
    where you can just click some things, and
    then you get a customized image.
  • 4:29 - 4:36
    This image can be put onto a CD, DVD or
    USB stick, just with dd
  • 4:36 - 4:41
    and the customization is just by using
    the web interface
  • 4:41 - 4:46
    so there's no need for you to edit
    a text file, a config file inside FAI.
  • 4:48 - 4:53
    I hope I covered most important things
    that you want to adjust
  • 4:53 - 4:56
    or a little bit customize.
  • 4:56 - 5:00
    You can add additional packages, I think
    that's the most important thing
  • 5:00 - 5:04
    that people say "I want to have the normal
    Debian installation
  • 5:04 - 5:06
    but with some additional packages."
  • 5:07 - 5:12
    And you can select different
    distributions, so it's not only
  • 5:12 - 5:17
    the installation image for the stable
    release, you can create
  • 5:17 - 5:19
    3 variants of the installation.
  • 5:22 - 5:29
    This is the web page and thanks to Juri,
    he did a great job
  • 5:29 - 5:34
    during the first and second day, he added
    a new feature that we now have
  • 5:34 - 5:36
    a toggle button.
  • 5:36 - 5:40
    Is it big enough or should I zoom in?
  • 5:41 - 5:42
    Ok.
  • 5:43 - 5:50
    So, we have a toggle button, what you see
    now is just the bare minimum of questions
  • 5:50 - 5:54
    and we can toggle it to more advanced
    settings.
  • 5:55 - 6:00
    You have to select or just leave this as
    it is, username,
  • 6:00 - 6:06
    if you do not enter a password, a password
    will be generated and shown to you
  • 6:06 - 6:08
    and sent by e-mail.
  • 6:08 - 6:11
    I will now just type in the password.
  • 6:12 - 6:15
    It's here in clear text, for me that's fine
    because
  • 6:15 - 6:21
    there's also a comment that you should
    change the password after the installation
  • 6:21 - 6:27
    and I do not like to enter passwords twice
    so you can see what you typed in
  • 6:27 - 6:33
    and hopefully do not make any wrong
    mistakes.
  • 6:34 - 6:38
    For example, we could select the Stretch
    distribution with backports,
  • 6:38 - 6:42
    so we will get a 4.15 kernel with Stretch.
  • 6:43 - 6:48
    There are some buttons we can say we want
    to have some Debian developer tools.
  • 6:48 - 6:54
    This is what I defined in the FAI
    configuration, so just a list of packages.
  • 6:55 - 6:59
    Here, you can enter you own packages.
  • 7:01 - 7:05
    I will select the desktop.
  • 7:05 - 7:09
    You can have an installation without any
    desktop, so a very small installation.
  • 7:11 - 7:16
    I will select the XFCE desktop, but all
    the other desktops are here.
  • 7:16 - 7:22
    The language, these are just task packages
    that are…
  • 7:22 - 7:27
    I think Debian has much more task packages,
    I just searched which are
  • 7:27 - 7:36
    the most common languages, and what I do
    if I say I want the spanish language,
  • 7:36 - 7:38
    also the keyboard layout is spanish.
  • 7:39 - 7:43
    I know there are different combinations
    and with local time,
  • 7:43 - 7:47
    it's getting more difficult.
  • 7:48 - 7:53
    This installation will install the clock
    with UTC, so if you want to set
  • 7:53 - 7:55
    your time, you have to do this manually.
  • 7:56 - 8:00
    I want to cover the most common installations.
  • 8:02 - 8:11
    We select english US, the desktop and,
    as an example, the midnight commander
  • 8:11 - 8:13
    and GIMP.
  • 8:13 - 8:21
    I can add an email address so if it would
    take longer,
  • 8:21 - 8:26
    for example if this service will have
    success and a lot of people are using it,
  • 8:26 - 8:31
    you may wait for some minutes so your job
    will be finished.
  • 8:32 - 8:38
    So here are the comments, how to reconfigure
    the keyboard or the timezone
  • 8:38 - 8:42
    and then you just click "Create
    the installation image".
  • 8:42 - 8:49
    Now, in the background, there's some job,
    a script, looking "Oh, there's a new job"
  • 8:49 - 8:54
    and there's a summary of the configuration,
    of the web configuration.
  • 8:56 - 8:59
    Down here you see these are the
    FAI classes,
  • 8:59 - 9:02
    I will explain a little bit more about this.
  • 9:02 - 9:07
    But with this information, FAI configuration
    is generated,
  • 9:07 - 9:10
    that's what normally the experienced
    sysadmins have to create
  • 9:11 - 9:18
    but here you just click on some buttons
    and it will be done for you.
  • 9:22 - 9:26
    In the meantime, we have some more
    advanced features
  • 9:26 - 9:29
    which I will also show you later.
  • 9:29 - 9:35
    For example, this very simple installation
    just creates one partition
  • 9:35 - 9:40
    but you can also select that you want
    to have a separate /home partition
  • 9:40 - 9:46
    or using lvm just by selecting this
    on the web interface.
  • 9:47 - 9:55
    You can also add your SSH public key
    for logging as root without a password
  • 9:55 - 10:01
    or what's very nice, I found the new
    Ubuntu installer does this,
  • 10:01 - 10:05
    you can give your github account and
    then there's a command which
  • 10:05 - 10:10
    receives the public key from your
    github account and puts it
  • 10:10 - 10:13
    into the root account so you can log in
    without password.
  • 10:13 - 10:15
    I think that's very neat.
  • 10:15 - 10:22
    And if you have a repository with your own
    packages, you could also add this and say
  • 10:22 - 10:27
    "Please install those packages from
    my publicly available repository."
  • 10:29 - 10:30
    Let's see.
  • 10:30 - 10:35
    As we see, this job finished in 74 seconds.
  • 10:36 - 10:40
    Now, this customised installation image
    is available for download.
  • 10:41 - 10:43
    You can also download the log file.
  • 10:44 - 10:47
    Since this is an installation image,
    I first have to create
  • 10:47 - 10:50
    a partial package mirror.
  • 10:52 - 10:57
    This is done by the command 'fai-mirror'
    and you can also read the log of
  • 10:57 - 11:05
    this call of the fai-mirror, where a list
    of all you packages with all the dependencies
  • 11:05 - 11:06
    are available.
  • 11:06 - 11:13
    So you see, these are the list of packages
    and later they are downloaded
  • 11:13 - 11:21
    and in the end, it says it created a mirror
    of 1G of packages
  • 11:21 - 11:24
    and since I have a local mirror,
    it's very fast.
  • 11:25 - 11:31
    This is the one part on the installation
    image partial mirror with all the packages
  • 11:31 - 11:36
    and the other is that the config space
    which you can also download.
  • 11:37 - 11:41
    So this is the config space that was
    really created for you
  • 11:41 - 11:44
    by clicking the web interface.
  • 11:44 - 11:48
    If you want to do more things with FAI,
    you can set up your own FAI server
  • 11:48 - 11:50
    and use this configuration space.
  • 11:52 - 11:57
    And, that's also very new, the two commands
    that are used for creating this ISO image
  • 11:57 - 12:00
    are now also listed there.
  • 12:00 - 12:05
    First, create the partial mirror and then
    create the installation image.
  • 12:06 - 12:11
    Ok, copy link location…
  • 12:12 - 12:14
    Let's see how good the network is here.
  • 12:20 - 12:22
    [Q] It's a rather large image.
  • 12:22 - 12:29
    Yeah, because it includes all the packages
    and with Xfce, LibreOffice and so on
  • 12:29 - 12:33
    and the installation environment is maybe
    about 200MB.
  • 12:33 - 12:38
    That's not much bigger than the Debian
    installer that you need to download.
  • 12:39 - 12:43
    So, 2, 1, done.
  • 12:48 - 12:56
    I have a little wrapper which calls
    a fresh kvm machine
  • 12:56 - 13:01
    with an empty disk and boots this ISO image
  • 13:01 - 13:06
    and then we will see how this installation
    runs.
  • 13:08 - 13:10
    So this is dracut booting the image
  • 13:11 - 13:17
    and now you see there are already
    some parted commands executed
  • 13:17 - 13:22
    and now the packages are installed
    and everything runs on
  • 13:22 - 13:24
    and in the end some customization
    script.
  • 13:25 - 13:29
    We use only shell scripts for doing
    some customizations
  • 13:29 - 13:33
    and you see the files are downloaded
    from /media/mirror
  • 13:33 - 13:36
    so this is local on the ISO image.
  • 13:36 - 13:40
    It would also be possible to create
    an image without the packages
  • 13:40 - 13:45
    and then give another sources.list file
    so the packages would be downloaded
  • 13:45 - 13:52
    from the internet but this default
    in the FAI service,
  • 13:52 - 13:55
    we put everything onto the ISO image.
  • 13:58 - 14:01
    I guess it will run for 4 minutes.
  • 14:03 - 14:07
    [Q] ???
  • 14:08 - 14:09
    Yeah.
  • 14:14 - 14:17
    What I will show you now is…
  • 14:17 - 14:21
    So, this was the simple one, now I toggle
    this web page and
  • 14:21 - 14:26
    you will see that there are some more
    questions you may answer,
  • 14:26 - 14:29
    for example you can give a root password.
  • 14:30 - 14:33
    If you leave this empty, sudo will be
    configured.
  • 14:34 - 14:39
    Here you can upload the SSH key or give
    your Github account,
  • 14:39 - 14:41
    that would be Mrfai for me.
  • 14:43 - 14:46
    With the partitioning schemes, we have
    one partition
  • 14:46 - 14:53
    or one partition and /home separated
    or these two versions with LVM.
  • 14:53 - 14:59
    FAI itself can do much more, we could do
    soft raid set ups, cryptsetup
  • 14:59 - 15:04
    but here I want to cover the most common
    installation, so very simple
  • 15:04 - 15:07
    we have only 4 things that you can choose.
  • 15:08 - 15:11
    [Q] For encryption?
  • 15:11 - 15:12
    [A] Yes.
  • 15:16 - 15:19
    So, this was the partitioning things.
  • 15:19 - 15:25
    This is the new feature where you can add
    an URL for your local package repository
  • 15:25 - 15:31
    and the rest is the same, you can add
    packages you like, your email address
  • 15:31 - 15:33
    and then also create an installation image.
  • 15:36 - 15:44
    I normally set… By default, I include
    the nonfree linux firmware.
  • 15:45 - 15:52
    This is because my target audience is
    an end user and I want to make it
  • 15:52 - 15:56
    very comfortable for them, so yeah,
    they can just install it
  • 15:56 - 15:58
    and do not have these problems.
  • 15:58 - 16:02
    And since this is not on an official
    debian.org web site,
  • 16:02 - 16:08
    I can do this with this default.
  • 16:11 - 16:14
    Let's see, the installation is still running.
  • 16:17 - 16:20
    So, advanced features.
  • 16:21 - 16:24
    The next thing after this installation,
  • 16:24 - 16:27
    I will show you how to create cloud
    images.
  • 16:27 - 16:32
    Currently, we create an installation image,
  • 16:32 - 16:35
    when you boot it, the installation is run
    fully automatically.
  • 16:35 - 16:43
    The other type of service FAI.me gives
    to you is that it creates a raw image
  • 16:43 - 16:48
    or some other formats as you see here,
    qcow2 and whatever
  • 16:48 - 16:51
    which you can just boot and
    the installation is already done.
  • 16:54 - 16:58
    But first, see if the installation finish.
  • 17:00 - 17:02
    Ah! Ok.
  • 17:02 - 17:08
    These are now the shell scripts that are
    executed for the customization
  • 17:08 - 17:14
    of like /etc/messages of today,
    /etc/network/interfaces is written
  • 17:14 - 17:15
    and so on.
  • 17:16 - 17:22
    You see the installation took 236s, it says
    there are some errors
  • 17:22 - 17:24
    but that's not really true.
  • 17:25 - 17:29
    And it stops here, but we can also
    disable this, this is only for showing
  • 17:29 - 17:31
    everything went well
  • 17:31 - 17:35
    and now we just reboot the machine.
  • 17:37 - 17:39
    You see the grub.
  • 17:47 - 17:50
    Ok, Xfce desktop.
  • 17:51 - 17:56
    debian was the user with password FAI.
  • 18:00 - 18:08
    We have "uname -a", this is 4.16,
    the backports kernel was installed there.
  • 18:08 - 18:14
    We have only one partition, no LVM
  • 18:14 - 18:21
    and I told it to install gimp which is
    not installed by default.
  • 18:21 - 18:24
    Gimp is there, so this is nice.
  • 18:25 - 18:27
    And the midnight commander is also there.
  • 18:31 - 18:34
    And now we just throw this machine.
    Gone.
  • 18:36 - 18:43
    What's very nice with this wrapper script,
    it creates the local disk
  • 18:43 - 18:48
    of the virtual machine in /tmp which is
    a RAM disk and I love RAM,
  • 18:48 - 18:50
    it's so nice and fast.
  • 18:51 - 18:56
    So, this was installation image and now we
    look at the cloud image.
  • 18:57 - 19:01
    First, you can say how big should your
    disk image be.
  • 19:04 - 19:10
    Here, I say 8GB, you will see it's not
    an 8GB image
  • 19:10 - 19:13
    that you have to download later.
  • 19:13 - 19:18
    By default, I use zstd compression.
  • 19:18 - 19:22
    Anyone who does not know
    this compression?
  • 19:22 - 19:28
    This is very fast, very new, created
    by Facebook if I'm correct.
  • 19:29 - 19:38
    It's for very big files and what you should
    never use is gzip with sparse images.
  • 19:38 - 19:42
    The disk image is sparse and gzip
    cannot handle this
  • 19:42 - 19:46
    so if you compress it and uncompress it
    it will be very large
  • 19:46 - 19:53
    and all the other, xz, zstd, can handle
    sparse files very nicely.
  • 19:54 - 20:02
    So, the hostname is set, the root password,
    username with a password.
  • 20:03 - 20:05
    Now we want to install Buster.
  • 20:07 - 20:09
    Maybe with no…
  • 20:12 - 20:15
    Oh, we also do the Xfce desktop.
  • 20:16 - 20:20
    Any packages you'd like to have in this
    cloud image.
  • 20:21 - 20:25
    "desktop" and "cloud" image does not
    make that much sense, maybe.
  • 20:27 - 20:31
    Emacs25, ok.
  • 20:33 - 20:37
    And now "Create disk image".
  • 20:37 - 20:42
    This will take a little bit longer because
    we are doing the installation
  • 20:42 - 20:45
    inside a file image.
  • 20:46 - 20:52
    But no problem, I can tell you what
    other ideas I have.
  • 20:53 - 21:02
    So, currently we have the installation and
    the cloud or virtual machine images for amd64
  • 21:02 - 21:08
    FAI itself can also do cross-architecture
    images so it would be some work
  • 21:08 - 21:14
    to extend the web page to say
    "Please create an arm64 image"
  • 21:14 - 21:22
    It would be very nice to have predefined
    configs for raspberry pi or
  • 21:22 - 21:24
    all the very different boards
  • 21:25 - 21:27
    but that would also be possible.
  • 21:29 - 21:33
    I guess the next thing I will implement
    is other distributions
  • 21:33 - 21:36
    because I know people are always asking it.
  • 21:36 - 21:38
    Not you but the Ubuntu guys.
  • 21:40 - 21:45
    Yesterday I did the first test with Ubuntu
    bionic, the LTS release
  • 21:45 - 21:47
    and FAI just works out of the box with it.
  • 21:48 - 21:54
    So what I have to do is to integrate it
    in these FAI.me processing scripts.
  • 21:55 - 22:00
    Ready-to-go cloud images for the big
    cloud providers.
  • 22:03 - 22:06
    That's only a different FAI config space
    that I have to use.
  • 22:07 - 22:11
    Currently, for example, in what I call
    cloud images, I do not install
  • 22:11 - 22:13
    the package cloud image.
  • 22:14 - 22:17
    That's needed for all the ones.
  • 22:18 - 22:25
    I'm also working in the Debian cloud team
    and this team decided 2 years ago
  • 22:25 - 22:30
    that the tool chain in the future for
    the official Debian package will be FAI.
  • 22:31 - 22:37
    Amazon is already using it, so if you
    boot or if you use a Debian cloud image
  • 22:37 - 22:41
    in Amazon, Noah Meyerhans did this and
    he's using the FAI tool chain for it.
  • 22:42 - 22:49
    Google is not yet using it because there was
    a very small problem
  • 22:49 - 22:52
    in a config file we had one space too much
  • 22:52 - 22:55
    which caused grub to hang forever
  • 22:55 - 23:01
    and that was the reason why they decided
    for Stretch to use their own tool chain.
  • 23:01 - 23:06
    But the things are working so we have
    the config space also for Google.
  • 23:07 - 23:12
    And also for Azure, some people from
    Credativ did this.
  • 23:15 - 23:18
    The Debian cloud team already has
    the FAI configuration for
  • 23:18 - 23:24
    the big tool providers,
    cloud providers.
  • 23:25 - 23:31
    We could also think on a more generic
    FAI installation image.
  • 23:32 - 23:37
    It's an image that you would boot up
    and then enter your job id of the web page
  • 23:37 - 23:40
    and then the configuration would be
    downloaded
  • 23:40 - 23:43
    and the packages would be just
    received from the internet.
  • 23:44 - 23:45
    That was one…
  • 23:46 - 23:50
    So, the image would be much smaller
    because the packages do not need to be
  • 23:50 - 23:53
    on the installation image.
  • 23:55 - 23:58
    It's also possible to create live images
    with FAI.
  • 23:59 - 24:00
    It is a little bit more…
  • 24:01 - 24:07
    Currently, you need some manual work
    but that should be also possible
  • 24:07 - 24:11
    to use FAI for creating live image
    and then also to provide this
  • 24:11 - 24:14
    on the FAI.me web service.
  • 24:15 - 24:18
    If you want to customize much more
    inside the image, you just say
  • 24:18 - 24:22
    "Oh, I have some Ansible scripts that
    I want to execute at the very end"
  • 24:22 - 24:27
    then I say "Ok, this is just a starting
    point, use the FAI.me service
  • 24:27 - 24:32
    and if you're happy with the FAI tools,
    then set up your own FAI server,
  • 24:32 - 24:38
    create your own configuration space
    and then you can do all the crazy things."
  • 24:40 - 24:42
    So, how does FAI.me work internally.
  • 24:43 - 24:48
    We have a web server where there are
    some CGI scripts and
  • 24:48 - 24:54
    this is not the build server, so on the
    web server, you click "Submit"
  • 24:54 - 25:02
    "Create my image", all the input
    is validated so you cannot make nasty things
  • 25:02 - 25:09
    and then the CGI writes or creates
    a subdirectory and puts 2 files in it,
  • 25:09 - 25:10
    a config and a meta file
  • 25:12 - 25:15
    and writes a status
    "waiting for processing".
  • 25:15 - 25:19
    Then, the other server, the build server
    reads this config and
  • 25:19 - 25:25
    this is just an NFS mounted directory,
    and sees
  • 25:25 - 25:27
    "Oh there's a new job I have to process".
  • 25:30 - 25:34
    In this processing script we pass for
    some errors.
  • 25:34 - 25:40
    What's happening very often that people
    type in a package that's not available
  • 25:40 - 25:45
    and this will be detected and then a new
    version of the web page will pop up and say
  • 25:45 - 25:49
    "Oh, when creating the package mirror,
    there was an error
  • 25:49 - 25:51
    because this package was not known."
  • 25:53 - 25:54
    Sometimes I have to…
  • 25:55 - 25:58
    Every night, I create new nfsroots
    for Buster.
  • 25:59 - 26:03
    If there are security updates, I have
    to create new nfsroots
  • 26:03 - 26:05
    for Stretch and backports.
  • 26:06 - 26:10
    I have some cleanup, so if a lot of jobs
    are created,
  • 26:10 - 26:13
    the images are on the disk after,
  • 26:13 - 26:17
    normally I say after one day I just
    remove the images
  • 26:17 - 26:21
    so you have one day to download
    the images.
  • 26:23 - 26:26
    There's 3 different configurations
  • 26:26 - 26:29
    /etc/fai-stretch, /etc/buster,
    /etc/fai-stretch-bpo (backports)
  • 26:29 - 26:31
    We need for the installation image
  • 26:31 - 26:36
    We need a different nfsroot, but
    the config space that is shared
  • 26:36 - 26:38
    about all configurations,
  • 26:38 - 26:41
    so it doesn't matter if I install
  • 26:41 - 26:46
    Stretch or Stretch backports or
    Buster,
  • 26:46 - 26:50
    I can use the same FAI configuration.
  • 26:50 - 26:54
    Also, for building the cloud images,
    I use the same FAI configuration.
  • 26:56 - 27:05
    A new job is detected, then a copy of
    the configuration space will be made
  • 27:05 - 27:08
    and it will be customized a little bit.
  • 27:08 - 27:10
    So there are a very very few changes,
  • 27:10 - 27:17
    for example I have to put the SSH key
    into your customized configuration space
  • 27:17 - 27:21
    or the list of packages or the user and
    root password.
  • 27:21 - 27:26
    Then we have two things, if we want to
    create the installation image,
  • 27:26 - 27:31
    I first have to create the partial package
    mirror and then create the installation image
  • 27:31 - 27:36
    For the cloud images, we do not need
    the nfsroot, we just need
  • 27:36 - 27:39
    the configuration space which is
    customized a little bit
  • 27:39 - 27:42
    and then we can just create the disk image
  • 27:42 - 27:47
    so there's one step less compared to
    creating the installation ISO.
  • 27:48 - 27:52
    The status on the web page will be
    updated, log files written
  • 27:52 - 27:55
    and if the user said "Please send me
    an email if my job is ready",
  • 27:55 - 27:58
    this will also be sent to the user.
  • 27:59 - 28:03
    Then we have the ISO or the disk image
    and this will be copied back
  • 28:03 - 28:08
    to the web server where the user can then
    download it.
  • 28:09 - 28:12
    And since I have a lot of RAM
    in this machine,
  • 28:12 - 28:16
    everything is run in RAM, very very nice.
  • 28:18 - 28:23
    As I said, we need an nfsroot,
    a configuration space and FAI classes.
  • 28:23 - 28:26
    This is a very central component in FAI
  • 28:27 - 28:29
    and this is just a list of names.
  • 28:29 - 28:36
    So in HOME_LVM, this is the class name,
    the FAI class we describe
  • 28:36 - 28:39
    and I think this is that example:
  • 28:39 - 28:43
    HOME_LVM describes how to partition
    the local hard disk.
  • 28:45 - 28:51
    This is our very flexible tool where
    we can do LVM, cryptsetups,
  • 28:51 - 28:53
    software RAIDs and so on.
  • 28:53 - 28:58
    But for the FAI.me service, I just created
    4 different types of partitioning
  • 28:58 - 29:00
    and this is the HOME_LVM example.
  • 29:04 - 29:07
    So we have a list of classes and,
    as I said,
  • 29:07 - 29:12
    just two commands for the installation
    image with a list of classes
  • 29:12 - 29:18
    and for the cloud image, I have to say
    how big should the disk image be,
  • 29:18 - 29:22
    the list of classes and what's the target
    file that should be created.
  • 29:24 - 29:26
    Let's see if this is ready.
  • 29:28 - 29:29
    Yes, it's ready.
  • 29:30 - 29:30
    So…
  • 29:32 - 29:34
    It's 1.1GB.
  • 29:35 - 29:37
    Is this really the… oh yeah, raw.
  • 29:41 - 29:46
    No problem, let's download it, it should
    be fast.
  • 29:49 - 29:54
    This is the normal architecture if you use
    FAI in a client/server set up.
  • 29:54 - 29:58
    You should just look on the left side
    where you see
  • 29:58 - 30:02
    you need the config space, an nfsroot
    and a mirror
  • 30:02 - 30:04
    and these parts will put onto the CD.
  • 30:05 - 30:09
    If you set up a network installation thing,
  • 30:09 - 30:13
    this is how things get from the server
    to the client.
  • 30:16 - 30:21
    For the software installation, we have
    another subdirectory called package_config
  • 30:21 - 30:27
    and there you also see several files
    where the file name is a FAI class.
  • 30:28 - 30:34
    Since in the FAI.me service every client
    belongs to the class DEBIAN,
  • 30:34 - 30:39
    it will install the packages that are listed
    on the top
  • 30:40 - 30:43
    and here we have an other class, NONFREE
  • 30:43 - 30:47
    These packages are only installed if
    you also said
  • 30:47 - 30:50
    "Please install the nonfree packages"
  • 30:50 - 30:53
    and this is mapped to a FAI class
    called NONFREE.
  • 30:54 - 30:57
    And there's an other class for AMD64
    and so on.
  • 30:59 - 31:02
    Some references.
  • 31:02 - 31:05
    In the past, it looked more like this
    when I said
  • 31:05 - 31:13
    "Oh, who's using FAI?" and during
    the last month I collected some logos
  • 31:13 - 31:16
    just because it's much nicer.
  • 31:19 - 31:22
    Let's see if the download was ready.
  • 31:23 - 31:35
    We unzstd the FAI.me image,
    faime-013Z image
  • 31:41 - 31:46
    On the web site, I said I want to have
    a 8GB partition,
  • 31:47 - 31:51
    so now let's see how big it is.
  • 31:52 - 31:59
    The file is 8, but since it's a sparse file
    it's only 3.5GB
  • 31:59 - 32:03
    and the compressed was 1.1GB.
  • 32:04 - 32:09
    Now I use my wrapper
  • 32:11 - 32:17
    and I say "Boot from disk" and this is
    the FAI.me raw image, disk image
  • 32:19 - 32:21
    that should be booted up.
  • 32:34 - 32:35
    That's it.
  • 32:36 - 32:37
    debian/fai
  • 32:53 - 32:57
    Let's see if emacs is installed, yes.
  • 32:59 - 33:05
    Gimp is already there, hopefully, and
    the blue midnight commander.
  • 33:14 - 33:16
    Let's see.
  • 33:21 - 33:23
    Questions.
  • 33:32 - 33:37
    [Q] I'm using the preseed file for
    the debian-installer,
  • 33:37 - 33:41
    do you have a conversion between
    your syntax and your configuration files
  • 33:41 - 33:46
    and the preseed file or maybe can you add
    a download button for the preseed file
  • 33:46 - 33:49
    to your web site because I think it's
    rather nice to have it displayed
  • 33:49 - 33:51
    in web site first.
  • 33:51 - 33:53
    [A] I'm not using the debian-installer.
  • 33:54 - 33:59
    I use preseeding, yes, the debconf
    preseeding for the normal packages
  • 33:59 - 34:03
    you can do this also in FAI and it's
    the same format
  • 34:03 - 34:06
    you get with debconf-get-selections.
  • 34:07 - 34:12
    And what you get is you can download
    your own FAI config space
  • 34:12 - 34:15
    and this includes all information you need
    to set up,
  • 34:15 - 34:21
    to do this mirror FAI CD or the FAI disk
    image command.
  • 34:21 - 34:28
    But you cannot convert this config into
    a d-i preseeding or vice versa,
  • 34:28 - 34:30
    that's not possible.
  • 34:31 - 34:38
    Because for example, for the partitioning
    part I do not like to create
  • 34:38 - 34:43
    from my disk config partman preseeding
    file.
  • 34:44 - 34:46
    You can pay me a lot of money, I will
    never do this.
  • 34:47 - 34:52
    You know that the partman preseeding
    is very ugly and very heavy.
  • 34:54 - 35:01
    For other things, yes, selection of,
    for example, the selection of the language
  • 35:01 - 35:05
    These are the normal preseeding we use.
  • 35:05 - 35:08
    And the list of packages, task selec…
  • 35:08 - 35:14
    I think it's much easier to do this in
    the FAI configuration than to create
  • 35:14 - 35:18
    a debian-installer preseeding.
  • 35:19 - 35:23
    And why use d-i if this works for you?
  • 35:23 - 35:25
    [Q] d-i works as well for me.
  • 35:25 - 35:27
    [A] Yes, then fine, use it.
  • 35:30 - 35:36
    [Q] Hi Thomas. Thank you very much for
    this new feature in the FAI project,
  • 35:36 - 35:43
    it's very nice and I found very great that
    you have the output of the commands
  • 35:43 - 35:49
    that you used to create the ISO image or
    the cloud file.
  • 35:50 - 36:00
    A question that I have is, in which servers
    are located the files that we create,
  • 36:00 - 36:01
    the ISO or the cloud.
  • 36:02 - 36:05
    Is it a server that you own host or…
  • 36:05 - 36:06
    [A] Trust me.
  • 36:09 - 36:10
    Currently,
  • 36:10 - 36:19
    both the web server and the FAI.me
    processing build server are run
  • 36:19 - 36:25
    on two machines at the university where
    I work as a system administrator
  • 36:25 - 36:28
    so that's also where we have a very fast
    connection.
  • 36:30 - 36:36
    The CGI script and shell script that is
    processing these jobs is currently
  • 36:36 - 36:38
    not open source.
  • 36:38 - 36:41
    There are plans to do this, I'm not sure
    when.
  • 36:43 - 36:48
    If you want to reproduce the things, you
    have the config file and you can download
  • 36:48 - 36:52
    the FAI software and use these one or two
    commands to reproduce it.
  • 36:53 - 36:57
    Some people said "Oh, very nice service,
    I would like to set up in my company".
  • 36:58 - 37:00
    Then please yes, contact me and…
  • 37:01 - 37:07
    Currently there are no concrete plans
    to make these background scripts open source
  • 37:07 - 37:09
    but it will be in some future.
  • 37:10 - 37:17
    But currently, you have to trust me as
    you also have to trust the package maintainers
  • 37:17 - 37:19
    that will be installed there.
  • 37:19 - 37:23
    But you can verify it or say "I do not
    trust Thomas but I will just grab
  • 37:23 - 37:27
    the FAI config space and this on my own".
  • 37:27 - 37:28
    [Q] Thank you.
  • 37:30 - 37:33
    [Q] There's a question from the internet.
  • 37:35 - 37:40
    Why not use a proper job queuing system
    like grid engine or similar?
  • 37:41 - 37:46
    [A] I'm using grid engine at work for
    different things.
  • 37:48 - 37:54
    It started as a very simple project, so
    in the end it's just a loop which
  • 37:54 - 37:57
    checks if there's new jobs on that.
  • 37:57 - 38:02
    Currently, I do not process jobs
    in parallel, currently there's no need for it
  • 38:03 - 38:07
    If this project will be very successful,
    yeah, I have to use a queuing system.
  • 38:08 - 38:10
    It's, yeah, a very simple script.
  • 38:11 - 38:15
    But it would be also possible with
    a proper queuing system.
  • 38:17 - 38:18
    More questions?
  • 38:19 - 38:20
    [Q] I have a bunch of questions.
  • 38:22 - 38:25
    First, what is it that you use for
    partitioning?
  • 38:27 - 38:32
    [A] I'm using a Perl script that we wrote
    several years ago in FAI
  • 38:32 - 38:38
    and we defined this config file,
    this package config
  • 38:38 - 38:46
    and the Perl script parses this script
    and then executes the parted and mkfs command
  • 38:46 - 38:51
    which you can see in the log files, so if
    you want to see what does FAI do
  • 38:51 - 38:56
    after parsing this, which commands are
    executed, you see everything
  • 38:56 - 38:57
    on the log files.
  • 38:58 - 39:03
    [Q] Right, but so you turn this text
    into partitioning…
  • 39:04 - 39:05
    [A] commands, yeah.
  • 39:06 - 39:09
    [Q] But the text looks like this,
    like with the spaces and everything.
  • 39:09 - 39:14
    [A] You can use more or less spaces
    or do you like,
  • 39:14 - 39:17
    should I convert it to XML?
  • 39:19 - 39:21
    [Q] Ok, then my next question is
  • 39:21 - 39:25
    what are you using the nfsroot for when
    you're generating the images?
  • 39:26 - 39:32
    [A] The nfsroot is used only for the
    installation image.
  • 39:32 - 39:37
    When I do the installation, I need to boot
    the machine as a diskless client,
  • 39:37 - 39:42
    so it's just what the debian-installer
    loads into RAM,
  • 39:42 - 39:43
    you need a running Linux system.
  • 39:44 - 39:46
    This is our nfsroot, on the installation
    image.
  • 39:48 - 39:52
    When you boot installation image, this
    nfsroot with all the commands we need
  • 39:52 - 39:56
    are started without using the local disk
    and then we can do
  • 39:56 - 39:59
    everything on the disk, /root and /target
    and so on.
  • 40:00 - 40:05
    The nfsroot is the system that is running
    during the installation.
  • 40:07 - 40:12
    [Q] Ok, but there's no need for this to be
    nfs, it could be a
  • 40:12 - 40:14
    [A] It's called nfsroot.
  • 40:14 - 40:20
    This is very common that people call it
    nfsroot
  • 40:20 - 40:24
    and if you have this network installation
    thing, it's really an nfsroot.
  • 40:24 - 40:26
    But you're right.
  • 40:26 - 40:32
    On the installation ISO, it's not nfs,
    it's just a local file system, yes.
  • 40:35 - 40:39
    [Q] Alright. So, I think it's my last
    comment.
  • 40:39 - 40:45
    You have the ISO from which you install
    and when you install from the ISO
  • 40:45 - 40:51
    you're installing then packages on the
    machine, and then you have the image
  • 40:51 - 40:55
    which is like a disk image that has
    the packages already installed,
  • 40:55 - 40:58
    so you skip the installing step.
  • 40:59 - 41:03
    Have you thought about having
    an intermediate thing
  • 41:03 - 41:07
    where you download an image that
    already has the packages installed?
  • 41:10 - 41:12
    [A] That's also possible.
  • 41:12 - 41:18
    When you do an installation, before you
    can change root in the new system
  • 41:18 - 41:22
    for adding packages, you have to call
    debootstrap.
  • 41:23 - 41:26
    What we do, we call debootstrap once and
    create a tar file out of it.
  • 41:27 - 41:32
    This is our minimal… in the former days
    it was the floppy disk,
  • 41:32 - 41:34
    our base tar.gz file,
  • 41:34 - 41:40
    so you could exchange the minimal tar file
    with whatever tar file you have.
  • 41:41 - 41:44
    That's for example what we do if we install
    Ubuntu.
  • 41:45 - 41:50
    We boot the installation system which is
    a Debian system
  • 41:50 - 41:57
    and then create the local filesystem and
    extract an Ubuntu base image
  • 41:57 - 42:02
    and then we can change root into
    the Ubuntu or the same for CentOS and so on
  • 42:02 - 42:07
    then we can change root into the other
    Linux system and add packages there.
  • 42:08 - 42:13
    If you have already a bigger image with
    some more packages added there,
  • 42:13 - 42:18
    it's very easy to say "Do not extract the
    Debian Stretch image
  • 42:18 - 42:22
    but use my image which also
    includes other tools."
  • 42:23 - 42:27
    And if you are fine with that, you can
    just extract the tar file.
  • 42:31 - 42:33
    [Q] Ok. Any more questions?
  • 42:41 - 42:43
    [Q] The heading is in german.
  • 42:44 - 42:44
    [A] What?
  • 42:45 - 42:46
    [Q] The heading is in german.
  • 42:46 - 42:49
    [A] Oh, because it's a copy of my german
    slides.
  • 42:51 - 42:53
    Thank you for this.
  • 42:53 - 42:55
    And, what's also missing.
  • 42:55 - 43:00
    The web page, where you can select german
    or other languages,
  • 43:00 - 43:05
    it would be nice if people are interested
    to help translate them
  • 43:05 - 43:10
    so that it's more easy for people that
    do not speak english
  • 43:10 - 43:15
    to use the website and create their own
    installation image with their language.
  • 43:24 - 43:28
    [Q] Someone on the stream said that
    the fai.me web site is not yours
  • 43:28 - 43:33
    and it's a hack thing, it's a scam, you go
    there and get hacked.
  • 43:34 - 43:37
    Do you have any plans to try to buy
    the domain because it's pretty confusing.
  • 43:37 - 43:41
    The first thing I would have done
    by seeing that talk would have been
  • 43:41 - 43:42
    to go to fai.me.
  • 43:42 - 43:49
    [A] Yeah, I was thinking about which name
    I should choose.
  • 43:49 - 43:54
    I didn't check which web domains are free
    and in then end I thought
  • 43:54 - 43:59
    "Do I like to have a different domain name
    for the service?"
  • 43:59 - 44:03
    But since it's only a part of the FAI
    project, I thought,
  • 44:03 - 44:08
    and technically it was also easier just
    to host it under a subdirectory
  • 44:08 - 44:17
    and yeah, if people now grab the fai.me
    domain and do other things with it, yeah.
  • 44:17 - 44:25
    I think one question would be to use
    a debian.net or maybe debian.org domain
  • 44:25 - 44:28
    because people trust much more.
  • 44:28 - 44:32
    I get a lot of comments "Oh this would
    be very nice if this would be hosted
  • 44:32 - 44:34
    on a Debian machine"
  • 44:35 - 44:39
    but this would be much more complicated
    because the DSA team
  • 44:39 - 44:43
    has much more restriction what to execute
    on their machines.
  • 44:44 - 44:49
    currently, we need root access because
    we mount some things
  • 44:49 - 44:55
    and DSA would not give me root access
    on any Debian machine.
  • 44:56 - 45:00
    That's the same problem we have
    in the Debian cloud team
  • 45:00 - 45:04
    where we want to create the official
    images for the cloud providers
  • 45:04 - 45:09
    where the Debian cloud team will also
    not have root access
  • 45:09 - 45:13
    and so there's much more work to get
    empty virtual machines
  • 45:13 - 45:18
    starting up, putting data into it,
    creating the images,
  • 45:18 - 45:21
    receiving them from inside the image.
  • 45:22 - 45:27
    And since on those machines I have
    root access, that's much easier for me.
  • 45:30 - 45:33
    We are out of time, so thank you Thomas.
  • 45:35 - 45:40
    [Applause]
Title:
FAI.me - A Build Service for Installation and Cloud Images
Description:

Talk given by Thomas Lange at Minidebconf Hamburg 18
https://meetings-archive.debian.net/pub/debian-meetings/2018/miniconf-hamburg/2018-05-20/fai.me.webm

more » « less
Video Language:
English
Team:
Debconf
Project:
2018_mini-debconf-hamburg
Duration:
45:45

English subtitles

Incomplete

Revisions Compare revisions