Meetup - PowerShell Templating with Plaster

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I think just quickly check okay hey guys thanks for coming to the power Meetup thanks guys come to the meetup October there's actually something I need to do think that we could discuss it when the news comes up so my name is Michael I'm one of the co-founders here obviously is a very large room a lot of attendees here really appreciate you guys coming hope you guys the ground so where I'm currently sponsored by Hudson and from boy pavlo my boy script that our script runner who's basically scoop run is basically paying our meetup costs which is absolutely insane especially since we were just talking about before meetups obviously on switch their pricing model it's very good talk across time so yeah actually haven't you yet script on orient you get that last watering there yeah it very very good arm so yeah definitely thanks group runner for that that was a really really awesome really awesome for them to do that and obviously in the sync technology is also sponsored so yeah thanks guys Sao Paulo news so there's not really much in terms of news one of the things I did kind of want to mention it just kind of came to mind but I've been even really think about it was Christmas obviously we're not going to be I'm doing Christmas because nothing in December we do we're gonna do anything in January do we do anything generally last year than we did what did it to the end of the Jeremy can do generally I can't know if you generated babies can buy them well the only reason I say that is because of critical problems yeah we do a better smile yeah that's what I want you to read about I think yeah like take the live team meeting anyway so obviously patch well seven pretty farms being released um kind of just got the update and then just went with it they should be going they should I'm how show seven how she'll seven should be GA by the end of this month the woods should huh see ya for the guys who don't use visual studio code or they used to just you know for PowerShell obviously Visual Studio 2019 is just being released tons really cool new features which basically I've stolen from mob is your street code so though there are some really cool features with c-sharp that's and they've re-engineered a lot of the intellisense of them which is actually quite cool but just for tonight yeah you can't so essentially they've got a live show now a whole bunch of other cool features like using statements and things like that C sharp now pretty much automatically added so you don't actually if you add up class um dude show you guys and figures it out and then ask using statements off the top is a little Western elegance which is really quite cool it's got a whole box it's got a screwdriver so it out and you can actually refactor your code multiple times and you can show you different ways of formatting your coat and things like that was really quite cool so yeah anyway that looks like that's c-sharp so obviously the c-sharp eight has been released which has some new features so I'm not going to really talk about it because this is really powerful meetup but it's just kind of good to know that there's new features there especially with the async and awaits I think one of the really cool features you can with a c-sharp with async and owaisi's you can do async and awaits inside for each and so it actually makes a little bit easier to manage there so cool things like that there's Conference EU is doing a call for papers which I think it's April summit I think they're a couple months after but essentially there's a personal conference EU so corporate papers did a quick round of research they'll pay for your hotel if you get accepted but you have to pay for plane flights yeah anyway it's all good illicit pairing for something so obviously I'm tickets for Paschal so I'm at twenty twenty first of November another thing which is really important if you guys are interested on the on-ramp the PowerShell summit on-ramp DevOps program which is really geared towards junior arms junior people with power shoulder basically you can apply to that and you can basically get from it from Australia it's not all expenses paid but they'll basically pay for hotel they'll pay for your food they'll pay for six hundred dollars worth of coke 600 dollars in US dollars worth of air fares so the only thing you have to do is cover air fares but that's all applications to be accepted before the first of November so I put for a Christian for it because I think you candidate will see there we go one of the guys that come to you Virginia gun I still study yeah but essentially I'm really good a few yeah some of you guys and your team you kind of want to get them in I think I think Jordan here pretty much just you can't really do that because everyone hates powershot [Laughter] but yeah I really really quite cool so tip of the month so it's actually put together by Mitchell so I'm just gonna kind of wing it and see how we go so I'm Universal dashboard Forge so you can actually create dashboard apps from Universal dashboard which is really fun I'm sorry Universal desktop are universal desktop you create desktop applications of universal dashboard ah yeah well actually says right there I don't want to really know I can't actually greet so um yeah and you can obviously do really cool things with that um there is actually really cool I actually can demo it can I wait first come out in downpours because windows and that was twice okay defeated can I can I copy this I'm just going to Google you should say use the electron like Microsoft teams and a Visual Studio code are you I'm a software there already thank you that's the new one here oh my here I have a ps1 script this dashboard ps1 script actually takes a beauty input where the user can enter some text and I'll pop up a toast to them typically this one work as a website because they would be in the browser and the notification is a Windows notification that needs to pop up at the local machine so making this a desktop that makes sense because then we can pop up that notification locally so determines into a desktop app all I have to do is make sure that we have the user Universal dashboard and for module install then from there we'll have access to you desktop app do you need desktop app this command outlet takes a couple different parameters the first is path this path will either be a single ps1 file or a folder that contains a dashboard on ps1 file a few especially I folder it'll include all files in that folder in your application so if you want to ship multi-page dashboards or dashboards that include other assets like CSVs or txt files that's what you'll want to use in this case I'm just using a single file the next thing that I need to spend time a puppy app so I'm gonna call this toaster because it shows a burnt toast notification and then finally I'm supposed to write a compliment if the output path is just a directory that I want to develop you doesn't need to exist for it will actually go ahead and create that for you so now I start the compilation of the desktop app there are a couple things that are required when using uniform the first is that you to have universal dashboard module installed because it's actually include that module is your application so you don't have to install the universe that's where modules separately additionally you're going to need nodejs install nots you take advantage of the electronic library or building desktop the abysses just like this one so after this is done the building will actually have an installer available for user to execute so we look at the bait director here you'll see that we actually have a toaster view one setup.exe that's been produced it also produces a you get package file depository the parity execute this toaster setup what will happen is it'll use the squirrel window notice scholar platform to actually install our universal dashboard application to the end user you can ship this particular installer as a single file to your end users tab but it's also your application so now the universal - poor squirrel installer is installing the electron map as well as universal dashboard module and dashboard on ps1 script - location on the user's machine this location or this application will also show up in aggregate programs for uninstallation once the application has been installed via the setup.exe they'll never set the electronic applicants of automatically now we can actually go in and type message hello if I couldn't submit it's actually going to trigger a notification via Windows if the burnt toast module one other thing that you'll notice is in your desktop now there's actually a toaster application icon available or you can double click that and open your application so anything so in this video we took a look at how to use UD forge to produce desktop applications with Universal dashboard unique fork is available on powershell gallery and you can install it was installed module there's also a UD studio they just released yep if you go total products I think it's more for premium essentially yeah obviously use electron like soft teams and requires no doctors no Jess obviously Alex is a massive fan of it I think he'll be installing it tomorrow all right scripting games was it okay yeah they've all the instances I'm actually thinking I'm going to change this so we're just going to skip through that make that easier so partial templating with faster so we'll work with Alex up and he can does anyone use plus them it's like I stole it that's what I mean anyway I mean like this is squat so basically what is it why I should use it now install it what was a manifest file and how do I create them because that's basically the core of a placer demos in the question time well the demos going to spring something in between at all there's any questions because there's no people what is plasma basically it's a time place a template-based file and project generator developed fully impartial it's part of the official PowerShell project so if you go and get help them with plants actually under there it doesn't look like it's having updates is 2018 but in my opinion that just means the stable one can know what changes going on but it is yet under the official PowerShell project itself so there's like the dot in system pesto right so the core of our platter which we'll get into whether it manifests over the next about and you can get it on github vampire show that's basically yeah if you recognize any of these logos you've probably used a template file generator of some sort [Music] yes yeah actually where else has got kind of popularized the cookie cutter generation I didn't realize that was the unicorn so why should you use plaster basically for a consistent module project style or basically implementation of single thousand thousand at speed of circle development environment low cost of entry for junior devs and reduced check debt so basically if you try and ask people at once you've got in-house file guide for how to create power modules basically scaffold that cluster you don't have to so when we go through testing some modules and create some modules to see you can add this code works place settings in you can have all sorts you basically put scars on that's cool so basically just not the most interesting for demos but will install it and see what we'll get more to get around so when we install plaster what do we get so we get get class the template which will show you the installed plus the templates that we show the ones built in with a plus one module there is a dash installed modules so if you've got modules that howls plus the templates themselves like at the end of a result that will then scan through install modules and find your cluster manifest as well so basically it's looking for plaster manifest.xml in modules plans where in fact it's one special valve casing yes yes okay sensitive info cluster that's what you can be used to basically invoke your manifests and create your products new plots of manifest to generate your stock x-bow until then multiply s plus 1 on the first place that just checks the XML schema against it make sure it's about like past that manifest and then is it so if we do it and get plus the template we should see two two modules install as default so happy R scripts analyze the settings and you've been shown our first module I guess equal to0 penalize the settings yeah you can it's a file you can do whatever you could obviously much scaffold our projects just put that in I'm guessing would be really useful for like modules as long as well is if you I can't you know creating your module and it just goes okay you know these these your folders created folders here yeah I think I'm getting ahead again yep so the core of blaster the manifest file what's the comparison specially metabolic parameters and then the content to be files what you want for any module we're going to break down a bit more into what these are basically the metadata your manifest name ID basically you have done the generated commit if you don't put all in there yourself the version title the description tags if you want anyone we can create instant access but then the author is optional is a tags like when things like my own desktop so you can you know you can tag out like a test so to see don't neighborhood tanks okay yeah so so I'm guessing okay so you can basically go I'm gonna get you know you can tag all these different yeah you should better do it get more plus the template so so it's so it's a little bit more like in essence for like a DSC resource where you can have like we kinda like have multiple things and then you kind of just squash it all together into a single template or is it just like okay over the month us look like ready to fire out standard XML things that schema version is online you can check the resolution especially in another it's a hero sleek with any version title by these dark-eyed generator wants to give it an nuances parameters content which is where you're gonna see a conflict probably does what we got so we get the name of the parameter the type of the parameter so we have text choice MultiChoice user form a musical parameter so pretty stunning stuff reviews but app so it's time to sort of think of issue of what about that's true basically it's a boy and then the store specialized the store type of value this is optional is not eliminated - country stores so still talking outcomes jump straight sort of yes and that's what it looks like little bit of MultiChoice on my ex-wife and their proper name little known text profits that anyone so far than any of your muscle type in before you see pretty simple staffers it's really not hard to like this manifesto Alice once you actually get into it but opinion it's pretty pretty easy and that's why when you go in there invoke marketing yeah we're going to go through we're gonna invoke the create manifest and then create module so the monster is parameter here to see mice licenses so no states of choice name license type choice before these two score text select a license for their module and then from one state that patching MIT or no license it's got half as well so it gives you along both defaults to to so it'll default MIT thank you what's this before hello picks up where you put the amperes well I visit the first limit as the junction see we can choose a different one different place because there's two other ways to be to peace so content the fun stuff vials so specify one more files to copy under the destination so the file is it's just the file so there's no text information or anything that happens in the template file so the files to the file you're copying the file from all places your new module or the place or whatever you're doing it's not necessary for modules this it's a project or file scaffolding solution eventually setback files will then do the inspiration from the browser's which will go through a later a plan where at all depend on what you put in during the generation process and d1 the manifest it will then put those values into the files already so generally you get the number like module manifests it'll pretty feeling like all through and all the rest of it then message display message adduser wonder was great there are a couple of more that haven't are we going to get out because they're not really in this demo so in a modified got a very mrs. well under the destination folder using the template file elements so basically in the system one new module manifest so that's the new module manifest for the actual oneself like paschal PSN one these so that's for and they require model but if you want to request specific modules for the language or staffing that if you think so files or other so basically when we are doing a file section in a manifest we've got a source that destination and a condition so the sauce obviously specifies the world could pass the file in the template the root folder so if you're copying files and we'll see this on the demo you'll have a simple folder and ecstasy or your manifest and then a sub folder which has got your flowers at the or got a copy in to where you're going so the destination will actually be the module or the project space on the condition because you don't necessarily want to copy a file in if you want me in the collision manifest so if you don't want my license otherwise this is you're not using a license file there's no need to copy one in this condition isn't true there's no point but it's basically the tanks and so final source release notes and the destination is where the ones carrying file source Tesla's startup tests destination is testing in my chocolate or condition this is where pulling the plastic around options containers pesto we said yes pesto files the tests review some of the division and this family analysis when the conditions met condition make the best eight download a file dry just think that's my file right now basically same game source and destination encoding you can specify and we don't specify an encoding basically just defaults to a ski you can specify mostly tabletop to encoding you want and again conditions if it's the truth basically enact the expression so these are basically all expressions within XML tags files that's one template well there's the expression looks like so your source and the manifest C manifest will be here and you've got test chef ps1 destination is going to be that shed Rome in the moon place the destination path on a safe condition plus the planet option contains pesters because with saying it's a template file in the pest in that shed peer small path there'll be tags of plus prom options and then the values that are passed into the manifest or within interpolated into the file is copied over so template files interpolate the values into the file - copy files aren't they just copied straight over so the files just gonna copy the file template files going to copy it and then input the values you put the parameters into it let's hope this works none of the modules so this is what plaster looks like we're on it maybe pull up we call this and we say ayat when use Visual Studio code the default use Visual Studio code and it just creates out so if we go to the top here this is the director who just scaffold it out and in here we've got my first module PS m11 first module PSD manifest to see us generate Alex let's go dates interested in it's great the GUI of Alex company in M unknown and I forgot a PS courage Billy settings JSON you make us JSON and tests those module tests will scatter like what needs to go mostly the manifest stop you can make your own JSON so into JSON JSON from vs code whatever you want whatever editor you want dot files whatever you going at your life now I went too far so we go straight to demo a three so now to correct manifest that it's more like really yeah so basically we're just going to use a parameter spots correcting my fest so here's one I made earlier this is just through your path project or file can be template time so the project scaffolding scaffolds out of the numerous files and files who just does a single files with ASC file and in the description are coral promise but those are basic forms you need a manifest file so this should help yes so we have a brand new plaster manifest so as the error so basically that in core of what we saw earlier in the screenshot so we've got there possibly clothing well tax and plaster manifest our own that we're just pretty much scrap and then practices content which we'll go into next so that's we ran that nothing would happen because there's no parameters or content it's just that so basically that's your stop so here's one I made earlier template plant assets on this shift down here to parameters so basically what I've done here I spaced out more than usual or just as easily so we just got some suitable cramp is it here so asking for a module although with the tax net text box enter the name of the module so when you run a manifesto this poncho Okinawa has been a little promised a name description type text prompt and the description module version we need is the proper type choice so here then we'd meet that choice the default is one long a text normal prompt include using the we was playable yes now there's anybody what was born so these all be yes and then I'll usually help yes and so that's the parameter set so then we close off the parameter set and how we get down to the actual content you can see actually on the left here a form of their makes the map is called wondering if we open up we've got the readme file or don't bear down through that and then this was some up the text installation so you can see here in the readme we've got so that's how you basically just a giant find replace yeah okay okay we're back I'll see ya we're going to go into stucco which is a module I'll show you today and that's got everything in the kitchen sink so if we go back to this and if the gods others again this demo the package the module this is going to be D please [Music] its moist and he able get will use a weekly phone yes now capital so if we do question one for the help let's fit out yes we used so we must say yes down then just once three so if we check that now we've got our misspoke module from a demo so we've got our PSM one it's copied in we've got our subfolders that it's creating a scaffolded out what I did find you do you have to create the initial folder what you just put like the destination path as /downloads it'll just put them in the group of that so it wasn't it appear someone's at some folders it was I use the name of the module to correct folder right but in this case two crates yes it's just off during its the parent or issue though so you generally just like to make their own yeah yeah that's pretty cool like I really like that yeah yeah which one if you check the readme see ya building really simple simple stuff super handy it's pretty flexible what I can do which we'll go into but that is essentially the time but it's essentially just an XML manifest and you're copying files for warm weather or except from the map or doing a text replace interpolation briefly I'm not just kind of thinking about in terms of like you know like you said with you of those junior devs and things that I struggle with which was obviously setting up da car and things like that so obviously it's it is possible to execute executables when they when you're doing both templates I think that that was really going to stuck and open up and stuck on manna-fest go back further reading that's the rest stuck-up serve these guys so the template for high quality PowerShell modules so rather than so this is why the deadlock up speak will stuck in so putting a plus the template to build a high quality power modules so rather than rolling around because you know when generally a lot of us just make power modules the couple of get configs in the way we get so this is on the PowerShell gallery we're also gonna from get up it's a module so MT platja license so these are all the features so read the dark Skoda compact keep changelogs MIT a patent licensing platypus support ps2 pen tip use DPS depend is really handy it's a lot like bundle up huge Pamela completely dependent mantra pens in there anyway it goes PS make or PSA go IVs a play around your pipelines to see ICD get up chocolates and BS code tasks so tons of stuff in their contributions bits and pieces pretty cool I've yet to use part of us but it's a good idea especially one passional help documentation we've knocked down yes yep as well so let's run this service stuck out on so this is going to be more in-depth so let me move this tablet so this is what I was saying you need gift basket anyway included installed modules so get past the template is in the bath sir yes and they've got a prime to say to find it even installed modules yes so you can have a module white stucco that's designed to be like yeah it's a it's a the modules essentially a holder for the plastic template so you can pull it in destination path number Deepak lat what is it itches the text values in there she said so then she form explore then from I get conflicts that's already saying kick and then we get licensing requires someone who's that with you know we want to use the code of conduct yes you know if you put yes it does add some but the role makeup sports with use back Doc's gets brought straight down we need to power on classics we're going to say yes is the default but Whitney's possible yes do only use CIC dsport yeah and we're going to choose it as a pipe lines which is defaulted to so much fun and it's just all twisted as what one down so many people out there it's been around a while okay um I've been in the middle of trying to move across from that bag attached of pipelines this one from you want faster you go to one current builds that bad unless your pain is also controlling you can get quite slow so this is especially once kicked out when you see here which PSD file for PS depends so you probably module type see what you want in there readme file again it's just interpreted the text in there your PS sake far your license we chose mi t--'s we're just president this is right wouldn't want us to gauge it pulls it all in their chosen believe vocally changelog MD builds your plans defaults to build a ship in 2016 now you're getting more you get our tributes tests fills in all the different needs of our she basic scaffolding out the actual module is here my awesome stucco module that's better see it's filled these in my list of modules module version they get off Alex no description the public to product in the classes nothing there's nothing food policy that's correct cause I ain't got be a Spartan that's super helpful they're going to help glass box box directory William box but fill in the US then couples out your BS codes in the city extension setting this workspace town mostly contributions so so I'm guessing the way okay so essentially so let's say you've got different commands within your module I'm guessing you can just create about and then you just walk mark on you go like about let's say you know that you have a command according you new ad user you just have you know about and maybe user and then basically helpful ND and then basically you just what you're wrong yes I love this place dude your macro and then so then then basically it does it build it within the doesn't feel like it adds that that doing some sort of it XML file which you get included also a Johnson in the vehicles as an XML yeah I guess this is injected directly into the PSone mammals yes I think there are c'mon lives that you can use to convert between the MD and an actual health script of the Oscars oh but I believe it's not designed to be done as part of that build process yeah I believe the way that they recommend you use platypus is that if you've got an existing module with the help inside the department use that to generate you'll scaffold markdown pollen and fill in the missing gaps that either couldn't come down or get you didn't do correctly okay that's cool that was stuck it on so generally speaking this current modules just stuck up unless you've got specific obviously if you're doing custom stuff like worldly power bill ground manifests goofy life also using it for projects that works kappa wat just directory structure for their partial exchange environment analyzer scripts for them just so you've got the project scaffolding where they go so with that tags thing you could put in your own class takes a little does that mean you can run multiple templates and then white filter applied tags that is the short answer no fiddling why was he coming up different templates essentially you know like let's say you've got a module template and that module obviously you know that builds just modules but then you basically want to like you know have for example you want to drag in like you know all your oil pipe code for you know whatever and then basically can drag that in and you like thought I know she should get some rest stuff as well and go grab that and then like so you can have different templates for different things and like my whole idea was that you could kind of just specify the tags and then it just kind of you know just pass while so it is case it's case sensitive based on the file system so we're still case insensitive but on Linux was the case sensitive file system it will be yeah so if you run the same one also on Windows in federal court so essentially if you can't parish I'll call that's patients do this with excess case incidentally so I'm guessing like this actually be really good feel like especially across platforms and you like the file structure is just saying there's some guys like I'm gonna make this other case and then you have like lens in there and if you do [Music] yeah doesn't know I don't know yeah I was just curious as to where that was naturally I was just given location [Music] absolutely
Info
Channel: Brisbane Infrastructure DevOps User Group
Views: 93
Rating: 5 out of 5
Keywords: powershell, plaster, meetup, educational, brispug
Id: z7nhivEXW9A
Channel Id: undefined
Length: 54min 27sec (3267 seconds)
Published: Tue Oct 29 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.