-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdevOps.txt
92 lines (56 loc) · 2.03 KB
/
devOps.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
>>>>>> DevOps Engeenear <<<<<<<<
------------------------------------------
------------------------------------------
*Adding to your resume:
*Created CI/CD pipeline of a web app using docker, jenkins & AWS
------------------------------------------------------------------
Project One:
DevOps Engeenear:
GitHub ---> Docker ---> Jenkins ---> AWS (EC2: Cloud)
1. Stip Start (git,python,linux)
git:
git clone <projetName> //Project on local machine
git checout -b feature/deploy-app //Make new branch
git add .
git commit -m "added requirememts"
git push origin feature/deploy-app
Python:
virtualenv -p python3.7 env
source env/bin/activate
pin install django
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
pip freeze > requirements.txt //Make requirement.txt file
Linux:
cd download
sudo <es2 ssh paste here to connect ec2>
mdkir projects
cd projects
git clone <git..pro name>
cd django-todo/
sudo apt install python3-pip
sudo apt-get update
sudo apt install python3-pip
pip install django
python3 manage.py migrate (After this command showing error of time zone fix it)
AWS:
EC2:
2. Step (Docker)
linux:
ls
sudo apt install docker.io
vi Dockerfile
//Making docker file Code in vi edirot
FROM python:3
RUN pip install django==3.2
COPY <source> <destination>
RUN python manage.py migrate
CMD ["python","manage.py","runserver","0.0.0.0:8001"]
:wq #(save file command)
sudo docker build . -t doto-app //Build now
sudo docker ps //Checking images
sudo docker run -p 8001:8001 <container ID> //Port mapping
sudo docker run -d -p 8001:8001 <container ID> (Demon: App Run in Background)
--------------> End One <------------------