Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource policy documentation #6

Merged
merged 7 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## The NRI Plugin Collection Project Community Code of Conduct
# The NRI Plugins Project Community Code of Conduct

The NRI Plugin Collection Project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).
The NRI Plugins Project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ LDFLAGS = \
-X=github.com/containers/nri-plugins/pkg/version.Build=$(BUILD_BUILDID) \
-B 0x$(RANDOM_ID)"

# Documentation-related variables
SPHINXOPTS ?= -W
SPHINXBUILD = sphinx-build
SITE_BUILDDIR ?= build/docs

# Docker base command for working with html documentation.
DOCKER_SITE_BUILDER_IMAGE := nri-plugins-site-builder
DOCKER_SITE_CMD := $(DOCKER) run --rm -v "`pwd`:/docs" --user=`id -u`:`id -g` \
-p 8081:8081 \
-e SITE_BUILDDIR=$(SITE_BUILDDIR) -e SPHINXOPTS=$(SPHINXOPTS)

#
# top-level targets
#
Expand Down Expand Up @@ -329,3 +340,33 @@ report-licenses:
--ignore github.com/containers/nri-plugins \
> $(LICENSE_PATH)/licenses.csv && \
echo See $(LICENSE_PATH)/licenses.csv for license information

#
# Rules for documentation
#

html: clean-html
$(Q)BUILD_VERSION=$(BUILD_VERSION) \
$(SPHINXBUILD) -c docs . "$(SITE_BUILDDIR)" $(SPHINXOPTS)
cp docs/index.html "$(SITE_BUILDDIR)"
for d in $$(find docs -name figures -type d); do \
mkdir -p $(SITE_BUILDDIR)/$$d && cp $$d/* $(SITE_BUILDDIR)/$$d; \
done

serve-html: html
$(Q)cd $(SITE_BUILDDIR) && python3 -m http.server 8081

clean-html:
rm -rf $(SITE_BUILDDIR)

site-build: .$(DOCKER_SITE_BUILDER_IMAGE).image.stamp
$(Q)$(DOCKER_SITE_CMD) $(DOCKER_SITE_BUILDER_IMAGE) make html

site-serve: .$(DOCKER_SITE_BUILDER_IMAGE).image.stamp
$(Q)$(DOCKER_SITE_CMD) -it $(DOCKER_SITE_BUILDER_IMAGE) make serve-html

.$(DOCKER_SITE_BUILDER_IMAGE).image.stamp: docs/Dockerfile docs/requirements.txt
docker build -t $(DOCKER_SITE_BUILDER_IMAGE) docs
touch $@

docs: site-build
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NRI Plugin Collection
# NRI Plugins

This repository contains a collection of community maintained NRI plugins.

Expand All @@ -9,4 +9,4 @@ Currently following plugins are available:
| [Topology Aware][1] | resource policy |
| [Balloons][1] | resource policy |

[1]: http://github.com/containers/nri-plugins/blob/main/docs/README-resource-policy.md
[1]: http://github.com/containers/nri-plugins/blob/main/docs/resource-policy/README.md
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Security and Disclosure Information Policy for the NRI Plugin Collection Project
# Security and Disclosure Information Policy for the NRI Plugins Project

* [Reporting a Vulnerability](#Reporting-a-Vulnerability)
* [Security Announcements](#Security-Announcements)
* [Security Vulnerability Response](#Security-Vulnerability-Response)

## Reporting a Vulnerability

If you think you've identified a security issue in a NRI Plugin Collection project,
If you think you've identified a security issue in a NRI Plugins project,
please DO NOT report the issue publicly via the Github issue tracker,
mailing list, or IRC. Instead, send an email with as many details as
possible to [[email protected]](mailto:[email protected]?subject=Security%20Vunerablity%20Report) or [[email protected]](mailto:[email protected]?subject=Security%20Vunerablity%20Report).
Expand Down
13 changes: 13 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM sphinxdoc/sphinx:5.3.0

RUN apt-get update && apt-get install -y wget git

# Note: Any golang version that can 'go list -m -f {{.Variable}}' is fine...
RUN wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz

ENV PATH=$PATH:/usr/local/go/bin

COPY requirements.txt .

RUN pip3 install -r requirements.txt
35 changes: 35 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{%- extends "!layout.html" %}

{% block footer %}
{% if versions_menu %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> GitHub Pages</span>
{{ versions_menu_this_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl id="versions">
<dt>{{ _('Versions') }}</dt>
</dl>
<dl>
<dt>
<a href="/containers/nri-plugins/releases">all releases</a>
</dt>
</dl>
</div>
</div>
{% endif %}
<script src="{{ pathto('../versions.js', 1) }}"></script>
<script>
var list = document.getElementById('versions')
var menuItems = getVersionsMenuItems();
for (var i=0; i < menuItems.length; i++) {
var item = document.createElement('dd');
var anchor = item.appendChild(document.createElement('a'));
anchor.appendChild(document.createTextNode(menuItems[i].name));
anchor.href = menuItems[i].url;
list.appendChild(item);
}
</script>
{% endblock %}
Loading