Skip to content

Commit ceac5bc

Browse files
committed
Tweak venv explanation
1 parent 962f327 commit ceac5bc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/10-The-Client-Demonstration/02-Troubleshoot-the-Development-Environment.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
9898
</details>
9999
1. <details>
100-
<summary>Back on the devapp01 webserver. Attempt to start the web application by:</br>Navigate to the directory /opt/caleston-code/mercuryProject</br>Next, run the command python3 manage.py runserver 0.0.0.0:8000</summary>
100+
<summary>Back on the devapp01 webserver. Attempt to start the web application by:</br>Navigate to the directory /opt/caleston-code/mercuryProject</br>Next, run the command Python3 manage.py runserver 0.0.0.0:8000</summary>
101101
102102
At this point you are still logged into `devdb01`, so first return to Bob's laptop
103103

@@ -111,7 +111,7 @@
111111
ssh devapp01
112112
113113
cd /opt/caleston-code/mercuryProject
114-
python3 manage.py runserver 0.0.0.0:8000
114+
Python3 manage.py runserver 0.0.0.0:8000
115115
```
116116

117117
Note it dumps a stack trace on the screen, i.e. it crashed! Thus the answer is `No`.
@@ -164,27 +164,27 @@
164164
165165
```bash
166166
source ../venv/bin/activate
167-
python3 manage.py migrate
167+
Python3 manage.py migrate
168168
```
169169
170170
Start the app again so the question will vaildate.
171171
172172
**What is this venv stuff?**
173173
174-
If you're considering learning Python (highly recommended as it is required in most DevOps jobs), this means Virtual ENVironment. It allows you to install python packages on a project-by-project basis, thus not polluting the main Python installation.
174+
If you're considering learning Python (highly recommended as it is required in many DevOps jobs), this means Virtual ENVironment. It allows you to install Python packages on a project-by-project basis, thus not polluting the main Python installation. This is especially useful on your development environment where you may have multiple Python projects all with different package requirements.
175175

176176
</details>
177177
1. <details>
178178
<summary>Well done! Now, for the final task before the client presentation.</summary>
179179

180-
Here we have to create a [systemd unit file](https://kodekloud.com/topic/creating-a-systemd-service/) to make the python app be runnable as a service.
180+
Here we have to create a [systemd unit file](https://kodekloud.com/topic/creating-a-systemd-service/) to make the Python app be runnable as a service.
181181

182182
First quit the running webapp by pressing `CTRL-C`
183183

184-
Note that in unit files, the process to execute (in this case `python3`) we must use its fully qualified path, as `systemd` does not have a search path. Get this like this
184+
Note that in unit files, the process to execute (in this case `Python3`) we must use its fully qualified path, as `systemd` does not have a search path. Get this like this
185185

186186
```bash
187-
which python3
187+
which Python3
188188
```
189189

190190
Now create the unit file
@@ -200,7 +200,7 @@
200200
Description=Project Mercury Web Application
201201
202202
[Service]
203-
ExecStart=/usr/bin/python3 manage.py runserver 0.0.0.0:8000
203+
ExecStart=/usr/bin/Python3 manage.py runserver 0.0.0.0:8000
204204
Restart=on-failure
205205
WorkingDirectory=/opt/caleston-code/mercuryProject/
206206
User=mercury

0 commit comments

Comments
 (0)