動画検索
関連広告
検索結果
Today's DevOps SRE review question the question is pretty simple but you really have to know a bunch of stuff to answer the question
so the question is if you have a Python application how would you go about creating a CI pipeline for deploying that application over and over again with new versions to some deployment setup you know maybe a VM maybe containers whatever doesn't matter your pipeline is going to deploy deploy the new
version of the Python application to production or staging or what have you right that's the question and you need to do this in either Jenkins, GitLab or GitHub the steps are almost always the same basic ideas the tools might be slightly different here and there but the ideas are the same, the steps
are the same so that's the question, right and this idea of creating a CI is actually pretty generic for any application of of using any language so if you want to pause the video for the answer you can do that I'm going to go ahead and give you one answer for this question right now so these tools like
Jenkins and GitHub actions or workflows or GitLab CI pipeline the idea is the same you have different stages so in this particular case we're going to make things very simple we're just going to say we're going to have one stage and in that stage there will be a script that would install by the way I don't
if you don't know this what happens in the background for these CI CD pipelines is for each stage there is a container that gets created spun up where you can do stuff so you can think of as a machine that's given to you and you can do whatever you with it for that time frame right for that for that
stage so in this stage you're going to have a script that will install Python and the dependencies that it might need the application might need and the application might also need some package Python packages that packages that might need and they'll go into requirements.txt file that'll be part of
the code repo and then the last step is really to actually deploy the application sometimes it is basically compiling or whatever and putting other artifacts into in production sometimes includes more than that it might be a migrating a database or updating configuration files whatever is needed for the
new version of the application to be available in production or staging that's the step that happens in the fourth stage so again the ideas are the steps are have a stage installs the python dependencies install the packages from a from a file in the repo and then at the end do the actual deployment
of the new version whatever that entails all right so that's the answer to that question i'm sure you can come up with a different answer slightly different but the ideas are the same hope you found this video useful if you did please like and subscribe and i will see you in the next video