Skip to content

Commit 993a1b3

Browse files
authored
Merge pull request #7 from ProfessionalLinuxUsersGroup/fix-contributing-title
fix: Update title to match course name
2 parents 1690bb8 + a9a7dad commit 993a1b3

File tree

2 files changed

+58
-86
lines changed

2 files changed

+58
-86
lines changed

src/contributing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="flex-container">
22
<img src="https://github.com/ProfessionalLinuxUsersGroup/img/blob/main/Assets/Logos/ProLUG_Round_Transparent_LOGO.png?raw=true" width="64" height="64"></img>
33
<p>
4-
<h1>Contributing to the ProLUG Linux Systems Security Course Book</h1>
4+
<h1>Contributing to the ProLUG Linux Automation Engineering Course Book</h1>
55
</p>
66
</div>
77

@@ -128,7 +128,7 @@ Pull requests with substantial merge conflicts may be rejected.
128128
You can do this from the GitHub web UI easily with the `Sync Fork` button. If you want to do this from the terminal, you can add a new `git remote` called `upstream`.
129129

130130
```bash
131-
git remote add upstream https://github.com/ProfessionalLinuxUsersGroup/psc.git
131+
git remote add upstream https://github.com/ProfessionalLinuxUsersGroup/pcae.git
132132
```
133133

134134
Then, to sync your local fork with the original repo, do a `git pull` from the `upstream` remote.
@@ -157,22 +157,22 @@ visibility and collaboration before merging changes.
157157

158158
### Create a Fork
159159

160-
Go to the [original repository link](https://github.com/ProfessionalLinuxUsersGroup/psc).
160+
Go to the [original repository link](https://github.com/ProfessionalLinuxUsersGroup/pcae).
161161
Click on "Fork" on the top right.
162162
Now you'll have your own version of the repository that you can clone.
163163

164164
```bash
165-
git clone [email protected]:YOUR_USERNAME/psc.git
165+
git clone [email protected]:YOUR_USERNAME/pcae.git
166166
# Or, with https:
167-
git clone https://github.com/YOUR_USERNAME/psc.git
167+
git clone https://github.com/YOUR_USERNAME/pcae.git
168168
```
169169

170170
### Clone the Fork to your Local Machine
171171

172172
Then you'll need to clone your fork down to your local machine in order to work on it.
173173

174174
```bash
175-
git clone [email protected]:yourname/psc.git
175+
git clone [email protected]:yourname/pcae.git
176176
```
177177

178178
### Create a New Branch
@@ -289,7 +289,7 @@ for free, so there is only one person who is able to merge pull requests at the
289289

290290
### Create a Pull Request
291291

292-
Now you'll be able to go to the [original repository link](https://github.com/ProfessionalLinuxUsersGroup/psc) and go to the "Pull Requests" tab and create a new pull request.
292+
Now you'll be able to go to the [original repository link](https://github.com/ProfessionalLinuxUsersGroup/pcae) and go to the "Pull Requests" tab and create a new pull request.
293293
Select your branch `unit1-worksheet`, and create a description and mention an issue by number (e.g., `#5`).
294294

295295
## Supporting Material
@@ -298,11 +298,11 @@ Select your branch `unit1-worksheet`, and create a description and mention an is
298298

299299
Below are links to the necessary materials to build out the course templates:
300300

301-
- Look over the [template pages wiki](https://github.com/ProfessionalLinuxUsersGroup/psc/wiki), or directly here:
302-
- Pages: [intro](https://github.com/ProfessionalLinuxUsersGroup/psc/blob/main/ref/intro.md),
303-
[bonus](https://github.com/ProfessionalLinuxUsersGroup/psc/blob/main/ref/ub.md),
304-
[lab](https://github.com/ProfessionalLinuxUsersGroup/psc/blob/main/ref/ulab.md),
305-
[worksheet](https://github.com/ProfessionalLinuxUsersGroup/psc/blob/main/ref/uws.md)
301+
- Look over the [template pages wiki](https://github.com/ProfessionalLinuxUsersGroup/pcae/wiki), or directly here:
302+
- Pages: [intro](https://github.com/ProfessionalLinuxUsersGroup/pcae/blob/main/ref/intro.md),
303+
[bonus](https://github.com/ProfessionalLinuxUsersGroup/pcae/blob/main/ref/ub.md),
304+
[lab](https://github.com/ProfessionalLinuxUsersGroup/pcae/blob/main/ref/ulab.md),
305+
[worksheet](https://github.com/ProfessionalLinuxUsersGroup/pcae/blob/main/ref/uws.md)
306306

307307
Ancillary unit videos provided by Scott:
308308

src/development.md

Lines changed: 46 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ are provided below. These guidelines are by no means a requirement or the only
1111
set of procedures to locally develop on this project.
1212

1313
The examples, code, and commands provided below were developed using such
14-
technologies as Ansible, containers, bash scripts, and more.
14+
technologies as containers, bash scripts, and more.
1515

1616
## Build Dependencies
1717

1818
---
1919

20-
The ProLUG Security Course (psc) utilizes [mdBook](https://github.com/rust-lang/mdBook)
21-
(markdown Book), a friendly and popular markdown utility that quickly exports
22-
files and web structures for documentation or general website use cases.
20+
The ProLUG Linux Administration Course (pcae) utilizes [mdBook](https://github.com/rust-lang/mdBook)
21+
(markdown Book), a friendly and popular markdown utility that quickly exports static web files for
22+
documentation or general website use cases.
2323

2424
Utilizing mdBook this course then deploys the exported web structure to a
2525
[Git Pages workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages) and runner that then produces an easily navigable website.
@@ -35,97 +35,69 @@ Below is the current workflow that deploys the Git Page for the course:
3535
To achieve this deployment locally the following environment and dependencies are
3636
required:
3737

38-
<dl>
39-
<dt>1. A localhost, this could be a container, virtual machine, or local machine</dt>
40-
<dt>2. The following packages installed on such machine:</dt>
41-
<dd>- httpd or apache</dd>
42-
<dd>- git</dd>
43-
<dd>- gcc</dd>
44-
<dd>- rust</dd>
45-
<dd>- cargo</dd>
46-
<dt>3. And a clone of a ProLUG repository</dt>
47-
</dl>
38+
1. A localhost, this could be a container, virtual machine, or local machine
39+
2. The following packages installed on such machine:
4840

49-
## Building, Deploying, and Developing Locally
50-
51-
---
52-
53-
Below is a set of scripts and Ansible-Playbooks that can quickly achieve this
54-
environment in an automated fashion. They are only designed to "standup" these
55-
machines, they are otherwise unintelligent and will not manage or cleanup
56-
environments if things go awry.
57-
58-
### Ansible-Playbook
59-
60-
<https://github.com/ProfessionalLinuxUsersGroup/psc/blob/main/src/assets/deploy/ansible-playbook.yml>
61-
62-
To use this playbook, your machine(s)/containers must be configured correctly for Ansible.
63-
If you don't know the requirements to administer a machine via Ansible documentation
64-
has been provided below.
65-
66-
<div class = warning>
67-
This playbook attempts to install and initialize dependencies based on APT and DNF package managers only.
68-
</div>
41+
- httpd or apache
42+
- git
43+
- mdBook binary
6944

70-
Getting started with Ansible:
71-
<https://docs.ansible.com/ansible/latest/getting_started/index.html>
45+
3. And a clone of a ProLUG repository
7246

73-
### Bash Script
74-
75-
Many of these commands assume a root user.
76-
77-
Export and execute this script to your machine/container.
78-
79-
<div class=warning>
80-
81-
Dependencies can total over ~500MB compressed and 1-2GB unpackaged or more.
47+
## Building, Deploying, and Developing Locally
8248

83-
Debian containers/machines will require building many of these packages from
84-
source or adding additional repositories as Debian has a far slower package
85-
version adoption rate for stability, thus is not recommended for deploying mdBook.
49+
---
8650

87-
</div>
51+
Below is a set of scripts that can quickly achieve this environment in an automated fashion.
8852

89-
These scripts will take up to 5-7 minutes to download the necessary dependencies
90-
and compile mdBook depending on the machine/container's capabilities.
53+
These commands assume a `root` user. This script will update and upgrade host packages to
54+
their latest versions, install git, curl, tar, gzip, grep and their dependencies if they aren't present,
55+
attempt to pull down the latest fully compiled `mdbook` binary from the official mdBook GitHub repository, boot
56+
up the local web server, process and produce the necessary .html files from the pcae source files, deploy
57+
the website and necessary cleanup operations.
9158

92-
Tested with Rocky 9 and Ubuntu 24.04 Containers.
59+
Outside of system packages all files will be localized to the `/root/pcae` directory on the container or machine.
9360

9461
APT frontends:
9562

9663
```bash
97-
#!/usr/bin/env bash
98-
apt-get update
99-
apt-get -y install apache2 git gcc rustc-1.80 cargo-1.80
100-
cargo-1.80 install --locked [email protected]
64+
#!/bin/bash
65+
apt-get -y install apache2 git curl tar gzip grep
66+
cd && git clone https://github.com/ProfessionalLinuxUsersGroup/pcae && cd $HOME/pcae
67+
VERSION=$(curl -sL https://github.com/rust-lang/mdBook/releases/latest | grep -Po -m 1 'v(?:\d\.){2}\d+')
68+
curl -sLO "https://github.com/rust-lang/mdBook/releases/download/${VERSION}/mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
69+
tar xfz mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
70+
rm -f mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
10171
systemctl enable --now apache2
102-
cd && git clone https://github.com/ProfessionalLinuxUsersGroup/psc
103-
echo 'PATH=$PATH:~/.cargo/bin/' | tee -a ~/.profile
104-
export PATH=$PATH:~/.cargo/bin/ && echo $PATH | grep cargo
105-
cd ~/psc && mdbook build -d /var/www/html
72+
$PWD/mdbook build -d /var/www/html
10673
systemctl restart apache2
74+
unset VERSION
10775
```
10876

10977
DNF frontends:
11078

11179
```bash
112-
#!/usr/bin/env bash
113-
dnf update
114-
dnf install -y httpd git gcc rust cargo
115-
cargo install --locked mdbook
80+
#!/bin/bash
81+
dnf install -y httpd git curl tar gzip grep
82+
cd && git clone https://github.com/ProfessionalLinuxUsersGroup/pcae && cd $HOME/pcae
83+
VERSION=$(curl -sL https://github.com/rust-lang/mdBook/releases/latest | grep -Po -m 1 'v(?:\d\.){2}\d+')
84+
curl -sLO "https://github.com/rust-lang/mdBook/releases/download/${VERSION}/mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
85+
tar xfz mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
86+
rm -f mdbook-${VERSION}-x86_64-unknown-linux-gnu.tar.gz
11687
systemctl enable --now httpd
117-
cd && git clone https://github.com/ProfessionalLinuxUsersGroup/psc
118-
echo 'PATH=$PATH:~/.cargo/bin/' | tee -a ~/.bash_profile
119-
export PATH=$PATH:~/.cargo/bin/ && echo $PATH | grep cargo
120-
cd ~/psc && mdbook build -d /var/www/html
88+
$PWD/mdbook build -d /var/www/html
12189
systemctl restart httpd
90+
unset VERSION
12291
```
12392

93+
The ProLUG Linux Administration Course website should now be available from your
94+
web browser either at http://localhost or its designated IP address.
95+
12496
#### From here you can use such commands from your localhost to implement changes:
12597

12698
```bash
127-
cd {working psc directory} #for example: /root/psc or ~/psc
128-
mdbook build -d /var/www/html
99+
cd {working pcae directory} #for example: /root/pcae or ~/pcae
100+
$HOME/pcae/mdbook build -d /var/www/html
129101
systemctl restart {httpd or apache}
130102
```
131103

@@ -141,15 +113,15 @@ From there you should be able to see any changes you have made are reflected.
141113
these commands will need to utilize absolute paths.
142114

143115
```bash
144-
scp {working directory}/{targeted document} {TARGET_IP}:/root/psc/src/{targeted document}
145-
ssh {TARGET_IP} "cd /root/psc && ~/.cargo/bin/mdbook build -d /var/www/html && systemctl restart httpd"
116+
scp {working directory}/{targeted document} {TARGET_IP}:/root/pcae/src/{targeted document}
117+
ssh {TARGET_IP} "cd /root/pcae && /root/pcae/mdbook build -d /var/www/html && systemctl restart httpd"
146118
```
147119

148120
An example of the workflow after making changes:
149121

150122
```bash
151-
scp src/development.md 172.16.15.8:/root/psc/src/
152-
ssh 172.16.15.8 "cd /root/psc && ~/.cargo/bin/mdbook build -d /var/www/html && systemctl restart httpd"
123+
scp src/development.md 172.16.15.8:/root/pcae/src/
124+
ssh 172.16.15.8 "cd /root/pcae && /root/pcae/mdbook build -d /var/www/html && systemctl restart httpd"
153125
```
154126

155127
<img src="./assets/images/flow.png"></img>

0 commit comments

Comments
 (0)