#107 Additional Dependencies in Beanstalk
11-26-2017

Summary

Sometimes your AWS Beanstalk environment may require configuration changes from your app to properly deploy and get everything working.
5
rails production deployment 9:51
  • Student & Teacher
  • $9.00 / month
  • Valid School Email Required
  • Same Access as Pro
  • Subscribe Now
  • Pro Monthly
  • $15.00 / month
  • Access to Pro Episodes
  • Invite to Slack Channel
  • Priority Episode Suggestions
  • Ad Free
  • Subscribe Now
  • Pro Annual
  • $150.00 / year
  • Access to Pro Episodes
  • Invite to Slack Channel
  • Priority Episode Suggestions
  • Ad Free
  • Subscribe Now
  • Teams
  • starts at $75.00 / month
  • 5 Users Minimum
  • $15.00 / user / month
  • Same Access as Pro
  • Subscribe to Teams
there are turning to ah to add a turn around and learned more to get the education of the rodents tell me it felt that their cells and things said to scotland are working correctly for example the thousand year public folder or being served by the application you get a consistent deployments if your username the tube micro or something smaller maybe application require some additional services or maybe your application has some specific into next configurations he need that there isn't as well so what does have said what he will look at addressing some of these issues for the files are public folder if we look under the production can take in a new wheels five application there's this line where it says cafe got public file server enabled then it checks environment terrible said because we're using puma to host the application stenson get picked up by the fall so when a copy this environment variable and then added into the beans optimistic so on your application select our environment and they will go to the configuration dad and under the support of the grey she will hit the gear and then at the bottom looks is based in the key there will just the day the rental value that's because the check is just making sure that this environment variable excess that applied it will take a moment to refreshed but once it does seizure able to access the files within your public tracker rate from the application you raul so what's the applications refreshed we just go to the end of our you were out there we get put something like four slash robots that the x p which is it the fall foul within the rails application they didn't see that it's serving it now and if you do when it was situation we do need to add some additional configuration these some additional packages or some options settings day weekend create a new directory a awarded the call this directory got me be extensions within a year we can create a file and for worse a thing like a repeat of the duration of jews could call this rudy back and think in the format of this fall is going to be like a demo so if we need to set some options like the option name if we had the bottle disabled surgeons we get to the value to one we can also have a another option name said the dashes is basically like an array of options yeah about shitting call bottle path and we can set the value to the underside chicago they may be also need some packages which weekend and salty young packages using the packages ski in a week it was for different packages they were not specifying any cameras specific version does whatever is available from the young sources in that we might need to create a file and i'm just gonna call this one swap back and think and typically hello everyone could swap on your computer and that's basically your virtual memory that the system will be accessing their runs out of the physical memory and what the reasons why you know what to do that is because swap is going to be magnitude slower than your physical memory as far as simply to rights to the applications performance can be degraded quite severely if your knitting swap wonder if you're easy to its its runs out of memory entirely then this is alicia school and crashed doesn't our health markers the old notify you if you're in since we just about a certain amount memory that you're going to be notified of it anyways pull over in this way the application of wool mart crash so what then are swapped occupied while we can ride cymbal different commands these will run in a alphabetical order someone is a create swap ever been you with the zero zero one in a week you mind the command the d n a a zero of for such small files of this all the dead the blood of the instance they were making a a one gigabyte file we live on a second step we do what to read this in a second step because if we just have several different commands within here then the last one will overwrite the previous one they then run the command in case walk there were going to reference the file there we just created called the swap while i'm lesley we want to turn on the swap so what is called this debt swap one they will run the command swap one in there we will reference the fall again so these steps will work the first time you run it but that although we have here is that if we're we're deploying a new version of our application to the extent that or the right to a problem because this didi command will fail could see small file or reads this and all the subs appointments with bell was while so before we run the command want to make it past so i want to make this test for it the fella does not exist hence the bank the world would to run the command so the ballot does exist in this first step would be admitted same way for the second step and the third step as well so because we had these three different steps and they are doing attack before it runs each one ago these are now on important steps to where the person they weren't they will perform something cooler if they write each subsequent time then we're not going to have any changes from the initial time and bread and we're not have any errors in or not to have any differences in that's one thing they you wanna make sure whatever you creating thieves can fit files because otherwise it could cause it to fail this isn't something they you what to do manually or the instant messages because over time your instances will be cycle as more instances are creative input into the blood bouncer feel for instances would be terminated what's your load is gone back down you wanna make sure that these ran every single time into it says is created or maybe each time to your application is deployed so there we could create a another file or why they call this fell into next arc and tagged with it here were dealt with cheesy directive files and this is going to create a file within each instance someone to put a path game with this path name what is set this up to where it is going to overwrite be at sea in gen x. carved out the navy proxy dark a fake and in this fall but he said the content but our content is going to be multiple lines so i'm going to show others with the pipe and then within a year we get the dinner to fake oh what a scumbag options are the deep ball but we will need a copy of the entire contents of the file because we are going to be replacing it from this can fake so the first few lines and pasting in here these are just only your standard things were were basically creating a back in proxy it as proxies is going to be direct traffic to beat you to explore run the mile and then you're my amp socket because what's used by default would be would be too for blew my image and it's in the resin here upgrading our server and it's one of the civil court eighty which is specified some of our logs that we get down to the location this is where we're setting some headers so whenever someone access is the blood of your application or did the subsequent past this would be hip dislocation it then we direct all the traffic to the back end which is we saw earlier is are the most socket they need to get into some the specifics like if you have a location for your assets you had this hose it to a specific red curry also get the location for cable for example if you're using an action cable they get past a proxy to hear back end they were setting the header great for the web socket and so at the end of this while also going to pick a direction of coke into a recommends that this is very similar to the demands that we use on the spot a fake the main difference is that the commands option is going to run earlier at the steps in the incense however the container demands is going to wind after the application has been extracted but i get deployed so with the container commands will create this sub called blizzard into next villages for the command service agent x we start you wanna make sure they you can then all the housing you created yes otherwise could not the bees it up and then transfer to ask me to get deployed what's were ready to deploy a religious right he be deployed this'll take a few minutes and while it's still in the deployment application will still be accessible because the top scoring to first take the application that was a public as great and it's going to extract a two way you would get colder than one all of the configuration files and if you do run into an issue with this deployment the application is appointed goodell because it's still living in the current directory and the new application has been deployed to the one that once everything is successful then i'm a bit from the one that for her over to the current falter and they get all of that resides entered the floor apt to you have your current or you have the one that and back on the b in soccer think we'd save everything is deployed successfully been there we get checked out and make sure application so running and it looks like everything's still working while well that's all for this episode make a fortune