diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index df1ef996..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,199 +0,0 @@ -# WARNING: DO NOT EDIT! -# -# This file was generated by plugin_template, and is managed by it. Please use -# './plugin-template --docs pulp_ostree' to update this file. -# -# For more info visit https://github.com/pulp/plugin_template -# Makefile for Sphinx documentation -# - -SHELL := /bin/bash -# You can set these variables from the command line. -SPHINXOPTS = -W # turn warnings into errors -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -DIAGRAM_BUILD_DIR = _diagrams -PULP_URL ?= http://localhost:24817 -PULP_API_ROOT ?= /pulp/ - -# Internal variables. -PULP_V3_API_JSON_URL := ${PULP_URL}${PULP_API_ROOT}api/v3/docs/api.json -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 diagrams - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " diagrams to make diagram images" - @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)/* - -install: - python3 -m venv pulpdocs - source pulpdocs/bin/activate && pip install -r ../doc_requirements.txt - -diagrams: -ifneq ($(wildcard diagrams_src), ) - mkdir -p $(DIAGRAM_BUILD_DIR) -ifneq ("$(wildcard pulpdocs/bin/activate)","") - source pulpdocs/bin/activate && python3 -m plantuml diagrams_src/*.dot -else - python3 -m plantuml diagrams_src/*.dot -endif - mv diagrams_src/*.png $(DIAGRAM_BUILD_DIR)/ -else - @echo "Did not find $(DIAGRAM_SOURCE_DIR)." -endif - -$(BUILDDIR)/html/api.json: - mkdir -p $(BUILDDIR)/html - if pulp debug has-plugin --name core --specifier ">=3.44.0.dev"; \ - then \ - curl --fail -o $(BUILDDIR)/html/api.json "$(PULP_V3_API_JSON_URL)?component=ostree&include_html=1"; \ - else \ - curl --fail -o $(BUILDDIR)/html/api.json "$(PULP_V3_API_JSON_URL)?plugin=pulp_ostree&include_html=1"; \ - fi - -html: $(BUILDDIR)/html/api.json - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: -ifneq ("$(wildcard pulpdocs/bin/activate)","") - source pulpdocs/bin/activate && PULP_CONTENT_ORIGIN=localhost $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml -else - PULP_CONTENT_ORIGIN=localhost $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml -endif - @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." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PulpDocs.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PulpDocs.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/PulpDocs" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PulpDocs" - @echo "# devhelp" - -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." - -run: - cd $(BUILDDIR) && python -m http.server 8010 diff --git a/docs/_templates/restapi.html b/docs/_templates/restapi.html deleted file mode 100644 index 7d33c1e7..00000000 --- a/docs/_templates/restapi.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - REST API for Pulp 3 ostree Plugin - - - - - - - - - - - - - diff --git a/docs/changes.rst b/docs/changes.rst deleted file mode 100644 index 96e8eb90..00000000 --- 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 100755 index 176bea4e..00000000 --- a/docs/conf.py +++ /dev/null @@ -1,289 +0,0 @@ -# WARNING: DO NOT EDIT! -# -# This file was generated by plugin_template, and is managed by it. Please use -# './plugin-template --docs pulp_ostree' to update this file. -# -# For more info visit https://github.com/pulp/plugin_template -# 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. - -import os -import sys -from datetime import date - -try: - import sphinx_rtd_theme -except ImportError: - sphinx_rtd_theme = False - -# 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('./extensions')) # noqa - -sys.path.insert(0, os.path.abspath('..')) # noqa - - -# Set environment variable so Sphinx can bootstrap the Django app -os.environ["DJANGO_SETTINGS_MODULE"] = "pulpcore.app.settings" - -import django -django.setup() - -# -- 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', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', - '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 top level toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Pulp ostree Support' - -# Set copyright to current year -copyright = u'2012-{0}, Pulp Team'.format(date.today().year) - -# 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 = "2.5.0.dev" -# The full version, including alpha/beta/rc tags. -release = "2.5.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', 'pulpdocs'] - -# 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 = [] - -# Set autodoc default options -# Document all module/class/etc members, even if they have no docstring. -# Show class inheritance, and group class members together by type (attr, method, etc) -autodoc_default_flags = ['members', 'undoc-members'] -autodoc_member_order = 'groupwise' -autoclass_content = 'both' - -# -- 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 = 'PulpDocs' - - -# -- 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': '', -} - -# 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 - -# If true, show URL addresses after external links. -#man_show_urls = False - -# 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' - -extlinks = { - 'github': ('https://github.com/pulp/pulpcore/issues/%s', '#%s'), - 'redmine': ('https://pulp.plan.io/issues/%s', '#%s'), -} - -# napoleon uses .. attribute by default, but :ivar: is more succinct and looks better, -# particularly on classes with a lot of attributes, like django models and related objects -napoleon_use_ivar = True - -# set primary domain to python so we don't have to include :py: in xref links -default_domain = 'py' - -from sphinx.domains.python import PythonDomain - -# Adapted from: -# https://github.com/sphinx-doc/sphinx/issues/3866#issuecomment-366014346 -# Required because pulpcore.app and pulpcore.plugin have the same class names -# and Sphinx can't figure out which it should be using. This code defaults to -# pulpcore.app -class MyPythonDomain(PythonDomain): - def find_obj(self, env, modname, classname, name, type, searchmode=0): - """Ensures an object always resolves to the desired module if defined there.""" - orig_matches = PythonDomain.find_obj(self, env, modname, classname, name, type, searchmode) - matches = [] - for match in orig_matches: - match_name = match[0] - desired_name = "pulpcore.app.models." + name.strip('.') - if match_name == desired_name: - matches.append(match) - break - if matches: - return matches - else: - return orig_matches - - -def setup(sphinx): - """Use MyPythonDomain in place of PythonDomain""" - sphinx.add_domain(MyPythonDomain, override=True) - -rst_prolog = """.. attention:: - This documentation will be deactivated in the near future. `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 fb09fcc7..00000000 --- a/docs/contributing.rst +++ /dev/null @@ -1,13 +0,0 @@ -Community ---------- - -This plugin exists to serve the community. If we can do more for your use case, please let us know! -Also, contributions are greatly appreciated in the form of: - - 1. `Github Issues `_ - 2. `Github Pull Requests `_ - 3. `Helping other users `_ - -We can be usually found on Matrix in `#pulp-dev` and `#pulp`. - -.. include:: ../CONTRIBUTING.rst diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index da8c631d..00000000 --- a/docs/index.rst +++ /dev/null @@ -1,40 +0,0 @@ -Pulp OSTree Plugin -================== - -The OSTree plugin extends `pulpcore `_ to support -hosting OSTree packages. This plugin is a part of the `Pulp Project `_, -and assumes some familiarity with the `pulpcore documentation -`_. - -If you are just getting started, we recommend getting to know the :doc:`basic -workflows`. - -Features --------- - -* :ref:`Synchronize ` a remote OSTree repository and serve it via Pulp. -* :ref:`Import ` new OSTree commits to an existing repository. -* :ref:`Modify ` commits and refs within a published repository. -* :ref:`Consume ` OSTree content imported to Pulp by leveraging the - `ostree` utility. - -Table of Contents ------------------ - -.. toctree:: - :maxdepth: 1 - - installation - workflows/index - restapi - changes - 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 439bfe50..00000000 --- a/docs/installation.rst +++ /dev/null @@ -1,61 +0,0 @@ -User Setup -========== - -Install ``pulpcore`` --------------------- - -Follow the `installation instructions `_ -provided with pulpcore. - -Install plugin --------------- - -The following sections assume that ``pulpcore`` is `installed `_ -into the virtual environment ``pulpvenv``. - -Users should install the plugin **either** from PyPI or source. The plugin utilizes some of the -features provided by `libostree `_. Please, install it on the -system as well. - -From PyPI -********* - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - pip install pulp-ostree - -From Source -*********** - -.. code-block:: bash - - sudo -u pulp -i - source ~/pulpvenv/bin/activate - git clone https://github.com/pulp/pulp_ostree - cd pulp_ostree - pip install -e . - django-admin runserver 24817 - -Make and Run Migrations ------------------------ - -.. code-block:: bash - - pulp-manager makemigrations pulp_ostree - pulp-manager migrate pulp_ostree - - -Run Services ------------- - -.. code-block:: bash - - pulp-manager runserver - gunicorn pulpcore.content:server --bind 'localhost:24816' --worker-class 'aiohttp.GunicornWebWorker' -w 2 - sudo systemctl restart pulpcore - sudo systemctl restart pulpcore-content - sudo systemctl restart pulpcore-api - sudo systemctl restart pulpcore-worker@1 - sudo systemctl restart pulpcore-worker@2 diff --git a/docs/restapi.rst b/docs/restapi.rst deleted file mode 100644 index 54fee4f1..00000000 --- a/docs/restapi.rst +++ /dev/null @@ -1,2 +0,0 @@ -REST API -======== diff --git a/docs/static/.gitkeep b/docs/static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/template_gitref b/docs/template_gitref deleted file mode 100644 index 9e5cdc02..00000000 --- a/docs/template_gitref +++ /dev/null @@ -1 +0,0 @@ -2021.08.26-364-g6f9579c diff --git a/docs/user/guides/_SUMMARY.md b/docs/user/guides/_SUMMARY.md new file mode 100644 index 00000000..d6f266f5 --- /dev/null +++ b/docs/user/guides/_SUMMARY.md @@ -0,0 +1,2 @@ +* [Import Commit](import-commit.md) +* [Modify Content](modify-content.md) diff --git a/staging_docs/user/guides/00-import-commit.md b/docs/user/guides/import-commit.md similarity index 100% rename from staging_docs/user/guides/00-import-commit.md rename to docs/user/guides/import-commit.md diff --git a/staging_docs/user/guides/01-modify-content.md b/docs/user/guides/modify-content.md similarity index 100% rename from staging_docs/user/guides/01-modify-content.md rename to docs/user/guides/modify-content.md diff --git a/staging_docs/user/tutorials/00-overview.md b/docs/user/index.md similarity index 98% rename from staging_docs/user/tutorials/00-overview.md rename to docs/user/index.md index b5200ec1..70798c8d 100644 --- a/staging_docs/user/tutorials/00-overview.md +++ b/docs/user/index.md @@ -1,4 +1,4 @@ -# Overview +# Welcome to Pulp OSTree The Pulp OSTree plugin adds support for managing OSTree repositories. In this section, readers will learn more about the concept of mirroring remote repositories and publishing diff --git a/staging_docs/user/tutorials/01-sync-and-host.md b/docs/user/tutorials/sync-and-host.md similarity index 100% rename from staging_docs/user/tutorials/01-sync-and-host.md rename to docs/user/tutorials/sync-and-host.md diff --git a/docs/workflows/import.rst b/docs/workflows/import.rst deleted file mode 100644 index 9caa509c..00000000 --- a/docs/workflows/import.rst +++ /dev/null @@ -1,99 +0,0 @@ -.. _import-workflow: - -Import Content -============== - -Create a Repository -------------------- - -Create a new repository by running: - -.. code-block:: bash - - pulp ostree repository create --name fedora-iot - -Import a Commit ---------------- - -First, build an image representing one OSTree commit and wait until the process finishes: - -.. code-block:: bash - - echo """name = \"fishy-commit\" - description = \"Fishy OSTree commit\" - version = \"0.0.1\" - - [[packages]] - name = \"fish\" - version = \"*\"""" > fishy.toml - - sudo composer-cli blueprints push fishy.toml - sudo composer-cli compose start-ostree fishy-commit fedora-iot-commit --ref fedora/stable/x86_64/iot - sudo composer-cli compose status - -Download the result from the server by issuing: - -.. code-block:: bash - - sudo composer-cli compose image ${COMPOSER_TASK_UUID} - -Ensure that the downloaded tarball is readable by Pulp and import it: - -.. code-block:: bash - - pulp ostree repository import-all --name fedora-iot --file ${IMAGE_TARBALL_C1} --repository_name repo - -.. note:: - - The argument ``repository_name`` describes the name of an OSTree repository that is contained - within the tarball. The name of a repository created by ``composer-cli`` defaults to ``repo``. - -Import more Commits -------------------- - -If there is a need to import additional commits, one can do so by attaching new commits to the last -commit in the existing repository: - -.. code-block:: bash - - echo """name = \"vim-commit\" - description = \"Vim OSTree commit\" - version = \"0.0.2\" - - [[packages]] - name = \"vim\" - version = \"*\"""" > vim.toml - - sudo composer-cli blueprints push vim.toml - -.. note:: - - Through this step, the reader should have distributed the imported repository to enable the - ``composer-cli`` utility to download a parent commit to which more commits are going to be - attached. Follow :ref:`the publish workflow ` to learn how to distribute a - repository. - -Set the reference to the parent commit, the URL of a Pulp repository to verify the parent against, -and monitor the status of the build: - -.. code-block:: bash - - sudo composer-cli compose start-ostree vim-commit fedora-iot-commit --ref fedora/stable/x86_64/iot --parent fedora/stable/x86_64/iot --url ${DISTRIBUTION_BASE_URL} - sudo composer-cli compose status - -Download the result from the server by issuing: - -.. code-block:: bash - - sudo composer-cli compose image ${TASK_UUID} - -Import the downloaded tarball into Pulp: - -.. code-block:: bash - - pulp ostree repository import-commits --name fedora-iot --file ${IMAGE_TARBALL_C2} --repository_name repo --ref fedora/stable/x86_64/iot - -.. note:: - - The OSTree plugin currently supports only repositories with the modern ``archive`` format. The - repository's config file still uses the historical term ``archive-z2`` to signify such a format. diff --git a/docs/workflows/index.rst b/docs/workflows/index.rst deleted file mode 100644 index dcfd9ee8..00000000 --- a/docs/workflows/index.rst +++ /dev/null @@ -1,41 +0,0 @@ -Workflows -========= - -.. note:: - - If the OSTree plugin has not yet been configured, please, follow the :doc:`../installation` guide. - These documents assume that users have their environment configured and ready to go. - -For managing local copies of OSTree repositories, it is recommended to instal the following utilities: - -* `ostree `_ - a CLI tool for managing - versioned filesystem trees -* `osbuild-composer `_ - an HTTP service for building - bootable OS images -* `composer-cli `_ - a tool - for use with a WELDR API server, managing blueprints, or building new images - -The utilities are used to demonstrate the way how to create and consume OSTree content. - -For the best user experience, the workflows utilize `Pulp CLI `_. -Install the CLI for the OSTree plugin by running: - -.. code-block:: bash - - pip install pulp-cli-ostree - -`Configure `_ the reference to the Pulp server -for the CLI by running: - -.. code-block:: bash - - pulp config create && pulp config edit - - -.. toctree:: - :maxdepth: 2 - - sync - publish - import - modify diff --git a/docs/workflows/modify.rst b/docs/workflows/modify.rst deleted file mode 100644 index eb41cc8c..00000000 --- a/docs/workflows/modify.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. _modify-workflow: - -Add or Remove Content -===================== - -Users are allowed to copy and remove content within repositories. When a new ref is being added or -removed from a repository, all the referenced commits and file objects will be added or removed as -well in order to preserve the integrity of the repository. - -Users add existing content to a repository by issuing the following commands: - -.. code-block:: bash - - pulp ostree repository ref add --repository foo --name ${REF_NAME} --checksum ${COMMIT_CHECKSUM1} - pulp ostree repository commit add --repository foo --checksum ${COMMIT_CHECKSUM2} - pulp ostree repository config add --repository foo --pulp_href ${PULP_HREF_CONFIG} - -The added content can be listed by inspecting the latest repository version: - -.. code-block:: bash - - pulp ostree repository ref list --repository foo - pulp ostree repository config list --repository foo --version 1 - -Similarly, to remove content, one specifies refs and commits that should be removed, like so: - -.. code-block:: bash - - pulp ostree repository ref remove --repository foo --name ${REF_NAME} --checksum ${COMMIT_CHECKSUM1} - pulp ostree repository commit remove --repository foo --checksum ${COMMIT_CHECKSUM2} - -.. note:: - - Bear in mind that the ``ostree`` utility may require the ``config`` file to be present in the - published repository as well. Otherwise, the ``pull`` operations may not be successful. diff --git a/docs/workflows/publish.rst b/docs/workflows/publish.rst deleted file mode 100644 index 84263e84..00000000 --- a/docs/workflows/publish.rst +++ /dev/null @@ -1,49 +0,0 @@ -.. _publish-workflow: - -Publish and Host -================ - -This section assumes that a user has initialized a repository with OSTree content in it. To do this, -see :doc:`sync` or :doc:`import`. - -Host Content (Create a Distribution) ------------------------------------- - -To serve the OSTree content from Pulp, the user needs to create a distribution that will host the -associated repository at ``${PULP_BASE_ADDR}/pulp/content/``: - -.. code-block:: bash - - pulp ostree distribution create --name fedora-iot --base-path fedora-iot --repository fedora-iot - -The content present in the latest repository version is automatically published and accessible by -package managers (e.g., the ``ostree`` utility). - -Now, configure a local OSTree repository and consume the content, like so: - -.. code-block:: bash - - ostree --repo=repo init --mode=archive - ostree --repo=repo remote --no-gpg-verify add pulpos ${PULP_BASE_ADDR}/pulp/content/fedora-iot - - ostree pull --repo=repo --mirror pulpos:fedora/stable/x86_64/iot --depth=-1 - ostree log --repo=repo fedora/stable/x86_64/iot - -Output:: - - commit 9bbeb2f9961b425b70551b91992e4e3169e7c695f93d99b03e3f2aac463231bf - Parent: 50aeff7f74c66041ffc9e197887bfd5e427248ff1405e0e61e2cff4d3a1cecc7 - ContentChecksum: 237941566711d062b8b73d0c2823225d59c404d78bf184243c6031fa279e8a1f - Date: 2021-09-06 15:48:13 +0000 - (no subject) - - commit 50aeff7f74c66041ffc9e197887bfd5e427248ff1405e0e61e2cff4d3a1cecc7 - ContentChecksum: 10155b85154b87675970fd56c4a3b44c4739b486772926ed7463f1c827e7a236 - Date: 2021-09-06 11:35:16 +0000 - (no subject) - - -.. note:: - - The plugin automatically generates static deltas for a specific subset of commits. Currently, - the summary file is not being updated after every single change to the repository. diff --git a/docs/workflows/sync.rst b/docs/workflows/sync.rst deleted file mode 100644 index 607c3cff..00000000 --- a/docs/workflows/sync.rst +++ /dev/null @@ -1,47 +0,0 @@ -.. _sync-workflow: - -Synchronize a Repository -======================== - -Users can populate their repositories with content from an external sources by syncing -their repository. - -Create a Repository -------------------- - -Start by creating a new repository named "foo": - -.. code-block:: bash - - pulp ostree repository create --name foo - -Create a Remote ---------------- - -Creating a remote object informs Pulp about an external content source: - -.. code-block:: bash - - pulp ostree remote create --name bar --url https://fixtures.pulpproject.org/ostree/small/ - -Use the standard Linux wildcards ``*``, ``?`` to include or exclude refs from a remote repository -when syncing: - -.. code-block:: bash - - pulp ostree remote create --name bar-filtered --url https://fixtures.pulpproject.org/ostree/small/ --include-refs "[\"stable\"]" --exclude-refs "[\"raw*\"]" - -Sync the Repository -------------------- - -Use the remote object to kick off a synchronization task by specifying a repository to sync with. -This tells Pulp to fetch content from the remote source and add it to the repository: - -.. code-block:: bash - - pulp ostree repository sync --name foo --remote bar - -.. note:: - - The OSTree plugin currently supports only repositories with the modern ``archive`` format. The - repository's config file still uses the historical term ``archive-z2`` to signify such a format.