diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 515ed51dd..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,158 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -W -n -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -STATIC_BUILD_DIR = _static -DIAGRAM_BUILD_DIR = _diagrams -DIAGRAM_SOURCE_DIR = diagrams_src -PULP_URL = "http://localhost:24817" - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -rm -rf $(DIAGRAM_BUILD_DIR)/* - -diagrams: -ifneq ($(wildcard $(DIAGRAM_SOURCE_DIR)), ) - mkdir -p $(DIAGRAM_BUILD_DIR) - python3 -m plantuml $(DIAGRAM_SOURCE_DIR)/*.dot - mv $(DIAGRAM_SOURCE_DIR)/*.png $(DIAGRAM_BUILD_DIR)/ -else - @echo "Did not find $(DIAGRAM_SOURCE_DIR)." -endif - -$(STATIC_BUILD_DIR)/api.json: - mkdir -p $(STATIC_BUILD_DIR) - if pulp debug has-plugin --name core --specifier ">=3.44.0.dev"; \ - then \ - curl --fail -o $(STATIC_BUILD_DIR)/api.json "$(PULP_URL)/pulp/api/v3/docs/api.json?component=rpm&include_html=1"; \ - else \ - curl --fail -o $(STATIC_BUILD_DIR)/api.json "$(PULP_URL)/pulp/api/v3/docs/api.json?plugin=pulp_rpm&include_html=1"; \ - fi - -html: $(STATIC_BUILD_DIR)/api.json - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/_scripts/add_remove.sh b/docs/_scripts/add_remove.sh deleted file mode 100755 index 055cafa46..000000000 --- a/docs/_scripts/add_remove.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Add created RPM content to repository -echo "Add created RPM Package to repository." -TASK_URL=$(http POST "$BASE_ADDR""$REPO_HREF"'modify/' \ - add_content_units:="[\"$PACKAGE_HREF\"]" | jq -r '.task') -export TASK_URL - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new repository version -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF_WITH_PKG=$(http "$BASE_ADDR""$TASK_URL" | jq -r '.created_resources | first') -export REPOVERSION_HREF_WITH_PKG - -echo "Inspecting RepositoryVersion." -http "$BASE_ADDR""$REPOVERSION_HREF_WITH_PKG" \ No newline at end of file diff --git a/docs/_scripts/add_remove_cli.sh b/docs/_scripts/add_remove_cli.sh deleted file mode 100755 index fd0b9756f..000000000 --- a/docs/_scripts/add_remove_cli.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Add created RPM content to repository -echo "Add created RPM Package to repository." -TASK_HREF=$(pulp rpm repository content modify \ - --repository "${REPO_NAME}" \ - --add-content "[{\"pulp_href\": \"${PACKAGE_HREF}\"}]" \ - 2>&1 >/dev/null | awk '{print $4}') - -# After the task is complete, it gives us a new repository version -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF=$(pulp show --href "${TASK_HREF}" \ - | jq -r '.created_resources | first') - -echo "Inspecting RepositoryVersion." -pulp show --href "${REPOVERSION_HREF}" diff --git a/docs/_scripts/advisory.sh b/docs/_scripts/advisory.sh deleted file mode 100755 index 028bbe110..000000000 --- a/docs/_scripts/advisory.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Get advisory -echo '{ - "updated": "2014-09-28 00:00:00", - "issued": "2014-09-24 00:00:00", - "id": "RHSA-XXXX:XXXX" -}' > advisory.json -export ADVISORY="advisory.json" - -# Upload advisory -echo "Upload advisory in JSON format." -TASK_URL=$(http --form POST "$BASE_ADDR"/pulp/api/v3/content/rpm/advisories/ \ - file@./"$ADVISORY" repository="$REPO_HREF" | jq -r '.task') -export TASK_URL - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new repository version -echo "Set ADVISORY_HREF from finished task." -ADVISORY_HREF=$(http "$BASE_ADDR""$TASK_URL" \ - | jq -r '.created_resources | .[] | match(".*advisories.*") | .string') -export ADVISORY_HREF - -echo "Inspecting advisory." -http "$BASE_ADDR""$ADVISORY_HREF" diff --git a/docs/_scripts/advisory_cli.sh b/docs/_scripts/advisory_cli.sh deleted file mode 100755 index bef5c88e0..000000000 --- a/docs/_scripts/advisory_cli.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Get advisory -echo '{ - "updated": "2014-09-28 00:00:00", - "issued": "2014-09-24 00:00:00", - "id": "RHSA-XXXX:XXXX" -}' > advisory.json -export ADVISORY="advisory.json" - -# Upload advisory -echo "Upload advisory in JSON format." -TASK_URL=$(http --form POST "${BASE_ADDR}"/pulp/api/v3/content/rpm/advisories/ \ - file@./"${ADVISORY}" repository="${REPO_HREF}" | jq -r '.task') -export TASK_URL - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "${BASE_ADDR}""${TASK_URL}" - -# After the task is complete, it gives us a new repository version -echo "Set ADVISORY_HREF from finished task." -ADVISORY_HREF=$(http "${BASE_ADDR}""${TASK_URL}" \ - | jq -r '.created_resources | .[] | match(".*advisories.*") | .string') -export ADVISORY_HREF - -echo "Inspecting advisory." -pulp show --href "${ADVISORY_HREF}" diff --git a/docs/_scripts/artifact.sh b/docs/_scripts/artifact.sh deleted file mode 100755 index cbc0b3ead..000000000 --- a/docs/_scripts/artifact.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Get an RPM package -if [[ -n "$1" ]]; then - export REMOTE_FILE="$1" -else - export REMOTE_FILE="https://fixtures.pulpproject.org/rpm-signed/squirrel-0.1-1.noarch.rpm" -fi -curl -O "$REMOTE_FILE" -PKG="$(basename $REMOTE_FILE)" -export PKG - -# Upload it as an Artifact -echo "Upload an RPM package." -ARTIFACT_HREF=$(http --form POST "$BASE_ADDR"/pulp/api/v3/artifacts/ \ - file@./"$PKG" | jq -r '.pulp_href') -export ARTIFACT_HREF - -echo "Inspecting artifact." -http "$BASE_ADDR""$ARTIFACT_HREF" diff --git a/docs/_scripts/artifact_cli.sh b/docs/_scripts/artifact_cli.sh deleted file mode 100755 index 2220d2aa6..000000000 --- a/docs/_scripts/artifact_cli.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Get an RPM package -if [[ -n "$1" ]]; then - export REMOTE_FILE="$1" -else - export REMOTE_FILE="https://fixtures.pulpproject.org/rpm-signed/squirrel-0.1-1.noarch.rpm" -fi -curl -O "${REMOTE_FILE}" -PKG="$(basename ${REMOTE_FILE})" -export PKG - -# Upload it as an Artifact -echo "Upload an RPM package." -ARTIFACT_HREF=$(pulp artifact upload --file "${PKG}" | jq -r '.pulp_href') -ARTIFACT_SHA256=$(pulp show --href "${ARTIFACT_HREF}" | jq -r '.sha256') -export ARTIFACT_HREF -export ARTIFACT_SHA256 - -echo "Inspecting artifact." -pulp show --href "${ARTIFACT_HREF}" diff --git a/docs/_scripts/base.sh b/docs/_scripts/base.sh deleted file mode 100755 index e860ef242..000000000 --- a/docs/_scripts/base.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Setting environment variables for default hostname/port for the API and the Content app" -BASE_ADDR=${BASE_ADDR:-http://localhost:24817} -export BASE_ADDR -CONTENT_ADDR=${CONTENT_ADDR:-http://localhost:24816} -export CONTENT_ADDR - -# Necessary for `django-admin` -export DJANGO_SETTINGS_MODULE=pulpcore.app.settings - -# Poll a Pulp task until it is finished. -wait_until_task_finished() { - echo "Polling the task until it has reached a final state." - local task_url=$1 - while true - do - response=$(http "$task_url") - local response - state=$(jq -r .state <<< "${response}") - local state - jq . <<< "${response}" - case ${state} in - failed|canceled) - echo "Task in final state: ${state}" - exit 1 - ;; - completed) - echo "$task_url complete." - break - ;; - *) - echo "Still waiting..." - sleep 1 - ;; - esac - done -} diff --git a/docs/_scripts/base_cli.sh b/docs/_scripts/base_cli.sh deleted file mode 100755 index c6e35ab7a..000000000 --- a/docs/_scripts/base_cli.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "Setting environment variables for default hostname/port for the API and the Content app" -BASE_ADDR=${BASE_ADDR:-http://localhost:24817} -export BASE_ADDR -CONTENT_ADDR=${CONTENT_ADDR:-http://localhost:24816} -export CONTENT_ADDR - -# Necessary for `django-admin` -export DJANGO_SETTINGS_MODULE=pulpcore.app.settings - -# Set up a config for pulp-cli -if [ ! -f ${HOME}/.config/pulp/cli.toml ] -then - pulp config create --username admin --password password --base-url "${BASE_ADDR}" --no-verify-ssl -fi - -# Poll a Pulp task until it is finished (needed when using httpie to make requests) -wait_until_task_finished() { - echo "Polling the task until it has reached a final state." - local task_url=$1 - while true - do - response=$(http "$task_url") - local response - state=$(jq -r .state <<< "${response}") - local state - jq . <<< "${response}" - case ${state} in - failed|canceled) - echo "Task in final state: ${state}" - exit 1 - ;; - completed) - echo "$task_url complete." - break - ;; - *) - echo "Still waiting..." - sleep 1 - ;; - esac - done -} diff --git a/docs/_scripts/copy_basic.sh b/docs/_scripts/copy_basic.sh deleted file mode 100755 index 709a1de6b..000000000 --- a/docs/_scripts/copy_basic.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -# Add content unit to the repository -echo "Add and then remove content from repository." -TASK_URL=$(http POST "$BASE_ADDR""$REPO_HREF"'modify'/ add_content_units:="[\"$PACKAGE_HREF\"]" | jq -r '.task') -wait_until_task_finished "$BASE_ADDR""$TASK_URL" -REPOVERSION_HREF_WITH_PKG=$(http "$BASE_ADDR""$TASK_URL" | jq -r '.created_resources | first') -export REPOVERSION_HREF_WITH_PKG - -# Remove content units from the repository -http POST "$BASE_ADDR""$REPO_HREF"'modify'/ remove_content_units:="[\"$PACKAGE_HREF\"]" - -# Clone a repository (can be composed with addition or removal of units) -# This operation will create a new repository version in the current repository which -# is a copy of the one specified as the 'base_version', regardless of what content -# was previously present in the repository. -echo "Clone a repository with a content." -TASK_URL=$(http POST "$BASE_ADDR""$REPO_HREF"'modify'/ \ - base_version="$REPOVERSION_HREF_WITH_PKG" | jq -r '.task') - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new repository version -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF=$(http "$BASE_ADDR""$TASK_URL"| jq -r '.created_resources | first') -export REPOVERSION_HREF - -echo "Inspecting RepositoryVersion." -http "$BASE_ADDR""$REPOVERSION_HREF" diff --git a/docs/_scripts/copy_basic_cli.sh b/docs/_scripts/copy_basic_cli.sh deleted file mode 100755 index bc0b6e75e..000000000 --- a/docs/_scripts/copy_basic_cli.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Add content unit to the repository -echo "Add and then remove content from repository." - -TASK_HREF=$(pulp rpm repository content modify \ - --repository "${REPO_NAME}" \ - --add-content "[{\"pulp_href\": \"${PACKAGE_HREF}\"}]" \ - 2>&1 >/dev/null | awk '{print $4}') -REPOVERSION_HREF=$(pulp show --href "${TASK_HREF}" | jq -r '.created_resources | first') -REPOVERSION=$(echo "${REPOVERSION_HREF}" | cut -d "/" -f 10) -export REPOVERSION - -# Remove content units from the repository -pulp rpm repository content modify \ - --repository "${REPO_NAME}" \ - --remove-content "[{\"pulp_href\": \"${PACKAGE_HREF}\"}]" - -# Clone a repository (can be composed with addition or removal of units) -# This operation will create a new repository version in the current repository which -# is a copy of the one specified as the 'base_version', regardless of what content -# was previously present in the repository. -echo "Clone a repository with a content." -TASK_HREF=$(pulp rpm repository content modify \ - --repository "${REPO_NAME}" \ - --base-version "${REPOVERSION}" \ - 2>&1 >/dev/null | awk '{print $4}') - -# After the task is complete, it gives us a new repository version -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF=$(pulp show --href "${TASK_HREF}" | jq -r '.created_resources | first') -export REPOVERSION_HREF - -echo "Inspecting RepositoryVersion." -pulp show --href "${REPOVERSION_HREF}" diff --git a/docs/_scripts/distribution.sh b/docs/_scripts/distribution.sh deleted file mode 100755 index a39d124db..000000000 --- a/docs/_scripts/distribution.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# Variables -if [ $# -eq 0 ]; then - BASE_PATH="foo" -else - BASE_PATH="$1" -fi -export BASE_PATH - -# Create RPM distribution for publication -TASK_URL=$(http POST "$BASE_ADDR"/pulp/api/v3/distributions/rpm/rpm/ \ - publication="$PUBLICATION_HREF" name="$BASE_PATH" base_path="$REPO_NAME" | jq -r '.task') - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new distribution -echo "Set DISTRIBUTION_HREF from finished task." -DISTRIBUTION_HREF=$(http "$BASE_ADDR""$TASK_URL"| jq -r '.created_resources | first') -export DISTRIBUTION_HREF - -echo "Inspecting Distribution." -http "$BASE_ADDR""$DISTRIBUTION_HREF" \ No newline at end of file diff --git a/docs/_scripts/distribution_cli.sh b/docs/_scripts/distribution_cli.sh deleted file mode 100755 index 11fd6fa61..000000000 --- a/docs/_scripts/distribution_cli.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Variables -if [ $# -eq 0 ]; then - BASE_PATH="foo" -else - BASE_PATH="$1" -fi -export BASE_PATH - -# Create RPM distribution for publication -pulp rpm distribution create \ - --name "${DIST_NAME}" \ - --base-path "${BASE_PATH}" \ - --publication "${PUBLICATION_HREF}" - -# After the task is complete, it gives us a new distribution -pulp rpm distribution show --name "${DIST_NAME}" diff --git a/docs/_scripts/docs_check_copy.sh b/docs/_scripts/docs_check_copy.sh deleted file mode 100755 index d2fcf7e00..000000000 --- a/docs/_scripts/docs_check_copy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie, jq, curl and requires a .netrc for authentication with Pulp - -# From the _scripts directory, run with `source docs_check_copy.sh` (source to preserve -# the environment variables) - -export REPO_NAME="copy-repo" -export DIST_NAME="copy-dist" -export REMOTE_ARTIFACT="https://fixtures.pulpproject.org/rpm-signed/shark-0.1-1.noarch.rpm" - -source base.sh -source repo.sh "$REPO_NAME" - -source artifact.sh $REMOTE_ARTIFACT -source package.sh -source copy_basic.sh - -source publication.sh -source distribution.sh "$DIST_NAME" -source download.sh diff --git a/docs/_scripts/docs_check_copy_cli.sh b/docs/_scripts/docs_check_copy_cli.sh deleted file mode 100755 index 5dba15395..000000000 --- a/docs/_scripts/docs_check_copy_cli.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie (requires a .netrc for authentication), jq, curl and pulp-cli - -# From the _scripts directory, run with `source docs_check_copy.sh` (source to preserve -# the environment variables) - -export REPO_NAME="copy-repo" -export DIST_NAME="copy-dist" -export REMOTE_ARTIFACT="https://fixtures.pulpproject.org/rpm-signed/shark-0.1-1.noarch.rpm" - -source base_cli.sh -source repo_cli.sh "${REPO_NAME}" - -source artifact_cli.sh ${REMOTE_ARTIFACT} -source package_cli.sh -source copy_basic_cli.sh - -source publication_cli.sh -source distribution_cli.sh "${DIST_NAME}" -source download_cli.sh diff --git a/docs/_scripts/docs_check_delete.sh b/docs/_scripts/docs_check_delete.sh deleted file mode 100644 index 9b0134752..000000000 --- a/docs/_scripts/docs_check_delete.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie, jq, curl and requires a .netrc for authentication with Pulp - -# From the _scripts directory, run with `source docs_check_copy.sh` (source to preserve -# the environment variables) - -export REPO_NAME="delete-repo" -export DIST_NAME="delete-dist" -export REMOTE_ARTIFACT="https://fixtures.pulpproject.org/rpm-signed/penguin-0.9.1-1.noarch.rpm" - -source base.sh -source repo.sh "$REPO_NAME" - -source artifact.sh $REMOTE_ARTIFACT -source package.sh -source remove_content.sh diff --git a/docs/_scripts/docs_check_install_with_signed_repodata.sh b/docs/_scripts/docs_check_install_with_signed_repodata.sh deleted file mode 100755 index 2792a24f7..000000000 --- a/docs/_scripts/docs_check_install_with_signed_repodata.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# From the _scripts directory, run with `source docs_check_install_with_signed_repodata.sh` (source -# to preserve the environment variables) -export REPO_NAME="signed-repo" -export DIST_NAME="signed-dist" - -source base.sh - -source repo_with_signing_service.sh "$REPO_NAME" -source remote.sh -source sync.sh -source publication.sh -source distribution.sh "$DIST_NAME" -source install_from_signed_repository.sh diff --git a/docs/_scripts/docs_check_install_with_signed_repodata_cli.sh b/docs/_scripts/docs_check_install_with_signed_repodata_cli.sh deleted file mode 100755 index 911805174..000000000 --- a/docs/_scripts/docs_check_install_with_signed_repodata_cli.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. -# NOTE: These scripts use httpie (requires a .netrc for authentication), jq, curl and pulp-cli -# From the _scripts directory, run with `source docs_check_install_with_signed_repodata.sh` (source -# to preserve the environment variables) -export REPO_NAME="signed-repo" -export REMOTE_NAME="signed-remote" -export DIST_NAME="signed-dist" - -source base_cli.sh - -source repo_with_signing_service_cli.sh "${REPO_NAME}" -source remote_cli.sh "${REMOTE_NAME}" -source sync_cli.sh -source publication_cli.sh -source distribution_cli.sh "${DIST_NAME}" -source install_from_signed_repository_cli.sh diff --git a/docs/_scripts/docs_check_reset.sh b/docs/_scripts/docs_check_reset.sh deleted file mode 100755 index e9214c80f..000000000 --- a/docs/_scripts/docs_check_reset.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# This script (attempts to) clean up the repositories and remotes created by the docs_check_* scripts. -# -# NOTE: This script relies on pulp-cli being installed and configured to point to your Pulp instance. -# -# From the _scripts directory, run with `docs_check_reset.sh` - -REPO_NAME="copy-repo" -DIST_NAME="copy-dist" -pulp rpm repository destroy --name "${REPO_NAME}" -pulp rpm distribution destroy --name "${DIST_NAME}" - -REPO_NAME="signed-repo" -REMOTE_NAME="signed-remote" -DIST_NAME="signed-dist" -pulp rpm repository destroy --name "${REPO_NAME}" -pulp rpm remote destroy --name "${REMOTE_NAME}" -pulp rpm distribution destroy --name "${DIST_NAME}" - -REPO_NAME="sync-repo" -REMOTE_NAME="sync-remote" -DIST_NAME="sync-dist" -pulp rpm repository destroy --name "${REPO_NAME}" -pulp rpm remote destroy --name "${REMOTE_NAME}" -pulp rpm distribution destroy --name "${DIST_NAME}" - -REPO_NAME="upload-repo" -DIST_NAME="upload-dist" -pulp rpm repository destroy --name "${REPO_NAME}" -pulp rpm distribution destroy --name "${DIST_NAME}" - -REPO_NAME="delete-repo" -pulp rpm repository destroy --name "${REPO_NAME}" - -echo "Sleep 60 for orphan-cleanup..." -sleep 60 -pulp orphan cleanup --protection-time 1 diff --git a/docs/_scripts/docs_check_sync.sh b/docs/_scripts/docs_check_sync.sh deleted file mode 100755 index cb0dff40a..000000000 --- a/docs/_scripts/docs_check_sync.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie, jq and requires a .netrc for authentication with Pulp - -# From the _scripts directory, run with `source docs_check_sync_publish.sh` (source to preserve the -# environment variables) - -export REPO_NAME="sync-repo" -export DIST_NAME="sync-dist" - -source base.sh - -source repo.sh "$REPO_NAME" -source remote.sh -source sync.sh - -source publication.sh -source distribution.sh "$DIST_NAME" - -source download.sh \ No newline at end of file diff --git a/docs/_scripts/docs_check_sync_cli.sh b/docs/_scripts/docs_check_sync_cli.sh deleted file mode 100755 index d383b510e..000000000 --- a/docs/_scripts/docs_check_sync_cli.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie (requires a .netrc for authentication), jq, curl and pulp-cli - -# From the _scripts directory, run with `source docs_check_sync_publish.sh` (source to preserve the -# environment variables) - -export REPO_NAME="sync-repo" -export REMOTE_NAME="sync-remote" -export DIST_NAME="sync-dist" - -source base_cli.sh - -source repo_cli.sh "${REPO_NAME}" -source remote_cli.sh "${REMOTE_NAME}" -source sync_cli.sh - -source publication_cli.sh -source distribution_cli.sh "${DIST_NAME}" - -source download_cli.sh \ No newline at end of file diff --git a/docs/_scripts/docs_check_upload.sh b/docs/_scripts/docs_check_upload.sh deleted file mode 100755 index 074968743..000000000 --- a/docs/_scripts/docs_check_upload.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie, jq, curl and requires a .netrc for authentication with Pulp - -# From the _scripts directory, run with `source docs_check_upload.sh` (source to preserve -# the environment variables) - -export REPO_NAME="upload-repo" -export DIST_NAME="upload-dist" - -source base.sh -source repo.sh "$REPO_NAME" - -source artifact.sh -source package.sh -source add_remove.sh -source advisory.sh - -source publication.sh -source distribution.sh "$DIST_NAME" -source download.sh diff --git a/docs/_scripts/docs_check_upload_cli.sh b/docs/_scripts/docs_check_upload_cli.sh deleted file mode 100755 index c0bccb33c..000000000 --- a/docs/_scripts/docs_check_upload_cli.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# This script will execute the component scripts and ensure that the documented examples -# work as expected. - -# NOTE: These scripts use httpie (requires a .netrc for authentication), jq, curl and pulp-cli - -# From the _scripts directory, run with `source docs_check_upload.sh` (source to preserve -# the environment variables) - -export REPO_NAME="upload-repo" -export DIST_NAME="upload-dist" - -source base_cli.sh -source repo_cli.sh "${REPO_NAME}" - -source artifact_cli.sh -source package_cli.sh -source add_remove_cli.sh -source advisory_cli.sh - -source publication_cli.sh -source distribution_cli.sh "${DIST_NAME}" -source download_cli.sh diff --git a/docs/_scripts/download.sh b/docs/_scripts/download.sh deleted file mode 100755 index 00d387696..000000000 --- a/docs/_scripts/download.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -# Download a package - -# Specify one package from repository used in 'remote.sh' -if [ -z "$PKG" ]; then - PKG="fox-1.1-2.noarch.rpm" -fi - -SHORT="${PKG:0:1}" - -# The distribution will return a url that can be used by http clients -echo "Setting DISTRIBUTION_BASE_URL, which is used to retrieve content from the content app." -DISTRIBUTION_BASE_URL=$(http "$BASE_ADDR""$DISTRIBUTION_HREF" | jq -r '.base_url') -export DISTRIBUTION_BASE_URL - -# If Pulp was installed without CONTENT_HOST set, it's just the path. -# And httpie will default to localhost:80 -if [[ "${DISTRIBUTION_BASE_URL:0:1}" = "/" ]]; then - DISTRIBUTION_BASE_URL="$CONTENT_ADDR""$DISTRIBUTION_BASE_URL" -fi - -# Download a package from the distribution -echo "Download a package from the distribution." -http -d "$DISTRIBUTION_BASE_URL"Packages/"$SHORT"/"$PKG" diff --git a/docs/_scripts/download_cli.sh b/docs/_scripts/download_cli.sh deleted file mode 100755 index 2e260c78c..000000000 --- a/docs/_scripts/download_cli.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -# Download a package - -# Specify one package from repository used in 'remote.sh' -if [ -z "${PKG}" ]; then - PKG="fox-1.1-2.noarch.rpm" -fi - -SHORT="${PKG:0:1}" - -# The distribution will return a url that can be used by http clients -echo "Setting DISTRIBUTION_BASE_URL, which is used to retrieve content from the content app." -DISTRIBUTION_BASE_URL=$(pulp rpm distribution show --name "${DIST_NAME}" | jq -r '.base_url') -export DISTRIBUTION_BASE_URL - -# If Pulp was installed without CONTENT_HOST set, it's just the path. -# And httpie will default to localhost:80 -if [[ "${DISTRIBUTION_BASE_URL:0:1}" = "/" ]]; then - DISTRIBUTION_BASE_URL="${CONTENT_ADDR}""${DISTRIBUTION_BASE_URL}" -fi - -# Download a package from the distribution -echo "Download a package from the distribution." -http -d "$DISTRIBUTION_BASE_URL"Packages/"${SHORT}"/"${PKG}" diff --git a/docs/_scripts/install_from_signed_repository.sh b/docs/_scripts/install_from_signed_repository.sh deleted file mode 100755 index 80d8a59d8..000000000 --- a/docs/_scripts/install_from_signed_repository.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -BASE_URL=$(http "$BASE_ADDR""$DISTRIBUTION_HREF" | jq -r '.base_url') -BASE_PATH=$(http "$BASE_ADDR""$DISTRIBUTION_HREF" | jq -r '.base_path') -PUBLIC_KEY_URL="$BASE_URL"/repodata/repomd.xml.key - -echo "Setting up a YUM repository." -sudo dnf config-manager --add-repo "$BASE_URL" -sudo dnf config-manager --save \ - --setopt=*"$BASE_PATH".gpgcheck=0 \ - --setopt=*"$BASE_PATH".repo_gpgcheck=1 \ - --setopt=*"$BASE_PATH".gpgkey="$PUBLIC_KEY_URL" - -sudo dnf install -y walrus diff --git a/docs/_scripts/install_from_signed_repository_cli.sh b/docs/_scripts/install_from_signed_repository_cli.sh deleted file mode 100755 index 32f3b38fc..000000000 --- a/docs/_scripts/install_from_signed_repository_cli.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -BASE_URL=$(pulp rpm distribution show --name "${DIST_NAME}" | jq -r '.base_url') -BASE_PATH=$(pulp rpm distribution show --name "${DIST_NAME}" | jq -r '.base_path') -PUBLIC_KEY_URL="${BASE_URL}"/repodata/repomd.xml.key - -echo "Setting up a YUM repository." -sudo dnf config-manager --add-repo "${BASE_URL}" -sudo dnf config-manager --save \ - --setopt=*"${BASE_PATH}".gpgcheck=0 \ - --setopt=*"${BASE_PATH}".repo_gpgcheck=1 \ - --setopt=*"${BASE_PATH}".gpgkey="${PUBLIC_KEY_URL}" - -sudo dnf install --downloadonly -y walrus diff --git a/docs/_scripts/package.sh b/docs/_scripts/package.sh deleted file mode 100755 index 11eb7a7d8..000000000 --- a/docs/_scripts/package.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM package from an artifact -echo "Create RPM content from artifact." -TASK_URL=$(http POST "$BASE_ADDR"/pulp/api/v3/content/rpm/packages/ \ - artifact="$ARTIFACT_HREF" | jq -r '.task') - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new package (RPM content) -echo "Set PACKAGE_HREF from finished task." -PACKAGE_HREF=$(http "$BASE_ADDR""$TASK_URL"| jq -r '.created_resources | first') -export PACKAGE_HREF - -echo "Inspecting Package." -http "$BASE_ADDR""$PACKAGE_HREF" \ No newline at end of file diff --git a/docs/_scripts/package_cli.sh b/docs/_scripts/package_cli.sh deleted file mode 100755 index 8c63aa6f7..000000000 --- a/docs/_scripts/package_cli.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM package from an artifact -echo "Create RPM content from artifact." -PACKAGE_HREF=$(pulp rpm content create \ - --sha256 "${ARTIFACT_SHA256}" \ - | jq -r '.pulp_href') -export PACKAGE_HREF - -echo "Inspecting Package." -pulp show --href "${PACKAGE_HREF}" diff --git a/docs/_scripts/publication.sh b/docs/_scripts/publication.sh deleted file mode 100755 index 76e75976b..000000000 --- a/docs/_scripts/publication.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM publication -echo "Create a task to create a publication." -TASK_URL=$(http POST "$BASE_ADDR"/pulp/api/v3/publications/rpm/rpm/ \ - repository="$REPO_HREF" metadata_checksum_type=sha256 | jq -r '.task') - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new publication -echo "Set PUBLICATION_HREF from finished task." -PUBLICATION_HREF=$(http "$BASE_ADDR""$TASK_URL"| jq -r '.created_resources | first') -export PUBLICATION_HREF - -echo "Inspecting Publication." -http "$BASE_ADDR""$PUBLICATION_HREF" diff --git a/docs/_scripts/publication_cli.sh b/docs/_scripts/publication_cli.sh deleted file mode 100755 index 90bf69f75..000000000 --- a/docs/_scripts/publication_cli.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM publication -echo "Create a task to create a publication." -TASK_HREF=$(pulp rpm publication create \ - --repository "${REPO_NAME}" \ - 2>&1 >/dev/null | awk '{print $4}') - -# After the task is complete, it gives us a new publication -echo "Set PUBLICATION_HREF from finished task." -PUBLICATION_HREF=$(pulp show --href "${TASK_HREF}" | jq -r '.created_resources | first') -export PUBLICATION_HREF - -echo "Inspecting Publication." -pulp show --href "${PUBLICATION_HREF}" diff --git a/docs/_scripts/remote.sh b/docs/_scripts/remote.sh deleted file mode 100755 index 6b8880898..000000000 --- a/docs/_scripts/remote.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Create new RPM remote -echo "Creating a remote that points to an external source of files." -http POST "$BASE_ADDR"/pulp/api/v3/remotes/rpm/rpm/ \ - name='bar' \ - url='https://fixtures.pulpproject.org/rpm-unsigned/' \ - policy='on_demand' - -echo "Export an environment variable for the new remote URI." -REMOTE_HREF=$(http "$BASE_ADDR"/pulp/api/v3/remotes/rpm/rpm/ \ - | jq -r '.results[] | select(.name == "bar") | .pulp_href') -export REMOTE_HREF - -echo "Inspecting new Remote." -http "$BASE_ADDR""$REMOTE_HREF" diff --git a/docs/_scripts/remote_cli.sh b/docs/_scripts/remote_cli.sh deleted file mode 100755 index 718e4c269..000000000 --- a/docs/_scripts/remote_cli.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# Create new RPM remote -if [ $# -eq 0 ]; then - REMOTE_NAME="bar" -else - REMOTE_NAME="$1" -fi -export REMOTE_NAME - -echo "Creating a remote that points to an external source of files." -pulp rpm remote create \ - --name "${REMOTE_NAME}" \ - --url 'https://fixtures.pulpproject.org/rpm-unsigned/' \ - --policy 'on_demand' - -echo "Export an environment variable for the new remote URI." -REMOTE_HREF=$(pulp rpm remote show --name "${REMOTE_NAME}" | jq -r '.pulp_href') -export REMOTE_HREF - -echo "Inspecting new Remote." -pulp rpm remote show --name "${REMOTE_NAME}" diff --git a/docs/_scripts/remove_content.sh b/docs/_scripts/remove_content.sh deleted file mode 100644 index b7a990b31..000000000 --- a/docs/_scripts/remove_content.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -# Remove content from repository -echo "Removing content from ${REPO_NAME}" -export LATEST_VERSION=$(http "$BASE_ADDR/pulp/api/v3/repositories/rpm/rpm/?name=${REPO_NAME}" | jq -r '.results[0].latest_version_href') -http DELETE "${BASE_ADDR}${LATEST_VERSION}" - -echo "Removing orphan rpm contents" -http POST "$BASE_ADDR"/pulp/api/v3/orphans/cleanup/ orphan_protection_time=0 - -echo "Checking rpm contents" -export LATEST_VERSION_HREF=$(http "${BASE_ADDR}/pulp/api/v3/repositories/rpm/rpm/?name=${REPO_NAME}" | jq -r .results[0].latest_version_href) -http "${BASE_ADDR}/pulp/api/v3/content/rpm/packages/?repository_version=${LATEST_VERSION_HREF}" diff --git a/docs/_scripts/remove_content_cli.sh b/docs/_scripts/remove_content_cli.sh deleted file mode 100644 index e673ee1cc..000000000 --- a/docs/_scripts/remove_content_cli.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -# Remove content from repository -echo "Removing content from ${REPO_NAME}" -pulp rpm repository version destroy --repository $REPO_NAME - -echo "Removing orphan rpm contents" -pulp orphan cleanup --content-hrefs $(pulp rpm content list | jq -cr '.|map(.pulp_href)') --protection-time 0 - -echo "Checking rpm contents" -pulp rpm repository content list --repository $REPO_NAME diff --git a/docs/_scripts/repo.sh b/docs/_scripts/repo.sh deleted file mode 100755 index 8f98bd38f..000000000 --- a/docs/_scripts/repo.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM repository -if [ $# -eq 0 ]; then - REPO_NAME="foo" -else - REPO_NAME="$1" -fi -export REPO_NAME - -echo "Creating a new repository named $REPO_NAME." -REPO_HREF=$(http POST "$BASE_ADDR"/pulp/api/v3/repositories/rpm/rpm/ name="$REPO_NAME" \ - | jq -r '.pulp_href') -export REPO_HREF - -echo "Inspecting Repository." -http "$BASE_ADDR""$REPO_HREF" \ No newline at end of file diff --git a/docs/_scripts/repo_cli.sh b/docs/_scripts/repo_cli.sh deleted file mode 100755 index 5ec1c6811..000000000 --- a/docs/_scripts/repo_cli.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM repository -if [ $# -eq 0 ]; then - REPO_NAME="foo" -else - REPO_NAME="$1" -fi -export REPO_NAME - -echo "Creating a new repository named $REPO_NAME." -REPO_HREF=$(pulp rpm repository create --name "${REPO_NAME}" | jq -r '.pulp_href') -export REPO_HREF - -echo "Inspecting Repository." -pulp rpm repository show --name "${REPO_NAME}" \ No newline at end of file diff --git a/docs/_scripts/repo_with_signing_service.sh b/docs/_scripts/repo_with_signing_service.sh deleted file mode 100755 index f6440df3e..000000000 --- a/docs/_scripts/repo_with_signing_service.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM repository -if [ $# -eq 0 ]; then - REPO_NAME="foo" -else - REPO_NAME="$1" -fi -export REPO_NAME - -echo "Fetching the signing service." -SIGNING_SERVICE_HREF=$(http "$BASE_ADDR"/pulp/api/v3/signing-services/?name="sign-metadata" \ - | jq -r '.results[0].pulp_href') -export SIGNING_SERVICE_HREF - -echo "Creating a new repository named $REPO_NAME." -REPO_HREF=$(http POST "$BASE_ADDR"/pulp/api/v3/repositories/rpm/rpm/ name="$REPO_NAME" \ - metadata_signing_service="$SIGNING_SERVICE_HREF" \ - | jq -r '.pulp_href') -export REPO_HREF - -echo "Inspecting Repository." -http "$BASE_ADDR""$REPO_HREF" diff --git a/docs/_scripts/repo_with_signing_service_cli.sh b/docs/_scripts/repo_with_signing_service_cli.sh deleted file mode 100755 index 5eca18615..000000000 --- a/docs/_scripts/repo_with_signing_service_cli.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Create RPM repository -if [ $# -eq 0 ]; then - REPO_NAME="foo" -else - REPO_NAME="$1" -fi -export REPO_NAME - -echo "Fetching the signing service." -SIGNING_SERVICE_HREF=$(pulp signing-service show --name 'sign-metadata' | jq -r '.pulp_href') -export SIGNING_SERVICE_HREF - -echo "Creating a new repository named ${REPO_NAME}." -REPO_HREF=$(http POST "$BASE_ADDR"/pulp/api/v3/repositories/rpm/rpm/ name="${REPO_NAME}" \ - metadata_signing_service="${SIGNING_SERVICE_HREF}" \ - | jq -r '.pulp_href') -export REPO_HREF - -echo "Inspecting Repository." -pulp rpm repository show --name "${REPO_NAME}" - diff --git a/docs/_scripts/sync.sh b/docs/_scripts/sync.sh deleted file mode 100755 index 0d3f2b340..000000000 --- a/docs/_scripts/sync.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Sync repository foo using remote bar -echo "Create a task to sync the repository using the remote." -TASK_URL=$(http POST "$BASE_ADDR""$REPO_HREF"'sync/' \ - remote="$REMOTE_HREF" \ - | jq -r '.task') - -# Poll the task (here we use a function defined in docs/_scripts/base.sh) -wait_until_task_finished "$BASE_ADDR""$TASK_URL" - -# After the task is complete, it gives us a new repository version -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF=$(http "$BASE_ADDR""$TASK_URL"| jq -r '.created_resources | first') -export REPOVERSION_HREF - -echo "Inspecting RepositoryVersion." -http "$BASE_ADDR""$REPOVERSION_HREF" \ No newline at end of file diff --git a/docs/_scripts/sync_cli.sh b/docs/_scripts/sync_cli.sh deleted file mode 100755 index 66e37f6bf..000000000 --- a/docs/_scripts/sync_cli.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# Sync repository foo using remote bar -echo "Create a task to sync the repository using the remote." -pulp rpm repository update --name "${REPO_NAME}" --remote "${REMOTE_NAME}" -TASK_HREF=$(pulp rpm repository sync --name "${REPO_NAME}" \ - 2>&1 >/dev/null | awk '{print $4}') - -echo "Set REPOVERSION_HREF from finished task." -REPOVERSION_HREF=$(pulp show --href "${TASK_HREF}"| jq -r '.created_resources | first') -export REPOVERSION_HREF - -echo "Inspecting RepositoryVersion." -pulp show --href "${REPOVERSION_HREF}" diff --git a/docs/_templates/restapi.html b/docs/_templates/restapi.html deleted file mode 100644 index ff2abecbd..000000000 --- a/docs/_templates/restapi.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - REST API for Pulp 3 RPM Plugin - - - - - - - - - - - - - diff --git a/staging_docs/admin/guides/add-signing-services.md b/docs/admin/guides/add-signing-services.md similarity index 100% rename from staging_docs/admin/guides/add-signing-services.md rename to docs/admin/guides/add-signing-services.md diff --git a/staging_docs/admin/guides/rbac.md b/docs/admin/guides/rbac.md similarity index 100% rename from staging_docs/admin/guides/rbac.md rename to docs/admin/guides/rbac.md diff --git a/staging_docs/admin/index.md b/docs/admin/index.md similarity index 100% rename from staging_docs/admin/index.md rename to docs/admin/index.md diff --git a/docs/static/.gitkeep b/docs/admin/learn/.gitkeep similarity index 100% rename from docs/static/.gitkeep rename to docs/admin/learn/.gitkeep diff --git a/staging_docs/admin/reference/settings.md b/docs/admin/reference/settings.md similarity index 100% rename from staging_docs/admin/reference/settings.md rename to docs/admin/reference/settings.md diff --git a/docs/bindings.rst b/docs/bindings.rst deleted file mode 100644 index 8b7b223f1..000000000 --- a/docs/bindings.rst +++ /dev/null @@ -1,76 +0,0 @@ -Client Bindings -=============== - -Python Client -------------- - -The `pulp-rpm-client package `_ on PyPI provides -bindings for all API calls in the `pulp_rpm API documentation `_. It is -currently published daily and with every RC. - -The `pulpcore-client package `_ on PyPI provides bindings -for all API calls in the `pulpcore API documentation `_. -It is currently published daily and with every RC. - - -Ruby Client ------------ - -The `pulp_rpm_client Ruby Gem `_ on rubygems.org -provides bindings for all API calls in the `pulp_rpm API documentation `_. It -is currently published daily and with every RC. - -The `pulpcore_client Ruby Gem `_ on rubygems.org provides -bindings for all API calls in the `pulpcore API documentation `_. It is currently published daily and with every RC. - - -Client in a language of your choice ------------------------------------ - -A client can be generated using Pulp's OpenAPI schema and any of the available `generators -`_. - -Generating a client is a two step process: - -**1) Download the OpenAPI schema for pulpcore and all installed plugins:** - -.. code-block:: bash - - curl -o api.json http://:24817/pulp/api/v3/docs/api.json - -The OpenAPI schema for a specific plugin can be downloaded by specifying the plugin's module name -as a GET parameter. For example for ``pulp_rpm`` only endpoints use a query like this: - -.. code-block:: bash - - curl -o api.json http://:24817/pulp/api/v3/docs/api.json?plugin=pulp_rpm - -**2) Generate a client using openapi-generator.** - -The schema can then be used as input to the openapi-generator-cli. The documentation on getting -started with openapi-generator-cli is available on -`openapi-generator.tech `_. - - -Generating a client for a dev environment ------------------------------------------ - -The pulp dev environment provided by `pulp_installer `_ -introduces a set of useful -`aliases `_, -such as `pbindings`. - -Examples: - -- generating python bindings for pulp_rpm: - -.. code-block:: bash - - pbindings pulp_rpm python - -- generating ruby bindings for pulp_rpm with '3.0.0rc1.dev.10' version - -.. code-block:: bash - - pbindings pulp_rpm ruby 3.0.0rc1.dev.10 diff --git a/docs/changes.rst b/docs/changes.rst deleted file mode 100644 index 96e8eb90c..000000000 --- a/docs/changes.rst +++ /dev/null @@ -1,4 +0,0 @@ -Changes -********* - -Removed due to docs migration process. diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 7f09c16a0..000000000 --- a/docs/conf.py +++ /dev/null @@ -1,259 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Pulp RPM Support documentation build configuration file, created by -# sphinx-quickstart on Tue Nov 27 11:32:17 2012. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - - -import os -import sys -sys.path.insert(0, os.path.abspath('..')) # noqa - -import pulp_rpm - -try: - import sphinx_rtd_theme -except ImportError: - sphinx_rtd_theme = False - - - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.extlinks', 'sphinxcontrib.jquery'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Pulp RPM Support' -copyright = u'2012-2019, Pulp Team' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = "3.28.0.dev" -# The full version, including alpha/beta/rc tags. -release = "3.28.0.dev" - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'sphinx_rtd_theme' if sphinx_rtd_theme else 'default' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] if sphinx_rtd_theme else [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -html_additional_pages = {'restapi': 'restapi.html'} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'PulpRPMSupportdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'PulpRPMSupport.tex', u'Pulp RPM Support Documentation', - u'Pulp Team', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'pulprpmsupport', u'Pulp RPM Support Documentation', - [u'Pulp Team'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'PulpRPMSupport', u'Pulp RPM Support Documentation', - u'Pulp Team', 'PulpRPMSupport', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -rst_prolog = """.. attention:: - This docs will be deactivated in July 2024. `Learn More `_ - or go to the `New Pulp Docs `_ (beta). -""" diff --git a/docs/contributing.rst b/docs/contributing.rst deleted file mode 100644 index e582053ea..000000000 --- a/docs/contributing.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../CONTRIBUTING.rst diff --git a/staging_docs/dev/guides/bindings.md b/docs/dev/guides/bindings.md similarity index 100% rename from staging_docs/dev/guides/bindings.md rename to docs/dev/guides/bindings.md diff --git a/staging_docs/dev/index.md b/docs/dev/index.md similarity index 100% rename from staging_docs/dev/index.md rename to docs/dev/index.md diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 26b2e5757..000000000 --- a/docs/index.rst +++ /dev/null @@ -1,76 +0,0 @@ - -``pulp_rpm`` Plugin -=================== - -The ``pulp_rpm`` plugin extends `pulpcore `__ to support -hosting RPM family content types. - -Features --------- - -* :ref:`sync-publish-workflow` with "RPM Content" including RPMs, Advisories, Modularity, and Comps -* :ref:`sync-publish-workflow` using :ref:`ULN remotes ` to sync from ULN servers. -* :ref:`Versioned Repositories ` so every operation is a restorable snapshot -* :ref:`Download content on-demand ` when requested by clients to reduce disk space. -* Upload local RPM content in `chunks `__ -* Add, remove, copy, and organize RPM content into various repositories -* De-duplication of all saved content -* Host content either `locally or on S3 `_ -* View distributions served by pulpcore-content in a browser - -Tech Preview ------------- - -Some additional features are being supplied as a tech preview. There is a possibility that -backwards incompatible changes will be introduced for these particular features. For a list of -features currently being supplied as tech previews only, see the :doc:`tech preview page -`. - -Requirements ------------- - -``pulp_rpm`` plugin requires some dependencies such as ``libsolv`` and ``libmodulemd`` -which is provided only by RedHat family distributions like Fedora. - -``pulp_rpm`` plugin requires either to be: - -* install on Fedora 29+, CentOS 7+ (with EPEL repository enabled) -* install from the official Pulp image (https://pulpproject.org/pulp-in-one-container/) - -Get Started ------------ - -To get started, check the :doc:`installation docs` and take a look at the :doc:`basic -workflows`. - -Community contributions are encouraged. - -* Send us pull requests on `our GitHub repository `_. -* View and file issues in the `Github Tracker - `_. - - -Table of Contents ------------------ - -.. toctree:: - :maxdepth: 1 - - installation - settings - workflows/index - bindings - rbac - restapi - changes - tech-preview - contributing - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/installation.rst b/docs/installation.rst deleted file mode 100644 index 5e526da7e..000000000 --- a/docs/installation.rst +++ /dev/null @@ -1,162 +0,0 @@ -User setup -========== - -.. _ansible-installation: - -Install with pulp_installer (recommended) ------------------------------------------ - -Only Fedora 29+ and CentOS 7+ are supported. - -pulpcore provides an `Ansible Installer `_ that can be used to -install ``pulp_rpm``. For example if your host is in your Ansible inventory as ``myhost`` you -can install onto it with: - -.. code-block:: bash - - ansible-galaxy install geerlingguy.postgresql - ansible-galaxy collection install pulp.pulp_installer - -Create your pulp_rpm.yml playbook to use with the installer: - -.. code-block:: yaml - - --- - - hosts: all - vars: - pulp_settings: - secret_key: << YOUR SECRET HERE >> - content_origin: "http://{{ ansible_fqdn }}" - pulp_default_admin_password: << YOUR PASSWORD HERE >> - pulp_install_plugins: - pulp-rpm: {} - roles: - - pulp.pulp_installer.pulp_all_services - environment: - DJANGO_SETTINGS_MODULE: pulpcore.app.settings - -Then install it onto ``myhost`` with: - -.. code-block:: bash - - ansible-playbook pulp_pm.yml -l myhost - - -Pip install ------------ - - -Install ``pulpcore`` -******************** - -Follow the `installation -instructions `__ -provided with pulpcore. - -Install prerequisites -********************* - -Install build dependencies -########################## - -``pulp_rpm`` depends on some C libraries that must be compiled from source as Python extentions. Unfortunately, -some of these packages are only available as Python "source distributions", meaning that they must be compiled -on your own machine. But, luckily, you won't have to do that yourself! Simply install the build dependencies -on your machine and the build process itself will happen behind the scenes when you install the packages. - -Caveat: Unfortunately, a fully-featured ``createrepo_c`` can only be built on Red Hat based distros, -as not all of its build dependencies are available on Debian-based platforms. - -If you are on Fedora, install the build dependencies with this command: - -.. code-block:: bash - - sudo dnf install -y gcc make cairo-devel cairo-gobject-devel cmake bzip2-devel expat-devel file-devel glib2-devel gobject-introspection-devel libcurl-devel libmodulemd-devel libxml2-devel openssl-devel python3-devel rpm-devel sqlite-devel xz-devel zchunk-devel zlib-devel - -If on CentOS or RHEL, use this commands: - -Ensure you have enabled ``epel`` and ``powertools`` (in RHEL it is ``CodeReady``) repositories - -.. code-block:: bash - - sudo yum install -y epel-release - sudo yum config-manager --set-enabled powertools - # sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms - -.. code-block:: bash - - sudo yum install -y gcc make cairo-devel cairo-gobject-devel cmake bzip2-devel expat-devel file-devel glib2-devel gobject-introspection-devel libcurl-devel libmodulemd-devel libxml2-devel openssl-devel python3-devel rpm-devel sqlite-devel swig xz-devel zchunk-devel zlib-devel - - - -Ensure your virtual environment uses system wide packages -######################################################### - -``pyevn.cfg`` can be found usually in ``/usr/local/lib/pulp/`` as root directory of virtual environment. - -.. code-block:: bash - - grep "include-system-site-packages" pyvenv.cfg - -You should get ``include-system-site-packages = true``. - -This is a necessary prerequisite for ``libmodulemd`` and ``libcomps`` along with the build dependencies listed -above for ``createrepo_c``. - -Install Python build dependencies (CentOS / RHEL only) -###################################################### - -Users on CentOS or RHEL must manually install the Python build dependencies for createrepo_c and libcomps. - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - pip install scikit-build nose - -Install ``pulp_rpm`` -******************** - -Users should install from **either** PyPI or source or use pulp_installer installer. -In case of PyPI or source installation in virtual environment make sure the environment -has enabled usage of system wide packages. You can achieve that with flag ``--system-site-packages`` -at environment creation time or with option in ``pyvenv.cfg`` file in root directory of virtual environment. - - -Install ``pulp-rpm`` From PyPI -############################## - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - pip install pulp-rpm - -Install ``pulp_rpm`` from source -################################ - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - git clone https://github.com/pulp/pulp_rpm.git - cd pulp_rpm - pip install -e . - -Run Migrations -************** - -.. code-block:: bash - - django-admin migrate rpm - -Run Services ------------- - -.. code-block:: bash - - django-admin runserver 24817 - gunicorn pulpcore.content:server --bind 'localhost:24816' --worker-class 'aiohttp.GunicornWebWorker' -w 2 - sudo systemctl restart pulpcore-resource-manager - sudo systemctl restart pulpcore-worker@1 - sudo systemctl restart pulpcore-worker@2 diff --git a/docs/rbac.rst b/docs/rbac.rst deleted file mode 100644 index ca6fe355a..000000000 --- a/docs/rbac.rst +++ /dev/null @@ -1,396 +0,0 @@ -Role Based Access Control -========================= - -.. important:: - - This feature is a Tech Preview and may be subject of change. - -.. important:: - - User ``admin`` automatically gets all RBAC permissions. - -RPM plugin presents Role Based Access for these endpoints : - -* RPM Alternate Content Source (``/pulp/api/v3/acs/rpm/rpm/``) -* RPM Distributions (``/pulp/api/v3/distributions/rpm/rpm/``) -* RPM Publications (``/pulp/api/v3/publications/rpm/rpm/``) -* RPM Remotes (``/pulp/api/v3/remotes/rpm/rpm/`` and ``/pulp/api/v3/remotes/rpm/uln``) -* RPM Repository (``/pulp/api/v3/repositories/rpm/rpm/``) -* RPM Copy (``/pulp/api/v3/rpm/copy/``) - -.. note:: - - Content is secured too, but the only condition right now is the authenticated user. - -Default Roles -------------- - -RPM plugin ships a few default roles described bellow. - -Viewer Role -^^^^^^^^^^^ - -This role contains only ``view`` permission for an endpoint. Using this permission you can control who can -view specific content for example a repository. - -.. code-block:: shell - :caption: You can check the role by pulp-cli - - pulp role show --name "rpm.rpmremote_viewer" - -.. code-block:: shell - - { - "pulp_href": "/pulp/api/v3/roles/62baf888-09c2-4c18-8d3a-354d9c6bdb48/", - "pulp_created": "2022-04-07T12:41:11.065567Z", - "name": "rpm.rpmremote_viewer", - "description": null, - "permissions": [ - "rpm.view_rpmremote" - ], - "locked": true - } - -Creator Role -^^^^^^^^^^^^ - -This role contains only ``add`` permission for a specific endpoint to allow a user to create a new object of its type. -Be aware that you may need additional permission to create a new object. -For example, ``rpm.rpmrepository_view`` is needed for a used repository to create a new publication. - -.. code-block:: shell - :caption: Example of the requested condition to create an RPM Publication - - { - "action": ["create"], - "principal": "authenticated", - "effect": "allow", - "condition": [ - "has_model_perms:rpm.add_rpmpublication", - "has_repo_attr_model_or_obj_perms:rpm.view_rpmrepository", - ] - } - -Owner Role -^^^^^^^^^^ - -This role contains all permissions needed for manipulating objects, such as modifying or removing them. -This role also contains permission to manage role assignments on the object, -for example, adding or removing user roles. - -By default, the user who created a new object will receive this role. - -.. code-block:: shell - :caption: Example of the RPM Remote owner role - - { - "pulp_href": "/pulp/api/v3/roles/592356da-8cdf-4a1b-a434-3f10cda285f7/", - "pulp_created": "2022-04-07T12:41:11.047168Z", - "name": "rpm.rpmremote_owner", - "description": null, - "permissions": [ - "rpm.change_rpmremote", - "rpm.delete_rpmremote", - "rpm.manage_roles_rpmremote", - "rpm.view_rpmremote" - ], - "locked": true - } - -RPM specific Roles ------------------- - -Also, the RPM plugin ships two roles to use. - -RPM Admin Role (rpm.admin) -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This role is like a pulp admin but only for the RPM plugin - -it can perform any RPM workflow with no restrictions. If you need a more -specific admin role as a repo maintainer, you need to combine -permissions on your own. More in the `Creating Roles` section. - -.. code-block:: shell - :caption: rpm.admin role - - { - "pulp_href": "/pulp/api/v3/roles/08d16dda-038b-4fbb-b3fc-acb081111e6a/", - "pulp_created": "2022-04-07T12:41:11.129526Z", - "name": "rpm.admin", - "description": null, - "permissions": [ - "rpm.add_rpmalternatecontentsource", - "rpm.add_rpmdistribution", - "rpm.add_rpmpublication", - "rpm.add_rpmremote", - "rpm.add_rpmrepository", - "rpm.add_ulnremote", - "rpm.change_rpmalternatecontentsource", - "rpm.change_rpmdistribution", - "rpm.change_rpmremote", - "rpm.change_rpmrepository", - "rpm.change_ulnremote", - "rpm.delete_rpmalternatecontentsource", - "rpm.delete_rpmdistribution", - "rpm.delete_rpmpublication", - "rpm.delete_rpmremote", - "rpm.delete_rpmrepository", - "rpm.delete_rpmrepository_version", - "rpm.delete_ulnremote", - "rpm.manage_roles_rpmalternatecontentsource", - "rpm.manage_roles_rpmdistribution", - "rpm.manage_roles_rpmpublication", - "rpm.manage_roles_rpmremote", - "rpm.manage_roles_rpmrepository", - "rpm.manage_roles_ulnremote", - "rpm.modify_content_rpmrepository", - "rpm.refresh_rpmalternatecontentsource", - "rpm.repair_rpmrepository", - "rpm.sync_rpmrepository", - "rpm.view_rpmalternatecontentsource", - "rpm.view_rpmdistribution", - "rpm.view_rpmpublication", - "rpm.view_rpmremote", - "rpm.view_rpmrepository", - "rpm.view_ulnremote", - ], - "locked": true - } - -.. important:: - - Please note there are two types of Remotes with their individual permissions. - - -RPM Viewer Role (rpm.viewer) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -A universal role allows you to view all content within the RPM plugin. - -.. code-block:: shell - :caption: Universal RPM viewer role - - { - "pulp_href": "/pulp/api/v3/roles/d1e7bae0-2363-45e2-815c-d721ecc3133c/", - "pulp_created": "2022-04-07T12:41:11.144883Z", - "name": "rpm.viewer", - "description": null, - "permissions": [ - "rpm.view_rpmalternatecontentsource", - "rpm.view_rpmdistribution", - "rpm.view_rpmpublication", - "rpm.view_rpmremote", - "rpm.view_rpmrepository", - "rpm.view_ulnremote", - ], - "locked": true - } - - -Content and RepositoryVersions Permissions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -RPM Content and RepositoryVersions are unique as they do not have any default roles on their -viewsets. Content's access policy allows any authenticated user to create content, however -they must specify the repository to upload to since viewing content is scoped by the repositories -the user has permission for. RepositoryVersions' access policy requires the user to have -permissions on the parent repository in order to perform actions on the repository version. Both -objects have CRD permissions in the database that can be assigned to users, but currently their -access policies do not use them for authorization. - - -Creating Roles --------------- - -.. note:: - - Roles shipped by the RPM plugin mentioned above are locked and cannot be modified or removed. - -To create a new role, you need to specify its name and permissions to use. -To find out which permissions you need for a new role, you can list an endpoints policy with the following command: - -.. code-block:: shell - :caption: List possible access policies for the repository endpoint - - pulp access-policy show --viewset-name "repositories/rpm/rpm" - -.. code-block:: json - - { - "pulp_href": "/pulp/api/v3/access_policies/dae50330-83b5-4ab0-b74f-f54e1d2cbf29/", - "pulp_created": "2022-04-25T15:27:48.556140Z", - "permissions_assignment": [ - { - "function": "add_roles_for_object_creator", - "parameters": { - "roles": "rpm.rpmrepository_owner" - } - } - ], - "creation_hooks": [ - { - "function": "add_roles_for_object_creator", - "parameters": { - "roles": "rpm.rpmrepository_owner" - } - } - ], - "statements": [ - { - "action": [ - "list", - "my_permissions" - ], - "effect": "allow", - "principal": [ - "authenticated" - ] - }, - { - "action": [ - "retrieve" - ], - "effect": "allow", - "condition": "has_model_or_obj_perms:rpm.view_rpmrepository", - "principal": "authenticated" - }, - { - "action": [ - "create" - ], - "effect": "allow", - "condition": [ - "has_remote_param_model_or_obj_perms:rpm.view_rpmremote", - "has_model_perms:rpm.add_rpmrepository" - ], - "principal": "authenticated" - }, - { - "action": [ - "update", - "partial_update" - ], - "effect": "allow", - "condition": [ - "has_model_or_obj_perms:rpm.change_rpmrepository", - "has_model_or_obj_perms:rpm.view_rpmrepository", - "has_remote_param_model_or_obj_perms:rpm.view_rpmremote" - ], - "principal": "authenticated" - }, - { - "action": [ - "modify" - ], - "effect": "allow", - "condition": [ - "has_model_or_obj_perms:rpm.modify_content_rpmrepository", - "has_model_or_obj_perms:rpm.view_rpmrepository" - ], - "principal": "authenticated" - }, - { - "action": [ - "destroy" - ], - "effect": "allow", - "condition": [ - "has_model_or_obj_perms:rpm.delete_rpmrepository", - "has_model_or_obj_perms:rpm.view_rpmrepository" - ], - "principal": "authenticated" - }, - { - "action": [ - "sync" - ], - "effect": "allow", - "condition": [ - "has_model_or_obj_perms:rpm.sync_rpmrepository", - "has_model_or_obj_perms:rpm.view_rpmrepository", - "has_remote_param_model_or_obj_perms:rpm.view_rpmremote" - ], - "principal": "authenticated" - }, - { - "action": [ - "list_roles", - "add_role", - "remove_role" - ], - "effect": "allow", - "condition": "has_model_or_obj_perms:rpm.manage_roles_rpmrepository", - "principal": "authenticated" - } - ], - "viewset_name": "repositories/rpm/rpm", - "customized": false - } - -**Example 1: RPM Repository Creator** - -.. code-block:: shell - :caption: Example of the RPM repository creator role - - pulp role create --name "rpm_repo_creator" \ - --permission "rpm.add_rpmrepository" \ - --permission "rpm.view_rpmrepository" \ - --permission "rpm.sync_rpmrepository" \ - --permission "rpm.modify_rpmrepository" \ - --permission "rpm.change_rpmrepository" \ - --permission "rpm.delete_rpmrepository" \ - --permission "rpm.add_rpmremote" \ - --permission "rpm.change_rpmremote" \ - --permission "rpm.delete_rpmremote" \ - --permission "rpm.view_rpmremote" - -**Example 2: RPM Publisher** - -.. code-block:: shell - :caption: Example of the RPM publisher role - - pulp role create --name "rpm_publisher" \ - --permission "rpm.view_rpmrepository" \ - --permission "rpm.add_rpmpublication" \ - --permission "rpm.add_rpmdistribution" - -.. code-block:: shell - :caption: Globally assign these roles to user - - pulp user role-assignment add --username "bob" --role "rpm_repo_creator" --object "" - pulp user role-assignment add --username "jack" --role "rpm_publisher" --object "" - -.. note:: - - You can only assign roles at the object level if the role contains at least one permission applicable for that object. - -Edit Access Policy ------------------- - -It is possible to edit the `access policy` for an endpoint. - -.. code-block:: shell - :caption: Change the access policy of all actions not requiring any permission. - - pulp access-policy update \ - --viewset-name "remotes/rpm/rpm" \ - --statements '[{"action": ["list", "retrieve"], "effect": "allow"}, {"action": "*", "effect": "allow"}]' - -.. warning:: - - When editing access policies, you must specify all the endpoint actions, or their usage will lead to failure. - -You can modify ``creation-hooks`` to specify what will happen after object creation. -By default, a user will receive the ``owner`` role. - -.. code-block:: shell - :caption: Update creation hook of a repository to creator gets another role than `repository_owner` - - pulp access-policy update --viewset-name "repositories/rpm/rpm" \ - --creation-hooks '[{"function": "add_roles", "parameters": {"roles": "rpm_viewer"}}]' - -Of course, you can reset the access policy back to the default with the command: - -.. code-block:: shell - - pulp access-policy reset --viewset-name "repositories/rpm/rpm" diff --git a/docs/restapi.rst b/docs/restapi.rst deleted file mode 100644 index 38914f0f1..000000000 --- a/docs/restapi.rst +++ /dev/null @@ -1,9 +0,0 @@ -REST API -======== - -Pulpcore Reference: `pulpcore API documentation `_. - -Pulp RPM API ----------------- - -See the `pulp_rpm API documentation <../restapi.html>`_ diff --git a/docs/settings.rst b/docs/settings.rst deleted file mode 100644 index afa0a58f6..000000000 --- a/docs/settings.rst +++ /dev/null @@ -1,74 +0,0 @@ -.. _settings: - -Settings -======== - -pulp_rpm adds configuration options to the those offered by pulpcore. - -KEEP_CHANGELOG_LIMIT -^^^^^^^^^^^^^^^^^^^^ - - This setting controls how many changelog entries (from the most recent ones) should - be kept for each RPM package synced or uploaded into Pulp. The limit is enacted to - avoid metadata bloat, as it can _significantly_ reduce the amount of space needed - to store metadata, the amount of bandwidth needed to download it, and the amount of - time needed to create it. - - The changelog metadata is used for the `dnf changelog` command, which can display the - changelogs of a package even if it is not installed on the system. This setting - therefore controls the maximum number of changelogs that can be viewed on clients - using Pulp-hosted repositories using this command. Note, however, that for installed - packages the `rpm -qa --changelog` command can show all available changelogs for that - package without limitation. - - 10 was selected as the default because it is a good compromise between utility and - efficiency - and because it is the value used by Fedora, CentOS, OpenSUSE, and others. - - -ALLOW_AUTOMATIC_UNSAFE_ADVISORY_CONFLICT_RESOLUTION -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - This setting controls whether or not pulp_rpm will block advisory sync or - upload if it appears an 'incoming' advisory is incompatible with an existing - advisory with the same name. - - This defaults to False, and advisory-merge will raise an ``AdvisoryConflict`` - exception in two scenarios: - - Situation 1 - Updated date and version are the same but pkglists differ (and one is not a subset - or superset of the other). E.g. It's likely a mistake in one of the pkglists. - - Situation 2 - Updated dates are different but pkglists have no intersection at all. E.g. It's - either an attempt to combine content from incompatible repos (RHEL6-main and RHEL7 - debuginfo), or someone created a completely different advisory with already used id. - - - If this setting is True, Pulp will merge the advisories in Situation 1, and simply - accept the new advisory in Situation 2. - - If the setting is False, then the merge is rejected until the user has examined the - conflicting advisories and addressed the problem. - - Addressing the problem manually could take a number of forms. Examples include - (but are not limited to): - - * remove the existing advisory from the destination repository - * choose not to sync from the offending remote - * evaluate the command and choose not to combine conflicting repositories (e.g. - RHEL6-main and RHEL7-debuginfo) - -.. note:: - - This approach to conflict-resolution is done **AT YOUR OWN RISK**. - Pulp cannot guarantee the usability/usefulness of the resulting advisory. - - -RPM_METADATA_USE_REPO_PACKAGE_TIME -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -When publishing RPM metadata, if this is true, Pulp will use the timestamp that the package was -added to the repo rather than the timestamp that the package first appeared in Pulp. This timestamp -appears in the "file" field of the time element for each package in primary.xml. Defaults to -``False``. diff --git a/docs/tech-preview.rst b/docs/tech-preview.rst deleted file mode 100644 index 3d35cf11f..000000000 --- a/docs/tech-preview.rst +++ /dev/null @@ -1,10 +0,0 @@ -Tech previews -============= - -The following features are currently being released as part of a tech preview. - -* Distribution (Kickstart) Trees sync support -* Advisory upload by providing a file containing JSON or providing an href of an existing artifact - in Pulp -* Copy API, functionality for the /pulp/api/v3/rpm/copy/ endpoint -* Role Based Access Control diff --git a/docs/template_gitref b/docs/template_gitref deleted file mode 100644 index e169228ce..000000000 --- a/docs/template_gitref +++ /dev/null @@ -1 +0,0 @@ -2021.08.26-327-g520b576 diff --git a/staging_docs/user/guides/_SUMMARY.md b/docs/user/guides/_SUMMARY.md similarity index 100% rename from staging_docs/user/guides/_SUMMARY.md rename to docs/user/guides/_SUMMARY.md diff --git a/staging_docs/user/guides/alternate-content-source.md b/docs/user/guides/alternate-content-source.md similarity index 100% rename from staging_docs/user/guides/alternate-content-source.md rename to docs/user/guides/alternate-content-source.md diff --git a/staging_docs/user/guides/metadata_signing.md b/docs/user/guides/metadata_signing.md similarity index 100% rename from staging_docs/user/guides/metadata_signing.md rename to docs/user/guides/metadata_signing.md diff --git a/staging_docs/user/guides/modify.md b/docs/user/guides/modify.md similarity index 100% rename from staging_docs/user/guides/modify.md rename to docs/user/guides/modify.md diff --git a/staging_docs/user/guides/prune.md b/docs/user/guides/prune.md similarity index 100% rename from staging_docs/user/guides/prune.md rename to docs/user/guides/prune.md diff --git a/staging_docs/user/guides/sign-packages.md b/docs/user/guides/sign-packages.md similarity index 100% rename from staging_docs/user/guides/sign-packages.md rename to docs/user/guides/sign-packages.md diff --git a/staging_docs/user/guides/upload.md b/docs/user/guides/upload.md similarity index 100% rename from staging_docs/user/guides/upload.md rename to docs/user/guides/upload.md diff --git a/staging_docs/user/guides/use_pulp_repo.md b/docs/user/guides/use_pulp_repo.md similarity index 100% rename from staging_docs/user/guides/use_pulp_repo.md rename to docs/user/guides/use_pulp_repo.md diff --git a/staging_docs/user/index.md b/docs/user/index.md similarity index 100% rename from staging_docs/user/index.md rename to docs/user/index.md diff --git a/staging_docs/user/learn/concepts.md b/docs/user/learn/concepts.md similarity index 100% rename from staging_docs/user/learn/concepts.md rename to docs/user/learn/concepts.md diff --git a/staging_docs/admin/learn/.gitkeep b/docs/user/reference/.gitkeep similarity index 100% rename from staging_docs/admin/learn/.gitkeep rename to docs/user/reference/.gitkeep diff --git a/staging_docs/user/tutorials/create_sync_publish.md b/docs/user/tutorials/create_sync_publish.md similarity index 100% rename from staging_docs/user/tutorials/create_sync_publish.md rename to docs/user/tutorials/create_sync_publish.md diff --git a/docs/workflows/alternate-content-source.rst b/docs/workflows/alternate-content-source.rst deleted file mode 100644 index 906190aef..000000000 --- a/docs/workflows/alternate-content-source.rst +++ /dev/null @@ -1,54 +0,0 @@ -Alternate Content Sources -========================= - -Alternate Content Sources (ACS) can help speed up populating of new repositories. -If you have content stored locally or geographically near you which matches -the remote content, Alternate Content Sources will allow you to substitute -this content, allowing for faster data transfer. - -`Alternate Content Sources `_ -base is provided by pulpcore plugin. - -To use an Alternate Content Source you need a ``RPMRemote`` with path of your ACS. - -.. warning:: - - Remotes with mirrorlist URLs cannot be used as an Alternative Content Source. - -.. code-block:: bash - - pulp rpm remote create --name rpm_acs_remote --policy on_demand --url http://fixtures.pulpproject.org/rpm-unsigned/ - -Create Alternate Content Source -------------------------------- - -Create an Alternate Content Source. - -.. code-block:: bash - - pulp rpm acs create --name rpm_acs --remote rpm_acs_remote - -Alternate Content Source Paths -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you have more places with ACS within one base path you can specify them -by paths and all of them will be considered as a ACS. - -.. code-block:: bash - - pulp rpm remote create --name rpm_acs_remote --policy on_demand --url http://fixtures.pulpproject.org/ - pulp rpm acs create --name rpm_acs --remote rpm_acs_remote --path "rpm-unsigned/" --path "rpm-distribution-tree/" - -Refresh Alternate Content Source --------------------------------- - -To make your ACS available for future syncs you need to call ``refresh`` endpoint -on your ACS. This create a catalogue of available content which will be used instead -new content if found. - -.. code-block:: bash - - pulp rpm acs refresh --name rpm_acs - -Alternate Content Source has a global scope so if any content is found in ACS it -will be used in all future syncs. diff --git a/docs/workflows/copy.rst b/docs/workflows/copy.rst deleted file mode 100644 index 181532562..000000000 --- a/docs/workflows/copy.rst +++ /dev/null @@ -1,214 +0,0 @@ -Copy RPM content between repositories -===================================== - -If you want to copy RPM content from one repository into another repository, you have two options -for doing so. - - -.. _basic-modify-workflow: - -Basic Repository Modification API ---------------------------------- - -Like all Pulp repositories, you can use the ${repo_href}/modify/ endpoint to: - -* add or remove individual content units from a repository by HREF -* roll back the content present in a repository to that of a previous version using 'base_version' -* clone a repository version using '"base_version". This operation will create a new repository - version in the current repository which is a copy of the one specified as the "base_version", - regardless of what content was previously present in the repository. This can be combined with - adding and removing content units in the same call. For worklows check the :ref:`Recipes section `. - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/copy_basic_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/copy_basic.sh - :language: bash - - -.. copy-workflow: - -Advanced copy workflow ----------------------- - -.. note:: - - The RPM copy API is a **tech preview**, while we hope it can remain stable, it may be subject - to change in future releases. - -RPM repositories have a large number of unique use cases for which the standard 'generic' Pulp -repository modification API is insufficient, so a separate RPM-specific API is provided for more -'advanced' use cases. - -Several types of RPM content, such as Advisories (Errata), Package Groups, and Modules -depend on the existence of other content units to be "correct" or meaningful. For example: - -#. An Advisory (Errata) references RPM Packages and Modules that are needed to address a - particular bug or security concern. In order for the Advisory to be useful, these RPM packages - or Modules should be present in the same repository - otherwise when a client tries to install - them it will not be able to fully apply the Advisory fix. -#. A Package Group is a group of RPM packages. If the RPM packages that a Package Group contains - are not present in the same repository, the Package Group is effectively "broken" and won't be - possible to install correctly on a client system. -#. A Module consists of many RPM packages (similar to a Package Group). If the module is added to - a repository while the packages that its RPMs depend on are not, it may not be possible to - install the module on a client system. -#. A Module can depend on other modules. If those modules are not present in the RPM repo, the - module will not be installable on a client system. -#. RPM Packages typically depend on other RPM packages. If a lone RPM package is added to a - repository without its dependencies, it will potentially not be installable on a client system. - -The advanced copy API exists primarily to address these use cases. - -In contrast to the repository modification API, when a copy is performed using the RPM copy -API it is permitted to additionally copy content in the background which you, the user, -did not explicitly tell it to copy. For example: - -* When copying an Advisory (Errata) from one repository to another, all of the RPM packages - directly referenced by the Advisory will also be copied (however, see note below - regarding "best effort" in copies). -* When copying RPM packages from one repository to another, if dependency-resolution is enabled - then all of the RPM packages that those packages depend on are also be copied. - -The goal is to be as easy to use as possible, while allowing for a "best effort" at maintaining -the "correctness" of the repository, as well as its dependencies if requested. - -.. note:: - - In all cases, copy engages in a "best effort" attempt to fulfill the requirement. This - means that, in the event of the copy process being unable to find entities it believes - are necessary for the copy operation, **it will continue to execute the copy**. This - can happen for a variety of reasons (e.g., the source repositor(ies) don't contain all - of the referenced/required content, or the copy-configuration is incomplete or otherwise - incorrect). In these instances, missing entities are logged as WARNINGs - be sure to - check the logs if the results of a copy are unexpected. - -Dependency solving -__________________ - -When copying RPM packages, advisories, or modules between repositories, it is useful to ensure -that all of the RPM dependencies they need to be "installable" on a client system are also present -in the destination-repository. - -For example: if you want to add the "hexchat" RPM to a new repository, and you want to be able -to install it from that repository, the repository should also contain hexchat's dependencies -such as "libnotify" and "gtk3". - -This applies to all RPM concepts that "contain" RPMs, such as Advisories (Errata), Modules, and -PackageGroups. With the RPM copy API, you are afforded the option to have all dependencies (and -the dependencies of those dependencies) copied for you automatically, if they do not already exist -in the destination repository. In Pulp 2, this feature was documented as "advanced copy"; -the Pulp3 behavior matches the "recursive-conservative" option from Pulp2 (copies **latest missing** -dependencies) - -Solving these complex dependency relationships can be quite expensive, but is often necessary for -correctness. It is **enabled by default**, but can be disabled by setting the "dependency_solving" -parameter to a value of ``False`` when making calls against the API. Note that if you do choose not -to use dependency-solving, (or if you configure it incorrectly), it is possible to create incomplete -repositories. - -.. note:: - - While the default value for the "dependency_solving" parameter is currently ``True``, this - default is potentially subject to change in the future - until such a time as this API is - stabilized. - -Dependency solving does have some restrictions to be aware of. The set of content contained by -all repositories used in a copy operation must be "dependency closed", which is to say that no -content in any repository may have a dependency which cannot be satisfied by any content present -in any of the other repositories involved in the copy operation. - -For example, in CentOS 8, there are two primary repositories which are called "BaseOS" and -"AppStream". RPMs present in the "AppStream" repository frequently depend on RPMs which are -not present in "AppStream", but are present in "BaseOS", instead. - -In order to copy RPMs from a Pulp-clone of the "AppStream" repository, you must perform a -"multi-repository copy" so that the dependencies can be properly resolved. Please see the -recipe section below for more details on how to do this. - -.. _copy-recipes: - -Recipes -_______ - -These are examples of how the RPM copy API should be used. This code isn't intended to be runnable -as-is, but rather as a template for how the calls should be constructed. - -Create a new repository version in "dest_repo" containing all content units which are present in -the "source_repo_version". This essentially copies all content from the "source_repo_version" into -the "dest_repo", while leaving the content that was previously in the repository untouched, unless -retain package policy is set on the "dest_repo" - -.. code-block:: sh - - POST /pulp/api/v3/rpm/copy/ - config:=[ - {"source_repo_version": "$SRC_REPO_VERS_HREF", "dest_repo": "$DEST_REPO_HREF"} - ] - -.. note:: - - Retain package policy is set by `retain_package_versions` option. - When set, it identifies the maximum number of versions of each package to keep; as new versions of - packages are added by upload, sync, or copy, older versions of the same packages are automatically - removed. A value of 0 means "unlimited" and will keep all versions of each package. - -Create a new repository version in "dest_repo" containing the two "content" units specified by href, -which are present in the "source_repo_version". - -.. code-block:: sh - - POST /pulp/api/v3/rpm/copy/ - config:=[ - {"source_repo_version": "$SRC_REPO_VERS_HREF", "dest_repo": "$DEST_REPO_HREF", "content": [$RPM_HREF1, $ADVISORY_HREF1]} - ] - dependency_solving=False - -Create a new repository version in "dest_repo" containing the two "content" units specified by href, -which are present in the "source_repo_version". Instead of adding them to the content present in -the latest repository version present in "dest_repo", instead create a new version based upon -the version numbered "dest_base_version" in "dest_repo". These semantics are similar to how the -"base_version" parameter is used in the repository modification API. - -.. code-block:: sh - - POST /pulp/api/v3/rpm/copy/ - config:=[ - {"source_repo_version": "$SRC_REPO_VERS_HREF", "dest_repo": "$DEST_REPO_HREF", "dest_base_version": "$DEST_BASE_VERSION", "content": [$RPM_HREF1, $ADVISORY_HREF1]} - ] - -Create a new repository version in "dest_repo" containing the two "content" units specified by href, -as well as all of their RPM and Module dependencies, which are present in the "source_repo_version". - -.. code-block:: sh - - POST /pulp/api/v3/rpm/copy/ - config:=[ - {"source_repo_version": "$SRC_REPO_VERS_HREF", "dest_repo": "$DEST_REPO_HREF", "content": [$RPM_HREF1, $ADVISORY_HREF1]} - ] - dependency_solving=True - -"Multi-repository-copy", required when any of the repositories involved in the copy are not "dependency closed". - -Each of the pairs of source and destination repositories will see the content units that were -specified copied as normal. However when one of the content units has a dependency which is not -present in the same repository, but is present in one of the other "source" repositories listed, -it may be copied between the repos configured in that pair. - -In the following example, if $RPM_HREF1 depends on a content unit which is only present in -$SRC_REPO_VERS_HREF2 and is not present in either $DEST_REPO_HREF or $DEST_REPO_HREF2, then -it will be copied from $SRC_REPO_VERS_HREF2 to $DEST_REPO_HREF2, even though no content was -specified to be copied between those repositories. - -.. code-block:: sh - - POST /pulp/api/v3/rpm/copy/ - config:=[ - {"source_repo_version": "$SRC_REPO_VERS_HREF", "dest_repo": "$DEST_REPO_HREF", "content": [$RPM_HREF1, $ADVISORY_HREF1]}, - {"source_repo_version": "$SRC_REPO_VERS_HREF2", "dest_repo": "$DEST_REPO_HREF2", "content": []}, - ] - dependency_solving=True diff --git a/docs/workflows/create_sync_publish.rst b/docs/workflows/create_sync_publish.rst deleted file mode 100644 index 36941f36d..000000000 --- a/docs/workflows/create_sync_publish.rst +++ /dev/null @@ -1,353 +0,0 @@ -.. _sync-publish-workflow: - -Create, Sync and Publish a Repository -===================================== - -One of the most common workflows is a fetching content from a remote source and making it -available for users. - -Create an RPM repository ``foo`` --------------------------------- - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/repo_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/repo.sh - :language: bash - -Repository GET response: - -.. code:: json - - { - "description": null, - "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/0/", - "name": "foo", - "pulp_created": "2019-11-27T13:30:28.159167Z", - "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/", - "versions_href": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/" - } - -RPM Repositories support several additional options. - -- metadata_signing_service: - See :ref:`metadata_signing`. -- retain_package_versions: - The maximum number of versions of each package to keep; as new versions of packages are added by upload, sync, or copy, older versions of the same packages are automatically removed. A value of 0 means "unlimited". -- autopublish: - If set to True, Pulp will automatically create publications for new repository versions. It is generally intended to be used with the `Distribution` pointing to the repository, i.e. set the `repository` field on the distribution. Newly created publications (from autopublish) will then be made available automatically upon creation. -- retain_repo_versions: - Provided by pulpcore, specifies how many repository versions will be kept for a repository. For example, if set to 1, it will keep only the most-recent repository version; the rest will be automatically deleted, together with any associated publications. Note, however, that repository versions that are currently being distributed are "protected", and cannot be removed. This can result in more versions being retained than specified by `retain_repo_versions`. - -.. _create-remote: - -Create a new remote ``bar`` ---------------------------- - -By default ``policy='immediate`` which means that all the content is downloaded right away. -Specify ``policy='on_demand'`` to make synchronization of a repository faster and only -to download RPMs whenever they are requested by clients. - -Also, you can specify ``client_cert`` and ``client_key`` if your remote require authorization with a certificate. - -Using pulp-cli commands : - -.. code:: shell - - pulp rpm remote create \ - --name='bar' \ - --url "${URL}" \ - --policy on_demand \ - --client-cert @./certificate.crt \ - --client-key @./certificate.key \ - --tls-validation False - -Using httpie to talk directly to the REST API : - -.. code:: shell - - http --form POST $BASE_ADDR/pulp/api/v3/remotes/rpm/rpm/ \ - name='bar' \ - url="$URL" \ - policy='on_demand' \ - client_cert=@./certificate.crt \ - client_key=@./certificate.key \ - tls_validation=False - -If you want to use TLS validation you have to provide ``ca_cert`` too. - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/remote_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/remote.sh - :language: bash - -Remote GET response: - -.. code:: json - - { - "ca_cert": null, - "client_cert": null, - "client_key": null, - "download_concurrency": 20, - "name": "bar", - "policy": "on_demand", - "proxy_url": null, - "pulp_created": "2019-11-27T13:30:29.199173Z", - "pulp_href": "/pulp/api/v3/remotes/rpm/rpm/2ceb5262-a5b2-4297-afdf-a31f7e46dfc5/", - "pulp_last_updated": "2019-11-27T13:30:29.199187Z", - "tls_validation": true, - "url": "https://fixtures.pulpproject.org/rpm-unsigned/" - } - - -.. note:: - - While creating a new remote, you may set the field ``url`` to point to a mirror list feed. Pulp - fetches the list of available mirrors and tries to download content from the first valid mirror. - This means that whenever an error occurs during the synchronization, the whole sync process ends - with an error too. - -.. _versioned-repo-created: - -Configuration for SLES 12+ repository with authentication -********************************************************* - -If you would like to sync SLES 12+ repository you will need to specify an authentication as ``sles_auth_token``. - -You can receive your token with script like this: - -.. code:: bash - - curl -H "Authorization: Token token=YourOrganizationRegistrationCode" \ - https://scc.suse.com/connect/subscriptions/products | \ - tr "," "\n" | \ - grep -i "url" | \ - grep -i "SLE-SERVER" - -Assuming your token is ``YourRepositoryToken``, create the remote with the ``sles_auth_token`` specified. - -Using pulp-cli commands : - -.. code:: shell - - pulp rpm remote create \ - --name 'SLESrepo' \ - --url 'https://updates.suse.com/SUSE/Updates/SLE-SERVER/12/x86_64/update/' \ - --policy on_demand \ - --sles-auth-token 'YourRepositoryToken' - -Using httpie to talk directly to the REST API : - -.. code:: bash - - http POST :/pulp/api/v3/remotes/rpm/rpm/ \ - name='SLESrepo' \ - url='https://updates.suse.com/SUSE/Updates/SLE-SERVER/12/x86_64/update/' \ - policy='on_demand' \ - sles_auth_token='YourRepositoryToken' - -.. _create-uln-remote: - -Creating a ULN remote -********************** - -ULN stands for "Unbreakable Linux Network" and refers to the way Oracle in particular, `delivers Oracle Linux repositories `_ to their enterprise customers. -You can use a ULN remote to synchronize repositories from a ULN server to Pulp. -For ULN remotes you must provide your ULN login credentials via the ``username``, and ``password`` parameters, and the ``url`` is the ULN channel, e.g. ``uln://ovm2_2.1.1_i386_patch``: - -Using httpie to talk directly to the REST API : - -.. code:: shell - - http --form POST $BASE_ADDR/pulp/api/v3/remotes/rpm/uln/ \ - name='ULNRemote' \ - url='uln://ovm2_2.1.1_i386_patch' \ - username='example@example.com' \ - password='changeme' - -Note how we are using the ``pulp/api/v3/remotes/rpm/uln/`` API endpoint, rather than ``pulp/api/v3/remotes/rpm/rpm/``. - -You can also specify the ULN Server base URL for a remote using the ``uln_server_base_url`` parameter. -If you do not provide this parameter, a sync with the remote will default to the contents of the ``DEFAULT_ULN_SERVER_BASE_URL`` setting, which is ``https://linux-update.oracle.com/`` by default. -The `pulpcore configuration documentation `_ has more on how to change Pulp settings. - -Once you have created a ULN remote, you can synchronize it into a RPM repository, just like you would with a RPM remote. - -You may also want to consult the `Oracle ULN documentation `_ for more information. - - -Sync repository ``foo`` using remote ``bar`` --------------------------------------------- - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/sync_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/sync.sh - :language: bash - -There are 3 sync modes to choose from, using the ``sync_policy`` option. - -- ``additive`` (the default) will retain the existing contents of the Pulp repository and add the contents of the remote repository being synced. -- ``mirror_content_only`` will synchronize the Pulp repository to contain the same content as the one remote repository being synced - removing any existing content that isn't present in the remote repo. -- ``mirror_complete`` will act as ``mirror_content_only`` does, but additionally it will automatically create a publication that will be an _exact_ bit-for-bit copy of the remote repository being synced, rather than requiring a separate step (or ``autopublish``) to generate the metadata later. This will keep repo metadata checksums intact, but is not possible for all repositories, as some use features which are incompatible with creating local clones that are exact copies. - -The ``mirror`` option is deprecated, ``sync_policy`` should be used instead. If the ``mirror`` option is used, a value of ``true`` will change the default ``sync_policy`` to ``mirror_complete``, while a value of ``false`` will not change the default ``sync_policy``. - -Optionally, you can skip ``SRPM`` packages by using ``skip_types:="[\"srpm\"]"`` -option. - -Optionally, you can skip kickstart-trees referred to by a parent repository by using ``skip_types:="[\"treeinfo\"]"`` - -You can combine these options by using by using ``skip_types:="[\"srpm\", \"treeinfo\"]"``. - -By default, ``optimize=True`` and sync will only proceed if changes are present. -You can override this by setting ``optimize=False`` which will disable optimizations and -run a full sync. - -RepositoryVersion GET response (when sync task complete): - -.. code:: json - - { - "base_version": null, - "content_summary": { - "added": { - "rpm.advisory": { - "count": 4, - "href": "/pulp/api/v3/content/rpm/advisories/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.package": { - "count": 35, - "href": "/pulp/api/v3/content/rpm/packages/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagecategory": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packagecategories/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagegroup": { - "count": 2, - "href": "/pulp/api/v3/content/rpm/packagegroups/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagelangpacks": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packagelangpacks/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - } - }, - "present": { - "rpm.advisory": { - "count": 4, - "href": "/pulp/api/v3/content/rpm/advisories/?repository_version=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.package": { - "count": 35, - "href": "/pulp/api/v3/content/rpm/packages/?repository_version=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagecategory": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packagecategories/?repository_version=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagegroup": { - "count": 2, - "href": "/pulp/api/v3/content/rpm/packagegroups/?repository_version=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - }, - "rpm.packagelangpacks": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packagelangpacks/?repository_version=/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - } - }, - "removed": {} - }, - "number": 1, - "pulp_created": "2019-11-27T13:30:31.961788Z", - "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - } - -.. note:: - - To set up a regular sync task, use one of the external tools that deal with periodic background jobs. - Learn more about scheduling tasks `here `_. - - -.. _publication-workflow: - -Create a Publication --------------------- - -A publication can only be created once a sync task completes. You can specify checksum algorithm with the following optional parameters: - -- metadata_checksum_type: affects all the repodata, including primary.xml, repomd.xml, etc. - If not specified, the default SHA256 algorithm will be used. - -- package_checksum_type: affects package checksum type in all repo metadata files. - If not specified, the default SHA256 algorithm will be used. - Because of on_demand sync, it is possible that the requested checksum is not available. - In such case the one from the remote repo will be used. - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/publication_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/publication.sh - :language: bash - -Publication GET response (when task complete): - -.. code:: json - - { - "publisher": null, - "pulp_created": "2019-11-27T13:30:36.006972Z", - "pulp_href": "/pulp/api/v3/publications/rpm/rpm/c90316fc-bf2a-458a-93b8-d3d75614572f/", - "repository": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/", - "repository_version": "/pulp/api/v3/repositories/rpm/rpm/a02ace53-d490-458d-8b93-604fbcd23a9c/versions/1/" - } - -The GPG signature check options, like ``gpgcheck`` and ``repo_gpgcheck`` are configurable via the ``repo_config`` option. -This option has a json format and can contain any of the configuration for the ``.repo`` file. - -We encourage users to take a look at the `pulp_rpm API documentation <../restapi.html#operation/publications_rpm_rpm_create>`_ -to see the default values for these options. - - -Create a Distribution for the Publication ------------------------------------------ -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/distribution_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/distribution.sh - :language: bash - -Distribution GET response (when task complete): - -.. code:: json - - { - "base_path": "foo", - "base_url": "http://pulp3-source-fedora30.pavels-macbook-pro.example.com/pulp/content/foo", - "content_guard": null, - "name": "baz", - "publication": "/pulp/api/v3/publications/rpm/rpm/c90316fc-bf2a-458a-93b8-d3d75614572f/", - "pulp_created": "2019-11-27T13:30:38.238857Z", - "pulp_href": "/pulp/api/v3/distributions/rpm/rpm/c1166d2d-0832-4e90-85fd-e34e94e6a156/" - } diff --git a/docs/workflows/index.rst b/docs/workflows/index.rst deleted file mode 100644 index d7d65235b..000000000 --- a/docs/workflows/index.rst +++ /dev/null @@ -1,50 +0,0 @@ -All the examples below come in two forms. One uses the `pulp-cli `__ -project, and the other uses the `httpie `__ application to talk directly to the REST API. - -The pulp-cli command examples assume that the user executing the commands has configured ``pulp-cli`` as with the following command:: - - pulp config create \ - --username admin \ - --password YOUR-ADMIN-PASSWORD-HERE \ - --base-url http://localhost:24817 \ - --no-verify-ssl - - -REST API examples using `httpie `__ commands assume that the user executing the commands -has a ``.netrc`` file in their home directory. The ``.netrc`` should have the following configuration:: - - machine localhost - login admin - password password - -If you configured the ``admin`` user with a different password, adjust the configuration -accordingly. If you prefer to specify the username and password with each request, please see -``httpie`` documentation on how to do that. - -.. note:: - - ``pulp-cli`` is under active development, and does not yet have 100% coverage of the REST API. As a result, some - examples rely on ``httpie`` even in the ``pulp-cli`` code sections. - -The examples also make use of ``curl`` and the `jq library `_ -to parse the json received from requests, in order to get the unique urls generated -when objects are created. To follow this documentation as-is please install the jq -library with: - -``$ sudo dnf install jq curl`` - -Workflows ---------- - -.. toctree:: - :maxdepth: 2 - - scripting - create_sync_publish - upload - use_pulp_repo - remove_content - manage - copy - metadata_signing - alternate-content-source diff --git a/docs/workflows/manage.rst b/docs/workflows/manage.rst deleted file mode 100644 index 055af6f64..000000000 --- a/docs/workflows/manage.rst +++ /dev/null @@ -1,74 +0,0 @@ -Manage Content -============== - -Package -------- - -Within a repository version there can be only one package (RPM or SRPM) with the same NEVRA. -NEVRA stands for name, epoch, version, release, architecture. - - -Advisory --------- - -.. warning:: - Advisory Upload is provided as a tech preview in Pulp RPM 3.0. Functionality may not fully work and backwards compatibility when upgrading to future Pulp RPM releases is not guaranteed. - -Advisory is sometimes referred as an Erratum. -It carries information about the updates: which packages need to be updated to solve a specific problem. - -There can be only one advisory with the same id in a repository version. - -If advisory with the same id already exists in a repository version at the time when another one is being added, -or if a remote repository holds duplicate advisory-ids at sync time, a conflict resolution mechanism is applied. -As a result, a new combined advisory might be created and added to a repository instead of two conflicting ones. -It's also possible that one of advisories will be kept as is, in case it's a newer version of the other. -For more information of the conflict resolution logic, see `this detailed explanation `__. - - -Modularity Metadata -------------------- - -RPM plugin parses a modules.yaml metadata file into modules and their defaults. - -Modulemd is uniquely identified by NSVCA which stands for name, stream, version, context, and -architecture. Modulemd contains artifacts (RPM packages), whenever a modulemd is being added or -copied to a repository, modulemd's packages are carried over. In case a modulemd is removed from -a repository version, modulemd's packages are removed as well, this way repository version will -not contain ursine (modulemd unreferenced) packages and modulemd consistency will be preserved. - -Within a repository version there can be only one modulemd-defaults with the same modulemd name. - - -Distribution Tree ------------------ - -.. warning:: - Support for Distribution Trees is provided as a tech preview in Pulp RPM 3.0. Functionality may not fully work and backwards compatibility when upgrading to future Pulp RPM releases is not guaranteed. - -Distribution is sometimes referred as a kickstart tree. -A tree is architecture-specific and is made up of: - - * One or more RPM repositories - * Bootable ISO images - * PXE boot images including EFI boot files, ISOLINUX boot files, and one or more kernel images with initial RAM disks. - -Almost all the content in a tree is described in a metadata file called the treeinfo file (sometimes .treeinfo). - -There can be only one Distribution Tree in a repository verison. - - -Comps.xml ---------- - -RPM plugin parses comps.xml metadata file into package groups, package environments, package -categories and langpacks. - - -Custom Repository Metadata ---------------------------- - -Custom or unknown repository metadata is considered any file listed in repomd.xml that Pulp does -not otherwise recognize. Within a repository version there can be only one custom repository -metadata of the same type. - diff --git a/docs/workflows/metadata_signing.rst b/docs/workflows/metadata_signing.rst deleted file mode 100644 index e4b32811b..000000000 --- a/docs/workflows/metadata_signing.rst +++ /dev/null @@ -1,58 +0,0 @@ -.. _metadata_signing: - -Metadata Signing -================ - -The RPM plugin is able to sign repository metadata using a `signing service -`_ configured by an administrator. -This enables package managers to verify the authenticity of metadata before installing packages -referenced by that metadata. The metadata signing is enabled for all repositories that have a -signing service associated with them. - -Setup ------ - -Let us assume that a signing service is already supplied by an administrator and is queryable via -REST API in an ordinary way. The only thing that needs to be done by a user is to create a new -repository with the associated signing service, like so: - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/repo_with_signing_service_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/repo_with_signing_service.sh - :language: bash - -Then, the repository needs to be published and a new distribution needs to be created out of it, as -usually. Follow the instructions provided :ref:`here` to do so. - -The publication will automatically contain a detached ascii-armored signature and a public key. -Both, the detached signature and the public key, are used by package managers during the process of -verification. - -Installing Packages -------------------- - -When a distribution with signed repodata is created, a user can install packages from a signed -repository. But, at first, it is necessary to set up the configuration for the repository. One may -initialize the configuration by leveraging the utility ``dnf config-manager`` like shown below. -Afterwards, the user should be able to install the packages by running ``dnf install packages``. - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/install_from_signed_repository_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/install_from_signed_repository.sh - :language: bash - -.. note:: - - Package managers take advantage of signed repositories only when the attribute ``repo_gpgcheck`` - is set to 1. Also, bear in mind that the attribute ``gpgkey`` should be configured as well to - let the managers know which public key has to be used during the verification. diff --git a/docs/workflows/remove_content.rst b/docs/workflows/remove_content.rst deleted file mode 100644 index 82cc2ca66..000000000 --- a/docs/workflows/remove_content.rst +++ /dev/null @@ -1,27 +0,0 @@ -Remove Content -============== - - -Removing content from Pulp entirely is slightly complicated for a number of architectural reasons. -First, repository-versions are immutable (so you can get back to any version and have all the content available). This means that it is not possible to remove content as long as there still exists a repo-version that "knows about it". -Second, Pulp deduplicates content. Artifacts can be shared across repositories - which means the repo being looked at, may not be the only one whose repo-versions still point to the content. - -**The way content gets removed "from Pulp" is via the orphan cleanup task, which will look for Artifacts that don't belong to any repository-versions, and haven't been touched in a while, and removes them.** - - -Removing Content ----------------- - -.. warning:: - - Please, follow the script steps carefuly and only if you know what you are doing because you risk losing data. - -Using pulp-cli commands: - -.. literalinclude:: ../_scripts/remove_content_cli.sh - :language: bash - -Using httpie to talk directly to the REST API: - -.. literalinclude:: ../_scripts/remove_content.sh - :language: bash diff --git a/docs/workflows/scripting.rst b/docs/workflows/scripting.rst deleted file mode 100644 index 0d7d4d05a..000000000 --- a/docs/workflows/scripting.rst +++ /dev/null @@ -1,69 +0,0 @@ -Scripting -========= - -Each workflow renders bash scripts that allow the developers to ensure the continued correctness of -the instructions. These scripts may also be helpful to users as a basis for their own scripts. All -of the scripts can be found at https://github.com/pulp/pulp_rpm/tree/main/docs/_scripts/ - -Some scripts have conditional statements for setting REPO_NAME, REMOTE_NAME, and DIST_NAME. -These are used by Pulp team for validity testing. - -The scripts come in pairs, with one (`scriptname_cli.sh`) using pulp-cli commands where available, and the other -(`scriptname.sh`) using httpie REST calls. - -The following scripts are used in conjunction with all the workflow scripts: - -**Base** - -Setting up to use pulp-cli: - -.. literalinclude:: ../_scripts/base_cli.sh - :language: bash - -Setting up to use httpie: - -.. literalinclude:: ../_scripts/base.sh - :language: bash - -Correctness Checks ------------------- - -.. warning:: - - These scripts can harm your data. - -To check the correctness of the sync with publish and download workflow scripts, they can all be run together using: - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/docs_check_sync_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/docs_check_sync.sh - :language: bash - -To check the correctness of the upload with publish and download workflow scripts, they can all be run together using: - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/docs_check_upload_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/docs_check_upload.sh - :language: bash - -To check the correctness of the basic copy with publish and download workflow scripts, they can all be run together using: - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/docs_check_copy_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/docs_check_copy.sh - :language: bash diff --git a/docs/workflows/upload.rst b/docs/workflows/upload.rst deleted file mode 100644 index 37b6d8ea8..000000000 --- a/docs/workflows/upload.rst +++ /dev/null @@ -1,217 +0,0 @@ -Upload Content -============== - -.. _upload-workflow: - -Content can be added to a repository not only by synchronizing from a remote source but also by -uploading. - -Bulk Upload ------------ - -Upload artifacts -**************** - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/artifact_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/artifact.sh - :language: bash - -Artifact GET response: - -.. code:: json - - { - "file": "artifact/49/921db74808725e9228f6e8f4c25c65d81ba2382d5b97f26814b9fd80977402", - "md5": "0c9013e04fa09f48d1996b3fb4c11724", - "pulp_created": "2019-11-27T13:48:15.394730Z", - "pulp_href": "/pulp/api/v3/artifacts/c3440ebb-99bc-44a0-915c-ee06cc5d4001/", - "sha1": "183a50aa0d25fdd0faa6642e4a82ff8870f96656", - "sha224": "9b199695812ff2fab161aaa7873920b12c743b8b32f37be926bce649", - "sha256": "49921db74808725e9228f6e8f4c25c65d81ba2382d5b97f26814b9fd80977402", - "sha384": "59b3d541c495abee3d0295ae87aadfb9fd20280757fd2373160120d8690435c23ae48aed4f60d8cf0713f9c4876f7ffa", - "sha512": "eaf47a730d2397e1b58d813914b0bad2b61aa90e5fa0b58101e98654f84d3a30826c2b67f0de96c5690b2bbf5bf847fa5b9f0cfdb970d52b94b56a94d68ca7c2", - "size": 2473 - } - -Create content from artifacts -***************************** - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/package_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/package.sh - :language: bash - -Package GET response (after task complete): - -.. code:: json - - { - "arch": "noarch", - "artifact": "/pulp/api/v3/artifacts/c3440ebb-99bc-44a0-915c-ee06cc5d4001/", - "changelogs": [], - "checksum_type": "sha256", - "conflicts": [], - "description": "A dummy package of fox", - "enhances": [], - "epoch": "0", - "files": [ - [ - "", - "/tmp/", - "fox.txt" - ] - ], - "is_modular": false, - "location_base": "", - "location_href": "fox-1.1-2.noarch.rpm", - "name": "fox", - "obsoletes": [], - "pkgId": "49921db74808725e9228f6e8f4c25c65d81ba2382d5b97f26814b9fd80977402", - "provides": [ - [ - "fox", - "EQ", - "0", - "1.1", - "2", - false - ] - ], - "pulp_created": "2019-11-27T13:48:16.462655Z", - "pulp_href": "/pulp/api/v3/content/rpm/packages/9ee09de7-5fff-4805-8b30-9ab95493317d/", - "recommends": [], - "release": "2", - "requires": [], - "rpm_buildhost": "smqe-ws15", - "rpm_group": "Internet/Applications", - "rpm_header_end": 2329, - "rpm_header_start": 928, - "rpm_license": "GPLv2", - "rpm_packager": "", - "rpm_sourcerpm": "fox-1.1-2.src.rpm", - "rpm_vendor": "", - "size_archive": 292, - "size_installed": 42, - "size_package": 2473, - "suggests": [], - "summary": "A dummy package of fox", - "supplements": [], - "time_build": 1331831360, - "time_file": 1574862495, - "url": "http://tstrachota.fedorapeople.org", - "version": "1.1" - } - - -Add content to repository ``foo`` -********************************* - -.. note:: - - It is recommended to omit the ``relative_path`` and have Pulp generate a common pool location. - This will be ``/repo/Packages/s/squirrel-0.1-1.noarch.rpm`` as shown below. - - When specifying a ``relative_path``, make sure to add the exact name of the package - including its name, version, release and arch as in ``squirrel-0.1-1.noarch.rpm``. - It is composed of the ``name-version-release.arch.rpm``. - - .. code-block:: none - - relative_path="squirrel-0.1-1.noarch.rpm" - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/add_remove_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/add_remove.sh - :language: bash - -Repository Version GET response (after task complete): - -.. code:: json - - { - "base_version": null, - "content_summary": { - "added": { - "rpm.package": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packages/?repository_version_added=/pulp/api/v3/repositories/rpm/rpm/805de89c-1b1d-432c-993e-3eb9a3fedd22/versions/1/" - } - }, - "present": { - "rpm.package": { - "count": 1, - "href": "/pulp/api/v3/content/rpm/packages/?repository_version=/pulp/api/v3/repositories/rpm/rpm/805de89c-1b1d-432c-993e-3eb9a3fedd22/versions/1/" - } - }, - "removed": {} - }, - "number": 1, - "pulp_created": "2019-11-27T13:48:18.326333Z", - "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/805de89c-1b1d-432c-993e-3eb9a3fedd22/versions/1/" - } - -One-shot Upload ---------------- - -.. _advisory-upload-workflow: - -Advisory upload -*************** - -Advisory upload requires a file or an artifact containing advisory information in the JSON format. -Repository is an optional argument to create new repository version with uploaded advisory. - -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/advisory_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/advisory.sh - :language: bash - -Advisory GET response (after task complete): - -.. code:: json - - { - "artifact": "/pulp/api/v3/artifacts/b4e3a95c-eb82-410e-8f90-aba59d573058/", - "description": "", - "fromstr": "nobody@redhat.com", - "id": "RHSA-XXXX:XXXX", - "issued_date": "2014-09-24 00:00:00", - "pkglist": [], - "pulp_created": "2019-11-27T13:48:20.364919Z", - "pulp_href": "/pulp/api/v3/content/rpm/advisories/51169df4-f7c6-46df-953c-1714e5dd5869/", - "pushcount": "", - "reboot_suggested": false, - "references": [], - "release": "", - "rights": "", - "severity": "", - "solution": "", - "status": "", - "summary": "", - "title": "", - "type": "", - "updated_date": "", - "version": "" - } - diff --git a/docs/workflows/use_pulp_repo.rst b/docs/workflows/use_pulp_repo.rst deleted file mode 100644 index a16f15bc5..000000000 --- a/docs/workflows/use_pulp_repo.rst +++ /dev/null @@ -1,85 +0,0 @@ -.. _get-content-workflow: - -Get content from Pulp -===================== - -When content is published and distributed, one can download packages directly from Pulp or point -client tools to a repo distributed by Pulp. - - -Download ``foo.rpm`` from Pulp ------------------------------- -Using pulp-cli commands : - -.. literalinclude:: ../_scripts/download_cli.sh - :language: bash - -Using httpie to talk directly to the REST API : - -.. literalinclude:: ../_scripts/download.sh - :language: bash - -Download GET response: - -.. code:: shell - - HTTP/1.1 200 OK - Accept-Ranges: bytes - AppTime: D=417 - Cache-Control: max-age=1800 - Connection: keep-alive - Content-Length: 2473 - Content-Type: application/x-rpm - Date: Wed, 27 Nov 2019 14:17:43 GMT - Etag: "9a9-598026a4cfb06" - Expires: Wed, 27 Nov 2019 14:47:43 GMT - Last-Modified: Sat, 23 Nov 2019 12:10:24 GMT - Server: nginx/1.16.1 - Strict-Transport-Security: max-age=31536000; includeSubDomains; preload - X-Fedora-AppServer: people02.fedoraproject.org - X-GitProject: (null) - - +-----------------------------------------+ - | NOTE: binary data not shown in terminal | - +-----------------------------------------+ - -Install a package from Pulp ---------------------------- -If available, download the config.repo file from the server at distribution's -base_path and store it in /etc/yum.repos.d:: - - curl http://localhost:24816/pulp/content/foo/config.repo > /etc/yum.repos.d/foo.repo - -Now use dnf to install a package:: - - sudo dnf install walrus - -If config.repo file is not served by the distribution, it is necessary to manually set up the -configuration for the repository. One may initialize the configuration by leveraging the utility -``dnf config-manager`` like shown below. Afterwards, the user should be able to install the packages -by running dnf install packages. - -.. code:: shell - - BASE_URL=$(pulp rpm distribution show --name "${DIST_NAME}" | jq -r '.base_url') - BASE_PATH=$(pulp rpm distribution show --name "${DIST_NAME}" | jq -r '.base_path') - - sudo dnf config-manager --add-repo "${BASE_URL}" - sudo dnf config-manager --save \ - --setopt=*"${BASE_PATH}".gpgcheck=0 \ - --setopt=*"${BASE_PATH}".repo_gpgcheck=0 \ - - sudo dnf install walrus - -List and Install applicable Advisories --------------------------------------- - -Make sure Pulp repo is configured in /etc/yum.repos.d/, then use dnf to work with Advisory content. - -List applicable Advisories: - -``$ dnf list-sec`` - -Install a specific advisory: - -``sudo dnf update --advisory XXXX-XXXX:XXXX`` diff --git a/staging_docs/user/reference/.gitkeep b/staging_docs/user/reference/.gitkeep deleted file mode 100644 index e69de29bb..000000000