1 00:00:04,960 --> 00:00:20,000 [Music] 2 00:00:20,480 --> 00:00:28,519 Al righty welcome back welcome back to 3 00:00:25,199 --> 00:00:30,920 devs thank you for coming um a quick 4 00:00:28,519 --> 00:00:33,559 note if you are interested in giving a 5 00:00:30,920 --> 00:00:35,280 lightning talk for devops we have a a 6 00:00:33,559 --> 00:00:37,760 lightning talk track just for the devops 7 00:00:35,280 --> 00:00:40,600 track uh later this afternoon please put 8 00:00:37,760 --> 00:00:42,440 in a talk very very shortly there is a 9 00:00:40,600 --> 00:00:44,719 link on the conference website if you 10 00:00:42,440 --> 00:00:47,520 scroll way down near the bottom you'll 11 00:00:44,719 --> 00:00:50,000 find a link to the lightning talk form 12 00:00:47,520 --> 00:00:51,120 please submit a form uh get on to that 13 00:00:50,000 --> 00:00:53,480 straight away because we need to close 14 00:00:51,120 --> 00:00:54,760 that off so we can let you know uh who 15 00:00:53,480 --> 00:00:57,079 is going to be giving talk so you have 16 00:00:54,760 --> 00:01:01,399 time to build one they're only short but 17 00:00:57,079 --> 00:01:04,280 yeah takes time to build something 18 00:01:01,399 --> 00:01:06,320 and with that said now I would like to 19 00:01:04,280 --> 00:01:08,320 give you David Anderson who is here to 20 00:01:06,320 --> 00:01:10,600 talk to us about simplifying python web 21 00:01:08,320 --> 00:01:13,479 app operations automating kubernetes Ops 22 00:01:10,600 --> 00:01:15,400 with open source David is from canonical 23 00:01:13,479 --> 00:01:19,080 and uh we'll tell you more about himself 24 00:01:15,400 --> 00:01:22,240 as he commences his talk thank you David 25 00:01:19,080 --> 00:01:22,240 great thank you for 26 00:01:23,600 --> 00:01:27,640 that I'm happy to be here uh one year 27 00:01:26,159 --> 00:01:29,400 ago I was still living in Melbourne 28 00:01:27,640 --> 00:01:31,439 currently I live in Brisbane but I'm 29 00:01:29,400 --> 00:01:34,759 happy to be back back 30 00:01:31,439 --> 00:01:36,880 um okay so as as was said my name is 31 00:01:34,759 --> 00:01:38,960 David Anderson I work for canonical if 32 00:01:36,880 --> 00:01:41,360 you don't know what that company is you 33 00:01:38,960 --> 00:01:44,479 might know about Ubuntu so canonical em 34 00:01:41,360 --> 00:01:46,840 makers of Ubuntu um and what I'm going 35 00:01:44,479 --> 00:01:49,439 to talk to you about it's a complicated 36 00:01:46,840 --> 00:01:52,000 title um simpler words is I want to 37 00:01:49,439 --> 00:01:53,560 deploy my flask application um using 38 00:01:52,000 --> 00:01:57,079 communities and sort of what are your 39 00:01:53,560 --> 00:01:58,280 options for doing that um so overall I'm 40 00:01:57,079 --> 00:02:02,520 going to give you a quick introduction 41 00:01:58,280 --> 00:02:04,439 to the the that we're going to um deploy 42 00:02:02,520 --> 00:02:06,399 then we're going to deploy it using 43 00:02:04,439 --> 00:02:08,319 three different methods and you know 44 00:02:06,399 --> 00:02:09,920 take a look at uh what are the 45 00:02:08,319 --> 00:02:12,480 consequences what are benefits what are 46 00:02:09,920 --> 00:02:14,959 the drawbacks um so the first that we're 47 00:02:12,480 --> 00:02:17,879 going to look at is using Helm charts 48 00:02:14,959 --> 00:02:19,280 which is using sort of the uh Native 49 00:02:17,879 --> 00:02:21,840 kubernetes 50 00:02:19,280 --> 00:02:23,400 resources um in a sort of templated 51 00:02:21,840 --> 00:02:25,440 format then we're going to take a look 52 00:02:23,400 --> 00:02:28,680 at what sort of platform as a service 53 00:02:25,440 --> 00:02:31,040 type of solution looks like using fly.io 54 00:02:28,680 --> 00:02:33,080 and then I'll show you a tool called 55 00:02:31,040 --> 00:02:35,239 Juju which is an open source tool that 56 00:02:33,080 --> 00:02:37,200 we've been working on at canonical um 57 00:02:35,239 --> 00:02:40,519 that can do this that has a similar 58 00:02:37,200 --> 00:02:43,239 experience to fly.io um but without sort 59 00:02:40,519 --> 00:02:47,280 of P type of 60 00:02:43,239 --> 00:02:48,920 login okay so to start with to set the 61 00:02:47,280 --> 00:02:50,560 scene let's say you have flask 62 00:02:48,920 --> 00:02:52,920 application now the previous talk was 63 00:02:50,560 --> 00:02:55,000 about jeno we also have the same tooling 64 00:02:52,920 --> 00:02:57,400 for jeno uh we also have the same 65 00:02:55,000 --> 00:02:58,879 tooling for fast API and for go 66 00:02:57,400 --> 00:03:00,640 applications and we're working on more 67 00:02:58,879 --> 00:03:01,920 Frameworks as well 68 00:03:00,640 --> 00:03:03,680 um but let's say you have a flask 69 00:03:01,920 --> 00:03:06,159 application and you want to run it on 70 00:03:03,680 --> 00:03:09,360 production on um kubernetes what are 71 00:03:06,159 --> 00:03:11,920 your options um so you can sort of do it 72 00:03:09,360 --> 00:03:13,799 yourself and write the kubernetes 73 00:03:11,920 --> 00:03:15,920 resource files yourself which are 74 00:03:13,799 --> 00:03:18,040 deployment Services Ingress that sort of 75 00:03:15,920 --> 00:03:20,440 stuff and the kind of General way to do 76 00:03:18,040 --> 00:03:22,080 that these days is using Helm charts um 77 00:03:20,440 --> 00:03:23,920 you can sort of ask somebody else to do 78 00:03:22,080 --> 00:03:26,760 it for you and use a platform as a 79 00:03:23,920 --> 00:03:28,760 service something like fly. IO um or you 80 00:03:26,760 --> 00:03:30,799 can use some open source tooling that 81 00:03:28,760 --> 00:03:33,760 that um we've been working on that 82 00:03:30,799 --> 00:03:35,040 canonical so this is the demo applic or 83 00:03:33,760 --> 00:03:38,080 the application that we're going to take 84 00:03:35,040 --> 00:03:40,640 a look at today it's very simple um it 85 00:03:38,080 --> 00:03:43,760 just has a a root index that just 86 00:03:40,640 --> 00:03:45,799 returns H world the what I'm showing you 87 00:03:43,760 --> 00:03:47,599 Works um for more complicated 88 00:03:45,799 --> 00:03:49,280 applications as well I just don't want 89 00:03:47,599 --> 00:03:51,560 to focus too much on the application and 90 00:03:49,280 --> 00:03:53,480 instead focus on the deployment side of 91 00:03:51,560 --> 00:03:55,159 things we're going to make it slightly 92 00:03:53,480 --> 00:03:57,879 more complicated towards the end by 93 00:03:55,159 --> 00:03:59,360 introducing a dependence init database 94 00:03:57,879 --> 00:04:03,000 um and sort of making use of that 95 00:03:59,360 --> 00:04:05,439 database but for now it's it's very 96 00:04:03,000 --> 00:04:08,760 simple if you're not familiar with 97 00:04:05,439 --> 00:04:12,000 containers what's an open what's an oci 98 00:04:08,760 --> 00:04:14,400 image um it's a Linux Foundation project 99 00:04:12,000 --> 00:04:16,959 and it's a sort of specification around 100 00:04:14,400 --> 00:04:19,440 containers um and things like Docker 101 00:04:16,959 --> 00:04:22,280 podman Builder scopio all comply with 102 00:04:19,440 --> 00:04:25,080 this um with this 103 00:04:22,280 --> 00:04:26,759 specification okay so you have your 104 00:04:25,080 --> 00:04:29,759 flask application now you need to create 105 00:04:26,759 --> 00:04:32,600 an OC image which is or dock image where 106 00:04:29,759 --> 00:04:35,080 which is the probably more popular term 107 00:04:32,600 --> 00:04:37,400 um you know which is a requirement to 108 00:04:35,080 --> 00:04:39,520 run it anywhere on kubernetes and if you 109 00:04:37,400 --> 00:04:40,800 go and Google and type in create a 110 00:04:39,520 --> 00:04:42,479 Docker application for a flask 111 00:04:40,800 --> 00:04:46,240 application you would get something like 112 00:04:42,479 --> 00:04:47,880 this um which starts with python 32 113 00:04:46,240 --> 00:04:50,960 maybe now you can start with 114 00:04:47,880 --> 00:04:53,600 313 um it just copies the requirements 115 00:04:50,960 --> 00:04:54,840 file installs the requirements copies 116 00:04:53,600 --> 00:04:58,360 everything from your local directory 117 00:04:54,840 --> 00:05:01,560 into the container and then runs flask 118 00:04:58,360 --> 00:05:02,919 run now there's some issues here um it 119 00:05:01,560 --> 00:05:04,600 copying everything from your local 120 00:05:02,919 --> 00:05:07,520 directory is not great because there 121 00:05:04,600 --> 00:05:10,240 might be things like your git um 122 00:05:07,520 --> 00:05:11,600 directory is there you might have some 123 00:05:10,240 --> 00:05:13,800 Secrets stored there that you haven't 124 00:05:11,600 --> 00:05:15,960 checked into get but that you still need 125 00:05:13,800 --> 00:05:19,600 locally um your virtual environment 126 00:05:15,960 --> 00:05:21,280 might be there so that's not the best um 127 00:05:19,600 --> 00:05:22,720 and here it's running the flas 128 00:05:21,280 --> 00:05:24,440 development server which is also not a 129 00:05:22,720 --> 00:05:25,800 great idea because there security issues 130 00:05:24,440 --> 00:05:28,199 with it because it's for development 131 00:05:25,800 --> 00:05:30,759 purposes and it's also not 132 00:05:28,199 --> 00:05:34,039 scalable so you put in all the sort of 133 00:05:30,759 --> 00:05:37,680 effort yourself um and improve this or 134 00:05:34,039 --> 00:05:40,800 alternatively um we have uh some tooling 135 00:05:37,680 --> 00:05:43,319 that um can create oci images that are 136 00:05:40,800 --> 00:05:45,319 compatible with dock as well um they're 137 00:05:43,319 --> 00:05:48,080 called the tool is called 138 00:05:45,319 --> 00:05:50,080 rockcraft um in the top right there you 139 00:05:48,080 --> 00:05:51,400 there's a tutorial which go steps you 140 00:05:50,080 --> 00:05:53,800 through everything that we're about to 141 00:05:51,400 --> 00:05:57,000 see in a sort of video 142 00:05:53,800 --> 00:06:00,240 demonstration um and this tooling 143 00:05:57,000 --> 00:06:02,560 natively understands um flasks so 144 00:06:00,240 --> 00:06:04,240 from a high level perspective those four 145 00:06:02,560 --> 00:06:07,759 commands is all that you have to do to 146 00:06:04,240 --> 00:06:11,039 actually create a production scalable 147 00:06:07,759 --> 00:06:14,039 image for your flask 148 00:06:11,039 --> 00:06:16,520 application okay so let's take a look at 149 00:06:14,039 --> 00:06:19,599 what that in 150 00:06:16,520 --> 00:06:21,039 action okay so just showing you that we 151 00:06:19,599 --> 00:06:22,680 haven't changed anything about the 152 00:06:21,039 --> 00:06:24,800 application so we have the requirements 153 00:06:22,680 --> 00:06:27,639 of text file which has just got flask in 154 00:06:24,800 --> 00:06:29,599 it we also have the app.py which is the 155 00:06:27,639 --> 00:06:31,000 same as we saw before and if we just 156 00:06:29,599 --> 00:06:34,880 just run it locally to verify that 157 00:06:31,000 --> 00:06:38,520 everything works um it will respond with 158 00:06:34,880 --> 00:06:38,520 um hello world so everything is working 159 00:06:44,280 --> 00:06:49,280 fine okay so now we just check what 160 00:06:47,479 --> 00:06:51,160 version of rockcraft we have installed 161 00:06:49,280 --> 00:06:54,160 it's 162 00:06:51,160 --> 00:06:58,800 1.5.3 163 00:06:54,160 --> 00:07:01,479 um and then we need to use the uh a sort 164 00:06:58,800 --> 00:07:04,800 of profile to create what the equivalent 165 00:07:01,479 --> 00:07:08,080 of a Docker file is so a Docker file is 166 00:07:04,800 --> 00:07:09,560 a series of sort of commands um that get 167 00:07:08,080 --> 00:07:11,360 executed by Docker and then at the end 168 00:07:09,560 --> 00:07:13,879 it takes a snapshot and that's what your 169 00:07:11,360 --> 00:07:16,919 image is rockcraft takes a slightly 170 00:07:13,879 --> 00:07:19,039 different philosophy it is a yaml file 171 00:07:16,919 --> 00:07:21,599 where you say I want all these things in 172 00:07:19,039 --> 00:07:23,400 my ooc image and then rockcraft will 173 00:07:21,599 --> 00:07:26,080 sort of make that happen for you so you 174 00:07:23,400 --> 00:07:29,759 say things like okay these files from my 175 00:07:26,080 --> 00:07:31,759 local um local file system I want copy 176 00:07:29,759 --> 00:07:35,520 in these are the python dependencies 177 00:07:31,759 --> 00:07:38,120 these are the app packages these are the 178 00:07:35,520 --> 00:07:42,639 um other things that I might want um in 179 00:07:38,120 --> 00:07:45,879 My OC image and we have created a um a 180 00:07:42,639 --> 00:07:48,639 profile um for flask and for Jango and a 181 00:07:45,879 --> 00:07:50,280 few other things as well um that 182 00:07:48,639 --> 00:07:52,440 natively understand how to run how to 183 00:07:50,280 --> 00:07:54,599 create images for these these um 184 00:07:52,440 --> 00:07:57,240 Frameworks and at the top here you just 185 00:07:54,599 --> 00:07:59,199 have a bit of metadata and then it's 186 00:07:57,240 --> 00:08:02,280 making use of of an extension that we've 187 00:07:59,199 --> 00:08:03,599 to find so it's it's very simple and 188 00:08:02,280 --> 00:08:05,919 then all we have to do is run the 189 00:08:03,599 --> 00:08:08,479 rockcraft pack command and at the end of 190 00:08:05,919 --> 00:08:11,199 that you will get a an archive written 191 00:08:08,479 --> 00:08:14,039 to your disk which is an OCA archive so 192 00:08:11,199 --> 00:08:16,560 it's compatible with Docker um for your 193 00:08:14,039 --> 00:08:20,000 flask application 194 00:08:16,560 --> 00:08:21,840 um and just to demonstrate that it is 195 00:08:20,000 --> 00:08:23,800 compatible with with Docker which you 196 00:08:21,840 --> 00:08:25,520 might be more familiar with um we're 197 00:08:23,800 --> 00:08:28,360 going to upload it to the local Docker 198 00:08:25,520 --> 00:08:30,879 registry and then run it so there's a 199 00:08:28,360 --> 00:08:35,039 tool called scopio which you can use to 200 00:08:30,879 --> 00:08:37,560 upload um the image and then if you go 201 00:08:35,039 --> 00:08:40,279 dock images you can see that our demo 202 00:08:37,560 --> 00:08:43,719 app is actually listed and then we can 203 00:08:40,279 --> 00:08:45,920 go run the image using that Docker 204 00:08:43,719 --> 00:08:48,640 command 205 00:08:45,920 --> 00:08:51,160 and uh send a cur request and we get 206 00:08:48,640 --> 00:08:53,800 hello world again so all you had to do 207 00:08:51,160 --> 00:08:56,080 is install rockcraft use the profile 208 00:08:53,800 --> 00:08:58,240 inside of rockcraft that we' created for 209 00:08:56,080 --> 00:09:00,440 flask pack the application and then you 210 00:08:58,240 --> 00:09:01,880 have a production ready um container 211 00:09:00,440 --> 00:09:04,519 which doesn't have any of the problems I 212 00:09:01,880 --> 00:09:06,720 was talking about in the um in the 213 00:09:04,519 --> 00:09:08,800 docker that I showed you earlier again 214 00:09:06,720 --> 00:09:11,320 if you'd like to go for a tutorial that 215 00:09:08,800 --> 00:09:14,200 starts from a blank Ubuntu installation 216 00:09:11,320 --> 00:09:17,120 and gets you all the way to a um running 217 00:09:14,200 --> 00:09:18,800 Docker image um you can use that QR code 218 00:09:17,120 --> 00:09:21,800 in the top right 219 00:09:18,800 --> 00:09:25,360 there 220 00:09:21,800 --> 00:09:29,000 oops okay so now we have our oci image 221 00:09:25,360 --> 00:09:30,079 and this oci image will run anywhere um 222 00:09:29,000 --> 00:09:31,839 so 223 00:09:30,079 --> 00:09:35,800 anyway where you have kues you can make 224 00:09:31,839 --> 00:09:37,399 use of it it's a standalone product that 225 00:09:35,800 --> 00:09:39,560 um doesn't depend on anything else that 226 00:09:37,399 --> 00:09:41,640 I talk about here so let's say we want 227 00:09:39,560 --> 00:09:43,920 to deploy it um so the first option that 228 00:09:41,640 --> 00:09:46,519 we're going to go through is using Helm 229 00:09:43,920 --> 00:09:48,560 charts so if you remember this is the n 230 00:09:46,519 --> 00:09:50,079 using native sort of cuetes resources 231 00:09:48,560 --> 00:09:52,160 that you define 232 00:09:50,079 --> 00:09:53,920 yourself so let's take a look at what 233 00:09:52,160 --> 00:09:56,920 that would look 234 00:09:53,920 --> 00:09:56,920 like 235 00:09:58,160 --> 00:10:02,800 um okay so we're just going to create a 236 00:10:00,680 --> 00:10:05,040 name space where we deploy the 237 00:10:02,800 --> 00:10:06,839 application uh make sure that Ingress is 238 00:10:05,040 --> 00:10:10,079 enabled so that we can expose our 239 00:10:06,839 --> 00:10:10,079 application later 240 00:10:20,320 --> 00:10:26,720 on I'm sure it'll Play 241 00:10:23,600 --> 00:10:29,800 No there we go okay now we have to 242 00:10:26,720 --> 00:10:33,040 upload the um or I should explain this 243 00:10:29,800 --> 00:10:36,320 we have to upload the oi image to our 244 00:10:33,040 --> 00:10:38,959 local running of kubernetes what I'm 245 00:10:36,320 --> 00:10:41,600 doing here is that I have an obuntu 246 00:10:38,959 --> 00:10:44,160 image running um and there's a snap 247 00:10:41,600 --> 00:10:45,720 called micro Cades um that we're 248 00:10:44,160 --> 00:10:47,680 renaming a little bit but don't worry 249 00:10:45,720 --> 00:10:50,720 about that too much so micro Kates is a 250 00:10:47,680 --> 00:10:53,160 way of um running a sort of 251 00:10:50,720 --> 00:10:55,120 development uh kubernetes cluster 252 00:10:53,160 --> 00:10:56,959 locally and you just run snap install 253 00:10:55,120 --> 00:10:58,880 micro Cades and then you have a commun 254 00:10:56,959 --> 00:11:01,360 cluster that's up and running it's super 255 00:10:58,880 --> 00:11:04,200 useful for development purposes and what 256 00:11:01,360 --> 00:11:06,440 what I've done here with um rockcraft or 257 00:11:04,200 --> 00:11:09,720 the scopio that comes with rockcraft is 258 00:11:06,440 --> 00:11:12,519 just upload the image to the um registry 259 00:11:09,720 --> 00:11:15,120 that comes with that um micro or that 260 00:11:12,519 --> 00:11:15,120 community's 261 00:11:16,639 --> 00:11:22,160 installation okay so now we're just 262 00:11:19,600 --> 00:11:23,760 going to look a little bit at the files 263 00:11:22,160 --> 00:11:26,519 for the helm 264 00:11:23,760 --> 00:11:28,959 charts so here we have the chart 265 00:11:26,519 --> 00:11:30,760 definition which has a bit of metadata 266 00:11:28,959 --> 00:11:32,519 uh like the name of the application and 267 00:11:30,760 --> 00:11:35,079 the version of the chart as well as the 268 00:11:32,519 --> 00:11:35,079 version of the 269 00:11:37,519 --> 00:11:43,079 application and then uh there's a value 270 00:11:40,360 --> 00:11:45,680 Soo file which just contains some shared 271 00:11:43,079 --> 00:11:47,639 configuration files like what image I 272 00:11:45,680 --> 00:11:49,760 want to use which is the image that was 273 00:11:47,639 --> 00:11:51,600 just uploaded to the registry and how 274 00:11:49,760 --> 00:11:53,320 many replicas we want so how many of 275 00:11:51,600 --> 00:11:55,680 these images we want to be running at 276 00:11:53,320 --> 00:11:55,680 the same 277 00:11:57,079 --> 00:12:01,600 time and this is what the deployment yo 278 00:12:00,120 --> 00:12:04,399 file looks like so if you're familiar 279 00:12:01,600 --> 00:12:06,320 with cetes this is the basic um 280 00:12:04,399 --> 00:12:08,880 deployment file that you're probably 281 00:12:06,320 --> 00:12:11,399 familiar with um that's templated a bit 282 00:12:08,880 --> 00:12:14,120 for the helm chart um and it's making 283 00:12:11,399 --> 00:12:15,880 use of the definitions that were put 284 00:12:14,120 --> 00:12:16,639 into those couple of files that I showed 285 00:12:15,880 --> 00:12:20,000 you 286 00:12:16,639 --> 00:12:22,240 before just to avoid the typos and those 287 00:12:20,000 --> 00:12:26,199 sorts of things um and to make it a 288 00:12:22,240 --> 00:12:29,199 little bit easier to configure um later 289 00:12:26,199 --> 00:12:31,399 on so we have some metadata at the top 290 00:12:29,199 --> 00:12:34,160 and an a spec for the 291 00:12:31,399 --> 00:12:37,560 container okay the next thing um is that 292 00:12:34,160 --> 00:12:38,720 we need a service so again probably if 293 00:12:37,560 --> 00:12:40,680 you're familiar with communities you 294 00:12:38,720 --> 00:12:42,600 recognize that service file and then we 295 00:12:40,680 --> 00:12:45,560 have a few templated things that we 296 00:12:42,600 --> 00:12:47,360 grabbed from the chart um so we have 297 00:12:45,560 --> 00:12:51,800 some metadata at the top and then the 298 00:12:47,360 --> 00:12:53,480 spec for a um HTTP type of service which 299 00:12:51,800 --> 00:12:55,959 just talks about which ports that we 300 00:12:53,480 --> 00:12:59,000 want to map and then has a selector 301 00:12:55,959 --> 00:13:00,560 which picks out the containers running 302 00:12:59,000 --> 00:13:03,560 um under the deployment file that I 303 00:13:00,560 --> 00:13:05,000 showed you just before and finally so 304 00:13:03,560 --> 00:13:08,079 that somebody can actually hit our 305 00:13:05,000 --> 00:13:11,079 application we have an Ingress here and 306 00:13:08,079 --> 00:13:13,560 this is the um standard communties 307 00:13:11,079 --> 00:13:16,320 Ingress with again a bunch of templated 308 00:13:13,560 --> 00:13:18,279 things in it um which just Expos the 309 00:13:16,320 --> 00:13:20,680 application under the root path and they 310 00:13:18,279 --> 00:13:23,480 make the set the host name because this 311 00:13:20,680 --> 00:13:24,880 Ingress accumul this Ingress usually use 312 00:13:23,480 --> 00:13:27,720 um host-based 313 00:13:24,880 --> 00:13:29,680 routing um and we've set the host name 314 00:13:27,720 --> 00:13:32,040 to the name of the application or the 315 00:13:29,680 --> 00:13:35,199 name of the 316 00:13:32,040 --> 00:13:37,360 chat okay and then we just used the helm 317 00:13:35,199 --> 00:13:39,279 extension for micro Cades to install 318 00:13:37,360 --> 00:13:42,360 this application and then it's um 319 00:13:39,279 --> 00:13:44,680 deployed very quickly and then we can 320 00:13:42,360 --> 00:13:46,320 send a cur request to Local Host and 321 00:13:44,680 --> 00:13:48,320 then we will see that we have the 322 00:13:46,320 --> 00:13:51,720 application running 323 00:13:48,320 --> 00:13:53,639 locally okay so that's using the same 324 00:13:51,720 --> 00:13:56,480 sort of container that we that we 325 00:13:53,639 --> 00:13:58,079 created before um and this is the 326 00:13:56,480 --> 00:14:00,800 approach if you want to kind of do it 327 00:13:58,079 --> 00:14:02,560 all yourself um there are some 328 00:14:00,800 --> 00:14:04,360 advantages to that in that you have a 329 00:14:02,560 --> 00:14:07,199 lot of fine grain control over your 330 00:14:04,360 --> 00:14:08,759 deployment the disadvantage is that um 331 00:14:07,199 --> 00:14:10,160 even with this simple deployment you 332 00:14:08,759 --> 00:14:13,279 know there were three files that you had 333 00:14:10,160 --> 00:14:15,040 to think about um and when you start to 334 00:14:13,279 --> 00:14:16,880 kind of make things more complicated by 335 00:14:15,040 --> 00:14:19,040 add in your database maybe rers maybe a 336 00:14:16,880 --> 00:14:20,399 few other things um then you have to 337 00:14:19,040 --> 00:14:22,040 write all those deployment files 338 00:14:20,399 --> 00:14:23,800 yourself and maintain them make sure 339 00:14:22,040 --> 00:14:25,199 they're all working have test 340 00:14:23,800 --> 00:14:26,759 environments and all the things that 341 00:14:25,199 --> 00:14:29,959 come with 342 00:14:26,759 --> 00:14:33,279 it so if uh you don't want to do that 343 00:14:29,959 --> 00:14:36,720 all of that yourself um then you can use 344 00:14:33,279 --> 00:14:39,240 a solution that's like a pass which does 345 00:14:36,720 --> 00:14:41,680 a lot of these things for you and one of 346 00:14:39,240 --> 00:14:44,800 the ones is uh flat Dio that we're going 347 00:14:41,680 --> 00:14:48,680 to look at so I'm going to show you um 348 00:14:44,800 --> 00:14:51,120 what what it's like to deploy a um flask 349 00:14:48,680 --> 00:14:53,720 application on 350 00:14:51,120 --> 00:14:55,959 fly.io so to start with we just need to 351 00:14:53,720 --> 00:14:59,920 install a couple of things basically the 352 00:14:55,959 --> 00:15:02,959 command line um application which is a 353 00:14:59,920 --> 00:15:06,839 bit like the AWS command Lo application 354 00:15:02,959 --> 00:15:08,040 but more targeted for fly services and 355 00:15:06,839 --> 00:15:10,759 then we have to run a couple of 356 00:15:08,040 --> 00:15:10,759 configuration 357 00:15:14,759 --> 00:15:18,199 commands Okay and then there essentially 358 00:15:16,880 --> 00:15:21,160 two commands that we have to run the 359 00:15:18,199 --> 00:15:22,560 first is called fly launch and for this 360 00:15:21,160 --> 00:15:26,079 we actually have to log in and actually 361 00:15:22,560 --> 00:15:29,880 provide um payment information to fly if 362 00:15:26,079 --> 00:15:32,240 we haven't done that already um 363 00:15:29,880 --> 00:15:35,000 and then it will just initialize a sort 364 00:15:32,240 --> 00:15:36,639 of standard configuration for flask app 365 00:15:35,000 --> 00:15:39,399 which includes creating a local file as 366 00:15:36,639 --> 00:15:41,319 well as a record in in their um 367 00:15:39,399 --> 00:15:44,000 dashboard or their their sort of service 368 00:15:41,319 --> 00:15:46,279 record and if we take a look at the flyo 369 00:15:44,000 --> 00:15:49,759 file um they have to find the HTTP 370 00:15:46,279 --> 00:15:53,920 service here and um a bit of information 371 00:15:49,759 --> 00:15:55,240 about the size of the um uh computer 372 00:15:53,920 --> 00:15:58,079 memory and so on that that we're going 373 00:15:55,240 --> 00:16:00,199 to use they've also created a Docker 374 00:15:58,079 --> 00:16:02,000 file for us now this is basically the 375 00:16:00,199 --> 00:16:03,959 same as we saw from Google before so 376 00:16:02,000 --> 00:16:06,360 it's not great it also copies everything 377 00:16:03,959 --> 00:16:08,240 from your local into the container and 378 00:16:06,360 --> 00:16:10,959 then use the flas development server to 379 00:16:08,240 --> 00:16:12,360 run things so even though you're using a 380 00:16:10,959 --> 00:16:13,920 pass you still have to manage the 381 00:16:12,360 --> 00:16:17,519 container yourself and make sure it's 382 00:16:13,920 --> 00:16:17,519 production grade and so 383 00:16:18,680 --> 00:16:22,639 on um and then the only other command 384 00:16:21,000 --> 00:16:24,440 that we have to run is called flly fly 385 00:16:22,639 --> 00:16:28,399 deploy and then it'll sort of push 386 00:16:24,440 --> 00:16:30,319 everything to their Cloud um Docker 387 00:16:28,399 --> 00:16:34,120 Builder and then deploy it put an 388 00:16:30,319 --> 00:16:38,079 Ingress um in front of it and then um 389 00:16:34,120 --> 00:16:41,199 you know you get a URL that that we can 390 00:16:38,079 --> 00:16:45,120 hit um and then we will see that we get 391 00:16:41,199 --> 00:16:48,959 the hello world again um that we're used 392 00:16:45,120 --> 00:16:51,000 to okay so that's what fly.io is like 393 00:16:48,959 --> 00:16:53,240 now the advantage is that it's pretty 394 00:16:51,000 --> 00:16:57,240 easy the disadvantage is that they 395 00:16:53,240 --> 00:16:59,279 didn't give you a um a container uh or a 396 00:16:57,240 --> 00:17:01,639 Docker file that is production grade so 397 00:16:59,279 --> 00:17:03,519 you have to manage that yourself um they 398 00:17:01,639 --> 00:17:05,959 also have tools for databases and that 399 00:17:03,519 --> 00:17:09,000 sort of stuff uh if you but if you don't 400 00:17:05,959 --> 00:17:12,679 like how they do things then you know 401 00:17:09,000 --> 00:17:15,760 not much you can do um and they're also 402 00:17:12,679 --> 00:17:18,120 pads so you're going to have to pay for 403 00:17:15,760 --> 00:17:22,240 everything okay so let's say that you 404 00:17:18,120 --> 00:17:24,520 like the um like the benefits of having 405 00:17:22,240 --> 00:17:27,480 somebody else do a lot of the hard work 406 00:17:24,520 --> 00:17:30,520 for you but you don't like the lockin 407 00:17:27,480 --> 00:17:33,280 closed source and pay for everything 408 00:17:30,520 --> 00:17:37,679 what do you do well we've created some 409 00:17:33,280 --> 00:17:39,919 tooling at canonical which um takes a 410 00:17:37,679 --> 00:17:42,440 lot or delivers a lot of the benefits of 411 00:17:39,919 --> 00:17:45,840 a sort of P type of solution but using 412 00:17:42,440 --> 00:17:47,760 open source um where you know you can 413 00:17:45,840 --> 00:17:51,320 propose changes to these things you can 414 00:17:47,760 --> 00:17:53,679 Fork them and and so on um so similar to 415 00:17:51,320 --> 00:17:56,120 before there's a QR code in the top 416 00:17:53,679 --> 00:17:59,919 right where we have a tutorial which 417 00:17:56,120 --> 00:18:02,640 takes you from um a be Ubuntu image and 418 00:17:59,919 --> 00:18:05,200 then with a finishes with a flask 419 00:18:02,640 --> 00:18:08,679 application that's running even with a 420 00:18:05,200 --> 00:18:11,840 database and um here are some of the the 421 00:18:08,679 --> 00:18:14,360 steps that we're going to run um I'm 422 00:18:11,840 --> 00:18:18,159 going to show you a video of this and 423 00:18:14,360 --> 00:18:18,159 explain a couple of Concepts as we 424 00:18:18,760 --> 00:18:23,559 go okay so we're going to make a couple 425 00:18:21,280 --> 00:18:25,760 of changes to the flask application um 426 00:18:23,559 --> 00:18:28,039 just to make use of a database so it's a 427 00:18:25,760 --> 00:18:32,120 little bit more realistic um so we're 428 00:18:28,039 --> 00:18:34,240 adding here the the postgress binary um 429 00:18:32,120 --> 00:18:36,039 python package that will be required to 430 00:18:34,240 --> 00:18:38,559 connect to postgress also going to 431 00:18:36,039 --> 00:18:40,039 replace the sort of basic flask 432 00:18:38,559 --> 00:18:42,559 application with a more complicated 433 00:18:40,039 --> 00:18:44,159 flask application not that much more 434 00:18:42,559 --> 00:18:46,200 complicated but it's basically it just 435 00:18:44,159 --> 00:18:49,679 keeps track of how many people actually 436 00:18:46,200 --> 00:18:51,480 visited the root endpoint um and adds a 437 00:18:49,679 --> 00:18:54,880 visitor's endpoint that counts the 438 00:18:51,480 --> 00:18:57,400 number of um uh visitors set that you 439 00:18:54,880 --> 00:18:59,799 get now in terms of how you get the 440 00:18:57,400 --> 00:19:03,480 information to connect to your 441 00:18:59,799 --> 00:19:05,480 application in sort of this tooling um 442 00:19:03,480 --> 00:19:08,480 there we inject environment variables 443 00:19:05,480 --> 00:19:11,520 for everything so we have support for 444 00:19:08,480 --> 00:19:13,039 post myql Rus a bunch of other things 445 00:19:11,520 --> 00:19:14,440 and the way that you get the connection 446 00:19:13,039 --> 00:19:16,400 strings is actually through environment 447 00:19:14,440 --> 00:19:19,880 variables and you can see an example 448 00:19:16,400 --> 00:19:22,320 here that the postc D um connect 449 00:19:19,880 --> 00:19:24,960 string and the root Endo is slightly 450 00:19:22,320 --> 00:19:27,360 altered it just connects to the database 451 00:19:24,960 --> 00:19:30,760 and inserts a visitor 452 00:19:27,360 --> 00:19:32,760 record and then Returns the hello world 453 00:19:30,760 --> 00:19:35,039 greeting and then at the bottom here you 454 00:19:32,760 --> 00:19:37,760 can see the visitors 455 00:19:35,039 --> 00:19:39,760 endpoint um which just goes into that 456 00:19:37,760 --> 00:19:41,520 table and counts the number of rows and 457 00:19:39,760 --> 00:19:46,039 that's how many people actually visit 458 00:19:41,520 --> 00:19:46,039 your your um root end 459 00:19:53,799 --> 00:19:57,799 point okay 460 00:20:00,600 --> 00:20:03,520 now the other thing when you have a 461 00:20:01,840 --> 00:20:05,120 database is that you need to prepare it 462 00:20:03,520 --> 00:20:08,000 so you need to make tables and that sort 463 00:20:05,120 --> 00:20:10,520 of stuff so the tooling um actually will 464 00:20:08,000 --> 00:20:13,080 inspect your container and if you have a 465 00:20:10,520 --> 00:20:15,840 migr that P file or a couple of other 466 00:20:13,080 --> 00:20:18,280 variants of that um we will execute that 467 00:20:15,840 --> 00:20:19,520 file and in that file um again you get 468 00:20:18,280 --> 00:20:21,679 access to all of the environment 469 00:20:19,520 --> 00:20:24,640 variables so things like the post 470 00:20:21,679 --> 00:20:27,400 connection string um you get access to 471 00:20:24,640 --> 00:20:30,039 and then you can make this file run your 472 00:20:27,400 --> 00:20:32,120 migration 473 00:20:30,039 --> 00:20:33,320 and then we execute that file before we 474 00:20:32,120 --> 00:20:35,760 start the 475 00:20:33,320 --> 00:20:38,360 application um to make sure that your 476 00:20:35,760 --> 00:20:40,520 database is prepared um and we're also 477 00:20:38,360 --> 00:20:42,880 going to just increment the version of 478 00:20:40,520 --> 00:20:45,320 The Rock because we've changed the 479 00:20:42,880 --> 00:20:48,159 application um and here's a quick look 480 00:20:45,320 --> 00:20:52,159 so we make use of an something called an 481 00:20:48,159 --> 00:20:54,640 extension which kind of goes from uh 482 00:20:52,159 --> 00:20:56,880 managing a lot of detail um and then you 483 00:20:54,640 --> 00:20:58,799 can run a command to actually see what 484 00:20:56,880 --> 00:21:02,120 specifically we do and then you get kind 485 00:20:58,799 --> 00:21:04,400 of the full um rockcraft or Docker file 486 00:21:02,120 --> 00:21:06,559 that you would use and you can actually 487 00:21:04,400 --> 00:21:08,440 take that instead of making use of the 488 00:21:06,559 --> 00:21:11,440 extension and mess around with it and 489 00:21:08,440 --> 00:21:13,200 use that instead as well um so you can 490 00:21:11,440 --> 00:21:14,720 just see what the expanded version looks 491 00:21:13,200 --> 00:21:17,760 like it's a little bit more complicated 492 00:21:14,720 --> 00:21:17,760 but not that much more 493 00:21:20,240 --> 00:21:26,120 complicated okay and now we just need to 494 00:21:22,360 --> 00:21:31,240 create the new oci image as we did 495 00:21:26,120 --> 00:21:31,240 before and upload it to uh my Cates 496 00:21:36,360 --> 00:21:43,919 again okay so now we have the new o 497 00:21:40,159 --> 00:21:45,919 image um that's uploaded and ready to go 498 00:21:43,919 --> 00:21:48,919 well now it's uploaded ready to 499 00:21:45,919 --> 00:21:50,960 go um and then the next step is that 500 00:21:48,919 --> 00:21:54,559 we're going to create something called a 501 00:21:50,960 --> 00:21:56,360 charm now a charm think of it as you 502 00:21:54,559 --> 00:21:59,279 have application logic which is your 503 00:21:56,360 --> 00:22:00,880 flask application and then you you have 504 00:21:59,279 --> 00:22:03,159 a lot of operational logic that's 505 00:22:00,880 --> 00:22:05,799 associated in many cases the operational 506 00:22:03,159 --> 00:22:08,320 logic is somebody clicking around or 507 00:22:05,799 --> 00:22:09,919 writing um configuration files and that 508 00:22:08,320 --> 00:22:13,919 sort of stuff right in the end it's 509 00:22:09,919 --> 00:22:16,279 still code or encodable as code right 510 00:22:13,919 --> 00:22:19,440 and what a charm is is it takes all of 511 00:22:16,279 --> 00:22:22,760 that knowledge and knowhow that you 512 00:22:19,440 --> 00:22:25,159 might have in your head and um gives you 513 00:22:22,760 --> 00:22:27,200 do a way of sort of writing that in 514 00:22:25,159 --> 00:22:29,559 actual python 515 00:22:27,200 --> 00:22:31,640 code um the charm that we're going to 516 00:22:29,559 --> 00:22:33,440 create doesn't require you to have done 517 00:22:31,640 --> 00:22:35,159 because we have taken kind of our 518 00:22:33,440 --> 00:22:37,679 general knowledge of how to run flask 519 00:22:35,159 --> 00:22:39,600 applications and whatever whatever other 520 00:22:37,679 --> 00:22:42,360 Frameworks we support as well and we've 521 00:22:39,600 --> 00:22:43,919 written it all for you um but the way 522 00:22:42,360 --> 00:22:46,240 that you think about the charm is that 523 00:22:43,919 --> 00:22:48,600 it's just taking all of the knowledge 524 00:22:46,240 --> 00:22:51,159 that's that's in an s's head and puts 525 00:22:48,600 --> 00:22:53,840 that into python so it understands 526 00:22:51,159 --> 00:22:55,640 things like okay how do I take um the 527 00:22:53,840 --> 00:22:59,120 connection information from a database 528 00:22:55,640 --> 00:23:01,760 and inject it into um my application 529 00:22:59,120 --> 00:23:04,240 how do I scale up the application how do 530 00:23:01,760 --> 00:23:06,360 I change the configuration how do I take 531 00:23:04,240 --> 00:23:07,200 a snapshot of a database all those sorts 532 00:23:06,360 --> 00:23:09,240 of 533 00:23:07,200 --> 00:23:12,080 things so that's what we're going to 534 00:23:09,240 --> 00:23:14,279 create for our flask application and for 535 00:23:12,080 --> 00:23:16,440 that we use a to cod shamcra in it it 536 00:23:14,279 --> 00:23:18,559 again natively supports flask and a few 537 00:23:16,440 --> 00:23:19,880 other Frameworks as well like Jingo and 538 00:23:18,559 --> 00:23:21,960 fast 539 00:23:19,880 --> 00:23:25,159 API 540 00:23:21,960 --> 00:23:28,039 um and then because our application 541 00:23:25,159 --> 00:23:30,960 depends on a database we just need to 542 00:23:28,039 --> 00:23:33,640 tell charm craft that we need a 543 00:23:30,960 --> 00:23:36,360 database um so in this require section 544 00:23:33,640 --> 00:23:38,320 we just uncomment the postgress 545 00:23:36,360 --> 00:23:39,760 component and you can see that we have 546 00:23:38,320 --> 00:23:42,679 support for a bunch of other things as 547 00:23:39,760 --> 00:23:46,320 well here for MySQL for mongodb for 548 00:23:42,679 --> 00:23:47,960 redus for S3 for saml rabbit and Q and 549 00:23:46,320 --> 00:23:51,240 there's a bunch of other things as well 550 00:23:47,960 --> 00:23:55,320 we also have observability integrated um 551 00:23:51,240 --> 00:23:57,080 by default and Ingress um so all of that 552 00:23:55,320 --> 00:23:59,200 uh is there without you having to do 553 00:23:57,080 --> 00:24:01,480 anything and then we need to create the 554 00:23:59,200 --> 00:24:04,840 Deployable artifact again so this is 555 00:24:01,480 --> 00:24:06,840 similar to a Oco image but it's for the 556 00:24:04,840 --> 00:24:12,240 operational side of things so we just 557 00:24:06,840 --> 00:24:12,240 need to create a charm um which happened 558 00:24:18,159 --> 00:24:23,080 here okay so the next step here is that 559 00:24:21,200 --> 00:24:27,440 we're going to start interacting with a 560 00:24:23,080 --> 00:24:28,919 tool called um Juju so guju is a command 561 00:24:27,440 --> 00:24:31,679 line application 562 00:24:28,919 --> 00:24:35,440 uh it's a bit like the AWS Commander 563 00:24:31,679 --> 00:24:38,399 application um but it's open source and 564 00:24:35,440 --> 00:24:41,520 you can actually use Juju to go all the 565 00:24:38,399 --> 00:24:44,360 way from uh sort of in a hardware that 566 00:24:41,520 --> 00:24:46,080 you bought from from Dell so at the 567 00:24:44,360 --> 00:24:48,240 metal level then you can deploy 568 00:24:46,080 --> 00:24:50,600 something called ma which will make that 569 00:24:48,240 --> 00:24:52,679 more manageable then you can run open 570 00:24:50,600 --> 00:24:54,640 stack on top of that or deployed using 571 00:24:52,679 --> 00:24:57,159 Juju and from the command line with a 572 00:24:54,640 --> 00:24:59,240 few prompts um and then you can install 573 00:24:57,159 --> 00:25:01,679 micro uh sorry commun on top of that 574 00:24:59,240 --> 00:25:04,480 again using Juju and then you have a 575 00:25:01,679 --> 00:25:07,399 communties cluster on your own Hardware 576 00:25:04,480 --> 00:25:09,440 running um uh without you having to do 577 00:25:07,399 --> 00:25:11,520 very much so that's an option the other 578 00:25:09,440 --> 00:25:14,720 thing you can use gg4 is actually make 579 00:25:11,520 --> 00:25:16,039 use of um AWS so it supports things like 580 00:25:14,720 --> 00:25:19,960 ec2 581 00:25:16,039 --> 00:25:21,399 instances um also J as well and then the 582 00:25:19,960 --> 00:25:24,080 other thing you can do with it is that 583 00:25:21,399 --> 00:25:26,440 you can just feed it General kubernetes 584 00:25:24,080 --> 00:25:28,000 credentials and then it'll work on any 585 00:25:26,440 --> 00:25:30,840 kubernetes cluster that you already have 586 00:25:28,000 --> 00:25:32,720 available as well now the first thing 587 00:25:30,840 --> 00:25:35,159 here that we did is we created a model 588 00:25:32,720 --> 00:25:38,080 which will just um Define all the things 589 00:25:35,159 --> 00:25:38,080 that are required for 590 00:25:38,840 --> 00:25:43,200 application and then the next step is 591 00:25:40,919 --> 00:25:45,880 that we actually deploy the charm using 592 00:25:43,200 --> 00:25:47,640 the oo image that we created before so 593 00:25:45,880 --> 00:25:49,880 this is the charm which contains all of 594 00:25:47,640 --> 00:25:51,279 the operational knowledge for how to run 595 00:25:49,880 --> 00:25:52,960 the flask 596 00:25:51,279 --> 00:25:55,240 application they're going to be a few 597 00:25:52,960 --> 00:25:57,080 things that happen here quite quickly so 598 00:25:55,240 --> 00:25:59,520 I'm going to pause a couple of times 599 00:25:57,080 --> 00:26:03,279 here we're deploying a 600 00:25:59,520 --> 00:26:05,960 postgress um in this case on kubernetes 601 00:26:03,279 --> 00:26:08,960 but you can also if you have machine 602 00:26:05,960 --> 00:26:11,840 resources like E2 or openstack machine 603 00:26:08,960 --> 00:26:14,480 resources available then you can also um 604 00:26:11,840 --> 00:26:19,039 deploy post Quest and any other 605 00:26:14,480 --> 00:26:19,039 database on on top of a machine as 606 00:26:21,520 --> 00:26:27,000 well and this step here where we 607 00:26:24,320 --> 00:26:29,000 integrate the flask application with 608 00:26:27,000 --> 00:26:30,559 postest is where 609 00:26:29,000 --> 00:26:32,279 Juju will facilitate a little bit of 610 00:26:30,559 --> 00:26:34,120 communication which is how we get the 611 00:26:32,279 --> 00:26:37,080 connection information from the post 612 00:26:34,120 --> 00:26:38,399 database into the flask application so 613 00:26:37,080 --> 00:26:41,320 those are things like the connection 614 00:26:38,399 --> 00:26:41,320 string that we saw 615 00:26:43,960 --> 00:26:51,440 before and here we deploy an Ingress um 616 00:26:47,919 --> 00:26:53,960 which is making use of the cumul Native 617 00:26:51,440 --> 00:26:55,799 Ingress we set a few configurations and 618 00:26:53,960 --> 00:26:57,279 integrated it again so we get a bit of 619 00:26:55,799 --> 00:26:59,600 information about that Ingress to the 620 00:26:57,279 --> 00:27:01,559 flask application 621 00:26:59,600 --> 00:27:03,840 and then we let Juju do its thing for a 622 00:27:01,559 --> 00:27:06,520 little bit just to deploy everything 623 00:27:03,840 --> 00:27:08,720 that we've just asked for and um share 624 00:27:06,520 --> 00:27:11,159 all the information with the various 625 00:27:08,720 --> 00:27:11,159 pieces 626 00:27:14,960 --> 00:27:22,080 here we do a final just to check 627 00:27:18,039 --> 00:27:25,120 everything as active and idle which is 628 00:27:22,080 --> 00:27:27,200 great and then we can send we can just 629 00:27:25,120 --> 00:27:28,960 check the visitors endpoint which says 630 00:27:27,200 --> 00:27:32,720 nobody's visitor 631 00:27:28,960 --> 00:27:34,840 yet um and when we send a request to the 632 00:27:32,720 --> 00:27:36,520 root end point we get hello world again 633 00:27:34,840 --> 00:27:38,320 and then the visitors count as 634 00:27:36,520 --> 00:27:42,000 incremented by one and if we send 635 00:27:38,320 --> 00:27:42,000 another request it'll go up again by 636 00:27:42,120 --> 00:27:49,039 one okay so you just saw how to go from 637 00:27:45,640 --> 00:27:51,519 a be buntu image and taking a flask 638 00:27:49,039 --> 00:27:52,760 application all the way from there to it 639 00:27:51,519 --> 00:27:55,880 running on 640 00:27:52,760 --> 00:27:57,840 kubernetes um using the jju toing if 641 00:27:55,880 --> 00:28:00,320 that was a bit too quick for you there's 642 00:27:57,840 --> 00:28:02,279 the QR code at the top right with a 643 00:28:00,320 --> 00:28:05,320 tutorial that takes you from a theun to 644 00:28:02,279 --> 00:28:08,360 image all the way to actually making um 645 00:28:05,320 --> 00:28:08,360 deploying this flask 646 00:28:09,320 --> 00:28:14,159 application um and that's sort of the 647 00:28:11,600 --> 00:28:15,880 end of the talk so in summary the first 648 00:28:14,159 --> 00:28:17,440 thing we did is we create an OCA image 649 00:28:15,880 --> 00:28:18,679 for the flask application and there were 650 00:28:17,440 --> 00:28:21,880 two options either you can write the 651 00:28:18,679 --> 00:28:23,320 docker file yourself um or you can use 652 00:28:21,880 --> 00:28:25,679 some of the tooling that I showed you 653 00:28:23,320 --> 00:28:27,399 which creates a production grade um 654 00:28:25,679 --> 00:28:29,600 image for your flask application with 655 00:28:27,399 --> 00:28:31,919 very little effort from your 656 00:28:29,600 --> 00:28:34,679 side um and then we looked at how we 657 00:28:31,919 --> 00:28:36,159 actually take that image and deploy it 658 00:28:34,679 --> 00:28:38,519 um so the first option we looked at this 659 00:28:36,159 --> 00:28:40,640 Helm charts where you manage all the 660 00:28:38,519 --> 00:28:42,880 communities resources 661 00:28:40,640 --> 00:28:45,159 yourself with the drawbacks of that 662 00:28:42,880 --> 00:28:46,840 being that it's a lot of effort then we 663 00:28:45,159 --> 00:28:49,799 looked at how to do this with 664 00:28:46,840 --> 00:28:52,120 fly.io um which is simpler so there were 665 00:28:49,799 --> 00:28:54,480 only two commands but the drawback is 666 00:28:52,120 --> 00:28:58,159 that the um Docker file that they 667 00:28:54,480 --> 00:28:59,600 provided um is not production grade and 668 00:28:58,159 --> 00:29:01,679 then obviously it's a proprietary 669 00:28:59,600 --> 00:29:04,880 service and you have to pay for for your 670 00:29:01,679 --> 00:29:07,240 use then lastly we looked at deploying 671 00:29:04,880 --> 00:29:09,399 this using Juju um which is open source 672 00:29:07,240 --> 00:29:11,880 tooling and everything um that I showed 673 00:29:09,399 --> 00:29:13,679 you is production ready and it also 674 00:29:11,880 --> 00:29:15,200 comes with easy database and Ingress 675 00:29:13,679 --> 00:29:17,840 integration and a bunch of other things 676 00:29:15,200 --> 00:29:21,559 like observability and so 677 00:29:17,840 --> 00:29:23,960 on okay so um if you'd like to connect 678 00:29:21,559 --> 00:29:26,679 with me on LinkedIn there's a QR code on 679 00:29:23,960 --> 00:29:28,440 the top right there the other thing I'm 680 00:29:26,679 --> 00:29:31,200 there's a lot of knowledge about FL ask 681 00:29:28,440 --> 00:29:33,880 jeno everything else in this room so I 682 00:29:31,200 --> 00:29:36,679 would love it um if we can get in touch 683 00:29:33,880 --> 00:29:39,360 with you and run some user experience 684 00:29:36,679 --> 00:29:43,360 research with you um so if you'd like to 685 00:29:39,360 --> 00:29:45,559 participate in that let me know um and 686 00:29:43,360 --> 00:29:50,159 you have some contact information there 687 00:29:45,559 --> 00:29:52,399 my email we have a chat um on on Matrix 688 00:29:50,159 --> 00:29:54,279 um where you can join and we put 689 00:29:52,399 --> 00:29:57,240 information there about any changes and 690 00:29:54,279 --> 00:29:59,440 so on um and they they are the two 691 00:29:57,240 --> 00:30:00,399 tutorials that that I showed you a video 692 00:29:59,440 --> 00:30:03,360 of as 693 00:30:00,399 --> 00:30:07,120 well okay that's the end of the talk so 694 00:30:03,360 --> 00:30:07,120 I think we might have a bit of time for 695 00:30:12,399 --> 00:30:18,279 questions thank you David uh we have 696 00:30:14,679 --> 00:30:18,279 time for maybe one question if you 697 00:30:18,559 --> 00:30:22,880 quick okay please phrase your question 698 00:30:21,360 --> 00:30:25,159 in the form of a 699 00:30:22,880 --> 00:30:27,720 question uh you mentioned that it's 700 00:30:25,159 --> 00:30:29,679 quite well integrated with a flask yeah 701 00:30:27,720 --> 00:30:31,640 how about fast API applications I'm 702 00:30:29,679 --> 00:30:34,519 interested yeah it works the same so we 703 00:30:31,640 --> 00:30:36,960 have tutorials um that I showed you for 704 00:30:34,519 --> 00:30:38,960 um flas we have the same for fast API as 705 00:30:36,960 --> 00:30:41,519 well yeah we're working on other 706 00:30:38,960 --> 00:30:43,159 Frameworks as well so in the current 707 00:30:41,519 --> 00:30:46,480 focus is that we're adding support for 708 00:30:43,159 --> 00:30:48,240 nodejs as well um and also spring boot 709 00:30:46,480 --> 00:30:50,600 which you know might not be that popular 710 00:30:48,240 --> 00:30:53,200 in this room but uh there's a crowd out 711 00:30:50,600 --> 00:30:55,519 there that likes 712 00:30:53,200 --> 00:30:57,600 that thank you very much David please 713 00:30:55,519 --> 00:31:05,210 join me in thanking David 714 00:30:57,600 --> 00:31:05,210 [Applause]