Skip to content

Commit

Permalink
Merge branch 'main' into feature/ubuntu_24_04_adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
koryaga authored Nov 21, 2024
2 parents 812e78d + 0e9f9d5 commit 0756154
Show file tree
Hide file tree
Showing 10 changed files with 1,139 additions and 556 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Results:
### Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] There is no breaking changes, or migration patch is provided
- [ ] Integration CI passed
- [ ] Unit tests. If Yes list of new/changed tests with brief description
- [ ] There is no merge conflicts
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ Kubemarine is an open source, lightweight and powerful management tool built for
- Package extension with [open extension API](documentation/PackageExtension.md)
- Support different deployment schemes (all-in-one, mini-HA, HA, and so on)

## Repository structure

There are following key locations in the repository

| Paths | Description |
| ----- | ----------- |
| `.github/workflows/`, `ci/` | Contain GitHub Actions configuration which runs unit/integration tests, builds/publishes artifacts, etc |
| `documentation/`, `examples/`, `README.md` | Contain documentation and examples |
| `kubemarine/` | Contains source code for KubeMarine python package |
| `test/` | Contains tests |
| `bin/`, `scripts/ci/` | Contains auxiliary scripts used during KubeMarine build |
| `scripts/thirdparties/` | Contains auxiliary script used to update KubeMarine thirdparties versions |
| `Dockerfile`, `kubemarine.spec`, `MANIFEST.in`, `pyproject.toml`, `requirements-pyinstaller.txt`, `setup.py` | Different files used to build KubeMarine artifacts (image, binaries, package) |

## Kubemarine Binary Installation
Proceed the following steps to install Kubemarine on your environment:
1. Download the binary file for your system from the latest [release](https://github.com/Netcracker/KubeMarine/releases)
Expand Down Expand Up @@ -174,6 +188,10 @@ Also, check out the following inventory examples:
- [cluster.yaml](examples/cluster.yaml)
- [procedure.yaml](examples/procedure.yaml)

For maintainers and developers there is useful [internal documentation](/documentation/internal/), for example:
* [How to write patches](/documentation/internal/Patches.md)
* [How to make new release](/documentation/internal/Release.md)

## Issues, Questions
If you have any problems while working with Kubemarine, feel free to open a [new issue](https://github.com/netcracker/kubemarine/issues) or even
[PR](https://github.com/netcracker/kubemarine/pulls) with related changes.
Expand Down
2 changes: 1 addition & 1 deletion documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ For cluster machines, ensure the following requirements are met:
* Centos 7.5+, 8.4, 9
* RHEL 7.5+, 8.4, 8.6, 8.7, 8.8, 8.9, 9.2
* Oracle Linux 7.5+, 8.4, 9.2
* RockyLinux 8.6, 8.7, 8.8, 9.2, 9.3
* RockyLinux 8.6, 8.7, 8.8, 9.2, 9.3 ,9.4
* Ubuntu 20.04, 22.04.1, 24.04.1

**Note**: Ubuntu 24.04 is supported only with latest kubernetes versions: v1.29.7, v1.30.3, v1.31.1.
Expand Down
1,631 changes: 1,083 additions & 548 deletions documentation/Troubleshooting.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions documentation/internal/Release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Releasing KubeMarine

If you want to make a new KubeMarine release, you need to do following:
1. On the `main` branch, update KubeMarine version and create tag (replace `X.X.X` with actual version):
```
python3 -m pip install bumpver
python3 -m bumpver update --set-version=X.X.X
```
2. Wait for [GitHub Actions](https://github.com/Netcracker/KubeMarine/actions) completion and verify newly create pre-release on [GitHub Release page](https://github.com/Netcracker/KubeMarine/releases). Following artifacts are essential for each release:
* KubeMarine binaries for different OS. They could be found in release assets.
* KubeMarine python distribution package. It could be found in release assets.
* [KubeMarine image](https://github.com/Netcracker/KubeMarine/pkgs/container/kubemarine).
* [Kubemarine documentation](https://github.com/Netcracker/KubeMarine/tree/main/documentation).
3. Once you have verified that KubeMarine artifacts are OK, change your release from `pre-release` to `latest release` on [GitHub Release page](https://github.com/Netcracker/KubeMarine/releases). This will publish KubeMarine distribution package to PyPI.
5 changes: 5 additions & 0 deletions kubemarine/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def get_kme_dictionary() -> dict:
"in cluster.yaml{previous_version_spec}, "
"but not present in procedure inventory{next_version_spec}. "
"Please, specify required 'sandbox_image' explicitly in procedure inventory."
},
'KME0014': {
"name": "The provided Helm chart URL {url} does not return {type} content in the {destination} file. "
"Please validate the URL. If this is a private repository, "
"ensure that the correct authentication is provided."
}
}

Expand Down
15 changes: 11 additions & 4 deletions kubemarine/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from kubemarine.core.cluster import KubernetesCluster, EnrichmentStage, enrichment
from kubemarine import jinja, thirdparties
from kubemarine.core import utils, static, errors, os as kos, log
from kubemarine.core.errors import FailException, KME
from kubemarine.core.yaml_merger import default_merger
from kubemarine.core.group import NodeGroup
from kubemarine.kubernetes.daemonset import DaemonSet
Expand Down Expand Up @@ -916,12 +917,18 @@ def get_local_chart_path(logger: log.EnhancedLogger, config: dict) -> str:
extension = destination.split('.')[-1]
if extension == 'zip':
logger.verbose('Unzip will be used for unpacking')
with zipfile.ZipFile(destination, 'r') as zf:
zf.extractall(local_chart_folder)
try:
with zipfile.ZipFile(destination, 'r') as zf:
zf.extractall(local_chart_folder)
except zipfile.BadZipFile as e:
raise KME(code="KME0014", url=chart_path, type=extension, destination=destination) from e
else:
logger.verbose('Tar will be used for unpacking')
with tarfile.open(destination, "r:gz") as tf:
tf.extractall(local_chart_folder)
try:
with tarfile.open(destination, "r:gz") as tf:
tf.extractall(local_chart_folder)
except tarfile.ReadError as e:
raise KME(code="KME0014", url=chart_path, type="tar:gz", destination=destination) from e
else:
logger.debug("Create copy of chart to work with")
shutil.copytree(chart_path, local_chart_folder, dirs_exist_ok=True)
Expand Down
5 changes: 4 additions & 1 deletion kubemarine/resources/configurations/globals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,12 @@ compatibility_map:
- '8.7'
- '8.8'
- '8.9'
- '8.10'
- os_family: 'rhel9'
versions:
- '9.2'

- '9.3'
- '9.4'
rocky:
- os_family: 'rhel8'
versions:
Expand All @@ -340,6 +342,7 @@ compatibility_map:
versions:
- '9.2'
- '9.3'
- '9.4'
ubuntu:
- os_family: 'debian'
versions:
Expand Down
2 changes: 1 addition & 1 deletion kubemarine/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.32.3
v0.33.1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Issues = "https://github.com/Netcracker/KubeMarine/issues/"
# 1. pip install bumpver
# 2. bumpver update --set-version <new version>
[tool.bumpver]
current_version = "v0.32.3"
current_version = "v0.33.1"
version_pattern = "vMAJOR.MINOR.PATCH"
commit_message = "bump version to {new_version}"
commit = true
Expand Down

0 comments on commit 0756154

Please sign in to comment.