Skip to content

Commit

Permalink
#1867 fix markdown violation in guides and gemstones (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishaaaaaant authored Apr 7, 2024
1 parent e21e91e commit a0517d9
Show file tree
Hide file tree
Showing 35 changed files with 292 additions and 214 deletions.
8 changes: 4 additions & 4 deletions docs/gemstones/containers/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ The Docker Engine can be used running native Docker style container workloads on

Use the `dnf` utility to add the Docker repository to your Rocky Linux server. Type:

```
```bash
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
```

## Install the needed packages

Install the latest version of Docker Engine, `containerd`, and Docker Compose, by running:

```
```bash
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
```

## Start and enable Docker (`dockerd`)

Use `systemctl` to configure Docker to automatically startup upon reboot and simultaneously start it now. Type:

```
```bash
sudo systemctl --now enable docker
```

### Notes

```
```docker
docker-ce : This package provides the underlying technology for building and running docker containers (dockerd)
docker-ce-cli : Provides the command line interface (CLI) client docker tool (docker)
containerd.io : Provides the container runtime (runc)
Expand Down
4 changes: 2 additions & 2 deletions docs/gemstones/containers/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ tags:

Use the `dnf` utility to install Podman:

```
```bash
dnf install podman
```

## Adding a container

Let us run a [Nextcloud](https://nextcloud.com/) self-hosted cloud platform as an example:

```
```bash
podman run -d -p 8080:80 nextcloud
```

Expand Down
18 changes: 8 additions & 10 deletions docs/gemstones/core/view_kernel_conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ tags:

The Linux kernel stores running kernel information in two places via special filesystems: ([A summary of them](https://www.landoflinux.com/linux_procfs_sysfs.html))

- The older [procfs](https://man7.org/linux/man-pages/man5/procfs.5.html) which mounts `/proc` (verify via `mount -l -t proc`)
- The newer [sysfs](https://man7.org/linux/man-pages/man5/sysfs.5.html) which mounts `/sys` (verify via `mount -l -t sysfs`)
- The older [procfs](https://man7.org/linux/man-pages/man5/procfs.5.html) which mounts `/proc` (verify via `mount -l -t proc`)
- The newer [sysfs](https://man7.org/linux/man-pages/man5/sysfs.5.html) which mounts `/sys` (verify via `mount -l -t sysfs`)

!!! warning

Be cautious if examining the files mentioned here, altering them can change the behavior of the actual running kernel!


These two interfaces allow you to view and change the parameters of the currently running kernel.

Note that if you do an [`ls -l`](https://man7.org/linux/man-pages/man1/ls.1.html) on some of these files, they will show as "0" length, but if you [`cat`](https://man7.org/linux/man-pages/man1/cat.1.html) them out they actually contain data. Most of them are ASCII and editable, however some are binary. In either case commands like [`file`](https://man7.org/linux/man-pages/man1/file.1.html) or [`stat`](https://man7.org/linux/man-pages/man2/lstat.2.html) will typically just return "empty file" or "0" for lengths, although they will show you other information.
Expand Down Expand Up @@ -59,11 +58,11 @@ cat /boot/config-$(uname -r) | grep -i <keyword>

Results will show:

- "=m" if compiled in as a kernel module
- "=y" if compiled statically into the kernel
- "is not set" if that setting was commented out
- a numeric value
- a quoted string value
- `=m` if compiled in as a kernel module
- `=y` if compiled statically into the kernel
- `is not set` if that setting was commented out
- a numeric value
- a quoted string value

Some distributions, like Gentoo and Arch, use the `configs` kernel module to provide `/proc/config.gz` by default instead:

Expand All @@ -90,7 +89,6 @@ modprobe configs

appstream-debug, appstream-source, baseos-debug, baseos-source, or devel


The `kernel-devel` packages install the config file used to compile each installed standard kernel package as an ASCII file in the following location:

```bash
Expand Down Expand Up @@ -154,6 +152,6 @@ You can check for kernel module dependencies in the file:

but it is easier to read or parse the output of the "Used-by" field in [`lsmod`](https://man7.org/linux/man-pages/man8/lsmod.8.html).

## Reference:
## Reference

[depmod](https://man7.org/linux/man-pages/man8/depmod.8.html), [ls](https://man7.org/linux/man-pages/man1/ls.1.html), [lsmod](https://man7.org/linux/man-pages/man8/lsmod.8.html), [modinfo](https://man7.org/linux/man-pages/man8/modinfo.8.html), [modprobe](https://man7.org/linux/man-pages/man8/modprobe.8.html), [modules.dep](https://man7.org/linux/man-pages/man5/modules.dep.5.html), [namespaces](https://man7.org/linux/man-pages/man7/namespaces.7.html), [procfs](https://man7.org/linux/man-pages/man5/procfs.5.html), [sysctl](https://man7.org/linux/man-pages/man8/sysctl.8.html), [sysfs](https://man7.org/linux/man-pages/man5/sysfs.5.html), [uname](https://man7.org/linux/man-pages/man8/uname26.8.html)
10 changes: 1 addition & 9 deletions docs/gemstones/dnf-swap.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ Although some of the shipped packages are stripped down versions, they are often

For cases, when the stripped-down package is not enough, you can use the `dnf swap` command to quickly replace the minimal package with the regular package.

# Objective
## Objective

This Rocky Linux GEMstone demonstrates how to use **dnf** to _swap_ the bundled `curl-minimal` package with the regular `curl` package.


## Check existing curl variant

While logged into your container or virtual machine environment as a user with administrative privileges, first verify the variant of `curl` package installed. Type:
Expand All @@ -39,7 +38,6 @@ curl-minimal-*

We have curl-minimal on our demo system!


## Swap curl-minimal for curl

Use `dnf` to swap the installed `curl-minimal` package with regular `curl` package.
Expand All @@ -58,10 +56,8 @@ To confirm the changes, query the rpm database again for the installed curl pack
curl-*
```


And it's a GEM !


## Notes

DNF Swap Command
Expand All @@ -74,10 +70,6 @@ dnf [options] swap <package-to-be-removed> <replacement-package>

Under the hood, `dnf swap` uses DNF's `--allowerasing` option to resolve any package conflict issues. Therefore the curl minimal example demonstrated in this GEMstone could also have been done by running:


```bash
dnf install -y --allowerasing curl
```



10 changes: 6 additions & 4 deletions docs/gemstones/gemstone_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ tags:
- Tags
---

## Introduction
## Introduction

A brief overview of the topic. State the relevance and purpose of the Gemstone.

## Problem Description

Define the problem or challenge addressed.

## Prerequisites
## Prerequisites

List prerequisites:

Expand All @@ -29,13 +29,15 @@ List prerequisites:
Outline the procedure or solution with numbered steps:

1. **First Step**:

Instructions and command examples.

```bash
Command or code snippet
```

2. **Second Step**:

Continue with detailed instructions.

## Additional Information (Optional)
Expand Down
9 changes: 6 additions & 3 deletions docs/gemstones/git/00-gh_cli_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ tags:
- github
---

## Introduction
## Introduction

This gemstone covers the installation and basic setup of the GitHub CLI tool (gh) on the Rocky Linux system. This tool enables users to interact with GitHub repositories directly from the command line.

## Problem Description

Users need a convenient way to interact with GitHub without leaving the command line environment.

## Prerequisites
## Prerequisites

- A system running Rocky Linux
- Access to a terminal
Expand All @@ -33,18 +33,21 @@ Users need a convenient way to interact with GitHub without leaving the command
curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/github-cli.repo
sudo dnf -y install gh
```

2. **Verify Installation**:
Ensure that `gh` is correctly installed. Type:

```bash
gh --version
```

3. **Authenticate with GitHub**:
Log in to your GitHub account. Type:

```bash
gh auth login
```

Follow the prompts to authenticate.

## Conclusion
Expand Down
17 changes: 12 additions & 5 deletions docs/gemstones/git/01-gh_cli_1st_pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tags:
- CLI
---

## Introduction
## Introduction

This Gemstone details how to contribute to the Rocky Linux documentation project using only the command line interface (CLI). It covers forking the repository the 1st time and creating a pull request.
We'll use contributing a new Gemstone document in our example.
Expand All @@ -19,7 +19,7 @@ We'll use contributing a new Gemstone document in our example.

Contributors may prefer or need to perform all actions via the CLI, from forking repositories to submitting pull requests for the first time.

## Prerequisites
## Prerequisites

- A GitHub account
- `git` and `GitHub CLI (gh)` installed on your system
Expand All @@ -29,46 +29,53 @@ Contributors may prefer or need to perform all actions via the CLI, from forking

1. **Fork the Repository Using GitHub CLI**:
Fork the upstream repository to your account.

```bash
gh repo fork https://github.com/rocky-linux/documentation --clone
```

2. **Navigate to the Repository Directory**:

```bash
cd documentation
```

3. **Add the Upstream Repository**:

```bash
git remote add upstream https://github.com/rocky-linux/documentation.git
```

4. **Create a New Branch**:
Create a new branch for your contribution. Type:

```bash
git checkout -b new-gemstone
```

5. **Add Your New Document**:
Use your favorite text editor to create and edit your new contribution file.
For this example, we'll create a new file named `gemstome_new_pr.md` and save the file under the `docs/gemstones/` directory.
Use your favorite text editor to create and edit your new contribution file.
For this example, we'll create a new file named `gemstome_new_pr.md` and save the file under the `docs/gemstones/` directory.

6. **Commit Your Changes**:
Stage and commit your new file. Type:

```bash
git add docs/gemstones/gemstome_new_pr.md
git commit -m "Add new Gemstone document"
```

7. **Push to Your Fork**:
Push the changes to your fork/copy of the Rocky Linux documentation repo. Type:

```bash
git push origin new-gemstone
```

8. **Create a Pull Request**:
Create a pull request to the upstream repository.
```

```bash
gh pr create --base main --head wsoyinka:new-gemstone --title "New Gemstone: Creating PRs via CLI" --body "Guide on how to contribute to documentation using CLI"
```

Expand Down
7 changes: 5 additions & 2 deletions docs/gemstones/git/02-gh_cli_edit_pr_title.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ tags:
- CLI
---

## Introduction
## Introduction

This Gemstone explains how to edit or change the title of an existing pull request (PR) in a GitHub repository using both the GitHub web interface and CLI.

## Problem Description

Sometimes, the title of a PR after its creation may need to be modified to better reflect the current changes or discussions.

## Prerequisites
## Prerequisites

- An existing GitHub pull request.
- Access to GitHub web interface or CLI with necessary permissions.
Expand All @@ -28,15 +28,18 @@ Sometimes, the title of a PR after its creation may need to be modified to bette

1. **Check Out the Corresponding Branch**:
- Ensure you are on the branch associated with the PR.

```bash
git checkout branch-name
```

2. **Edit the PR Using the CLI**:
- Use the following command to edit the PR:

```bash
gh pr edit PR_NUMBER --title "New PR Title"
```

- Replace `PR_NUMBER` with the number of your pull request and `"New PR Title"` with the desired title.

## Additional Information (Optional)
Expand Down
4 changes: 2 additions & 2 deletions docs/gemstones/git/02_github_web_edit_pr_title.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ tags:
- Documentation
---

## Introduction
## Introduction

This guide explains how to edit or change the title of an existing pull request (PR) in a GitHub repository using the GitHub web interface.

## Problem Description

Sometimes, there may be a need to modify the title of a PR after its creation to reflect the current changes or discussions better.

## Prerequisites
## Prerequisites

- An existing GitHub pull request.
- Access to GitHub web interface or CLI with necessary permissions.
Expand Down
Loading

0 comments on commit a0517d9

Please sign in to comment.