Skip to content

Commit

Permalink
Merge pull request #390 from Nordix/tuomo/add-markdownlint
Browse files Browse the repository at this point in the history
add markdownlint and shellcheck, fix complaints
  • Loading branch information
metal3-io-bot authored Jan 24, 2024
2 parents dd712d5 + 742a71c commit 936557a
Show file tree
Hide file tree
Showing 43 changed files with 1,258 additions and 520 deletions.
9 changes: 9 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Reference: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2yaml

config:
ul-indent:
# Kramdown wanted us to have 3 earlier, tho this CLI recommends 2 or 4
indent: 3

# Don't autofix anything, we're linting here
fix: false
17 changes: 1 addition & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
rev: v2.2.1
hooks:
- id: prettier
files: \.(css|js|md|markdown|json)
files: \.(css|js|json)
- repo: https://github.com/python/black
rev: 20.8b1
hooks:
Expand Down Expand Up @@ -41,21 +41,6 @@ repos:
rev: 3.9.0
hooks:
- id: flake8
- repo: local
hooks:
- id: shfmt
name: shfmt
minimum_pre_commit_version: 2.4.0
language: golang
additional_dependencies:
- mvdan.cc/sh/v3/cmd/shfmt@v3.1.1
entry: shfmt
args:
- -w
- -i
- '0'
types:
- shell
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
Expand Down
300 changes: 197 additions & 103 deletions GUIDELINES.md

Large diffs are not rendered by default.

27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## Contributing content

We more than welcome contributions in the form of blog posts, pages and/or labs, reach out if you happen to have an idea or find an issue with our content! [Here's our guideline for content](GUIDELINES.md).
We more than welcome contributions in the form of blog posts, pages
and/or labs, reach out if you happen to have an idea or find an issue
with our content! [Here's our guideline for content](GUIDELINES.md).

## Test your changes in a local container

Expand All @@ -15,26 +17,37 @@ We more than welcome contributions in the form of blog posts, pages and/or labs,
```console
cd metal3-io.github.io
mkdir .jekyll-cache
podman run -d --name metal3io -p 4000:4000 -v $(pwd):/srv/jekyll:Z jekyll/jekyll jekyll serve --future --watch
podman run -d --name metal3io -p 4000:4000 \
-v $(pwd):/srv/jekyll:Z jekyll/jekyll jekyll serve --future --watch
```

**NOTE**: Make sure you are in the _metal3-io.github.io_ directory before running the above command as the Z at the end of the volume (-v) will relabel its contents so it can be written from within the container, like running `chcon -Rt svirt_sandbox_file_t -l s0:c1,c2` yourself.
**NOTE**: Make sure you are in the _metal3-io.github.io_ directory
before running the above command as the Z at the end of the volume
(-v) will relabel its contents so it can be written from within the
container, like running `chcon -Rt svirt_sandbox_file_t -l s0:c1,c2`
yourself.

- On an OS without SELinux:

```console
cd metal3-io.github.io
mkdir .jekyll-cache
sudo docker run -d --name metal3io -p 4000:4000 -v $(pwd):/srv/jekyll jekyll/jekyll jekyll serve --future --watch
sudo docker run -d --name metal3io -p 4000:4000 \
-v $(pwd):/srv/jekyll jekyll/jekyll jekyll serve --future --watch
```

### View the site

Visit `http://0.0.0.0:4000` in your local browser.
Visit [http://0.0.0.0:4000](http://0.0.0.0:4000) in your local browser.
The Metal3.io website is a Jekyll site, hosted with GitHub Pages.

All pages are located under `/pages`. Each section of the site is broken out into their respective folders - `/blogs` for the various Blog pages, `/docs` for the Documentation and `/videos` for the videos that are shared.
All pages are located under `/pages`. Each section of the site is broken
out into their respective folders - `/blogs` for the various Blog pages,
`/docs` for the Documentation and `/videos` for the videos that are
shared.

All site images are located under `/assets/images`. Please do not edit these images.

Images that relate to blog entries are located under `/assets/images/BLOG_POST_TITLE`. The **BLOG_POST_TITLE** should match the name of the markdown file that you added under `/_posts`.
Images that relate to blog entries are located under
`/assets/images/BLOG_POST_TITLE`. The **BLOG_POST_TITLE** should match
the name of the markdown file that you added under `/_posts`.
4 changes: 4 additions & 0 deletions _faqs/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2yaml

config:
first-line-h1: false
3 changes: 2 additions & 1 deletion _faqs/baremetal-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
question: What is the baremetal operator?
---

Baremetal Operator is a Kubernetes controller providing support for several custom resources, most importantly - BareMetalHosts.
Baremetal Operator is a Kubernetes controller providing support for
several custom resources, most importantly - BareMetalHosts.
4 changes: 3 additions & 1 deletion _faqs/boot-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: What kind of boot processes can be paired with specific BMC protocols?
---

Drivers with "virtual media" in their name can use the virtual media technology to boot an ISO remotely. The other drivers require network boot, more specifically - iPXE.
Drivers with "virtual media" in their name can use the virtual media
technology to boot an ISO remotely. The other drivers require network
boot, more specifically - iPXE.
5 changes: 4 additions & 1 deletion _faqs/capm3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
question: What is Cluster API provider Metal3 (CAPM3)?
---

CAPM3 is an [infrastructure provider](https://cluster-api.sigs.k8s.io/user/concepts#infrastructure-provider) for the Cluster API that uses Metal3 and Ironic to provision machines for your cluster.
CAPM3 is an
[infrastructure provider](https://cluster-api.sigs.k8s.io/user/concepts#infrastructure-provider)
for the Cluster API that uses Metal3 and Ironic to provision machines
for your cluster.
3 changes: 2 additions & 1 deletion _faqs/cluster-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
question: How does Metal3 relate to Cluster API (CAPI)?
---

The Metal3 project includes the Cluster API Provider Metal3 (CAPM3) - an infrastructure provider for Cluster API.
The Metal3 project includes the Cluster API Provider Metal3 (CAPM3) - an
infrastructure provider for Cluster API.
3 changes: 2 additions & 1 deletion _faqs/cpu-architectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
question: What CPU architectures are supported?
---

Both x86_64 (Intel) and AARCH64 (Arm) are supported. Mixed architectures (e.g. some hosts x86_64, some - aarch64) are not supported yet.
Both x86_64 (Intel) and AARCH64 (Arm) are supported. Mixed architectures
(e.g. some hosts x86_64, some - aarch64) are not supported yet.
7 changes: 6 additions & 1 deletion _faqs/ipmi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
question: What is IPMI?
---

IPMI is the acronym for `Intelligent Platform Management Interface` which is used to monitor hardware health (fans, voltage, temperature, etc). The specification is available at <https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-home.html> and was created by a joint effort by several manufacturers. It allows us to also define the boot order and power status of the hardware.
IPMI is the acronym for `Intelligent Platform Management Interface`
which is used to monitor hardware health (fans, voltage, temperature,
etc). The specification is available at
[here](https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-home.html)
and was created by a joint effort by several manufacturers. It allows us
to also define the boot order and power status of the hardware.
4 changes: 3 additions & 1 deletion _faqs/kinds-of-operating-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: What kinds of operating systems can be installed?
---

You can use any operating system that is available in a cloud format (e.g. qcow2). If you need first boot configuration, the image has to contain cloud-init or a similar first-boot tool.
You can use any operating system that is available in a cloud format
(e.g. qcow2). If you need first boot configuration, the image has to
contain cloud-init or a similar first-boot tool.
4 changes: 3 additions & 1 deletion _faqs/metal3-support-provisioners.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: Does Metal3 support provisioners other than Ironic?
---

While it's technically possible to add more provisioners, only Ironic is supported now, and supporting other provisioners is not on the current roadmap.
While it's technically possible to add more provisioners, only Ironic is
supported now, and supporting other provisioners is not on the current
roadmap.
3 changes: 2 additions & 1 deletion _faqs/network-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
question: How can one supply network configuration during provisioning?
---

You can put it to the BareMetalHost's network Data field in the [OpenStack network data format](https://docs.openstack.org/nova/latest/_downloads/9119ca7ac90aa2990e762c08baea3a36/network_data.json).
You can put it to the BareMetalHost's network Data field in the
[OpenStack network data format](https://docs.openstack.org/nova/latest/_downloads/9119ca7ac90aa2990e762c08baea3a36/network_data.json).
4 changes: 3 additions & 1 deletion _faqs/openstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: Ironic is developed as part of OpenStack, does Metal3 require OpenStack?
---

Ironic can be used as a stand-alone service without any other OpenStack services. In fact, Baremetal Operator does not support any other OpenStack services.
Ironic can be used as a stand-alone service without any other OpenStack
services. In fact, Baremetal Operator does not support any other
OpenStack services.
5 changes: 4 additions & 1 deletion _faqs/operating-system-installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
question: Can I use my own operating system installer with Metal3?
---

You can use the [live ISO workflow](https://book.metal3.io/bmo/live-iso) to attach a bootable ISO to the machine using virtual media. Note that Baremetal Operator will not track the installation process in this case and will consider the host active once the ISO is booted.
You can use the [live ISO workflow](https://book.metal3.io/bmo/live-iso)
to attach a bootable ISO to the machine using virtual media. Note that
Baremetal Operator will not track the installation process in this case
and will consider the host active once the ISO is booted.
9 changes: 8 additions & 1 deletion _faqs/out-of-band.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
question: What is an out-of-band management controller?
---

Enterprise hardware usually has an integrated or optional controller that allows reaching the server even if it's powered down, either via dedicated or shared nic. This controller allows some checks on the server hardware and also perform some settings like changing power status, changing Boot Order, etc. The Baremetal Operator uses it to power on, reboot and provision the physical servers to be used for running workloads on top. Commercial names include `iDrac`, `iLO`, `iRMC`, etc and most of them should support `IPMI`.
Enterprise hardware usually has an integrated or optional controller
that allows reaching the server even if it's powered down, either via
dedicated or shared nic. This controller allows some checks on the
server hardware and also perform some settings like changing power
status, changing Boot Order, etc. The Baremetal Operator uses it to
power on, reboot and provision the physical servers to be used for
running workloads on top. Commercial names include `iDrac`, `iLO`,
`iRMC`, etc and most of them should support `IPMI`.
4 changes: 3 additions & 1 deletion _faqs/using-metal3-independently.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: Do I need to use the Metal3 with Cluster API or can I use Metal3 independently?
---

It is completely optional to use Cluster API. You can use only the Baremetal Operator and skip CAPM3 completely if all you need is bare-metal provisioning via Kubernetes API.
It is completely optional to use Cluster API. You can use only the
Baremetal Operator and skip CAPM3 completely if all you need is
bare-metal provisioning via Kubernetes API.
5 changes: 4 additions & 1 deletion _faqs/what-is-Ironic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
question: What is Ironic and how does Metal3 relate to it?
---

Ironic is a bare metal provisioner, it handles provisioning of physical machines. Metal3 exposes a part of the Ironic functionality as a Kubernetes native API via the Baremetal Operator. Ironic is not part of Metal3 but Metal3 relies on Ironic to provision the bare metal hosts.
Ironic is a bare metal provisioner, it handles provisioning of physical
machines. Metal3 exposes a part of the Ironic functionality as a
Kubernetes native API via the Baremetal Operator. Ironic is not part of
Metal3 but Metal3 relies on Ironic to provision the bare metal hosts.
8 changes: 7 additions & 1 deletion _faqs/what-is-an-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
question: What is an operator?
---

An Operator is a method of packaging, deploying and managing a Kubernetes application. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling. You can think of Operators as the runtime that manages this type of application on Kubernetes. If you want to learn more about Operators you can check the Operator framework website [https://operatorframework.io/what/](https://operatorframework.io/what/)
An Operator is a method of packaging, deploying and managing a
Kubernetes application. A Kubernetes application is an application that
is both deployed on Kubernetes and managed using the Kubernetes APIs and
kubectl tooling. You can think of Operators as the runtime that manages
this type of application on Kubernetes. If you want to learn more about
Operators you can check the Operator framework website
[https://operatorframework.io/what/](https://operatorframework.io/what/)
4 changes: 3 additions & 1 deletion _faqs/what-is-cleaning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: What is cleaning? Can I disable it?
---

Cleaning removes partitioning information from the disks to avoid conflicts with the new operating system. See [automated cleaning](https://book.metal3.io/bmo/automated_cleaning) for details.
Cleaning removes partitioning information from the disks to avoid
conflicts with the new operating system. See
[automated cleaning](https://book.metal3.io/bmo/automated_cleaning) for details.
6 changes: 5 additions & 1 deletion _faqs/what-is-inspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
question: What is inspection? Can I disable it?
---

Inspection is used to populate hardware information in the BareMetalHost objects. You can [disable it](https://book.metal3.io/bmo/external_inspection), but you may need to populate this information yourself. Do not blindly disable inspection if it fails - chances are high the subsequent operations fail the same way.
Inspection is used to populate hardware information in the BareMetalHost
objects. You can [disable it](https://book.metal3.io/bmo/external_inspection),
but you may need to populate this information yourself. Do not blindly
disable inspection if it fails - chances are high the subsequent
operations fail the same way.
4 changes: 3 additions & 1 deletion _faqs/what-is-ipxe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: What is iPXE?
---

The iPXE project develops firmware for booting machines over the network. It's a more feature-rich alternative to the well known PXE and can be used as an add-on on top of PXE.
The iPXE project develops firmware for booting machines over the
network. It's a more feature-rich alternative to the well known PXE and
can be used as an add-on on top of PXE.
3 changes: 2 additions & 1 deletion _faqs/what-is-virtual-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
question: What is virtual media?
---

Virtual media is a technology that allows booting an ISO on a remote machine without resorting to network boot (e.g. PXE).
Virtual media is a technology that allows booting an ISO on a remote
machine without resorting to network boot (e.g. PXE).
4 changes: 3 additions & 1 deletion _faqs/why-use-Ironic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
question: Why use Ironic?
---

Ironic is an established service with a long history of production usage and good support for industry standards. By using it, Metal3 can concentrate on providing the best integration with Kubernetes.
Ironic is an established service with a long history of production usage
and good support for industry standards. By using it, Metal3 can
concentrate on providing the best integration with Kubernetes.
4 changes: 4 additions & 0 deletions _includes/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Reference: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2yaml

config:
first-line-h1: false
13 changes: 9 additions & 4 deletions _includes/docs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!-- markdownlint-disable MD013 -->
## Around the Web

### Conference Talks

- [Metal³: Deploy Kubernetes on Bare Metal - Yolanda Robla - Shift Dev 2019]({% post_url 2020-01-20-metal3_deploy_kubernetes_on_bare_metal %})
- [Introducing metal3 kubernetes native bare metal host management - Kubecon NA 2019]({% post_url 2019-12-04-Introducing_metal3_kubernetes_native_bare_metal_host_management %})
- [Metal3: Deploy Kubernetes on Bare Metal - Yolanda Robla - Shift Dev 2019]({% post_url 2020-01-20-metal3_deploy_kubernetes_on_bare_metal %})
- [Introducing Metal3 kubernetes native bare metal host management - Kubecon NA 2019]({% post_url 2019-12-04-Introducing_metal3_kubernetes_native_bare_metal_host_management %})
- [Extend Your Data Center to the Hybrid Edge - Red Hat Summit, May 2019]({% post_url 2019-11-13-Extend_Your_Data_Center_to_the_Hybrid_Edge-Red_Hat_Summit %})
- [OpenStack Ironic and Bare Metal Infrastructure: All Abstractions Start Somewhere - Chris Hoge, OpenStack Foundation; Julia Kreger, Red Hat]({% post_url 2019-10-31-OpenStack-Ironic-and-Bare-Metal-Infrastructure_All-Abstractions-Start-Somewhere %})
- [Kubernetes-native Infrastructure: Managed Baremetal with Kubernetes Operators and OpenStack Ironic - Steve Hardy, Red Hat]({% post_url 2019-11-07-Kubernetes-native_Infrastructure-Managed_Baremetal_with_Kubernetes_Operators_and_OpenStack_Ironic %})
Expand All @@ -13,10 +14,14 @@
- [The New Stack: Metal3 Uses OpenStack's Ironic for Declarative Bare Metal Kubernetes]({% post_url 2019-05-13-The_new_stack_Metal3_Uses_OpenStack_Ironic_for_Declarative_Bare_Metal_Kubernetes %})
- [The Register: Raise some horns: Red Hat's MetalKube aims to make Kubernetes on bare machines simple]({% post_url 2019-04-12-Raise_some_horns_Red_Hat_s_MetalKube_aims_to_make_Kubernetes_on_bare_machines_simple %})

<!-- markdownlint-enable MD013 -->

### Blog Posts

- [Metal³ Blog posts](/blog/)
- [Metal3 Blog posts](/blog/)

### Community Meetups

- Join Metal³ Team Meetups to engage in discussion with members and help with a deeper understanding of the project as well as the future discussion
- Join Metal3 Team Meetups to engage in discussion with members and help
with a deeper understanding of the project as well as the future
discussion
22 changes: 17 additions & 5 deletions _includes/privacy-statement.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
## Privacy Statement for the Metal³ Project
## Privacy Statement for the Metal3 Project

As Metal3.io and most of the infrastructure of the Metal³ Project are currently hosted by Red Hat Inc., this site falls under the [Red Hat Privacy Policy](https://www.redhat.com/en/about/privacy-policy){:target="\_blank"}. All terms of that privacy policy apply to this site. Should we change our hosting in the future, this Privacy Policy will be updated.
As Metal3.io and most of the infrastructure of the Metal3 Project are
currently hosted by Red Hat Inc., this site falls under the
[Red Hat Privacy Policy](https://www.redhat.com/en/about/privacy-policy){:target="\_blank"}.
All terms of that privacy policy apply to this site. Should we change
our hosting in the future, this Privacy Policy will be updated.

### How to Contact Us

If you have any questions about any of these practices or Metal³'s use of your personal information, please feel free to [contact us](mailto:privacy@metal3.io) or [file an Issue](https://github.com/metal3-io/metal3-io.github.io/issues){:target="\_blank"} in our GitHub repo.
If you have any questions about any of these practices or Metal3's use
of your personal information, please feel free to [contact
us](mailto:privacy@metal3.io) or [file an
Issue](https://github.com/metal3-io/metal3-io.github.io/issues){:target="\_blank"}
in our GitHub repo.

Metal³ will work with you to resolve any concerns you may have about this Statement.
Metal3 will work with you to resolve any concerns you may have about
this Statement.

### Changes to this Privacy Statement

Metal³ reserves the right to change this policy from time to time. If we do make changes, the revised Privacy Statement will be posted on this site. A notice will be posted on our blog and/or mailing lists whenever this privacy statement is changed in a material way.
Metal3 reserves the right to change this policy from time to time. If we
do make changes, the revised Privacy Statement will be posted on this
site. A notice will be posted on our blog and/or mailing lists whenever
this privacy statement is changed in a material way.

This Privacy Statement was last amended on September 25, 2019.
5 changes: 5 additions & 0 deletions _posts/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reference: https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2yaml

config:
line-length: false
first-line-h1: false
Loading

0 comments on commit 936557a

Please sign in to comment.