Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add OCI containers #29

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add OCI containers #29

wants to merge 5 commits into from

Conversation

SchoolGuy
Copy link
Member

Linked Items

Fixes #4

Description

This PR has a couple of open points that are not yet done. This message will vanish when the PR can be reviewed.

This PR fixes the bug that the automatically generated code documentation doesn't show.

Mainly however the PR adds Dockerfiles for three different environments:

  • Development: Used for local development, execution of the dockerfile retrieves the project's dependencies from pip.
  • Production: Uses the current stable release project for Cobbler, dependencies get pulled in from the OBS at image build time.
  • Rolling: Uses the unstable rolling release project for Cobbler containers, dependencies get pulled in from the OBS at image build time.

The submission of the dockerfiles is not yet automatically done.

Behaviour changes

Old: Cobbler-TFTP could only be run bare-metal or in a VM

New: Containerized deployments are now also possible.

Category

This is related to a:

  • Bugfix
  • Feature
  • Packaging
  • Docs
  • Code Quality
  • Refactoring
  • Miscellaneous

Tests

  • Unit-Tests were created
  • System-Tests were created
  • Code is already covered by Unit-Tests
  • Code is already covered by System-Tests
  • No tests required

@SchoolGuy SchoolGuy added this to the V0.1.0 milestone Jun 23, 2024
Copy link

codacy-production bot commented Jun 23, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a851f72) 546 19 3.48%
Head commit (6bc8900) 546 (+0) 19 (+0) 3.48% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#29) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@SchoolGuy
Copy link
Member Author

The ReadTheDocs fix was successful.

Before:

Click me
Running Sphinx v6.2.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 13 source files that are out of date
updating environment: [new config] 13 added, 0 changed, 0 removed
reading sources... [  7%] code-autodoc/cobbler_tftp
reading sources... [ 15%] code-autodoc/cobbler_tftp.exceptions
reading sources... [ 23%] code-autodoc/cobbler_tftp.server
reading sources... [ 30%] code-autodoc/cobbler_tftp.settings
reading sources... [ 38%] code-autodoc/cobbler_tftp.settings.data
reading sources... [ 46%] code-autodoc/cobbler_tftp.settings.migrations
reading sources... [ 53%] code-autodoc/cobbler_tftp.types
reading sources... [ 61%] code-autodoc/modules
reading sources... [ 69%] configuration
reading sources... [ 76%] contributing
reading sources... [ 84%] index
reading sources... [ 92%] installation
reading sources... [100%] quickstart-guide
WARNING: autodoc: failed to import module 'cli' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'utils' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'exceptions.settings_exceptions' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'exceptions' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'server.tftp' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'server' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings.data' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings.migrations.v1_0' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings.migrations.whitelist__init__' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings.migrations.whitelist_v1_0' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'settings.migrations' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
WARNING: autodoc: failed to import module 'types' from module 'cobbler_tftp'; the following exception was raised:
No module named 'cobbler_tftp'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  7%] code-autodoc/cobbler_tftp
writing output... [ 15%] code-autodoc/cobbler_tftp.exceptions
writing output... [ 23%] code-autodoc/cobbler_tftp.server
writing output... [ 30%] code-autodoc/cobbler_tftp.settings
writing output... [ 38%] code-autodoc/cobbler_tftp.settings.data
writing output... [ 46%] code-autodoc/cobbler_tftp.settings.migrations
writing output... [ 53%] code-autodoc/cobbler_tftp.types
writing output... [ 61%] code-autodoc/modules
writing output... [ 69%] configuration
writing output... [ 76%] contributing
writing output... [ 84%] index
writing output... [ 92%] installation
writing output... [100%] quickstart-guide
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
Updating searchtools for Read the Docs search... build succeeded, 14 warnings.
The HTML pages are in ../_readthedocs/html.

After:

Click me
Running Sphinx v6.2.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 13 source files that are out of date
updating environment: [new config] 13 added, 0 changed, 0 removed
reading sources... [  7%] code-autodoc/cobbler_tftp
reading sources... [ 15%] code-autodoc/cobbler_tftp.exceptions
reading sources... [ 23%] code-autodoc/cobbler_tftp.server
reading sources... [ 30%] code-autodoc/cobbler_tftp.settings
reading sources... [ 38%] code-autodoc/cobbler_tftp.settings.data
reading sources... [ 46%] code-autodoc/cobbler_tftp.settings.migrations
reading sources... [ 53%] code-autodoc/cobbler_tftp.types
reading sources... [ 61%] code-autodoc/modules
reading sources... [ 69%] configuration
reading sources... [ 76%] contributing
reading sources... [ 84%] index
reading sources... [ 92%] installation
reading sources... [100%] quickstart-guide

WARNING: autodoc: failed to import module 'whitelist__init__' from module 'cobbler_tftp.settings.migrations'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/sphinx/ext/autodoc/importer.py", line 66, in import_module
    return importlib.import_module(modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.asdf/installs/python/3.11.9/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/cobbler_tftp/settings/migrations/whitelist__init__.py", line 6, in <module>
    get_schema(EMPTY_VERSION)
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/cobbler_tftp/settings/migrations/__init__.py", line 216, in get_schema
    return VERSION_LIST[version].settings_schema  # type: ignore
           ~~~~~~~~~~~~^^^^^^^^^
KeyError: CobblerTFTPVersion(major=0, minor=0)

WARNING: autodoc: failed to import module 'whitelist_v1_0' from module 'cobbler_tftp.settings.migrations'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/sphinx/ext/autodoc/importer.py", line 66, in import_module
    return importlib.import_module(modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.asdf/installs/python/3.11.9/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/cobbler_tftp/settings/migrations/whitelist_v1_0.py", line 5, in <module>
    migration.migrate({})
  File "/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/cobbler_tftp/settings/migrations/v1_0.py", line 71, in migrate
    raise SchemaError("v1.0.0: Schema error while validating")
schema.SchemaError: v1.0.0: Schema error while validating

/home/docs/checkouts/readthedocs.org/user_builds/cobbler-tftp/envs/29/lib/python3.11/site-packages/cobbler_tftp/settings/migrations/__init__.py:docstring of cobbler_tftp.settings.migrations.discover_migrations:5: ERROR: Unexpected indentation.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  7%] code-autodoc/cobbler_tftp
writing output... [ 15%] code-autodoc/cobbler_tftp.exceptions
writing output... [ 23%] code-autodoc/cobbler_tftp.server
writing output... [ 30%] code-autodoc/cobbler_tftp.settings
writing output... [ 38%] code-autodoc/cobbler_tftp.settings.data
writing output... [ 46%] code-autodoc/cobbler_tftp.settings.migrations
writing output... [ 53%] code-autodoc/cobbler_tftp.types
writing output... [ 61%] code-autodoc/modules
writing output... [ 69%] configuration
writing output... [ 76%] contributing
writing output... [ 84%] index
writing output... [ 92%] installation
writing output... [100%] quickstart-guide

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
Updating searchtools for Read the Docs search... build succeeded, 3 warnings.

The HTML pages are in ../_readthedocs/html.

@SchoolGuy SchoolGuy added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 23, 2024
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Jun 23, 2024
@SchoolGuy
Copy link
Member Author

SchoolGuy commented Aug 2, 2024

This is blocked until python3-schema and python3-daemon are available for Leap 15.6 and Python 3.11.

Edit: I opened a bsc for the issue - https://bugzilla.suse.com/show_bug.cgi?id=1228797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Pull Request
Development

Successfully merging this pull request may close these issues.

Build & Publish OCI image
1 participant