Advanced Local Development with DDEV

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay let's go ahead and get started um glenn great to see all of you here and uh way fun we're the title is a little hoity-toity today um it the title is advanced local development with data but what we're really going to do is just explore some territory that you're interested in and we'll um we'll go ahead and take some uh interest uh temperature feeling on that in just a minute um the first thing i think we're always supposed to say is that um that you agree to the uh you would you agree to the agreement right and everybody does right so we all agree so we've all agreed all the time um and we will not we will not be mean to each other or pick on each other so the um so let me just share my screen right quick and i'm going to put up here the put up here the things that [Music] that just came to my mind for this the first one is custom commands it's really really easy to add your own custom commands to dwab local and third-party services is another whole subject like being able to add solar or elastic or lots of other things to dw there are all kinds of recipes for these and so we can we can do that the advanced configuration using a custom docker file or web image extra packages is another topic that's that's uh you know the web image extra packages technique is pretty easy as long as you know where to find the the packages casual web hosting is a new feature well new in the last revision where you can actually put up uh websites using dwb local on a real server and i have all the stuff that i now that i host that i've been hosting over the last several years has now ended up on the casual web hosting uh feature i just put it on a linux vm and then last but not least and probably the first thing that we'll start with is using gitpod to develop gitpod.io with devs so opher's going to show that to us but before before we do that i'm interested in what you have to say about what you're interested in and those things or other things so feel free to unmute feel free to have your video on what what is exciting or what other questions might you have any question is fine too so go ahead catherine i'll go after you oh thank you oh we'll take turns okay thank you my name is catherine and i have dev because i went through the debug academy drupal 12 week course for drupal development and um prior to that i had been i've done a lot of wordpress but my php was like uh you know i would do whatever i needed to do to get it done and i wasn't following best practices so i decided that with drupal it was really important for me to make sure i was doing things the correct way because it's um the stakes are higher and it's more collaborative so i had ddev on my machine i use ubuntu linux and um everything works great when you just get the drupal file that they now make available and whenever i went to vs code and i'd read about people doing all this cool stuff with dev um i think i'm either not looking in the right place for documentation but i just feel like i go down into the weeds and specifically i was trying to get x debug to work with vs code and dda and i couldn't ever get it to work so i thought uh that's just probably me not being very smart but um what my big picture question is is how can i make sure my d dev is properly configured so that when i'm doing drupal stuff um i'm not having people tell me well i use lando i don't really know about d dev so i i think deep dev is you know really widely adopted but i just feel like i'm not looking in the right place and all the stuff you're talking about sounds so exciting and my tendency is to jump ahead to advanced things before i have my foundation correct so i'm feeling that tension but what would you advise for just basic basic like i have something that's not working where can i look what most people do is they go to the dev channel on drupal slack and they ask questions and there's a lot of great community there that will answer the questions um the um the ddep docs have a complete setup for vs code and debugging dev comes with x debug already set up you don't have to do anything with it if you're using vs code you do have to do some things that it's not dwf specific it's x debug issues but the docs tell you what to do um i've always been a jet brains fan so i uh but let's add that to the list and we can do vs code with xdebug xdebug is a great topic it's not advanced it's something everybody should be doing but we can just do that we can just go through the docs and do that so let's add that to the list and of course i'm happy to help you anytime uh and you can uh you can ping me um in the dev channel on drupal slack and there's lots of other ways to get me but i'm happy to help you if you're having trouble like that thank you andy i will join that slack channel yeah you betcha yep oh for you we're gonna say something yeah well just definitely recommending again slack channel of ddev it's the best place um to get help from community uh that would help me figuring out everything about ddiff for if it's possible if you can share maybe more of if there is some kind of a road map of data functionality upcoming things uh if there's anything like that you can share so let's uh let's talk about what's in v 1.17 let's put that on the list so i'm going to start a little a little list here in the chat um road map did the 1.17 features that's the upcoming version that will be released in the next couple of weeks [Music] assuming that i'm not on jury duty next week and assuming that i don't hit huge bugs when i'm manually testing it all through um an x debug with um bs code and maybe with phpstorm too wow i can't believe i thought oh i haven't turned off the auto auto spelling on this mac i gotta turn it off that's terrible okay so there's there's some a few other things that we could we could do today it sounds like the x debug uh would be uh would be a good thing and of course we can talk about the uh 1.17 features and other things on the roadmap and what's and what's booked for 1.18 already there's already like 30 issues on 118. so i don't know if there's going to be a time for that i'm curious about i think this ddf go through extensible testing uh methods and if you would be able to show what's happening like what kind of testing did it go through uh when you uh create new version or pr or things like that that's a that's a great question um when you create a new when when any commit happens to any pr ddev runs through a whole test routine on windows wsl 2 mac mac m1 and linux and linux arm64 as well and so it runs through thousands of tests on each of those environments it's really uh kind of painful to wait for sometimes and so there's a there's a huge amount of automated testing but when we get to a formal uh full stable release i write up a whole manual test plan so that each feature is reviewed again manually and that takes usually that takes at least a week to do um the rc-1 for via v1017 is already out there it was released this morning and yeah i think i've been in most of those places so i don't anticipate much trouble but i always find bugs in that last round every time you know and uh and and things that got left out of the dock stuff like that [Music] so put that on there um joanne asked if uh if we've run into an error with ddev a drush launch there isn't a command called dwbrush launch so you probably want a ddev launch well it's on your quick it is on your quick start uh in that case it's a bug it's just a typo really it's a typo yeah can you uh can you do a pr for it you can just click edit on the on the docs and fix that in the upper right there's an edit there's an edit this page button it might have already been fixed also if you're looking at the stable docs as opposed to the latest docs so anybody else have things that would be high on your uh agenda for talking about today on uh features that are not just straight line look at a website features of ddit i'm i'm chris wells i'm from solutions i'm working on um sort of porting all we've been using like virtual machine for the last three or four years and we're in the process of switching everything over to dev so this is very timely for me and i was looking at sort of things that are missing between ddep our um thing and i think a lot of this is stuff you're going to cover stuff that i've looked at in terms of maybe custom commands extra containers extra packages so like we news memcache solar on some sites we also do the pdf function so we would need tikka to be installed somewhere so that solar can extract text from word docs and pdfs and then we make heavy use of terminus so i was kind of wondering why terminus is like the one thing you have to ssh into the container for or or like sort of execute without you know like why isn't there a d dev terminus command um could i create one yeah you can add custom commands it's just nothing to it so you just look at the examples yeah in the global directory um and you'll see that uh dwf drush is there and you just copy that and change the name to terminus and there you are so you can add uh you can add anything um terminus um yeah you you should you should add that if you need it most people of course aren't on pantheon and so uh right we're a little stingy on what custom commands or what what extra commands we add to d div because every time you add a new command it's noise to somebody right and you want to limit the noise so i mean most people in the world who use ddev have no idea that pantheon exists or why and so that's that's a great case where you can just add your own command because you need it um yeah cool i saw that terminus was in there but just wasn't you know it's not exposed as a custom command so it's cool that that would be easy so i'm interested to learn about custom commands and um some other things um we have some projects that are built with like ruby and bundler so you know maybe there's if we cover some of that extra custom dockerfile types so that there are some containers where i might want to add some ruby in there and yeah i'm also interested there's a lot of stuff we use a lot of our sync commands using make files so you know we can do like make make refresh and it gets the latest copy of the production database it you know sets development settings it clears the cache it does you know like a chain of different things and so i was wondering if there was a cool you know if we should switch that to some sort of ddev custom commands or if we should just you know install make in the container and and be able to do a custom command so i'm just curious everything that's out there for that i wouldn't be surprised if make is already in there but um make is um you know most people use composer for build type things or or more more modern techniques um of course i i'm from the go world where make is still a thing and uh so i use make all the time but i never thought i'd i you know i used it in the 1990s and i never thought i'd use it again because i thought it got replaced by everything and then i come along in the go world and it's the thing in the go world it's like okay well i know this from way back so fine but uh um and probably the last big one for me is um we have a number a handful of sites that are kind of big multi-sites and just if there's iterations on multiple databases in database container and if there's any uh any custom stuff for supporting multi-site so there's a there's a whole dev contrib right up on how you do that um so that if you go to com github.com uh drud slash d dev dash contrib you'll see lots and lots of things there but you just search for multi-site on that page and you will see it cool all right that sounded pretty i i ended up following one of those links that was like very perfect and at 404 and i was bummed but i actually reached out to the developer and he sent me the archive of of the article um for dev multi site and it looked pretty easy okay yeah the one uh d-def contrib should be fine i don't think they're you'll have any trouble with that um and joanne i am trying to figure out how to give you uh how to give you can we not put images here i'll give you a link to it to show you how to edit um i see i couldn't find it before but then i went to the top of the article and i see a pencil on the top right yeah so i can click on it and it takes me directly to the page that i'm going to paste here that's what it looks like how you let anybody change this page i mean you're making a pull request so you you're going to do it's an op it's an open source world and the docs are open source and so by clicking that you'll be making a pull request which i'll review and uh so that's and we appreciate people so much um when they find things that can be improved in the docs because of course i don't read the whole all the docs every day and if i did my eyes would glaze over anyway and i wouldn't wrong with them but you see them and it's very much appreciated this is like this is like um full 101 you just go follow follow it along and you'll be good give a good name to it so let's go ahead and get um let's get this get pod going um opher i think you should be able to share your screen at will and tell us tell us what the purpose is and what the meaning is and what the future is and show us how it works thank you hi everyone uh yeah i've been uh since i found dieter never looked back it was a great and for anyone's coming to it yeah i i actually end up learning docker through working with ddf and this there's been so many different situation installation projects that been using ddev so chances are the unique creative thing you're trying to do someone already did it and that's why asking things in the drupal slack channel of ddev is so beneficial because you don't have to figure it out from scratch which is different than what i'm going to talk about now because we did have to figure it out from scratch so yeah shameless plug i work at phase two and at uh march 30th we gonna have uh drupal developer ask me anything uh event and here's a link if anyone want to join and now i'm going to share my screen where we can dive into the future now zoom messing up my screen oh i see everyone and my screen great you see the gitpod page great yep so you might have heard of project that kind of trying to do a similar thing github workspaces uh acquia ide which in a nutshell trying to bring the whole environment of development and work with a browser which that's why i really think this is the future and because there's so many benefits that you can have with it yes you would need internet but otherwise you can work with machines that are very lightweight you can literally work with a tablet and create anything what's beautiful about git pod is that this is an open source project that allows you to do that on top of that if you're planning to bring your company to use that they would allow you to even have their uh they have like pricing for things like that but you could because it's an open source project you can have it self-hosted and bring this whole machinery into whatever infrastructure you would like to from what i've seen so far they work with aws and google cloud probably more are coming also a few months ago gitpod become one of the official ides of git lab so if you would go to your setting in gitlab you can see you can choose their regular id of gitlab or you can choose git pod so finding gatepod and realizing this is the future now i had a problem because like how do you develop drupal because there's so many things you need to put together to get drupal working so i think i asked randy at the beginning and was like what nah it's not gonna work with so many things to figure out that yeah so i actually uh went in and tried to figure out piece by piece and randy helped a lot and thank you so much throughout the process today we have a solid working solution now we're at the end of march git body is fixing one bug we've found before that would make it even faster and what i'm going to show you now is what is possible to do what we're planning to add in the very near future and how anyone can benefit from that including whether it's for your billable project or for drupal contributions so any questions so far okay so this is the website of gitpod they show you a nice ide this one is vs code in a browser getting it to work is fairly easy i'll take you step by step to what does it mean and few things you need to do right now and in a few days few of these steps gonna become again easier um let me share with you this project it's called for now ddf-gitpod and anyone can you can you can actually do this right now yeah yeah please do it with me you can do it with him right right while he's doing this you can do it go to dwg yeah i i highly recommend trying it and see the magic so if you go to the link that i showed in zoom you would get to this repo uh scroll down a little bit to the readme just below the five minutes video you see the two things that you should do like i said right now in about in few days this is going to be eliminated it won't be needed anymore it's becoming part of the official thing um sign up means you kind of saying here's my github or gitlab user and that's it there's no it's a very simple process one more thing you want to do is to go this link would take you to the git pod i o settings because for now you need to scroll down that page i think i can show it to you right here and enable feature preview so what makes kitpod in my opinion so special so unique is they encountered i think a super complex uh concept which is we enjoyed ddev because did have allowed me to run my a little machine on my machine and it's in a sandbox it doesn't affect the host machine and it's really great what git pod is is and randy feel free to correct me from wrong there's like a docker setup but within that docker setup which is a development machine you can create your own docker within that one way gitpod did things before or still doing it is allowing people to type a whole docker file which is very specific of all the linux commands to get a system working the beauty of ddev is that in a very few commands or a few uh not even command just simple config files we can create a very complex setup of anything specifically now we're going to show drupal but literally you can do anything and i believe now uh d dev repo itself which is written in go language also can be you can contribute to dev by using gitpod without having to set up go or docker or anything else or even touch your local environment you're running the entire development environment in the cloud it's beautiful yeah so the end result is by having a link that looks like that usually the syntax is gitpodio pound and then you attach to that whatever repo public thing you have from gitlab or github and i believe also i forgot the third one another git hosting solution and that will automatically launch your own uh setup in the cloud so once you enable the feature preview that's what does the docker in docker that's what in few days you won't need to do anymore um so that will be done that works by the way on a pull request it works um so you can you can do the git pod gitbot has a handy little button that you can add but you can go to any pull req you can just take the url of a pull request and it'll launch get pod with that pull request yeah and i can show you one more thing i do um it went into git pod itself let me open one more window of github i added their extension it's a chrome extension all it does is it add this nice git pod button so now when i go to any github project i can click on it and it will open automatically it will do that what i showed you before with a git pod io slash bound in the repo itself so that same thing if i'm on the main repo that what gitpod gonna load but if i go to any of the branches or to any pr what git but gonna bring to me is that specific pr um okay so going through quickly what's happening or what's the what's the magic behind it there's two main setting files git podiamo and gitpod docker file gitpodiamo is is the are the different commands that you wish your uh machine gonna run a huge thing that gitpod added was their caching system so as you're changing your machine and what is installed on it that that part takes time but at the same time it's being cached so any changes i'm going to make to the computer that doesn't change the configuration of my development machine is already built in so in the next few days we're going to fix a bug that we had from before when you're going to turn on a machine it will already have detail installed you wouldn't need to download the images or anything like that your project will just have ddev out of the box in probably less than a minute but show us the things show us the thing show us here's the thing okay so when you click on the git pod you click create it says starting i have one ready on the side if anything goes wrong here [Laughter] but it does this one two three four just like four steps this is really cool by the way you get to play with this moving uh logo apart yeah somehow they're getting rid of it in the next ui but it's okay yeah so this is fairly quickly usually it takes about a minute to to load um and what we'll get is the specific report i clicked on which is that uh drupal ddf git pod setup and it will open uh in the browser anybody try to do it uh on your own and enable the feature and see that you get the same result okay it worked for me great so so what happens just like the the ddf promise itself each one of us now have our own unique machine with the exact same setup doesn't matter what you're using on top of that gitpod does allow us to share i can share my specific machine so and i did it uh many times with randy that you can get in and put the right commands and see why something doesn't work so here's my browser with vs code right here you can change the theme you can install vs code extension what will happen things to notice in this specific setup one of the things we're running is called docker up that's in order to be able to run the docker in docker the other thing that's happening on the other terminal is docker instead of being running and he's running in the first time so it's downloading all the latest images that did it requires um again a few days all this part gonna be already built in you wouldn't even need to wait for things to download it will be ready in your box in the meantime i can open this vs code so i can open files i can edit things so i can use git pod to change the machine that i'm working on and see it happen one of the things i talked about with caching in your machine is called in git pod language pre-builds and here specifically on this machine we asked to create a pre-built on everything that change so any any change in the branch of a new pr everything going to be rebuilt so we're getting a working environment right away so as you see did have finished running if you're familiar with what did have run on the terminal usually that's what you will see and i get to see that a service available in port 8080 available i'm going to open browser which in git pods current syntax is the port name dash the unique name that they give each workstation and now you would see a drupal installation screen as you're familiar with it one of the things i would uh do right here is i'm going to draw a drush command because now i have a full dev i can do anything i can do indeed if you're uh so you know you don't need that dot anymore i haven't needed it for a while at different okay so yeah one thing i like to also do is put the word time here so i think it's fairly fast machine we have a linux machine here i think it's faster than my mac right now which is fun to see so what i'm doing now is i'm using drupal core uh to install the umami demo out of the box and just like we could see this one which is the the regular installation before you do anything now you can see that we end up running drush uh no setup needed basically everything is ready for us someone asks uh right questions about xdebug it's one of the basic things all of us need uh the beauty of this system now is xdebug is built in it just works and i'll try it i'm gonna ask you to demo it yeah absolutely required to demo it that way we'll first of all let's just prove it that we really uh yeah that's what happened when you go to install page again but if i'll go to the home page we have the full umami showing up and what i'm going to do next okay here's mommy i can run the dev dress uli and getting admin access to do that i can share with other people this url i can open uh workstations or not i can also share what's called a snapshot i don't know if i can see it here so other people can see the exact status or the snapshot of where my machine including the database and everything is at right now so now we want xdebug because xdebug is usually difficult to uh work with so if i'm going to web index php i think one of the things i should because i don't know if in my if my php already have the php debugger um i think there's an extension yeah oh so we should see if we can get that in there by default that will be there as well yeah but just so you can see i'm now installing a vs code extension it's it's wild so that's it that's installed now it means that i can uh go to index again index i'm gonna put a debugger uh breakpoint right the red dot um i'm gonna go to the debugger and press one second before this dev x debug on you wanna do that and you want to turn it off when you don't use it so things go fast when you don't need to debug and once i'm playing pressing play here now it is listening to what's happening if i'm going to refresh my umami web page and go back to my git pod look at that xdebug worked it's already looking at where i'm at um yeah i can like do some amazing things here and whatever you need xdebug to do for you it would you get the call stack you can find variables you name it it's there so this is awesome when next debug not working it does work here i pasted the vs code x debug instruction link in the chat this isn't harder locally it's exactly the same locally but the fact is he didn't even have to set up anything he just went here and in the browser he's able to do all this and debug yeah uh now another thing that was a worrisome thing that people love to use d-dev but they love their php storm um so php storm uh actually came up in good timing for us with a project called projector and one of the things we type in the readme that you can try is you type in dev command and it's called run phpstorm so if i do that and you can try it on your machine as well so it's dot d dev uh run phpstorm.sh um you see that message i click open browser and look at that it start green for a second you get a jet brain user agreement that i would not do anything bad okay uh and this is uh 2020.3 i think it's the latest we can click for now valid for free you can put your own license and this is the real php storm so anything you want to do in phpstorm is absolutely available right here if i'm going to open my files so that was like huge thing because when people like to develop drupal with phpstorm because of all the additional things phpstorm is adding it's great so in here of course the ultimate test would be also to get make sure that xdebug is working so i'm just gonna check again that i have i believe i have xdebug working but you probably want to turn it off on the vs code yeah i did uh yeah it's often the vs code so did have no x debug is working i'm going to php storm i'm going to put a breakpoint here i'm going gonna turn this on i also i'm not sure how this is if it's valuable or not but i have this extension that phpstorm usually recommends so randy would know better if it's required or not um yeah and now i'm gonna go to my okay thank you refreshing the umami page and now uh phpstorm telling me that it understand there's an incoming connection accept and i'm getting the full php storm x debug experience in the browser unbelievable so this is really really cool it makes things much easier setting up things it doesn't slow down my computer because it's somewhere google cloud so chris wells mentions that f10 doesn't seem to work to step over um and the the function key mapping is one of the funky things about running a linux application in a browser on a different os and i think the i think what you end up having to do is remapping some of the function keys because f10 has native meaning to your browser and that's the problem but i think uh i saw randy did you create that issue with projector of telling them that we need certain key bindings i i pitched in on it or because git pod itself is taking over certain things that the browser is doing so i'm sure it is possible in a way chris were you on vs code or because it would have been f8 on phpstorm so you were probably talking about ps code right vs code yeah yeah so it it is that it there is a there is going to be some difficulty about um who owns what function keys and i don't i don't think there's a straight way around that um yeah so that's the so what's really really nice about it that all of you can actually take it for a run and see how it works i really like it i like how fast it is what we're trying to do in the open source project of it is to create the easiest setup possible for being able to work with is a drupal i guess any php project compared with an example i saw of of a commerce of magento example that they have like this giant docker file that you really really need to dive into understand docker to make any changes and here any change i want to make in the regular ddf setup right we have the configuramo i can make that change did they restart and it will take effect so that's what i really really like about this that this can support anything with the simplicity of ddif also from here right again sorry submit submit patches do anything i'm used to they have two different parts there's a projector sorry the project part where you can install extension which is what we're going to do probably adding php debug as part of the project but if you have your own extension you love from vs code it will know to bring your extensions into it so usually we have a pile of extension and then it makes it very easy it works with environment variables whenever you need to share secrets or get your application to do certain things and get certain access the long term which again after this bug is being fixed in next few days that i would like to do is creating a composer plugin that any project would run a composer command there's about four or five files that we need to make this work and once you add it into your um into your composer now this whole setup lives in your project without really affecting your project the extra files you're going to see in your project are these gitpodyamo gitpoddocker file and as you can see here you can take it and do whatever you want with it here is where we are installing the phpstorm projector uh here's where we're installing phpstorm on the machine here's where we're installing the latest d-div you could change it and get the additive edge if you want goes here the in-git podiamo is where you have the setup of what happens in a pre-build so how do you prepare your machine ahead of time and what happens when you just open uh your workstation and in this part we're modifying or announcing which ports we know we're gonna use it seems like in april they're gonna make some changes in ports i told you the syntax of ports is they write the ports dash the unique name that they give each workstation they might be able to change it into what we're more familiar with which is the url stay the same column the ports that we want um all ports under 1024 are blocked so that's why we open it open the website on 8080 and the different things here also built in is what we have here if you want is php my admin and what do you call the mail service mail hog hog as well that just run the port and you'll see it happening they have this little icon to help you see which ports are available and working to get if it's 825 yes so this is mailhog right there and is this phpmyadmin yeah so you can decide if you put a vs code extension to manage your database or use phpmyadmin and you can even change the theme if you like dark or lighting anyone has questions or things that you wish this would do you know it's almost disorienting watching you do this um watching you do this because it's not even clear to us that you're doing it all in a browser it's like it looks like vs code does because it is vs code but it's like it doesn't even we hardly i mean if you just if your eyes aren't seeing the url bar at the top you're just like oh well yeah so what this is what we always do isn't it offer i have a question um i've got as far as um seeing my vs code in my browser but when i started to look for dev it says it can't find docker so there's something that i missed so let me show you something maybe that's where it's at so as part of the setup which i also hope to make it a little better there's three different terminals running in parallel uh ddf when you run it first time for now the next few days is taking time because it's downloading all the images and that's what you see did have run so what the different terminals are one needs to run docker up all the time so we kind of keep that terminal to run in the background we don't need to touch it but we have to make sure that it is running the other one is the one that running dev right now this is also where i ran phpstorm and the third one and you can open more if you want to do any kind of uh terminal commands do you get a specific error there catherine oh i think i just got lost at the beginning um the other thing that i was going to ask you about is security because it asked me to create an account and sign away all of my life you know i was always worried when it says it can make changes to my gitlab and github and bitbucket uh and getpod.io projects you know i i guess i trust you so i said yes and now i'm in here and uh i see this um you know i just think i got lost at the beginning i think you can't you don't have to give all these permissions again they are like they're based in europe i think they care a lot about security and all and they have all these certification and how they do different things i believe that if i go to settings here you can define what kind of um is that an integration access control i think i give everything but i think you can decide i only let it read email addresses that's all i do yeah so you can totally do that and but it worked great that's all yours has catherine is read email addresses it was only asking for your permission to get your email address from github is all it was asking and and actually the benefit of being able to you know integrate with all those platforms is is certainly uh helpful but i could see if i were on vacation for example and i didn't have all of my stuff with me um you know i i could jump on a different computer and do something and get the um you know push the changes up to the repository with without too much trouble so i i don't mind if if if it's just you know if it's a trust if it's a trustworthy platform i i'm all for saving uh time and and so forth then the other question is when i first first went in and i i have this um vs code i don't see a welcome you know i think that i just see the vs code file edit selection view and so forth so i don't want to hold up the works but i went to put in the x debug extension and it says php debug debug support for php with xdebug felix becker built in it says built in and you had to add it you might yeah these are things that are gonna change in next few days they are working with two different ides one is called thea one is called vs code i believe today thea is the default one in a few days vs code going to be the one just so you can see for now where are you setting that because that's a great question in your settings it says open vx registry so yeah that's so thea is a little bit more uh complex because it supports things but because of microsoft they cannot do certain things so at the when you go to the bottom of in git podeo settings uh this is the feature preview that i want to enable and here the default ide you choose code and you're going to get vs code okay let me see if i can figure out where settings are so gitpodio setting in the url you can actually or click on your picture and then hit settings oh on my own picture okay and account share workspace stop is it on account no settings there's a little menu are you in vs code now or i don't know where i am but let me just let me do um i suggest in the url to type gitpod.io settings that will take you to directly to that page okay and receive important emails receive marketing emails that's fine environmental variables get provider integrations and turn on the the feature preview enable code enable preview it is code right but the feature preview wasn't enabled right so that wouldn't have been working yeah most most of the stuff wouldn't work with that on without that on okay so now i can go back to my history and so as they go they're adding functionality and sometimes they would make it a preview beta functionality so not everybody needs to uh test different things so this is he's testing the latest and greatest in a few days it's gonna be part of the main uh branch um yeah so i think it also supposed to when you open uh i don't know if that's a setting or if but you would see the readme open up right away when you initially uh open a project um yeah i've seen that drupal.org start having um that module contributors can get a live preview i wish that when we get to a good working point with this one we'll be able to add some kind of a button on drupal.org for people to just click it and start contributing to core modules and things like that won't that be great wouldn't that be great another interesting thing that i thought would be very useful is because we're using ddif and it's in a repo at my company i can run the same setup of ddev as in git pod so most people maybe today because it's not the future yet would be more comfortable with their own machine so the same ddif setup would work for them and they would run you know everything they need to run but because then the repo is somewhere in the cloud when they need to access that not in the regular machine or for some reason they want to test something else git pod should work the same way the part of the machinery of how we make it work and and bend a few things because git pod has their own way of doing things is in dot dta for now we're adding this script file that checking what is the unique workstation url we got and what are the available ports and according to that setting that up for ddif but that would not affect your normal did have set up yeah it says that um i have a warning on my ddev run terminal it says dreaddevdev 1.16.7 is already installed so that must be from before when i was trying to hit command it's fine did you you you probably want if you only enable feature preview now i would suggest to stop that workstation the workstation that you're on and start a new one because i believe they they're building it differently for you because of the feature preview so i just hit stop workspace and it goes away or when you do stop workspace it will tell you it's stopping and you don't need to stay on that window at all you would just go back to the actual repo over here and you can click again on this link it should ask you if it asks you do you want to use the old one you say no i want a new one okay okay so let's go ahead um and finish up with uh with uh questions about you know conceptual questions about git pod and then we'll move on to one of the other things i think what we'll do for the next one is we'll take a look at custom commands using git pod so what what conceptual questions or future questions do we have for opher on this how many of you followed along it's cool huh yeah i sort of put it in the chat too but i'm curious um how frequently are those urls changing for space and i'm curious about a multi-site setup it assumes it makes some heavy assumptions about its default but if you had a multi-site i i think you could just put your you know copper ferret dash whatever url in sites php they're a way to make those may be more consistent or reliable that's really really annoying go ahead over yeah um yeah so the way git pod is thinking about things is they're talking about each one of these workspaces as disposable so purposely they want you to as many times as possible stop one start a new one because other changes might come and you always want to work on the fresh one and not on another one by the way another note if you have a working workspace it will stay there for 14 days but if you pin it it will stay forever so it doesn't go anywhere it's a great system to continue working on things i guess that's randy's uh help more of what we do i i'm just guessing but a multi-site support would happen in a similar way of how we're dealing with ports right now where we're reading the current workspace that was given and giving it an additional prefix well we uh it's not the port because we're using the router right we we originally weren't using the router and now we are again but we'd have to add additional host names and i don't know how gitpod handles those so we don't know the answer to that we haven't tried it with multi-site it's it's not about multi-site it's about having multiple host names that map to the same project other conceptual questions yeah we um our use pattern is uh to use an enterprise drupal installation that's uh sort of centrally managed uh work for the university of minnesota and they have sort of a core drupal installation that's that's managed for us but then our sites will be you know just the site's default subdirectory in its own repo can i combine repos this way and you know spin up a drupal installation um using dev and get pod um because that's pretty easy to do on a local host but in git pod i don't think there's any difference how would i think there's any difference okay so i yeah you know git pod is just a hosting service and an editing service and ddev is putting the web server up and if you're doing that locally there really shouldn't be any difference especially if you're using a single um host name to access it sure okay so then i guess i would basically spin up the the drupal installation uh in gitpod using this and then do it like a git pull all right you know get check out of my own repo for the site's default folder and continue from there are you asking over is going to make a composer um add-on you're asking how to bring it into your projects yeah yeah so today if you want to test it right away these are the few files that you need and if you take this file in this file um it should work and git pod yamo yeah so git podiamo gitpod docker file dwfconfigure and did a gitpod setup ddev these are the four files that you need it would work the same on any regular let's call a drupal project yeah the composer plugin would make all that work much easier because then we will version the different features that might get added but and then you'll be able to bring it to your project and it will only affect the kit pod setup all right well i was thinking that the next thing we should do is uh make a terminus command who was it that asked about a terminus command there we go so let's just do that in vs code so in uh we'll do that um using git pod so i've got my bit git pod going and i'm going to share my screen and here we go um here's my ddev list and if i type dev i don't like being stuck in this little tiny terminal most of my screen is usually taken up with terminals but if i do it just type dev it shows me all the commands that are available to me um and what uh what i want to do is to add a terminus command and the normal place to uh the place that you would add commands that you want to show up for every project which i think your terminus example would be is in the dot in the in the home dot d dev directory um and uh in the commands directory and in this case we want something to run in the web container and so here's a few of the things that are already there dresh is one of them and i was suggesting that we use that as a pattern um so now uh vs code here doesn't show my home directory and i would prefer to open a file here with it can i do a file open of a particular file up which i can there we go commands oh tab didn't work are you looking for an existing one i'm gonna i mean i'm just going here what i really want to do is go to web um and i'm going to use drush i was looking for how to open it um i was going to open vi in the terminal and i thought that would be evil so so here we have a uh drush and what i want to do is i want to save this as a new file and i'm going to call it terminus and so what i want to do so this is just a batch file this is a standard thing in the world here i'm going to remove the dev generated here because it's not it's it's your own and you want to keep control of it and we're going to say run pantheon.io terminus command in web container and i'm going to say terminus here and what's what's a good terminus command dwf terminus site list is that correct terminus drush commands are great ah but is site list a valid one we're we're to have a hard time using this because we're not authenticated uh but um in the project types we can remove this because uh well it's probably drupal 789 and we're backdrop and wordpress right because that's what they support they probably don't support backdrop do they and then we're just going to say terminus dollar at to pass the commands on to it and so all we've done here i mean we've just copied and pasted pasted but we've just um created a new custom command so now i'm going to go over here and i don't think you even have to do this anymore but i'm going to make it executable i think ddiv now makes it executable for you and now i'm going to go back to the project workspace um is it theta of gitpod okay and if i type d dev um there is a terminus command and it says run it's what i what i told it to say and if i say d dev terminus if i just type diva def terminus it'll give us a list of the terminus commands and um i can't do a site list what can i do without authenticating not much this is what i did this is good enough not much is useful beyond that does that make sense for a for a custom command so we did that with a with a custom global command but when you're working with a team or you're working with something that's a little more a little less generic than terminus then you would do that in the project commands web directory which has some other examples there i got to remove that threshdot example since we have a real one now so that's very cool i didn't know it's so easy um can you repeat the the difference between the two places you could do it then why would you do it in each one you betcha so the global one will show up on all your projects and the one that's in the project will only show up in that project oh so the global one is on ddif it has nothing to do with your project that's right that's right the global studies show up everywhere the the project one also in most uh in most people's setup will be checked in with the project which is an advantage for a team when you're adding something that is for a team or that's for a specific project and we just did that in offers oh well in in my copy of overs get pod we just demonstrated that whole thing with ddev right there that's very cool yeah and keep in mind that it's until you actually push it somewhere i don't have access to it even that you used my setup yep exactly and uh i do think uh somebody was asking about security a little while ago and uh oprah and i have gone over this a few times let me go ahead and share my screen again but the security i think is very important and i am not um i've not fully come to terms with it yet but i leave mine let's get this out of here um on my settings i think that's where it is right where is it in your picture i think access control is where you wanna oh i missed it yeah i was right passed it so you see that i don't have it um i haven't authorized anything at all i don't use git love or bitbucket at this point and so i've only authorized github to begin with but i've given it only the ability to know how i'm logging in if i have to do a git push then i will temporarily enable the right public repos but i don't want that on by default because i'm still learning about the security implications of this there's other ways also of getting your ssh key in here instead of using their access key but i think the the security question is very important and i think that paying attention to these buttons here is terribly important so i would uh start with just that and nothing else yeah where we found the the issue arise is one of the option is i can open a workspace and then that link that always get a funny name there is shareable so the other person that i shared with or if i post it on public slack can go to that machine but then if i have write permission they also can use my git permits it is as if i'm logged in and doing everything that's not good right so never share your workspace but the other feature but the other feature you had on me he's picking on me because i shared it today but they do have an option to share a snapshot of your workspace so that is whatever the database that whatever you did there that is a shareable link that has nothing to do with you as the user each user would have their own permission and only access to whatever they can access okay so uh one of the other things let's uh if anybody has a last minute question about uh custom commands or um is there an easier way to share not easier easy way to share comments like is it indeed of course that i can just download it so there's a whole bunch of them in dwap can trip but um uh of course for your team the best place is in your project and you just check it in right so for your team that's the answer but yes uh there's a whole section of them indeed can trip i ask a question about versions of deep dev um um can you can i ask you a favor i should have asked you this a long time ago could you turn up your input volume your microphone volume oh i'm sorry yeah the good i don't have very good uh audio i'll just talk louder okay i can hear you i can hear you the question is i have d dev uh 1.16 something on get a git pod and on my local machine i have 1.14 and i have not worked with ddev to where i ever had to upgrade it so i don't know whether there's an implication with having a project say that i'm working on get pud dot io and then i bring it down locally and worked on it locally would i run it would i run into version issues or should i have to always make sure my getpod.io is synced version wise gitpod gitbot's going to use the current version and um those of us that do support and maintain things would really very much appreciate it if you would upgrade yours as well um you're not going to have any trouble uh going from 1.14 to 1.16 and so the the real answer is to the real answer is please use the current stable version so that you don't end up with support problems that have already been answered by the new stable version right i did have issues like that working in a project with other people something that worked for me did not work for them they had an older dative with a bug that was already fixed in the current version so um yeah upgrading to the current version is going to be beneficial is it just dev uh update and it won't break anything if i uh what operating system are you on i'm on ubuntu on this when i'm on 18. okay so if you're using uh brew if you're using homebrew then you'll do okay okay so just go to uh here let me just show you here i'm just going to go to dev.readthedocs.io which is the is the page here and on that page it says how to install and uh it says here's the home brew technique which you didn't use um and so you go down and it says the installation or upgrade script which you apparently did use yes and here's the command for you when i used linux i think i really enjoyed using brew i don't know if it's possible for you to switch it um i don't think they had linux brew back when i started using linux so i haven't i i guess i'm just a creature of habit but it's it's your choice you can just you can just use the upgrade script like this and you'll be fine and that and that will not overwrite anything that will break uh no the the reality is um you know i can't i don't know everything about your world but the reality is dev is a single binary and that single binary is where all the stuff is going on it doesn't have like dlls or anything like that or shared libraries that it's installing or anything like that it's a single binary um when you do that you will end up um you will end up when you do a ddf start you'll end up pulling all the latest container the latest images and so you'll want to do that but that i mean it's not it's you will do that that's what will happen but um i would say that at least 95 of the time you will not even know the difference and you're just better to stick with the stick with the current stable version i will do that all right okay well let's uh let's go ahead and take a quick look at what's in the upcoming version and we can talk about we can talk about what might be there and that's kind of a part of talking about the kind of a part of talking about the um the road map because that's the coming very soon roadmap um okay you go there you go there and i will just get out the the release notes um that i'm working on so we can see uh what's going on um one of the very first thing i notice is that we don't have to say to do a dda power off anymore because d-div will offer to do that for you um so the one of the really wonderful things that's going to be in 1.17 and this is available now of course in the release candidate but composer is now version two by default but you can still use version one it tells you how here we have now a provider integration system that is user configurable so you can change it or add other providers we're talking about hosting providers here so if you are using aqua you can pull from aqua with adidas pull aqua but if you're using some other thing who's another hosting provider that we don't have have supported here you can just if you have a homegrown one you can just implement it yourself very quickly and easily i can i guess i won't dive deep into that i'll be doing a screencast on that within the next bit to show you how but there's links here to how all of these work and you can you can create your own add your own there's an rsync example there's a local file example like if you if you use dropbox and you have a normal database that you're always installing from dropbox well that's just a local file poll it's nothing to it we've added support for pushing to hosting provider although i'm still trying to talk people out of using it unless they know why they're using it we have official support with the apple m1 the apple silicon a whole bunch of really cool improvements to dwf snapshot you you can now select um you could just do a diesel snapshot restore and select from the snapshot you want you can restore the latest um is everyone familiar with snapshot because oh great really good feature yeah yeah so if i go back to my if i go back over here to my git pod and go to the right git pod when i don't know where my right git pod is oh here this is how you can go back to something where you were before so here's the one that i was on and it uh it's apparently timed out on me so i can just say start and it'll open that up and bring it back up again so i'll just show you what snapshot is oh but i'll have to upgrade ddev to to i won't i won't fool around uh getting the latest ddev here but i will show you snapshot because that feature's been in there for a year or two and it really is nice but basically snapshot takes a snapshot a very fast snapshot of your running database and you give it a name and then you can restore it when you need to so it's great for backups but it's great great great for when you're incrementally working on a problem so for example if you're working on a migration a migration usually is a many step process where you're um you you get a piece working uh but then you have to work on the next piece so what you do is you save the one piece um and you um you save it when you get to the one place and then you start working on the next one and every time you need to get back to it you just go back to the dev snapshot restore um so let's see what we've got going here um it's not started up yet um you might still have it downloading in the other terminals yeah yeah yeah so which is what's going to get fixed in next year yep so that'll be ready in just a second but uh a snapshot saves a very very fast database so that you can come back to it and you can always start over at the same place even if you fiddled with stuff it's also great if you're insecure about what you're working on so if you're you know if you're insecure about whether you're you're doing a site edit and you might just screw everything up you can just do a snapshot before it and you can keep going back to that or if you're studying a bug that's another great and another great thing when you're studying a bug and trying to find a recreation scenario uh for it you can always you know if you find one you can you can snapshot it and then you've got it and you can keep going back to it and working with it with it in x debug and that kind of thing now you would never put a snapshot in your get repo as version uh control to re you know as an archive well if you did that and you had a public repo then you'd be exposing everything about your um what you were working with so i wouldn't do that um no i wouldn't do that um i would if you had you the snapshots are just a directory um but um you could put them in a different kind of storage but i wouldn't check them into git it's like sharing your get pod um uh a little bit it's a little is it it might be a little worse because if you had a copy of your production database then everybody's uh hashed passwords are in there um so i think it might not be the thing you'd want to do but but it's safe to have it on git pod because nobody on git pod can see it unless we were to yeah nobody can see it and i'm going to delete this instance in a few minutes anyway so this is how you do it you do a ddf snapshot dash dash name equals mid cam and it just makes a snapshot right there and then with this version so it tells you where it made it and that kind of thing um with this version of ddev we don't have the fancy the new fancy features where i can choose which one i want um here but i can make another one called mid camp 2. [Music] in this version of dita i would do a deed of restore snapshot hey we got to get the auto the auto autocomplete in there so i would do a ddf restore snapshot dash h did i not type it right i didn't think the autocomplete is on um i think ddev's auto complete isn't installed and it has to be um uh anyway let's we have to figure that out um so we'll do it d dev snapshot restore name equals mid camp and it'll get the first one that i did oh well sorry i'm using the wrong the backwards it's already lost out of my i fingers do it copy it from the terminal this is the problem right here right so there we go um so that's just the the quick way to get back to where you were and you can get back to any number of things the key to snapshot though is use a good name for your snapshot the default is a date time sequence and so you you want to use a use a good one for that i used it in project where with a huge database that took half an hour to do an import but snapshot took i don't know 30 seconds or something so way faster than getting uh the mysql import database yeah because it's actually saving it in the native format um it's it's saving it in the actual native format okay let's run through the the um so there's a whole bunch of improvements to ddf snapshot here uh blackfire.io is now in there and we could actually demo that but that would be another demo blackfire.o is a profiling technique it's a commercial service but they have a good free it's actually quite a generous free setup so now there's a deed of blackfyre on and you can just immediately do blackfire which is really very nice if you are used to creating a lot of projects and you don't want to answer the questions that come with ddf config there's now ddaf config dash dash auto that just takes you quickly through the process it's just a one step thing um this is a big one you can now create environment variables in your config.yaml or your globalconfig.yml so you can create them globally or you can create them in your project and it makes a huge difference if you want to share secrets you can put secrets in your global config you used to have to do this in dockercompose.star.yaml and you don't have to do that now and we now have a database browser if you're on windows so ddif heidi sql the defaults have changed for php version so php 7.4 is now the default for new projects and the mariadb default for new projects is now 10.3 which makes it easier with drupal 9 you don't have to think about that with drupal 9 and then the new docs theme is is very cool looking and has better features as well um i don't think that any of the smaller changes uh are very interesting to this crowd so i'll just skip those um things that might change for you that might impact you if you haven't been installing drush in your drupal 8 or 9 projects you need to install it because it's not going to be there and use your local bin rush on those on those versions um composer 2 is now the default composer version that's working with most things now drupal 8 9 drupal 9 plus all of them work fine with composer 2 but if you need to switch it tells here how to switch to composer version one um and of course the provider interface is completely different so people that were using it before um it will take a little bit of um but it's it's pretty easy to get used to because it's a lot simpler um you don't have to do the auth or the config steps anymore um so i think that's uh i think that's most of the most of the 170 things the 1-800 things one 118-0 i haven't started thinking a lot about it but most of these are not big new features so although code push and pull will probably come along for provider integrations um so that you can do a ddef push pantheon and it'll do the get push for you as well so that's a that's a big new one um and i think most of the rest of these are bugs and uh iterative improvements the d dev road map which i don't maintain well as i would like to um google has the wrong google has the wrong thing here the um i think the biggest thing that we'd like to get in that is probably beyond my ability to maintain right now is having a gui instead of just a text one that would make it so accessible to people but i think it probably expands beyond my ability to maintain it and since i'm the maintainer we have to keep things to where they're maintainable that's going to be like an electron app or something yeah yeah and we actually had an electron app in the past but there's there's actually native go uh gui stuff uh that it could be implemented in um but um yeah i what i'd like to do is have it in a native ghost so that it'd be all maintained as one thing when we had it before as an electron app just that just ran the data command line um it was a huge thing to maintain and it didn't have tests and it may still work it's out there let's try dwi but it just couldn't be it couldn't be supported you know because it uh it didn't have tests um and because it was electron um you know it's a whole different world completely different world so it needed somebody else to be paying attention to it and dread didn't have the resources to to keep anybody's eyes on that which only makes sense we'd like to expand the the cms support and improve the cms support we're getting quite a lot of quite a lot of traction in our magento support and our laravel support and um um what else we have um several other things but uh sulu joomla craft cms it would be great to have explicit support for those um so anyway okay any questions about roadmap or upcoming features in the next couple of weeks in the 1.18 do you think you might like i really liked how git pod did the milestone in their issues yeah yeah do you think you might uh do something like that so then it's more feasible i mean we we have it in milestones um so here's the 117 milestone we're almost done um here's the 41 closed it's not sharing your screen oh i guess i have a screen sharing my screen huh i just now turned it off so here's the here's the 117 milestone here this is the one remaining open issue here's the 41 that it closed in this [Music] the [Music] we can we can look at milestones here and here's the 118 milestone so um i don't usually maintain these more than one milestone ahead uh but does that answer your statement yeah i am i didn't i i did not notice we have milestones it's great yeah it's a pretty simple technique for tossing things in and prioritizing them so any other questions about uh the path forward anybody do you want to take uh we'll take a five minute break and come back and we'll look at some other things why don't we do that we'll come back it uh it's five minutes enough and we come back at one at uh it's uh 2 40 right come back at 2 40 central time is that all right we'll be back at 2 40 central time all right okay are we back anybody back tell me is anybody back at least ben's back ben and i can say man and brooke and i can start without everybody else that's good okay looks like we lost a couple of people which is not surprising we've been going at it pretty hard but we can have a good time um either of you have a favorite uh favorite question or topic that you want to deal with this afternoon i'm personally curious about um you know extending uh with docker files and such extending some of the things that we might be able to do with this um i'm kind of a newbie to docker i'm kind of a newbie to dev in general but our team is is adopting it a lot faster and one of the things first things that i had to do was um enable like a custom connection to an oracle database for example for some info and so i needed to uh draw up a custom docker file to to get the appropriate extensions php extensions and such and i'm just wondering if there might have been uh easier ways to do it than what i did so so yeah so that's a great question so let's go let's go that direction um we'll look at how to add uh an extension or a debian package into dev um and we'll look at where most people get their copy and paste solutions from um so we'll do we'll do both of those things so i think the first question is um how do we add a just add a uh add a package so we'll do that i think your your oracle question is a little uh more advanced because i i think they require you to have a separate repo and so since you have to have a separate repo you are stuck with using a docker file but it sounds like if you've already been there you've been in the really advanced land um but let me let me say first i'm going to share my screen here and let me say first that most people go to ddev contrib first they go to ddf contrib first to see what's there um and so uh i wonder if this has oracle in it doesn't have oracle i hope you'll paste i hope you'll provide your oracle recipe there are examples here with dockercompose.star.yaml snippets there are custom command examples there are additional services for many different things um and then there's doctor file examples like for the stripe cli or laravel q worker and then there's some full um full tutorials so for example setting up drupal 8 multi-site that kind of thing and some type of three examples headless chrome things like that that either will solve your problem or get you started on it and there are also a pile of things in stack overflow where they're tagged d dev dot tag d div and this is a great support place because it can be maintained easily um and so it's a great place to ask questions especially if you're not in a super hurry um i mean they usually get answered really fast anyway but they live on here and you can edit your question and edit your answer and people can comment on it and it's just a it's just a great place um one more place to look is in awesome d dev um which is a list of um it's a list of people's blogs and that kind of thing and um i always want to hear too when you um when you have something that should be added to this if you write a blog or something like that we want to have it we want to have a link to it in here but there's lots of stuff here including all of my articles about d dev which is quite a lot and sometimes they come at these problems from a different angle than the docs can so for example this casual web hosting which we we won't get to today this is a screencast that um helps you to understand it from a more from a from a bigger picture point of view um so there's there's a lot of a lot of options there but let's just go and find out how we would add a package to begin with and maybe we'll just do this with our um are we still live here still live we'll do that with this um i like the new docs so i'm going to switch to them and we will search to debian customizing docker images so i think you've already been here and you've already um you've already started to understand this but the easiest thing is when you just need a package an extra package like one of those is you just go and add wimage web image extra packages uh to your config.yml so the the default packages there's many of them already in there so this these are already in the base distribution that we use so you don't really have to do anything but then you can go searching for other types of packages that you might need by going to packages.debian.org stable and then we can do what uh if that is not adequate which it sometimes isn't like if you need to uh install a different node version here's a here's a recipe for you um and so these are the if if you know what package you need then it's really easy to just do the web image extra packages that's that's that's nothing to it but when you have to do something fancier um then you're going to have to end up writing a doctor file and there's docker file examples in your project so we'll take a look at that but i'm actually just going to take i don't really want to take that one let's take a look here at um let's just search for docker file and ddiv um so here's a classic thing of where you just want to run a yarn command before your project even runs or anything it's not as good as what i want okay here's nvm so a lot of people need nvm so they can switch node versions in the project and so you can take that the top part is boilerplate and then you can do whatever this is the documented process for installing nvm here and so that's that's a technique for you to do it um so if you wanted to install oracle i think i imagine you needed the php the oracle php extension right so this one uses the pekkl repository um and so now what we've done is we've we've done a web search to find out how i get the oracle php extension and then we find out that we want it to come from pickle or from pear and so i think that the docs actually tell how to do that but they might not no they don't so but the the stack overflow does so you find here how can i install it install a pickle extension like emcrypt and so this is exactly the same exactly the same issue here and we're just going to do a pickle install so here we did a pickle um here we did a pickle install m-crypt and in the case over here it would be a peck we'll install oci-8 and so um that's what we would do and let me show you where you would do that um so i'm just going to take um this and copy it um and i'm going to go over to our happy world over here and if we go into the dev folder and into the web build folder there should be a docker.dockerfile.example there and there isn't um i wonder if that's i'm just the reason i'm pausing is i'm wondering if it's a bug where the example is not being written so let's go ahead and use the proper editor here so we'll go into web build and i want a new file called docker file and i want to paste into it this stuff and i'm going to use the 7.4 and i want the 1.16.7 bass oh no we don't have to do this at all that was an older version um you probably want to remove the first line yeah thank you very much it's not going to work is it so um and we don't need this line here i don't oh yeah we do need it but we don't need the lib m crypt dev here so these are just the requirements for doing peckle and we want oci 8 right and we want 7.4 um and it's probably oci8 um this should have been dollar php version in the first place and this should be oci8 and who knows this could work it may blow to smithereens but you see now we have a docker file there we do a ddef start um normally i would do these commands one at a time in the web container i would have ssh in there and i'd do these commands one at a time until i had them working right that was going to be my follow-up i didn't know if there were some hints that you had it doing that other than like stop the container comment out what broke try it again so so i am gonna do it i'm gonna do it the way i would normally do it um because um that's the way to do it anyway so it wants um i'm gonna set make sure that i've got the right thing here no i don't oh we're back a version uh so this this was going to have a little trouble anyway um so so i'm going to do a sudo apt-get upgrade and then see if i can get through this uh process here um and that will it didn't didn't didn't blow up yet okay we need uh lib ssl devs and so um so i don't know um what i have to do to solve this and i probably shouldn't try to solve it in front of you here it's the beginning of it what we're trying to do yeah so what's that i missed the beginning of it and i did so what we're doing yeah sorry about that yeah you came in uh what we're doing is we're doing a peckl um a custom docker file that does a peckle install of something that isn't in the normal repository so in this case it's oracle so we're trying to install uh we made this docker file here um indeed of web build docker file and uh what what we're trying to do is install this peccalin extension since it's not in the in the default stuff so now what i'm going to do now that we've installed hopefully most of the prior the things the prerequisites i'm going to do a sudo pekkal we're inside the web container here pickle install oci 8. oh that's oci 8. now we don't want oci 8 we want um this is i just landed here on the web so obviously i'm doing this underneath for php oh there we go thank you right underneath it thank you keep going keep going keep going right where you were but the literally the next line under it for php 7 use pekkl install oci 8-220 or php 7. you just tell me what to do i can't see it you're a little bit up like one inch oh there it is it was there okay oh that's pretty uh okay well how about that we'll just do that then so i got to go back to my place here so i want to do that oh and i don't remember how to install php eyes so you have to get php eyes in there um it uh this this isn't that hard a process but i don't want to uh you know go into the wild the wild woods with everybody looking on and wondering what we're doing but the the bottom line is um that to solve a problem that's complex and requires a custom docker file the first step is find out how do i do what i need to do in regular debian so that's the first step and so that's why we that's we that's why we searched for um for oracle with php and we found our way here um and so we found out how to do the peckle install on it so that's the first step and then the the next step is to experiment with it inside the web container um using some of the resources like this one which is about how to install a peckle extension and to adapt what we have and then once we understand what we would be doing we have to get php eyes in there obviously so if we were if we were wanting to spend a lot of time on this we just go search and figure out what i'm missing about having php eyes in my container and then we manually do the peckle install and then whatever other cleanup needed to be done and then we would then put that into our docker file and basically once we found the correct formula then we just put it into these run statements and check it in and there we are and we do a ddif start it does the build and yes it does take that as you already found out yes it takes a little bit of work to find your way through it sometimes but the bottom line is find out what you need to do in debian do it by hand yeah and then put it in a docker file sure yeah those resources too are very helpful i'm not sure that i found everything that you were pointing at now back when i was trying to do all this so i was i was making my own way through it but that that's very helpful that's very impressive that you did that that's so that's definitely advanced um one of the things is whenever you start getting into the dockercompose.star.yaml or when you start getting into the dockerfile all of a sudden your need for knowledge has gone from oh i need to know how to do dwf start indeed i have launched to oh i need to understand docker and docker compose and what the integration is like and debian and all those things so you just start multiplying and that's pretty that that can be a little um it could be a little work as you know as you found out but the fact that you can do it is really good what are some of the more common uh web packages that are easier to install that people might need to to think about um some of the some of the easiest the easiest ones uh are just when you can just add a debian package so like in the example in the docs um so if we just needed a php extension that was already supported that's all there is to it so that's that's an easy one um the uh doing a yarn install in advance is another one um there there's um for ones that need so somebody wanted uh global phpcs the the code sniffer i don't know why they wanted it but they you know here's the example of how to do it do composer with it do it with a composer global install for whatever reason that they wanted it instead of it built into their project um so there's um you know you can get really obscure hopefully most people won't have to go there so for example you can you can override um dwbs phpfpm.conf and stuff like that um there's there's there's a lot of things you can do here oh my goodness there's a lot of things you can do let's see if i can get myself back to where i'm supposed to be oh you weren't even seeing my screen as i went through all that stuff i apologize uh somebody you got to tell me when i'm doing that sorry about that so what i was doing was i was looking through all i'd searched for for d dev and docker file in stack overflow um and i was looking at all that i'm not even sure when i turned off my screen i really apologize i hope but i hope i wasn't rambling on too long without any context are we exhausted yet or do we want to do something else excited so much cool stuff uh extra services okay well let's take a look at extra services then um so we will just do that um i'll share my screen and we will go to um we will go to the extra services i'm going to go to the latest docs because i like the look so much more so here's the additional services section of the of the docs here and the classic example is apache solar a lot of people need that with drupal but it's also one of the most complex that there is because solar itself is complex the docker solar container is complex and the drupal integration is complex and so there's a number of steps to install it and you can screw it up a number of places along the way um so and and then worse than that the solar p the people that maintain the solar container they seem to change the model of how they maintain it periodically so the the current um documented technique is for solar 8 but um aquia and pantheon like solar 3 4 and and they don't work exactly the same so there's a recipe for them indeed can trip but let's do one that's easier and it'll be a good example for us let's just do memcache d so what we'll do are you all familiar with memcache d are people still using that in the drupal world it used to be standard on every non-trivial drupal site um i can't because i because i'm sharing my screen i can't see you if you uh nod your head or anything yeah i have a few projects still using it yeah is it are people starting to use redis or what are they doing yeah pantheon supports redis as an add-on so a lot more people i think are using redis and i think just faster so they're like there's less of a need for it but so let's do let's do redis we'll go to dwev contrib um uh there's a whole bunch of services here in d dev contrib these are community maintained i try to try them out before i commit them but they um you know they don't have tests with them and so they can get out of date and when you find a problem it's your job to solve it you know this is a community maintained thing but here's redis and reddish commander so i'm going to open um the reddest one and the redis commander because they're both very nice and very cool and they're easy to use um so um the the first thing that they did was they added a uh commands redis directory um to the commands folder of the project ddep folder of course this was written before there was a global commands section and then they say change it if you need to which we don't need to and then update the config as you need so i will just do what it says here so i'm going to take the redis cli command i'm going to get the raw version of that and i'm going to go back over to my still running thing here and here i am indeed get pod and i'm going to um i'm going to go into the i'm going to put in the project commands for now because i'm there and so i'm just going to get that redis cli uh custom command and let's just take a look we'll just take a look here and see what's in it this is just like what we've been working with there's nothing to it it's just it's just showing what what the command is to run the redis cli so now we have a redis cli and we will go back over to ddevcontrib if we can find it we don't get lost in all of our tabs here we'll do the next step um of what they suggest on redis we copied the redis um the red we just made a custom command which we didn't we didn't specifically have to have and now we're going to get the the docker compose and the redis config so we need this we need this redis config and we're going to put it in redis.com so i'm going to get the raw for that and i'm going to go back over to my git pod and i'm going to make a redis directory here and i'm going to get that config and i don't know really anything about redis um so there it is and it's it's the standard redis config and so now i'm going to go back to my instructions and it's going to tell me that i need this dockercompose.redis.yaml so i'm going to get the doctorcompose.redis.yaml get the raw and you'll see all it's doing is getting us a container giving it a name giving it labels so that ddev knows that it belongs to it and it's got volumes for the configuration and this is saying that the web container depends on redis which i don't know that that is needed there so we will go ahead and go back to here and we will get that we will get that yaml file and now uh if i did have start i should have redis but why don't we get the redis commander while we're here because there's nothing to it here's the reddest commander i don't think you have to do anything other than what it says here i don't think you have to do anything other than this except remember where it is when it runs [Music] so we'll do a ddf start i'm going to do a deed of restart because i want everything shut down before it comes up and uh oh i need to delete that custom docker file the custom docker file that was broken was still in there so now it's it's opened the um the redis connection and i can open the browser i'm betting that this is the no let's see here let's try this one oh we haven't so this may be a complexity of working with this on here but it doesn't actually make any difference whether i can get to the redis commander with you know we may not have adequate configuration but i can do a dev ssh now i'm in the web container and i can ping the redis ping the redis container and i can connect to the redis container on the internal port so the the port for that is it six three seven nine six three seven nine it looks like it is so i should be able to and so i'm in the web container so i'm looking at the world like your php code does and i've got a connection to it i think it's http um but um it may not be http um but the my php code can now connect to the redis the red additional service so basically what we did was we added here we go we added two docker compose services to this um the redis.yaml and the rediscommander.yama which didn't really work out but the redis one worked out just fine and your your php would be able to do that right now so um that is essentially it and if you look at if you look at the redis one as an example um let's not let's look at the redis one here i don't know what that is about if you look at the redis one as an example this is similar to the memcache d1 it's really not that much trouble um you [Music] you set that some of this is boilerplate from the docs like the container name is boilerplate the image is the one that you decided to work with coming from docker hub the ports is what ports are exposed the labels are there to tell dida how to find um how to find that tell data that this container belongs to it and then these volumes allow the [Music] allow the data to be cached and then you know here's the command and we had the important stuff inside the redis.com and then this is telling a couple of details that get merged into the web containers configuration so that it knows you know it has a specific link to redis in there so questions about that i know it's uh it's a little intimidating because it requires some understanding of docker compose but the the find other people's stuff in uh dwck contrib is a pretty time-honored [Laughter] technique someone was asking uh we're saying at twitter do developers know that stack overflow actually have a home page what's that someone was saying on twitter and asking if developers know that stack overflow actually have a home page because we always end up right seeing an issue and reading everything oh yeah i i i i i i don't read everything in stack overflow i know it's very addictive but i i just i pay attention to d dev and that's all i paid but actually i serve you know i google i consider it one of the finest information sources on the web mostly because of the voting up kind of thing so that you end up finding out what the actual answer was and i don't know why i don't know why drupal.org even has a forum anymore i can't even believe after all these years that they do because because stack overflow does it so much better that the best part is being able to figure out what the real answer was and that's due to contributors like all of us so make sure that when you do something on stack overflow you share your answer and you vote up the ones that are real and comment if it's not working and stuff like that any last things that we should do before we go you you've been terribly patient and uh this is loads of fun to do this with you bendy thank you so much learning so much from you every time oh it's so much fun isn't we all learn from each other it's great um the um i guess we did do the things that people had mentioned i think the 1.17 features roadmap x debug with vs code phpstorm um we did you know let's see if the um let me just look at our other list that we started with custom commands and third-party services we did uh custom docker file we did web image extra pro packages the only thing we didn't do was casual web hosting and that's uh that's pretty easy to try out let me give you a link to that if you want to if you want to see how that works let me just get a link for that from awesome dev which is how the only place i can find anything so so i did a screencast on it so if you want to see how that might work out for you um here it is in the chat um the um at the like i say i'm using it for all the little sites that i have uh that i have kept around um over these years and it is really snappy on a twenty dollar linux i did have it on a ten 10 linode um but then when i got when i got like five sites on it it was um running out of memory so i paid the money for a 20 a month linode and um it is snappy those sights are snappy they don't scale or i mean you know like if they if it got slash-sided or something it's not going to stand up it's going to die but for all the little sites in our life and all the things that are not um you know not super production sensitive it is pretty nice and you end up using all the the normal um the normal techniques that you're used to using with ddif so that's a nice thing about it so did i miss other questions here [Music] i think we did it i think we did great i can't believe your patience and i appreciate it very much thank you additional baby quick question yeah yeah go for it uh one thing is um we use like a tool like browser sync when we're developing themes and like is there a way to sort of add additional port forwarding through the web container so are you using browser sync already with yes so there's there's a nice recipe on stack overflow that tells how to do it so we'll just go there and [Music] go to stack overflow and browser sync and uh if it's related i really enjoy using ddevshare when i need to show the website on my machine to other people yeah dwight sure is a good technique um so i think this is the chat this is the box there we go so there's the browser sync i think this is the this is the one that's the best answer uh recently um i will uh paste this here um yeah ddef share is really nice it uses ngrok and you can just show somebody your project um you know get with git pod you can also just give them the url to the to the um thing that you're using well you can actually also run div share from uh yeah it will work as well although you don't need to share your uh but why why would you do that when like so when you already have a a wide open port that you can just show them on isn't the port still uh can you share the website without sharing the workspace let's try it let's try it okay so here we are um let me share my screen so that i don't go off into the weeds again okay so here we are and here i have this running and i should be able to go to the ports right which are right here and the one that's um 80 80 is the one i want right yeah in the middle five down to that one right there here we go and then unlock that no no you want it the opposite i think uh everybody see if you can hit that page and install drupal for me i'm going to paste it i'm going to paste that see if you can see if you can hit that page isn't working can you try the opposite of the of the lock thing yeah i can let's try that so here i am i thought i was on it's i don't know why it's weird oh it's backwards so it was set up right to begin with so you should be able to hit that again and install it on my site yeah so yeah so it was open by default or or i had allowed it earlier might have been but yeah so it showed open and yeah the the icon is showing me what i can do with it not its current state yeah so yeah so i cannot go to your workspace but i can definitely exactly go to public ports yeah so that's probably if you're using git pod that's probably more efficient than d dev share but d dev share is there for everybody all the time and it works great so let me just show you ddev share so that you know um so if i do a um a ddf share here um it's going to oh oh we got to add ngrok well maybe we don't need to add in gruk should have a list of things that are good to add um all right um here let me just uh let me just do it on my local machine i'm going to do a [Music] um make sure that this is running and i will do a ddf share on this and it had a complaint but i don't think the complaint is very important oh i haven't configured my token on here so you should be able to go to this url [Music] and so see if you can hit that url and see if it takes you to my d9 site dot to so hope you don't take down your computer yeah right yeah well i'm getting lots of requests through there so it must be something like working but it looks like i um oh there yeah there comes miles there it is new mommy so that's a d share is a technique that lots of people don't know about it's really really easy to use all you have to do is brew install ngrok or install ngrok however you want that's just the dev project that's on my on my local machine here so and i got too many connections i well it looked like i haven't even installed i have a paid account but on this machine i haven't even put the token in so it uh it'll hit them pretty fast yeah so it's recommended in and grow even if you have a free account to sign in because that will allow more flexibility yep and i don't have uh i don't have that so that's um yeah very cool so okay we still had one or two more questions so if there's any more we'll just keep at it but uh um your call do you know of any additional uh performance gains in docker and mac the uh okay so the traditional problem with docker desktop on the mac is that it has kind of a two layer file share technique and dwev and all of the tools like it have the actual workspace files on the host and they share those into the container and on um and on um docker desktop that's a two level thing and on the mac it just has never gotten very fast so the technique that i recommend to everybody on mac or traditional windows is to enable nfs and that's in the docs you just search for search for performance in the docs and nfs makes a huge difference so um the m1 release that they just released today while we were on this call or right you know 10 minutes before or something is actually really fast i didn't get it but i was working with the um with a experimental release that i think is the same thing and it was really quite a lot faster and i'm going to be interested to see if maybe you don't even need nfs with that um so on the m1 there might be an answer on on the um on the traditional mac and traditional docker desktop unfortunately with the um with where they're thinking right now they haven't made progress they they went down a big rabbit hole last year um with a sinking technology that all syncing technologies are going to have reliability problems and they had the they had the reliability problems even though the the performance was amazingly wonderful for certain for most use cases but then all of a sudden it would crash on you and it'd be wrong um or it would it would um you know mess up your actual data um which is not what we want to do so the the issue is the open issue on this on the docker for mac issue queue has about 2 000 comments on it now and unfortunately they're just all people griping um the answer for now is use nfs and hope for the best um i think they're going to come back to it i think they may just have gotten exhausted by the the search they've tried a bunch of things they won't they they won't do native nfs because it doesn't have um it doesn't have um what's it called file i o sync or notifications it doesn't have i notify um which is really important to front end people so so that's the yeah on the mac it's kind of unfortunate because windows is making such huge strides and on wsl 2 we have such amazing performance because it's real linux and the mac mac apple doesn't um seem to care about you know like having linux or anything like that they that's not in the world that they're working toward um they want a controlled environment that they're you know that that is predictable and doesn't have all kinds of different user interface things in it and there's good reasons for that kind of thinking but for us as developers people are jumping ship all over the place and leaving the mac to go to do what wsl 2. thank you so much andy thank you everybody it's just a huge treat to have you here and your patients and it's so much fun to work with you and uh do come on over to the d dev channel on uh drupal slack we're there all the time and come into stack overflow and uh everywhere else and it'll be wonderful so happy to follow up anything that was left hanging here thanks so much everybody take a break all right great thanks so much bye-bye
Info
Channel: MidCamp - Midwest Drupal Camp
Views: 300
Rating: 5 out of 5
Keywords: MidCamp Chicago, MadCamp, Drupal, Drupalcamp, MidCamp, MidCamp 2021
Id: xNOQFps8QmQ
Channel Id: undefined
Length: 142min 5sec (8525 seconds)
Published: Sun Mar 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.