CI/CD Pipeline Project using AWS CodePipeline | CodeDeploy | Deploy Django Project
Vložit
- čas přidán 29. 08. 2024
- Hello, we will set up a Django CI/CD pipeline on AWS using AWS CodePipeline and CodeDeploy in this video.
☕ Buy me a coffee: www.buymeacoff...
Github Source code: github.com/cod...
Configurations Files: github.com/ras...
Commands File: github.com/ras...
Article: / ci-cd-pipeline-complet...
Welcome To My Code With Muh CZcams channel, You'll Learn about Python, JavaScript, DevOps, Django Rest Framework, and AWS!
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
Please let me know if you would like to consult with or hire me.
Hire me on Upwork: www.upwork.com...
Place an order on Fiverr: www.fiverr.com...
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
Social Links:
Github: github.com/cod...
LinkedIn: / muhammad-rashid-daha
Upwork: www.upwork.com...
X: / rashiddaha80
Instagram: / rashiddaha1
Medium: / codewithmuh
Website: codewithmuh.com
_ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
Connect with me on LinkedIn: www.linkedin.com/in/muhammad-rashid-daha
Its Takes Time To Create Quality Content for Free. Please Show Some Love and Support By Subscribing to My Channel. Thanks😇
hi Muh,This is the excellent video.Your way of teaching is very good.
Glad to hear. ✨
Very helpful this video thanks
@@Rana-d3e happy to hear.
It was very helpful my friend! Keep up with this amazing content.
Glad it helped!
Life saver!!👏
I am happy to hear
Thank you, this was an awesome video!
Glad To hear. 😉
MashaAllah keep it up 👍
Thanks
Very helpful video. 😍
Excellent method of teaching.
Glad you liked it. Thanks
Which method you are using to push code?
Very helpful videos.💕
Thanks
keep it up bro thanks.
Welcome
The adopted teaching method is this video is quite impressive and helpful but the method when reproduced does not lead to success. A 502 Bad Request (nginx error) was returned. This shows the described nginx and gunicorn configurations seem specific to the hosted app by the author and does not work for other Django apps deployed on an AWS EC2 instance.
The author can make a complimentary (Part 2) video to this that explains each lines of the nginx and gunicorn configuration files so that they can be easily adapted to any Django app
Having said that, I wish to thank you for the good work. It is very helpful.
About Nginx and Gunicorn, You have to make sure paths are correct, like your project name, you have to replace it with your project name, as well as the folder name where your setting.py file is. When you do not replace/update these things, then you get into trouble. Still, if someone needs help they can reach me on LinkedIn.
Hello Sir, I have deployed my code in the same way , deployement is successfull however while trying to access the site, error is thrown as "502 Bad Gateway" Please can you suggest me what should I check?
Its mean your nginx, gunicorn or security groups are not configured properly. Double check these things.
@Girjesh Kumar hi can you fix 502 error
Can you please make a video on django,postgres, docker, nginx,gunicorn deployment with any ci cd pipeline like Jenkins and terraform.
Thanks in advance
Yes, I have this video in list. Will create soon.
@@CodeWithMuh Thanks for your response
iam getting this error =/
Build failed to start. The following error occurred: Cannot have more than 0 builds in queue for the account
Your account Quota Problem. Reach out to AWS to increase your quota.
bahot khub rashid bhai..Greate
Thanks 😊
Really helpful
Glad to hear
Great video! Green pipeline. However my app isn’t up and running because the codedeployagent logs tell me that all the files in the scripts folder were not executable. I’ve already added permissions in the appspec file and also when I check in the ec2 instance scripts directory myself I can see the files are executable. Do you have any suggestions what could be causing the issue here?
Without looking at the issue, i can't suggest anything
@@CodeWithMuh From the codedeploy agent logs I can see that I'm getting this error for all scripts: InstanceAgent::Plugins::CodeDeployPlugin::HookExecutor: Script at specified location: scripts/clean_instance is not executable. Trying to make it executable.
I used AWS linux 2023 instead of ubuntu and adjusted all commands accordingly to AWS linux. Apparently I can't share links in comments so can't show my repo unfortunately. Please let me know if you know what could cause this issue? I've set permissions in the appspec file to 777 and can see manually in the ec2 instance that the files are executable which is strange.
I can't drop a reference to my repo but my name on is fholcodes and the repo is called trading-application
I can only help via live session.
The discord link in your profile says that the invite to your community is either invalid or expired. Could you update the invitation link?
Pls can you do a video on how to mikemigrations and connect to a database?
Am have trouble with that
Thank you
1. czcams.com/video/1D4mn_rO2cM/video.html , you can do ssh to your instance as well, just follow this Video, 2. OR ssh to your instance az explained in video. 3. You can also add migrations commands in start_app.sh file as well.
is it possible to auto deploy to aws ec2 instance using only github action?
Yes, for this you will need to follow GitHub actions
getting 502 bad gateway... upon chekcing gunicorn status, it is not working although i installed it? any ideas what it could be
502 is due to Nginx issue. Make your nginx configuration correct. Check your ngix file.
Re-follow all setps from gunicorn to nginx. Error is coming because you did mistake somewhere
@@CodeWithMuh when i check gunicorn's status, it gives the error that "Failed at step EXEC spawning /home/ubuntu/env/bin/gunicorn: No such file or directory"
@@CodeWithMuh nginx is working fine
You have to check all files. Also security groups.
You are making mistake somewhere. That's why issue is coming. Post your question on Facebook group: i will sechdule a call to help group link is given in video description
Hi guy, I can apply this course in another cloud provider as a digitalocean or any other else?
Yes, but for this you will need to make some changes in configurations
Hellow sir i can following in your videos pipeline three stages competed successfully but i got 502 bad gateway error and iam configure nginx config properly and add security groups http, https, ssh but not working
There will be mistake in your Nginx
For a short live session reach out to me at discord
hey guy!! first of all, thanks for your video. Next i have a problem when i follow your step in video. My build stage have an error, that is "Error while executing command: pip3 install -r requirements.txt. Reason: exit status 1". Help me pls.
i find bug in file buildspec.yml at pre_build
Do you have requirements.txt file in your repository?
@@CodeWithMuh yes i have
structure of the django project almost the same of your :(
Its difficult to guess where the mistake you did via comment
@@CodeWithMuh when build failed, i check the phase details. the phase error name PRE_BUILD and the full context is "COMMAND_EXECUTION_ERROR: Error while executing command: pip3 install -r requirements.txt. Reason: exit status 1"
I did exactly like your but it gives '502 Bad Gateway'
There will be Nginx error or you application error
hello sir I got this error please tell me how to solve the error
[Container] 2023/06/11 08:15:56 Waiting for agent ping
[Container] 2023/06/11 08:15:58 Waiting for DOWNLOAD_SOURCE
[Container] 2023/06/11 08:15:59 Phase is DOWNLOAD_SOURCE
[Container] 2023/06/11 08:15:59 CODEBUILD_SRC_DIR=/codebuild/output/src332977926/src
[Container] 2023/06/11 08:15:59 Phase complete: DOWNLOAD_SOURCE State: FAILED
[Container] 2023/06/11 08:15:59 Phase context status code: YAML_FILE_ERROR Message: YAML file does not exist
Make sure yaml file is there. File is missing
@@CodeWithMuh sir YAML file does not exist is fixed and iam go 502 Bad Gateway error
It means your nginx has issues. Make sure the Nginx file is correct.also added security group
security groups means ec2 instance security groups.
Yes