Day-25 | Docker Containerzation for Django |
Вставка
- Опубліковано 21 сер 2024
- Support my work
www.buymeacoff... Hi Everyone, This video is going to be Docker Zero to Hero with a very good documentation and video explanation
We will learn,
1. How to create your own Django Application ?
2. How to containerize Django Applications ?
3. Common mistakes
4. CMD vs EntryPoint
5. Is programming required for DevOps ?
GitHub Repo used in the video:
-------------------------------------------------
github.com/iam...
Telegram channel
===============
telegram.me/ab...
About me:
-----------------
LinkedIn: / abhishek-veeramalla-77...
GitHub: github.com/iam...
Medium: / abhishekveeramalla-av
UA-cam: / @abhishekveeramalla .
.
Disclaimer: Unauthorized copying, reproduction, or distribution of this video content, in whole or in part, is strictly prohibited. Any attempt to upload, share, or use this content for commercial or non-commercial purposes without explicit permission from the owner will be subject to legal action. All rights reserved.
If you run into the error
ERROR: EXTERNALLY MANAGED ENVIRONMENT
You can fix it by adding below line to your Dockerfile before the RUN command.
ENV PIP_BREAK_SYSTEM_PACKAGES 1
still getting same error after adding this
I'm getting same error plz solve it
@@farzanzuheer4770 HI, please do change the base image to python:3-slim and try.
@@abhinapatra3454 yes getting same error.
@@aravnandan1617 "pip install --break-system-packages " try this in place of pip install
After following you for a couple of months, I almost get a job with 200% hike... You made my life...I started seeing ray of hope and happiness again in my life...God bless you..
Hearty Congratulations 🎉. All the very best for your future endeavours 😍
You can run up to 750 hours of free ec2 instance. That is 31 days depending upon how many ec2 instance(free tier) you create and run. If you create and run 2 ec2 free tier instance then the 750 hours will be cut into half 750/2 = 375 hours i.e 31/2 = 15.5 days. So it depends on how many ec2 free tier instance you are running. If the ec2 instance is stopped then the above logic doesn't apply, it should be up and running. Once you exhaust the 750 hour mark aws will start charging you from that day.
But there is another limitation you didn't mention,
30gb space, like 1 t2.micro occupies 8gb of space so at a time you can have 4x instances at a time.
Also if you have snapshots already then it varies depending on the space occupied, as EBS are attached to each ec2 instance so that counts as well ...
Thank you my Devops God. You are not just awesome you are truly a God father of mine :). That's my promise to you sir soon I will get my job I will pay you my whole salary what ever I will be getting in my first month... Thanks alot
So nice of you .. Heart melted by your love ..
Please you don't have to pay me as I have decided to teach this course for free :)
Let's make sure you get a good job Rohit.
@@AbhishekVeeramalla Sir one last question do you think whatever you will be covering in this course would be sufficient to get a freshers job
@rohit .. for freshers .. yes
For experienced .. little more hands-on and practice is required
@AbhishekVeeramalla little more practice on the topics which u teach or more topics to learn
Hi Abhishek, you say that experienced people need more Hands on. I have 6.5 yrs of experience with 2 yrs on Big data and 4 as Application support specialist. I want to persue a career in devops now.
Can you please please guide me as to what should be my path to gain this experience? I have been seeing hands on projects by other youtubers. Is that the right way?
The best part of your video Abhishek is that it is very engaging. I don’t feel like pausing/playing every few min. Keep up the good work.
Thanks a ton
As far as I know the free tier covers 750 machine hours of micro instances. You can probably run 750 machines for 1 hour and finish that quota in 1 hour. Or run 1 micro instance 24x7 and it will stay up for a whole month.
So you can only run one ec2 instance in the free tier.
Micro instances are not free if your free tier is up or you exceeded 750 micro instance hours per month.
-source stackoverflow
Nice
wow. I am so impressed with this DevOps content. I did some courses in DevOps but did not get a clear view like this. Thank you so much, brother. so many doubts have cleared. You are true insipiration God bless you ❣😇😇😇.
Thanks alot Akshay 🙏
Thank you so much Abhi anna for such an awesome video. Truly you are like a master in DevOps, and you make it very easy for everyone to understand and implement it. I'm following all your videos, and I am confident of getting a job in it. For a free-tier account we can run 3 EC2 instances at a time and also, we can run another instance with EBS volume 6GB as for free tier with the default settings and if we resize the EBS volumes we can make use of 30 GB per month as the EBS volume provided for free tier is 30 GB. We can create many EC2's but charges are incurred for volumes occupied by it if it exceeds 30 GB.
750 hours/month for aws free tier account. So one can use as many as instances they want before the limit exhausts. Ex: If you launched 750 ubuntu ec2 instances all at once using launch template. Then the free tier account exhuasts and aws will start billing on our aws account. Thanks Abhishek.
Yes
Also, I believe you might have to pre-notify AWS support to relax the soft limit on launch of thus many EC2 instances under your Free Tier Account.
there is volume limit also, in free tier you can use less than 30 GB Volume at a time. So again it depends upon the instance type, if you use Red Hat instance you can use only 2 at a single point of time. If your instnace is Amazon linux or Ubuntu you can use 3 instances at a time. Amzon linux or Ubuntu has minimum 8 GB volume requirement while Red Hat has to be a volume of minimum 10GB.
Thank you Abhishek for creating amazing videos. I am able to successfully follow this video and able to create container on EC2 and my app launched perfectly. Thank you so much for teaching and helping us.
Its actually great abhishekh bhai you are posting all the things as opensource. Best thing is all the things are organized and went very deep this what is needed as devops engineer .
pouring your heart out and teaching all these concepts .
Thankyou abhishekh.
I'm from non-tech, non-IT background still able to understand. Thank you for such a good explanation.
Thank you sir , all videos are more important and good explanation.
i have done course with udemy and at online platform, they explained the docker file with line to line, but never explained how to write and what all parameters should have to consider. Thankyou, after one year of completing the course i am now able to understand docker completely, and also terraform tool which u have done along with cloud_champ regarding how to write terraform script. Thank u brother for clearing my every doubts, i m happily able to write on my own now. God bless you 🙂
🎯🎯🎯
Hey have you complete this all over course
Yes @@shelkeonka
@@tejasarcasm in which year u are an can you tell me if I complete all these series how much level of knowledge i gained or after completing this series what next ?
Thank you Abhishek for this high level content ..
😍😍
A very easy way to learn the django app with containers. Thanks Abhishek bhai.
Thanks for liking
Awesome. Please share the videos with your friends
Excellent presentation, now i just saw your full video. wonderfull of python project topics.
Awesome .. thanks alot
On AWS's Free Tier, we can run up to 750 hours of t2.micro or t3.micro instances per month for the first 12 months.
Thank you Abhishek bhai for the wonderful session like always... 💎😍
Q. 27:50 we receive 750 hr aws ec2 micro instance in free tier ..so according to that we can use 1 Instance for 750 hr or 750 instance for 1 hr..
Perfect
@@AbhishekVeeramalla thank you 😄
watched your docker multistage tut .. outstanding was it like this one and purely realtime scenario oriented ...such videos are hardly available on YT .. big like and subscribe
Thanks alot and glad you enjoyed it
Wow... really amazing explanation...great work
I am successfully able to run the Django application😀, Thanks a lot Abhi...
Welcome 👍
Very nice and detailed explanation! Thanks a lot for your efforts in creating this free devops course, we really appreciate it.
Welcome 🙏
Thanks teacher!! The answer is 1 instance. I googled it. I didn't know but now I know.
Good try .. but actually it's 750 Linux and windows each t2.micro instances .. so if you can run any number of instances .. there no limit on the number but the limit is on the time.
I hope you learnt something new :)
@@AbhishekVeeramalla What?! Thank goodness I have you as a teacher. Lol. Thanks!!
Thank you Sir, your way of explanation is simple and understandable.
Thanks and welcome
Thank you brother, Lord bless you
Thank you so much for devops series. You explain in very easy way.
You are most welcome
Hi bro
One request abhishek it will be very helpful if you would create a video or a series where you can explain majority of the application workflows!!! Seriously it would be very helful indeed ❤
Thank you so much sir for your fantastic way of learning. You make the hard topics so easily. Thank you so much for your support so that we are learning these things without paying it to anyone.
It's my pleasure
Thank you for the great explanation on live project example
Going to try this on system. Thank you so much for this. Django looks little complicated since it's first time that I am watching this flow..rewatched for around 4-5 times just that portion and understood some of it. Will do it on system and see ..❤ thanks once again. Coz of u, i am gonna search for other app workflows too.
Good luck! Most welcome
A customer with access to the AWS Free Tier can use up to 750 instance hours each of t2.micro instances running Linux and Windows. Usage of the Linux and Windows t2.micro instances are counted independently.
Bang on !!
Chatgpt
We can run both linux and windows VM's as many as we want which are in free tier eligible and the volume will be t2. Micro for 750 hours.
Awesome. Please share the videos with your friends
S.. T2.micro only we can use other wise instead of macro then start bill &aslo application cant run
Really feeling u as teaching god sir
So nice of you
The number of Amazon EC2 instances you can run on AWS depends on your AWS account's service limits. Service limits are the maximum number of resources that you can create in your AWS account. These limits vary based on the instance type, region, and your AWS account statu
Thank you so much Abhishek 😇🙏
Welckme
just owesome sir you rocked
Thanks
After finishing devops course. Please share the knoledge on python how is required for a devops engineer.Thanks for sharing knowledge sir.
Will upload soon
wonderful tutor . u technique is super. love u sir 💗. in free tier aws account there is limit for ec2 . Free Tier: Up to 750 hours per month of t2.micro or t3.micro instances.
Paid Tier: Limited by default soft limits, which can be increased upon request.
thank you for this impactful lecture.. my question is under CMD and Entry point, how do one know the variables to put in there while writing your Dockerfile for different applications.., also can you explain the variables in the entry point in this lecture, the runserver, the port in relation to the file itself
You will learn that as you keep practising different projects
Thank you for clearing my doubt regarding CMD and ENTRYPOINT I asked previously. Amazing quality content as always. I was wondering if you will be covering any artifactory management tools like jfrog or static code analysis sonarqube as well
Glad it was helpful!
Awesome. Please share the videos with your friends
you've 750 hours for one month. so you can run any number of instances unless they are all not exceeding 750 hours as combine. if you running only 1 instance for a month then you are not going to exceed the limit in any way : 24 * 31 = 744 . but for instances >1 you've to track your 750 hours limit.
I had done DevOps course.. was looking for something to refresh... I landed here Alhumdulillah, you are just doing awesome work.. hope to be like you.. helping other..
1 suggestion.. 21:00 entry point and CMD the explanation is outstanding however using the noun (entry & CMD) so many times is distracting, here and some other places too , no offence just suggestion.
Thanks 🙏
@@AbhishekVeeramalla Your most welcome Sir..
Hi brother i believe your the right person to answer my question so my question Does DevOps engineer should know programming languages or not.
Scripting knowledge with bash or python is must
Programming knowledge is not mandatory
@@AbhishekVeeramalla Okay Tq so much brother
thank you for the clear exppanation about docker and commands associated with it.
I just have one ask - Is it possible to do port mapping within the docker file, please let me know
Great
Thanks
Thank you for the session. very helpful
Java application and Mongo DB
Hi TechFeeds , you don't need to learn the language.. you just need to understand how to build it.
Learning a programing language is difficult.. building or steps to build is very very easy.
Kindly make a video on troubleshooting the sissues during running
Nice content
Thanks alot
Java, python, . Net, angular, node.js, reactjs, which one language want to know basics concepts (many companies used different applications, but we know anyone language basics concepts strongly AWS
Hi TechFeeds , you don't need to learn the language.. you just need to understand how to build it.
Learning a programing language is difficult.. building or steps to build is very very easy.
@@AbhishekVeeramalla
Hi sir , could you please explain the skeleton or flow for the Java and node js.
And also after creating jar or war file from Jenkins , we have to create docker image , could you please explain about that
Appropriate your efforts brother, just started...need to go till Kubernates....ty
congratulation for 300k
Ans: we can run 2 instance in free tier account. t1.micro and t2.micro.
we will be have 750hours free for 12 months.
no overall its 750 hours of watch time of windows and linux
amazon charges based on hours of usage, not based on number of instances you are running, only 750 hours in free tier
next video, we will see how to install docker & container in K8s ? it's a maintaining a docker and container.
Sure
you can create infinite instances in your Aws free tier account according to your requirement. but in free tier you will get 750hours per instance after that the charges will apply for usage of any microservice .
Free tier Amazon EC2 Allows to run two ec2 instances one for linux n another for windows each OS gets 750 hours
up to 750 instance hours each of t2. micro instances running Linux and Windows.
2 ec2 instances one Linux and one windows and we get 750 hrs for both combined for each month for one year.
we launch as many as free tier instances in aws, but 750 hours only free and rest will be charges
U r correct
I knew about X # of free launch instances - t2 micro as myself, I remember launching and stopping 5 instances simultaneously, but I couldn't remember the 750 hrs.. :)
While started practicing the video at final stage for the django application need to do db related like make migrations and migrate where these to apply for the server .and on current code from your repo need to do migrations where i have to do it
thanks for wonderful session, Entrypoint and CMD is well explained. what about RUN, it is also running commands inside the container, how it is different from CMD Entrypoint. it might be a stupid question but it came in my mind
Thank you so much for amazing content. I watched your most of videos. So you launched most of websites on port, but is port secure? means in real-world is it good practice to launching an application or website on port? Or launch on nginx server is good practice?
again thanks Abhi🙏
Hi sir, we are using CMD and entrypoint in dockerfile which ll be taken 1st priority when launching containers.
Entey point will override cmd
@@bharath4195 Thanks, then what about cmd, ll it execute or nt.
@@shubhamkalekar1519 no
@@shubhamkalekar1519 if you give both, entry point execute only
Like I told you can use combination of both ..
In entry point provide the executable and CMD provide the configurable values
Hi Abhishek,Thank you for all the efforts you are keeping to teach people ,That is so kind of you.Thank you very much
When I tried to containerize Django application.I containerized it successfully but when I run the application on browser it is showing me page 404 not found and it is saying me that you are seeing this error because you have debug = True in your Django settings file and change that to false . May I know how to change that settings ?
May be the you are not providing the correct path
@@AbhishekVeeramalla thank you Abhishek ❤️
how to run the application on browser ??
Hi Abhishek,
Thanks for the detailed video. I’m just curious why we can’t write commands directly in the RUN section of the Dockerfile. How do the CMD commands differ from the RUN command?
Thanks in advance.
To execute commands at the start of container
@@AbhishekVeeramalla Thanks for the quick response. From your reply I understand that RUN commands are executed at build time whereas CMD commands are executed at the start time of the container. Correct me if I’m wrong. Thanks again !!
🚀🚀Hi Abhishek Nice video, had a doubt, usually how is it, whether the developer will give us Dockerfile, or we have to write it from scratch, because developers have more clarity about the app right
working thqq
You are welcome!
We can create 100 ec2 instance as a free tier account, if you want increase then we should ask to aws admin team and they will increase ec2 instances.
Docker..Day-23, 24, 25 done ✅️
Cool, keep going
750 hours of runtime is allowed in freetier eligible EC2, Number of instances is not a limit
Maximum 10 you can run it under free tier I guess. Because 70 ec2 would create 70 volumes.sice volume aso chargeable, something risky to run under free tier. Contact?
Good try .. but actually it's 750 Linux and windows each t2.micro instances .. so if you can run any number of instances .. there no limit on the number but the limit is on the time.
I hope you learnt something new :)
Thanks
sir, whenever we install dependencies like python3 and Django. these will be inside the docker container not in the local machine, right? it means if I delete the container the dependencies installed also gets deleted since it is inside the container. am I right?
Yes
@@AbhishekVeeramalla thanks sir you are teaching very well
And also responding to my questions very quickly. We will always support this channel and I will recommend your videos to my friends also
Thanks for the wonderful session bro. I am learning a lot form your Devops series. I couldn't understand the port mapping here. Can you please tell me once here.
❤
Awesome. Please share the videos with your friends
please bring Linux beginners tutorials too
thank you guruji 🥰
Awesome. Please share the videos with your friends
Hi Abhishek could you please increase the quality of this video it's not even in 720p
Thank you sir
Thank you so much 😀
Thank you ^^
Hi Abhishek, Appreciate your content. Just one request Please do a Course on Azure DevOps, I've been thrugh so many e-learning platforms but none of them served the way you are teaching.
Thanks for the suggestion.. sure
@@AbhishekVeeramalla Most Welcome Abhishek, will look forward for your content.
I completed beginning with docker and fundamentals part here, I can see Django, python etc, I'm not familiar with coding shall I watch or skip this one? or only continue after learning coding
Thank you Abhishek for explaining hw to containerize django application i have no programming experience could you please share more examples for java apps /node js so that we can practice more docker files and you didn't show how we can login in container using container id i ran docker ps not able to see any container id am i missing something please let me know .
and aws charges as per the hours usage and 750 hrs are free after this it will charge as per usage but not on how many instances we used
max 20 instances can be created under free tier.
Devops god
:)
Good video, we need to know, we have created Docker file with code(push & pull from registry - it is not used daily basis)what are the other daily work activity in docker & container.(what are the problem come, how to maintenance)
Uploaded a video today .. please check
@@AbhishekVeeramalla great 👍
Hi @Abhishekveeramalla.
at this video i demoralized , when i heard about programming language. could you please help ? in which language programing knowledge need to have? I want to learn docker Jenkins and Kubernetes , or should i follow your full course ? I hopping you will respond quickly. Apart from that you are really a good teacher.
my target is get to job by end of this year by following your videos. please suggest something i need to do please sir
Please explain the Entrypoint and cmd in dockerfile
It is covered in the series
thanks lot. can you please explain how we know that ENTRYPOINT and CMD command that should use
Hi @abhishek sir, when you will be made a detailed video on kubeshark ?
Thank you brother for your knowledge sharing 🙏
Could you help to provide one session on real time accessibilities in a organisation like how we login to tools and privileges to each tool or to could and DevOps engineer limitations to each tool and other team dependencies.. etc 🙏
Sure
Can u please make a saperate video explaining about django, flask, nodejs app workflows???
I was trying to install python but Ubuntu was not allowing me to do that. Thereforethe above Docker file was not running as per the requirement. So to resolve this I had to create a virtual env. However I just tweaked a bit of code in the Dockerfile which helmed me to run this django app on my system.
Note: I am using Docker Desktop.
what code did you changed, same problem with me too
If we don't port map 8000:8000 it will be accessible to port 80 by default, right?
What is that 2a0d5e06eb8d? If that is the image I do not see it declared or created before running the container.
On what basis the port number 8000 is chosen?
Please watch the videos before this
Clear me one thing, let's say if in this django application, I have specified 5000 port to be used by the application, then does it require to specify EXPOSE parameter in the Dockerfile or we can avoid. If yes, we can avoid, then what if we still define EXPOSE parameter with port 6000 instead of port 5000 which is mentioned in the code, will the application run on 5000 or 6000. Also, if different ports are mentioned in code and Dockerfile, which is 5000 and 6000 in this case but while giving docker run command we specify container port as 7000, then what will happen?
how to decide what will be the commands inside CMD according to different different application?
Commands will be the command to start your application or the command that you want to run as the container starts