-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci_cd_info.txt
58 lines (47 loc) · 2.52 KB
/
ci_cd_info.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--------------- CI/CD Info ---------------
# Django and Jenkins Integration | CI-CD Pipeline for Django Project | Python with CI/CD Pipeline
[Ref-YT Video]: https://www.youtube.com/watch?v=Sl94H5e7MPw&t=4s
# How To Set Up Django with Postgres, Nginx, and Daphne (Django Channels) on Ubuntu 20.04
[Ref-'Medium' Article]: https://okbaboularaoui.medium.com/how-to-set-up-django-with-postgres-nginx-and-daphne-django-channels-on-ubuntu-20-04-b0d24dcc7da9
# Production Django, WebSockets, Django Channels 2, Daphne, Nginx, Gunicorn, HTTPS
[Ref-YT Video]: https://www.youtube.com/watch?v=14zdpWW6eqw
# How To Install and Secure Redis on Ubuntu 22.04
[Ref-'Digital Ocean' Article]: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-22-04
# Complete guide to automate deployment using Jenkins and Github webhooks in Ubuntu Server (Full Automation)
[Ref-Article]: https://vijaypathak.com.np/2021/09/complete-guide-to-automate-deployment-using-jenkins.html
Jenkins Pipeline stage
----------------------
[NB]: Construct a pipeline (filename: Jenkinsfile) skeleton to aid making the pipeline while executing "build now" in Jenkins.
Create 'Jenkinsfile' after creating 'intial-setup.sh' file.
1. Create 'intial-setup.sh' file.
2. Create 'redisSetup.sh' file.
3. Create 'envsetup.sh' file.
- Create 'access.log' file.
- Create 'error.log' file.
4. Create 'uWSGI.sh' file.
- Create 'teachatty.ini' file.
5. Create 'daphne.sh' file.
- Create 'daphne_access.log' file.
- Create 'daphne_error.log' file.
- Create 'teachatty_chat_app_daphne.socket' file.
- Create 'teachatty_chat_app_daphne.service' file.
6. Create 'staticfile.sh' file.
- Check or create projects_static inside /var/www
- Check or create teachatty_chat_app inside /var/www/projects_static
- Copy staticfiles from project dir to /var/www/projects_static/teachatty_chat_app
- Change the ownership after staticfiles being copied.
- Remove staticfiles from project dir.
7. Create 'nginx.sh' file.
- Create 'nginx_access.log' file.
- Create 'nginx_error.log' file.
- Create 'teachatty_nginx.conf' file.
[CMD]: Start all the services
-----------------------------
sudo su
systemctl daemon-reload
systemctl restart uwsgi; systemctl restart emperor.uwsgi.service
systemctl status uwsgi
systemctl status emperor.uwsgi.service
systemctl restart teachatty_chat_app_daphne.socket; systemctl restart teachatty_chat_app_daphne.service
systemctl status teachatty_chat_app_daphne.socket
systemctl status teachatty_chat_app_daphne.service