1 99:59:59,999 --> 99:59:59,999 Today, I talk about FAI.me, which is a build for images. 2 99:59:59,999 --> 99:59:59,999 First, anybody that never heard anything about FAI? 3 99:59:59,999 --> 99:59:59,999 Ok 4 99:59:59,999 --> 99:59:59,999 I started this project in 1999. 5 99:59:59,999 --> 99:59:59,999 I'm not sure… 6 99:59:59,999 --> 99:59:59,999 No, I'm sure that during those times, the Debian installer did not have 7 99:59:59,999 --> 99:59:59,999 the preseeding stuff, so we needed something automatically. 8 99:59:59,999 --> 99:59:59,999 I installed the first cluster with FAI and I always do talks on FAI or 9 99:59:59,999 --> 99:59:59,999 today in the lightning talks, I talk a little bit about dracut, 10 99:59:59,999 --> 99:59:59,999 which is used in FAI. 11 99:59:59,999 --> 99:59:59,999 So, what was the motivation. 12 99:59:59,999 --> 99:59:59,999 A neighbour of mine, she came to me with 13 99:59:59,999 --> 99:59:59,999 "My Windows desktop is broken, can you reinstall it?" 14 99:59:59,999 --> 99:59:59,999 And in the end, I installed her Linux, and I was shortly thinking about 15 99:59:59,999 --> 99:59:59,999 "Should I use FAI for installing her desktop with Linux?" 16 99:59:59,999 --> 99:59:59,999 And in the end, I did not use it because FAI is too complicated, 17 99:59:59,999 --> 99:59:59,999 like the Debian installer, I guess it's not really that easy for beginners 18 99:59:59,999 --> 99:59:59,999 because there are a lot of questions 19 99:59:59,999 --> 99:59:59,999 but also FAI is not really for beginners. 20 99:59:59,999 --> 99:59:59,999 So this was the motivation about thinking about FAI. 21 99:59:59,999 --> 99:59:59,999 The target group was always advanced sysadmins 22 99:59:59,999 --> 99:59:59,999 but I thought maybe it's possible to make FAI usable also for people 23 99:59:59,999 --> 99:59:59,999 that are not that advanced sysadmins. 24 99:59:59,999 --> 99:59:59,999 The idea is that an installer should cover most installations. 25 99:59:59,999 --> 99:59:59,999 The Debian installer is really perfect because I think it covers 26 99:59:59,999 --> 99:59:59,999 all different kinds and strange environments 27 99:59:59,999 --> 99:59:59,999 You can do a lot of things, you can configure very strange combination of language, 28 99:59:59,999 --> 99:59:59,999 keyboard layout and so on 29 99:59:59,999 --> 99:59:59,999 but I was thinking about an installer that covers 90 or 95% of the installations 30 99:59:59,999 --> 99:59:59,999 A lot of special cases can be ignored and since the Debian installer has like 31 99:59:59,999 --> 99:59:59,999 more than 20 questions, I thought it would be much nicer if there were only 32 99:59:59,999 --> 99:59:59,999 3 to 5 questions and I looked at Linux Mint and Mageia installers, CentOS installer, 33 99:59:59,999 --> 99:59:59,999 and they all ask much less questions. 34 99:59:59,999 --> 99:59:59,999 In the Debian installer, we sometimes have also things that are asked 35 99:59:59,999 --> 99:59:59,999 during the installation, so not everything is asked at the very beginning. 36 99:59:59,999 --> 99:59:59,999 For example, the task selection, where you select your desktop, 37 99:59:59,999 --> 99:59:59,999 is done after the base installation. 38 99:59:59,999 --> 99:59:59,999 This was also very important, I would like to have something that 39 99:59:59,999 --> 99:59:59,999 asks everything at the very beginning. 40 99:59:59,999 --> 99:59:59,999 Then, maybe some tool could create a customized installation image 41 99:59:59,999 --> 99:59:59,999 and this installation image should run then completely unattended 42 99:59:59,999 --> 99:59:59,999 so you can get yourself a coffee and when you come back, your machine is ready. 43 99:59:59,999 --> 99:59:59,999 There are 3 things to customize installation image, 44 99:59:59,999 --> 99:59:59,999 you just put this image, you do not have to touch anything, and then it's ready. 45 99:59:59,999 --> 99:59:59,999 I thought "Oh yes, this is FAI, maybe FAI can do this." 46 99:59:59,999 --> 99:59:59,999 As I said, FAI is only, or was until now only a tool for experienced sysadmins 47 99:59:59,999 --> 99:59:59,999 and you have to adjust several config files, these are ASCII files 48 99:59:59,999 --> 99:59:59,999 but still you have to touch 5 to 10 config files to make a customization. 49 99:59:59,999 --> 99:59:59,999 So, how can I make FAI usable for beginners? 50 99:59:59,999 --> 99:59:59,999 That's the beginning of FAI.me. 51 99:59:59,999 --> 99:59:59,999 There's a web page, we'll show it in more detail later, 52 99:59:59,999 --> 99:59:59,999 where you can just click some things, and then you get a customized image. 53 99:59:59,999 --> 99:59:59,999 This image can be put onto a CD, DVD or USB stick, just with dd 54 99:59:59,999 --> 99:59:59,999 and the customization is just by using the web interface 55 99:59:59,999 --> 99:59:59,999 so there's no need for you to edit a text file, a config file inside FAI. 56 99:59:59,999 --> 99:59:59,999 I hope I covered most important thangs that you want to adjust 57 99:59:59,999 --> 99:59:59,999 or a little bit customize. 58 99:59:59,999 --> 99:59:59,999 You can add additional packages, I think that's the most important thing 59 99:59:59,999 --> 99:59:59,999 that people say "I want to have the normal Debian installation 60 99:59:59,999 --> 99:59:59,999 but with some additional packages." 61 99:59:59,999 --> 99:59:59,999 And you can select different different distributions, so it's not only 62 99:59:59,999 --> 99:59:59,999 the installation image for the stable release, you can create 63 99:59:59,999 --> 99:59:59,999 3 variants of the installation. 64 99:59:59,999 --> 99:59:59,999 This is the web page and thanks to Juri, he did a great job 65 99:59:59,999 --> 99:59:59,999 during the first and second day, he added a new feature that we now have 66 99:59:59,999 --> 99:59:59,999 a toggle button. 67 99:59:59,999 --> 99:59:59,999 Is it big enough or should I zoom in? 68 99:59:59,999 --> 99:59:59,999 Ok. 69 99:59:59,999 --> 99:59:59,999 So, we have a toggle button, what you see now is just the bare minimum or questions 70 99:59:59,999 --> 99:59:59,999 and we can toggle it to more advanced settings. 71 99:59:59,999 --> 99:59:59,999 You have to select or just leave this as it is, username, 72 99:59:59,999 --> 99:59:59,999 if you do not enter a password, a password will be generated and shown to you 73 99:59:59,999 --> 99:59:59,999 and sent by e-mail. 74 99:59:59,999 --> 99:59:59,999 I will now just type in the password. 75 99:59:59,999 --> 99:59:59,999 It's here in clear text, for me that's fine because 76 99:59:59,999 --> 99:59:59,999 there's also a comment that you should change the password after the installation 77 99:59:59,999 --> 99:59:59,999 and I do not like to enter passwords twice so you can see what you typed in 78 99:59:59,999 --> 99:59:59,999 and hopefully do not make any wrong mistakes. 79 99:59:59,999 --> 99:59:59,999 For example, we could select the Stretch distribution with backports, 80 99:59:59,999 --> 99:59:59,999 so we will get a 4.15 kernel with Stretch. 81 99:59:59,999 --> 99:59:59,999 There are some buttons we can say we want to have some Debian developer tools. 82 99:59:59,999 --> 99:59:59,999 This is what I defined in the FAI configuration, so just a list of packages. 83 99:59:59,999 --> 99:59:59,999 Here, you can enter you own packages. 84 99:59:59,999 --> 99:59:59,999 I will select the desktop. 85 99:59:59,999 --> 99:59:59,999 You can have an installation without any desktop, so a very small installation. 86 99:59:59,999 --> 99:59:59,999 I will select the XFCE desktop, but all the other desktops are here. 87 99:59:59,999 --> 99:59:59,999 The language, these are just task packages that are… 88 99:59:59,999 --> 99:59:59,999 I think Debian has much more task packages, I just searched which are 89 99:59:59,999 --> 99:59:59,999 the most common languages, and what I do if I say I want the spanish language, 90 99:59:59,999 --> 99:59:59,999 also the keyboard layout is spanish. 91 99:59:59,999 --> 99:59:59,999 I know there are different combinations and with local time, 92 99:59:59,999 --> 99:59:59,999 it's getting more difficult. 93 99:59:59,999 --> 99:59:59,999 This installation will install the clock with UTC, so if you want to set 94 99:59:59,999 --> 99:59:59,999 your time, you have to do this manually. 95 99:59:59,999 --> 99:59:59,999 I want to cover the most common installations. 96 99:59:59,999 --> 99:59:59,999 We select english US, the desktop and, as an example, the midnight commander 97 99:59:59,999 --> 99:59:59,999 and GIMP. 98 99:59:59,999 --> 99:59:59,999 I can add an email address so if it would take longer, 99 99:59:59,999 --> 99:59:59,999 for example if this service will have success and a lot of people are using it, 100 99:59:59,999 --> 99:59:59,999 you may wait for some minutes so your job will be finished. 101 99:59:59,999 --> 99:59:59,999 So here are the comments, how to reconfigure the keyboard or the timezone 102 99:59:59,999 --> 99:59:59,999 and then you just click "Create the installation image". 103 99:59:59,999 --> 99:59:59,999 Now, in the background, there's some job, a script, looking "Oh, there's a new job" 104 99:59:59,999 --> 99:59:59,999 and there's a summary of the configuration, of the web configuration. 105 99:59:59,999 --> 99:59:59,999 Down here you see these are the FAI classes, 106 99:59:59,999 --> 99:59:59,999 I will explain a little bit more about this. 107 99:59:59,999 --> 99:59:59,999 But with this information, FAI configuration is generated, 108 99:59:59,999 --> 99:59:59,999 that's what normally the experienced sysadmins have to create 109 99:59:59,999 --> 99:59:59,999 but here you just click on some buttons and it will be done for you. 110 99:59:59,999 --> 99:59:59,999 In the meantime, we have some more advanced features 111 99:59:59,999 --> 99:59:59,999 which I will also show you later. 112 99:59:59,999 --> 99:59:59,999 For example, this very simple installation just creates one partition 113 99:59:59,999 --> 99:59:59,999 but you can also select that you want to have a separate /home partition 114 99:59:59,999 --> 99:59:59,999 or using lvm just by selecting this on the web interface. 115 99:59:59,999 --> 99:59:59,999 You can also add your SSH public key for logging as root without a password 116 99:59:59,999 --> 99:59:59,999 or what's very nice, I found the new Ubuntu installer does this, 117 99:59:59,999 --> 99:59:59,999 you can give your github account and then there's a comment which 118 99:59:59,999 --> 99:59:59,999 receives the public key from your github account and puts it 119 99:59:59,999 --> 99:59:59,999 into the root account so you can log in without password. 120 99:59:59,999 --> 99:59:59,999 I think that's very neat. 121 99:59:59,999 --> 99:59:59,999 And if you have a repository with your own packages, you could also add this and say 122 99:59:59,999 --> 99:59:59,999 "Please install those packages from my publicly available repository." 123 99:59:59,999 --> 99:59:59,999 Let's see. 124 99:59:59,999 --> 99:59:59,999 As we see, this job finished in 74 seconds. 125 99:59:59,999 --> 99:59:59,999 Now, this customised installation image is available for download. 126 99:59:59,999 --> 99:59:59,999 You can also download the log file. 127 99:59:59,999 --> 99:59:59,999 Since this is an installation image, I first have to create 128 99:59:59,999 --> 99:59:59,999 a partial package mirror. 129 99:59:59,999 --> 99:59:59,999 This is done by the command 'fai-mirror' and you can also read the log of 130 99:59:59,999 --> 99:59:59,999 this call of the fai-mirror, where a list of all you packages with all the dependencies 131 99:59:59,999 --> 99:59:59,999 are available. 132 99:59:59,999 --> 99:59:59,999 So you see, these are the list of packages and later they are downloaded 133 99:59:59,999 --> 99:59:59,999 and in the end, it says it created a mirror of 1G of packages 134 99:59:59,999 --> 99:59:59,999 and since I have a local mirror, it's very fast. 135 99:59:59,999 --> 99:59:59,999 This is the one part on the installation image partial mirror with all the packages 136 99:59:59,999 --> 99:59:59,999 and the other is that the config space which you can also download. 137 99:59:59,999 --> 99:59:59,999 So this is the config space that was really created for you 138 99:59:59,999 --> 99:59:59,999 by clicking the web interface. 139 99:59:59,999 --> 99:59:59,999 If you want to do more things with FAI, you can set up your own FAI server 140 99:59:59,999 --> 99:59:59,999 and use this configuration space. 141 99:59:59,999 --> 99:59:59,999 And, that's also very new, the two commands that are used for creating this ISO image 142 99:59:59,999 --> 99:59:59,999 are now also listed there. 143 99:59:59,999 --> 99:59:59,999 First, create the partial mirror and then create the installation image. 144 99:59:59,999 --> 99:59:59,999 Ok, copy link location… 145 99:59:59,999 --> 99:59:59,999 Let's see how good the network is here. 146 99:59:59,999 --> 99:59:59,999 [Q] It's a rather large image. 147 99:59:59,999 --> 99:59:59,999 Yeah, because it includes all the packages and with Xfce, LibreOffice and so on 148 99:59:59,999 --> 99:59:59,999 and the installation environment is maybe about 200MB. 149 99:59:59,999 --> 99:59:59,999 That's not much bigger than the Debian installer that you need to download. 150 99:59:59,999 --> 99:59:59,999 So, 2, 1, done. 151 99:59:59,999 --> 99:59:59,999 I have a little wrapper which calls a fresh kvm machine 152 99:59:59,999 --> 99:59:59,999 with an empty disk and boots this ISO image 153 99:59:59,999 --> 99:59:59,999 and then we will see how this installation runs. 154 99:59:59,999 --> 99:59:59,999 So this is dracut booting the image 155 99:59:59,999 --> 99:59:59,999 and now you see there are already some parted commands executed 156 99:59:59,999 --> 99:59:59,999 and now the packages are installed and everything runs on 157 99:59:59,999 --> 99:59:59,999 and in the end some customization script. 158 99:59:59,999 --> 99:59:59,999 We use only shell scripts for doing some customizations 159 99:59:59,999 --> 99:59:59,999 and you see the files are downloaded from /media/mirror 160 99:59:59,999 --> 99:59:59,999 so this is local on the ISO image. 161 99:59:59,999 --> 99:59:59,999 It would also be possible to create an image without the packages 162 99:59:59,999 --> 99:59:59,999 and then give another sources.list file so the packages would be downloaded 163 99:59:59,999 --> 99:59:59,999 from the internet but this default in the FAI service, 164 99:59:59,999 --> 99:59:59,999 we put everything onto the ISO image. 165 99:59:59,999 --> 99:59:59,999 I guess it will run for 4 minutes. 166 99:59:59,999 --> 99:59:59,999 [Q] ??? 167 99:59:59,999 --> 99:59:59,999 Yeah. 168 99:59:59,999 --> 99:59:59,999 What I will show you now is… 169 99:59:59,999 --> 99:59:59,999 So, this was the simple one, now I toggle this web page and 170 99:59:59,999 --> 99:59:59,999 you will see that there are some more questions you may answer, 171 99:59:59,999 --> 99:59:59,999 for example you can give a root password. 172 99:59:59,999 --> 99:59:59,999 If you leave this empty, sudo will be configured. 173 99:59:59,999 --> 99:59:59,999 Here you can upload the SSH key or give you Github account, 174 99:59:59,999 --> 99:59:59,999 that would be Mrfai for me. 175 99:59:59,999 --> 99:59:59,999 With the partitioning schemes, we have one partition 176 99:59:59,999 --> 99:59:59,999 or one partition and /home separated or these two versions with LVM. 177 99:59:59,999 --> 99:59:59,999 FAI itself can do much more, we could do soft raid set ups, cryptsetup 178 99:59:59,999 --> 99:59:59,999 but here I want to cover the most common installation, so very simple 179 99:59:59,999 --> 99:59:59,999 we have only 4 things that you can choose. 180 99:59:59,999 --> 99:59:59,999 [Q] For encryption? 181 99:59:59,999 --> 99:59:59,999 [A] Yes. 182 99:59:59,999 --> 99:59:59,999 So, this was the partitioning things. 183 99:59:59,999 --> 99:59:59,999 This is the new feature where you can add an URL for your local package repository 184 99:59:59,999 --> 99:59:59,999 and the rest is the same, you can add packages you like, your email address 185 99:59:59,999 --> 99:59:59,999 and then also create an installation image. 186 99:59:59,999 --> 99:59:59,999 I normally set by default, I include the nonfree linux firmware. 187 99:59:59,999 --> 99:59:59,999 This is because my target audience is an end user and I want to make it 188 99:59:59,999 --> 99:59:59,999 very comfortable for them, so yeah, they can just install it 189 99:59:59,999 --> 99:59:59,999 and do not have these problems. 190 99:59:59,999 --> 99:59:59,999 And since this is not on an officiel debian.org web site, 191 99:59:59,999 --> 99:59:59,999 I can do this with this default. 192 99:59:59,999 --> 99:59:59,999 Let's see, the installation is still running. 193 99:59:59,999 --> 99:59:59,999 So, advanced features. 194 99:59:59,999 --> 99:59:59,999 The next thing after this installation, 195 99:59:59,999 --> 99:59:59,999 I will show you how to create cloud images. 196 99:59:59,999 --> 99:59:59,999 Currently, we create an installation image, 197 99:59:59,999 --> 99:59:59,999 when you boot it, the installation is run fully automatically. 198 99:59:59,999 --> 99:59:59,999 The other type of service FAI.me gives to you is that it creates a raw image 199 99:59:59,999 --> 99:59:59,999 or some other formats as you see here, qcow2 and whatever 200 99:59:59,999 --> 99:59:59,999 which you can just boot and the installation is already done. 201 99:59:59,999 --> 99:59:59,999 But first, see if the installation finish. 202 99:59:59,999 --> 99:59:59,999 Ah! Ok. 203 99:59:59,999 --> 99:59:59,999 These are now the shell scripts that are executed for the customization 204 99:59:59,999 --> 99:59:59,999 of like /etc/messages of today, /etc/network/interfaces is written 205 99:59:59,999 --> 99:59:59,999 and so on. 206 99:59:59,999 --> 99:59:59,999 You see the installation took 236s, it says there are some errors 207 99:59:59,999 --> 99:59:59,999 but that's not really true. 208 99:59:59,999 --> 99:59:59,999 And it stops here, but we can also disable this, this is only for showing 209 99:59:59,999 --> 99:59:59,999 everything went well 210 99:59:59,999 --> 99:59:59,999 and now we just reboot the machine. 211 99:59:59,999 --> 99:59:59,999 You see the grub. 212 99:59:59,999 --> 99:59:59,999 Ok, Xfce desktop. 213 99:59:59,999 --> 99:59:59,999 debian was a user with password FAI. 214 99:59:59,999 --> 99:59:59,999 We have "uname -a", this is 4.16, the backports kernel was installed there. 215 99:59:59,999 --> 99:59:59,999 We have only one partition, no LVM 216 99:59:59,999 --> 99:59:59,999 and I told it to install gimp which is not installed by default. 217 99:59:59,999 --> 99:59:59,999 Gimp is there, so this is nice. 218 99:59:59,999 --> 99:59:59,999 And the midnight commander is also there. 219 99:59:59,999 --> 99:59:59,999 And now we just throw this machine. Gone. 220 99:59:59,999 --> 99:59:59,999 What's very nice with this wrapper script, it creates the local disk 221 99:59:59,999 --> 99:59:59,999 of the virtual machine in /tmp which is a RAM disk and I love RAM, 222 99:59:59,999 --> 99:59:59,999 it's so nice and fast. 223 99:59:59,999 --> 99:59:59,999 So, this was installation image and now we look at the cloud image. 224 99:59:59,999 --> 99:59:59,999 First, you can say how big should your disk image be. 225 99:59:59,999 --> 99:59:59,999 Here, I say 8GB, you will see it's not an 8GB image 226 99:59:59,999 --> 99:59:59,999 that you have to download later. 227 99:59:59,999 --> 99:59:59,999 By default, I use zstd compression. 228 99:59:59,999 --> 99:59:59,999 Anyone who dose not know this compression? 229 99:59:59,999 --> 99:59:59,999 This is very fast, very new, created by Facebook if I'm correct. 230 99:59:59,999 --> 99:59:59,999 It's for very big files and what you should never use is gzip with sparse images. 231 99:59:59,999 --> 99:59:59,999 The disk image is sparse and gzip cannot handle this 232 99:59:59,999 --> 99:59:59,999 so if you compress it and uncompress it it will be very large 233 99:59:59,999 --> 99:59:59,999 and all the other, xz, zstd, can handle sparse files very nicely. 234 99:59:59,999 --> 99:59:59,999 So, the hostname is set, the root password, username with a password. 235 99:59:59,999 --> 99:59:59,999 Now we want to install Buster.