Bestand wählen

Delivering Autonomous Rails Apps behind Corporate Firewalls

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Erkannte Entitäten
the at the time and and and yes thanks for coming out late Thursday as it is long couple days um I it can ruin the founder of coveralls thought 0 and hope because of seen some of our values around town get read news such a model we can all over the place so we're no today we're gonna discuss how 1 about figuring out how to get cover also sat sat in the hands of customers that want to run it within the corporate networks but it was pretty uncharted territory for me but I hope this general overview and what will see later would just have really basic prototypes I will help you guys get some confidence that you could also take your act add to the next level by offering host version to customer base and maybe you never thought was possible and so in that sense it's kind of Guinea partially abysmal discussion and some just general sysadmin and stuff and then of course all kinds so viewed through the lens of rails since coveralls roles that so
why would you want to set your apps free into the dark world out there outside of your yakushi deployment environment um so currently let's say your app is hosted on a rope were yes um cover losses unusual ocean and if you have a subscription-based service where users a by the month and is a free a few tears and usage based arms and it's humming along the occurring users and it seems like a potential customer bases covered but you might be neglecting the more lucrative and even preferable customer base which should be the enterprise quote on quote and this could be modeled the companies were dead teams have a much harder time getting an upper management to embrace cloud based tools or perhaps the issue just that setting up a 5 dollar monthly service fee takes amount of approval payment but that work the so let's chat about how they can make sense offers us version of the Court of your app in addition to your cloud service and so there 3 kind of tenants that I run across in figuring this out or as the the why you would wanna do this and that and the first one is security and it's pretty obvious that we all worry that when user cloud apple essentially give up control of your data and you assume that the devs on the other side hopefully you speak refined password we would never really know for sure just hope there's never a real data breach but beyond passwords it could be any sort of data that your company secure department has forbidden from leaving the networks and affected to preclude the possibility of them ever using wrap this could be maybe a medical company that wants to user data mining tool that can upload anything to the cloud to have a compliance issues or maybe it's a dev team that wants to use the source code analysis tools we can't risk sharing of leaking proprietary code I there's also this general business apps likes theorems internal tasking Chad and scheduling that would have 20 info that those companies when 1 a share with the competitor but by running a hosted version of your app within their networks they could just be more confident that they won't ever have the accounts have the data compromise on the open internet so 2nd 1 is a bit more esoteric reliability and this is just kind of a worst-case thing if your app that you're giving them is a Dev Ops tool that's part of the building upon a pipeline then they're not want there to be any down time unplanned minutes downtime so for instance would get have a Travis if something goes down something goes wrong you have control at and it blocks your pushes your builds Beckett's Griffin appointed an and so if you're running internally then you dad teams in his descendants will always be able to coordinate to make sure everything's good to go on when it comes to crunch time the so we use costs and the traditional subscription model where it's just paid by the month doesn't really work when you've given over in your app to to a customer so and the oftentimes those potential customers are also less price sensitive and could be willing to pay a premium for your hosted service and some sort of extra white-gloved support services and but once you deliver back to them you have to assume there will be of a phone home to check this description set so instead of a time a subscription like a monthly fee and you probably are going to need to do some sort of sea bass usage for on something else that's beyond just the monthly air perhaps you yearly and then you can do with the thinking about seeds and you can do see Paksas tears as the number of active users that are actually uh they can access the act as a living within the network and you can also build some sort of self destructive shutdown mechanism that will force the customer to purchase a renew the license after a set amount of time like 6 months or a year just to make sure that they come back and they keep a valid license and so there's a lot of different opportunities to and work out is a Kingston beyond just the traditional sass the model the so before we go into the how we figure this out when you just mention
cover roles and what it does and why they we took it to the enterprise so cover all
really quick coveralls tool for CO cover tracking indications we can annotate you pull requests with successive areas that is based on changes in coverage percentage or just send messages to your chat or e-mail updates the substeps teams make sure they don't deliver untested code especially in the production and on-site see line-by-line coverage of code base the clever for all open source is free but we tried for primary repose and and there comes because we don't while we don't actually store source on our servers we do store private scope aloft tokens forget how and so for some companies that shows the non-starter like they we we can have they can allow us to see within their private repose and then some of them are already using get enterprise so they're not using target up to start out with and the the 2 are not interoperable the so what
we did is gathered interest from potential customer base over a matter of months and i it became clear that there was enough of an interest that we should try to do this and try to make it happen and that so that's what brought us here so there some
pretty big main hurdles that I found in converting your general cloud rails to fall 1 where living within below the
cloud layer and so delivery and installation time of delivery 1st that's the best user experience for your customers would be to have the least amount of work to get your app operating in the environment obviously so 3 download files would be I think is the most consolidated way that we can achieve this and that's the 1st the virtual machine that that was gonna run on and that could just be a Linux box it'll show you a virtual image exports and and that's typically between 800 and a gigabyte size download so the next 1 would be the packaged up act ap files itself and that's a decently high number sometimes but between 50 100 or more depending on how many gems you have because all the gender need to be bundled invented into the app package itself as we'll see and then lastly license file that's specific to the customer and is generated for every customer and so out of those 3 year customers will probably only need to just download the unlike every once in a blue moon when you do like big upgrades to the underlying system had and dependencies that packages something that they download whenever there's updates and we'll get to that license file that would be around the same amount quicker like when they go to trial to active or what so the I should talk about this incremental updates for sex with the standard employment obviously um when your home your code is hosted up on roku getting features of fixes that users of users get pushed not so in this case when your app running completely out somewhere in the wild where you have no access to it so um that's where that packages come it's a smaller download that has just the most up-to-date fixes features such that is much quicker download than then having to read re-download configure an entire virtual machine I so also for the license files 1 last thing it it makes sense that this is the part where you probably need to build a secondary active In addition to your main cloud 1 that will just services those customers and charge them subscription fees and trial accounts and all that stuff so that's what go down the license file and then download the other 2 the 2nd area and alright so insulation wires the networking conveyed is the 1st thing that they're gonna see and since they're not you don't want them have to log into the themselves the best way to it to get around this is to build a tiny little menu-driven reactor gets presented on boot gosh show yourself we did this and and that way because we will need to know any the specifics about Linux Networking and In addition that external access is just has to be assumed as not only possibilities so hopefully if there the reason why the purchasing this um hosted version is that so they can be completely confident security it they will give an external access the little the pulley walled off in its sandbox the network and hopefully it so he is the assumption of there not being any way to access it from the outside is probably valid the last 1 is process management and that's how are we going to get back on jobs and the server itself to stay alive and start at boot or a couple more of these hurdles so support are generally you can see immediately when a user hits a 500 error it's gonna you gonna give me e-mail and of local go on air track service Airbrake whatever and take a look in this case there's no way to know when that happens there's already so you're just going to get an e-mail from your customers and so that's our right what's going on so you to provide them away it's since Bubalis you details about the exception and so will the look at how to adjust keep those exceptions somewhere that we can then s and over here let your customers and you can like it actually now something and the so that those same for logging if something's really funky on a your Mondial see if there's any we're parameters committed routs especially when they're not causing an exception for say lastly there's resource management if there if it seems like things are running slowly on the site there needs to be some way to um address that I'm not gonna go over that in this talk because of the like that's more the and meaning issue but on that something from various so Leslie is the intellectual property question this is a big 1 and because you're giving them the VM they can unpack the and and mount the disk and look at everything you put there so even though it comes in 1 nice file it still extractable and you can just load up another view on the virtual lottery on where and then mount the disk that you had deliver them so that means they're going to be able to look at everything as of the user so I feel like a database access in last and other there might be some way to get around this but you should just assume that they're have access to the database itself and it doesn't really matter at all that's the bigger question here along with code obfuscation um since Ruby there's no way to really really fully protector source code once and it's being executed in somebody else's environment and pass actually work itself um you can write a code obfuscator is a deterrent and that's what we've done for coveralls enterprise but I think mean that prevents people from immediately reading it if they just mounted your desk and look through your your source file 3 I but it's probably the safest to just cover this with your license and say something like the license your purchasing from less covers only the use of the software modification redescription redistribution are not permitted so I it just kind comes down to legally use as being a last line of defense here and that if this keeps you up at nite then maybe the best thing to remember is that your customers for your app should be most interested in getting updates getting but faces new features and support rather than breaking in your source code reading it copying it spreading out on the so that's that that's that could be its own talk about how to actually achieve some level of code obfuscation but we're not going to go over the early today OK so
let's get into the nitty gritty here on the so this is pretty hectic diagram but it's a basically showing that the general architecture of how that happens running within our the to the bond 2 and we chose Ubuntu because it's just while widely used and relatively easy to configure so and the main components that live within it are the network and figure which the 1st thing that cost will see when you put it up and and that's what's you do things like selects static networking water idea CP and then set the name servers and reboot shutdown such such cover a simple starter up and then they have behind a web server how going to why we choose path we chose passenger for it and the the symbiotes reinstalled after that I just made in Sinatra to really simple out that facilitates the unpacking of the package file that contains the actual app what updates and the license file and so within that there's wouldn't behind the Web server will live your else up also we so the rails up itself as some of the things that I that these 3 components I think are the main ones that set it apart from you standard cloud hosted app or uh where you started from to begin with to get to this point so the license file reader is going to reading catch your license at the boot when you're rails outputs and its checked on every page view and you can do things like enable disable disable features or the back down that 2nd 1 is data import export because when you need to download a brand new upgraded virtual machine and it's got new dependencies for new features and you don't need to give your customers away to get the data out the old 1 and get a new 1 so that's things like dumping within the database if your app as uploads than even the pull those together there if if uploads a you living on the D and amend anything else to the users might have uploaded changed uh that's uh that has a state on the on the 3rd 1 is a support package a generation downloads so we show how we can use the rails rescue from in the most general terms just a collect although exceptions the happening in controllers release and they can be archived into you attempt directory and then when an admin for the act as living on the is ready to uh our need some support making it a wake that generates a so archived file that we conclude also and then e-mail iPod dropbox it over to us the OK
so setting up the environment 1st for development I think
it's probably easiest to use virtual box it's free and pretty simple and it's really easy to export an appliance from your machine called an over file and that's just a nice little it's just that it's a Torah zipper something with the start over-extension measure something easy you can link to an answer from city and but also who went to just because of its how widely it's hopefully we can trust of built security setting the standards so we could get back out of the box and our customers get that confidence of the box so when the provision of free rails at the obvious 1 is used the minimum amount of dependencies and touches to it so that you can just keep them download size smallest and if you don't need to install something like image magic than just don't do it there's no point and end it's pretty easy to end up with a two gigabyte more virtual machine whereas the public at campus went completely down to 1 gigabyte the the so also when you're doing development on the virtual machine it helps to have a 2 separate versions of that 1 that you're going to use just for packaging appear and because you need to have the full app sitting somewhere on the virtual Xin so that you can run uh a bundle to vendor in the gems interior into the act itself to get ready to gate be completely packaged up that's not something you should do in your local development vironment say if you're if you're developing analysis and and you bundle your your prevented your gems in that environment other run on or under Linux and once you're once you're when it's so I have right next was talk about networking
configuration but that's so little screenshot of what the user will be prompted with when they are a customer when they load up the virtual machine the 1st time what every time really are you can still SSH into it and it's not like completely broke blocking everything off but this is just uh sitting on within a file in anyone to call the TTY the teletype and it's pretty darn simple set up and really you just to make this work the bare minimum is just having some system calls that I write to the file at the interface file or and we the DNS flower so there's also a shutdown reboot options so here's some of
that community that pretty small I have it on a on a text editor to and we so who delegates in it's a menu-driven AP and it's just basically collecting information from system calls and then displaying it and uh than letting you input things just using get s as a very simple react and then a the let me just read through the entire computer so it's it's pretty standard simple no rocket science here the the so the next parts part of the puzzle is this server itself and I chose passenger for it because it just seemed the most dense simple to put your act in a directory and house passenger just start serving it might once you uh hit temp touch the touch tempera start than passenger will love the new code and it doesn't really care if the code is in there to begin with it's talking like completely block adjustment for 4 so that means below loader Dirac that wall talk about the next slide can easily just extract the packaged up rails at into a directory that's RDB preconfigured for passenger to serve the up from and and as you can see sort of on lines 14 that's where we're running the up so as soon as you boot up the VM for the 1st time that those pages will actually if the roles that is not found little redirected to the set page the set of pages where you can upload your package from a license file to be extracted into its the eventual right that live in place for good through the installer apps itself is um just a simple way to not trapped that takes the package and like the file put some in the place where the word they live in this 1 you want have preinstalled on the VM for distribution because uh that's it's going be doing the work the to get rails up and running the so we can go over a bit of what is actually happening this not trapped and I'm using a a simple encryption library called gibberish they just is a nice abstraction over I believe over uh open SSL and then this horribly insecure shared key of various the FST have and if you do have your code obfuscated then it doesn't really matter that the key is right there and it's just best to assume that if people are going to be looking in your code like that and figure out everything about we begin with so you don't really need like a huge key I so what it does is it 1st different the license file to make sure that it's valid and or it will just use that license files let's say if you're upgrading the license it can just put that in your Rails app neural sample start picking up a new license maybe it's gone from trial to uh to life the the so if the package itself is present the package file then it'll be corrected and so place it in the directory where passages preconfigured to reader from relative from and then it'll just touch the the restart file and redirect you straight to root and so you'll be good to go and so right that our index is just how simple it can be I mean this is like the bare minimum of
what it what it takes so tweaks the back itself and we discussed the
license file so in a regular customer subscription act right there there's all the data and the customer some specifics in the database and that's checked on every page load but we can do that here because there's no way for the subscription side of that year I'm selling them on your cells that to have any effect to the rails after training on the side so when they get a new license while it contains within it is just a descriptor on file and that they live in the temp directory that little on every time so we also want add some other rails secrets will all them and for the simple example of a marine devise also so this secret token and device can be read from the lab the license file on to anyone do that because you don't want 1 customer to be able to tamper with another customers cookies is really extreme use case form and possibility but still just just best practices and I did the
so this is a really basic module that demonstrates how to read and write the license file and uh it's using the same encryption key as the loader and so this would obviously be obfuscated hopefully someone just for a deterrent but on it gives you an idea of how simple it is uh it's and the 1st thing to get guillotine initializes so that the rest rails can use it and I when is going out and from here we can have calls out to it's all of the act checking the trial period disabling functionalities when messages that to link out to the web is the they need to upgrade the license and so another big 1 here is the sequence and see when is something that can be checked say in a user validator right validate seats and just to account against licensee number the and in that case also for administrators you'd also wanna provide a way for them to manage the users of course as those they were using your cloud absolute have be able to deactivate or do we uses so free up seats if they needed to of the the right so next is the support package and this is really simple implementation of exception tracker and i it's gonna put exceptions in little encrypted files with the clean backtrace into your temp directory to be ready for download by the admin when the time comes when they started 5 hundreds and that just encryptor backed up and TAs it then we just is able to be e-mailed to you a drop box you develop avatars what it by lastly the data import and
export management mechanisms so this is just a dead simple PG restoring PG dump suppose rose commands um as this would be a controller so the first one is purely just taking whatever you you spit out and attempting to shove it into the database and x sport is just getting you entire down so nothing nothing released tricky here but it's a fully an important part of the at the end of the upgrade between virtual machines for background jobs
nothing too too much but we used form in export which allows you to take a proper file and generates an upstart processes and those can be used by a who went to and so that'll help for that will let them be executed on pollute and I'll and stay running hopefully I think the next step here would be for your app itself to show the background job status within the act itself has some sort of word of course that would be something you joined a cult out but just to think about also lastly when all the the pieces are in place with the best way to make it actually distributable um hopefully you can pare down to a single scripts because it's just like they get pusher OQ this to be something that I the place to your CD and
maybe updates to users that there's a new version of right for download so some basic things to do here this is super basically Ctask that just grabs a version and does a bundle uh vendor bundle that throws everything in your vendor directory and then parse everything up that's pertinent excludes what's not and then In cribs at all using your shared key and a and that's it so some of the things that they could do is uh obfuscation at this step if you needed to run a post-processor on it then you happened here um and then the last 1 would be actually up work uploading it to see and and then notify new users and so I keep aversion file in the root just so that all these scripts and random things can use it and because each download of the package is going to have some sort of the virgin attached to it that your users can be conveyable 1 go back and forth Theobald identify so that was pretty much
it for the what you can get up and running as a prototype ends beyond that um once you actually have it in customers hands they might if there are any using AWS they might wanna see it as an Amazon image uh which can be spun up without actually having to download anything it's pretty troubled trivial to converge and OBO file to an MRI Amazon provides some command line tools to make a simple so you could also put that in the year your packaging script action about this this would be a different script that would run purely on VM when you're ready to cut a version and once you have and I am I Implicit on Amazon it's pretty trivial to just hit the public button and then it searchable in the public registry so some more things that are going to be the next taking the next step beyond what we've covered um resource management there should be an easy way for admin to see how you're you're at the end is performing and this can be part of a support package also I clustering perhaps there is of you could set up a mechanism to run multiple diems at once for better performance mail server which is not that tricky but could be important since and your cloud up you probably using you know Sandra mailed and whatever but I can be accessible from the and so you should be able to that you're and should be able to specify an ulcer um incremental VM updates you could also include batch scripts to change pieces of EM around when you import a a new package file so when markets exported or an uncharted and migrations around those migrations could also include saying say I new dependencies that were that were stored inside the package because you can't just run and apt-get install from there you have to assume that you've eome doesn't have any access to the outside world the but so we talk a little about the sass act that will run in the cloud in addition to your main 1 to so license files facilitate that unless What is Enterprise sales with this decision because who knows about that point that's kind of the that's the big question mark which I had no idea about a year and is is the intra territory so I
think I think we're running out of time so
maybe we should just to the questions yeah had the the question was what are we doing for obfuscation and the that's the old kind of a work in progress right now it's
a uh it's a Ruby seed extension and the way they get how does it is they've compiled their own Ruby to do it so it's at a lower level than just a jam extension and so figuring out how to do that right now but it's not it's not something widely discussed yeah well the question is how can we reduce the nanopatches that we need a ship because there could be maybe above that specific to 1 customer but we don't have to have everybody else come and download it all once the yeah but yeah and there's really not a good way to tighten up the feedback loop beyond having to bundle and spirited package up and then released brain aversions for every little but this I mean I think that's that's more of a customer relations question where it's the small bug like maybe can wait until a bigger point release that it's being fixed just for the environment or if it's something that business-critical it just doesn't work for them and then the paying customer then of course no matter how small is and is not possible changes and a version has to be released and everybody will see the new version of the yeah it could it could be incremental like that where the package in in the migration will actually do the updates and but probably that melody for smaller things like maybe you can include . that can be loaded and that's not too huge but and for the a lesser level that would necessitate cutting plane you VM and asking your customers to go down the new 1 and do the whole import data export uh dance and scaling support teams and well we haven't really had a scale as yet because we haven't had but so many customers that it's become overwhelming but I mean I I feel like we're just needed scale in traditional ways but it's yet to be seen what extra sort of girls were a have with supporting multiple versions of the package and the the and and adding this kind of asynchronous support um slow where we get to e-mails are drop boxes of just packages of logs and uh 500 errors so that's a supplementary Dejori also the and so that this to pretty simple little apps up there that they're just prototypes and intercom calling enterprise communications just like what the poster uh you know simple blogger app but it shows off some of the license file reading and pretty much all that the screen grabs from the presentation were from that act except where the uploader which is the little Sinatra variables I thanks for coming well so long and all of that my friends in the learning and decision and in
Gewichtete Summe
Skript <Programm>
Brennen <Datenverarbeitung>
Generator <Informatik>
Lesen <Datenverarbeitung>
Virtuelle Maschine
Weg <Topologie>
Reelle Zahl
Direkte numerische Simulation
Installation <Informatik>
EINKAUF <Programm>
Wort <Informatik>
Prozess <Physik>
Regulärer Graph
Wurzel <Mathematik>
Lineares Funktional
Objektorientierte Analyse
Dreiecksfreier Graph
Konfiguration <Informatik>
Automatische Indexierung
Extreme programming
Web Site
App <Programm>
Zellularer Automat
Data Mining
Physikalisches System
Speicher <Informatik>
Bildgebendes Verfahren
Physikalisches System
Innerer Punkt
Deskriptive Statistik
App <Programm>
Kategorie <Mathematik>
Gebäude <Mathematik>
Güte der Anpassung
Dienst <Informatik>
Wurzel <Mathematik>
Rechter Winkel
Überlagerung <Mathematik>
Arithmetische Folge
Migration <Informatik>
Virtuelle Realität
Inklusion <Mathematik>
Avatar <Informatik>
Open Source
Elektronische Publikation
Dynamic Host Configuration Protocol
Körper <Physik>
Cookie <Internet>
Web log
Gemeinsamer Speicher
Prozess <Informatik>
Stützpunkt <Mathematik>
Figurierte Zahl
Funktion <Mathematik>
Nichtlinearer Operator
Zentrische Streckung
Prozess <Informatik>
Geschlecht <Mathematik>
Kombinatorische Gruppentheorie
Syntaktische Analyse
Zusammenhängender Graph
Elektronische Publikation
Dämon <Informatik>
Einfache Genauigkeit
Cloud Computing


Formale Metadaten

Titel Delivering Autonomous Rails Apps behind Corporate Firewalls
Serientitel RailsConf 2015
Teil 80
Anzahl der Teile 94
Autor Merwin, Nick
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/30656
Herausgeber Confreaks, LLC
Erscheinungsjahr 2015
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract When a Fortune 500 company wants to use your app but can't risk sharing sensitive data in the cloud, you'll need to package and deploy an autonomous version of it behind their firewall (aka the Fog). We’ll explore some methods to make this possible including standalone VM provisioning, codebase security, encrypted package distribution, seat based licensing and code updates.

Ähnliche Filme