testcloud 0.11.8__tar.gz → 0.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- testcloud-0.13.0/.fmf/version +1 -0
- testcloud-0.13.0/.github/workflows/release.yml +48 -0
- testcloud-0.13.0/.packit.yaml +94 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/PKG-INFO +40 -23
- testcloud-0.11.8/testcloud.egg-info/PKG-INFO → testcloud-0.13.0/README.md +30 -31
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/source/conf.py +2 -1
- testcloud-0.13.0/docs/source/develop.rst +108 -0
- testcloud-0.13.0/packaging/rpm/testcloud.spec +127 -0
- testcloud-0.13.0/packaging/rpm/testcloud.sysusers +1 -0
- testcloud-0.13.0/plans/tmt.fmf +20 -0
- testcloud-0.13.0/plans/unit.fmf +8 -0
- testcloud-0.13.0/pyproject.toml +45 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/requirements.txt +1 -0
- testcloud-0.13.0/test/tmt/regular-user/data/.fmf/version +1 -0
- testcloud-0.13.0/test/tmt/regular-user/data/main.fmf +22 -0
- testcloud-0.13.0/test/tmt/regular-user/main.fmf +8 -0
- testcloud-0.13.0/test/tmt/regular-user/test.sh +26 -0
- testcloud-0.13.0/test/unit/main.fmf +7 -0
- testcloud-0.13.0/test/unit/test_fedora.py +75 -0
- testcloud-0.13.0/test/unit/test_util.py +19 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/__init__.py +3 -3
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/config.py +2 -2
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/debian.py +1 -1
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/fedora.py +58 -15
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/misc.py +15 -9
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/domain_configuration.py +32 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/image.py +2 -9
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/instance.py +16 -11
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/util.py +11 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/tox.ini +0 -7
- testcloud-0.11.8/README.md +0 -449
- testcloud-0.11.8/pyproject.toml +0 -2
- testcloud-0.11.8/setup.cfg +0 -4
- testcloud-0.11.8/setup.py +0 -72
- testcloud-0.11.8/testcloud.egg-info/SOURCES.txt +0 -48
- testcloud-0.11.8/testcloud.egg-info/dependency_links.txt +0 -1
- testcloud-0.11.8/testcloud.egg-info/entry_points.txt +0 -3
- testcloud-0.11.8/testcloud.egg-info/requires.txt +0 -7
- testcloud-0.11.8/testcloud.egg-info/top_level.txt +0 -1
- {testcloud-0.11.8 → testcloud-0.13.0}/.gitignore +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/LICENSE +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/conf/99-testcloud-nonroot-libvirt-access.rules +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/conf/settings-example.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/conf/testcloud +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/LICENSE +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/Makefile +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/source/api.rst +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/source/indepth.rst +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/docs/source/index.rst +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/manpages/testcloud.1 +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/run_testcloud.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/test/__init__.py +0 -0
- {testcloud-0.11.8/test → testcloud-0.13.0/test/unit}/test_cli.py +0 -0
- {testcloud-0.11.8/test → testcloud-0.13.0/test/unit}/test_config.py +0 -0
- {testcloud-0.11.8/test → testcloud-0.13.0/test/unit}/test_image.py +0 -0
- {testcloud-0.11.8/test → testcloud-0.13.0/test/unit}/test_instance.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/cli.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/__init__.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/alma.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/centos.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/oracle.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/rocky.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/distro_utils/ubuntu.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/exceptions.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/sql.py +0 -0
- {testcloud-0.11.8 → testcloud-0.13.0}/testcloud/workarounds.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
run-name: Release ${{ inputs.ref || github.ref_name }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
ref:
|
|
10
|
+
type: string
|
|
11
|
+
description: 'Tag to release'
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
permissions: {}
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
with:
|
|
22
|
+
ref: ${{ inputs.ref }}
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
- uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 # v3.0.1
|
|
25
|
+
|
|
26
|
+
deploy:
|
|
27
|
+
needs: [build]
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment:
|
|
30
|
+
name: pypi
|
|
31
|
+
url: https://pypi.org/p/testcloud
|
|
32
|
+
permissions:
|
|
33
|
+
id-token: write
|
|
34
|
+
attestations: write
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
38
|
+
with:
|
|
39
|
+
name: Packages
|
|
40
|
+
path: dist
|
|
41
|
+
|
|
42
|
+
- name: Generate artifact attestation for sdist and wheel
|
|
43
|
+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
|
|
44
|
+
with:
|
|
45
|
+
subject-path: "dist/*"
|
|
46
|
+
|
|
47
|
+
- name: Publish to PyPI
|
|
48
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
specfile_path: packaging/rpm/testcloud.spec
|
|
4
|
+
files_to_sync:
|
|
5
|
+
- src: packaging/rpm/
|
|
6
|
+
dest: ./
|
|
7
|
+
delete: true
|
|
8
|
+
filters:
|
|
9
|
+
- "protect .git*"
|
|
10
|
+
- "protect sources"
|
|
11
|
+
- "protect changelog"
|
|
12
|
+
- .packit.yaml
|
|
13
|
+
|
|
14
|
+
upstream_package_name: testcloud
|
|
15
|
+
downstream_package_name: testcloud
|
|
16
|
+
|
|
17
|
+
upstream_project_url: https://github.com/teemtee/testcloud
|
|
18
|
+
issue_repository: https://github.com/teemtee/testcloud
|
|
19
|
+
|
|
20
|
+
srpm_build_deps:
|
|
21
|
+
- hatch
|
|
22
|
+
- python3-hatch-vcs
|
|
23
|
+
|
|
24
|
+
actions:
|
|
25
|
+
create-archive:
|
|
26
|
+
- hatch build -t sdist
|
|
27
|
+
- bash -c "echo dist/testcloud-$PACKIT_PROJECT_VERSION.tar.gz"
|
|
28
|
+
get-current-version:
|
|
29
|
+
- hatch version
|
|
30
|
+
|
|
31
|
+
targets: &all-targets
|
|
32
|
+
- fedora-all
|
|
33
|
+
- epel-9
|
|
34
|
+
- epel-10
|
|
35
|
+
|
|
36
|
+
# Common definitions
|
|
37
|
+
_:
|
|
38
|
+
# Copr jobs under the packit project
|
|
39
|
+
- &copr-under-packit
|
|
40
|
+
job: copr_build
|
|
41
|
+
additional_repos:
|
|
42
|
+
- copr://@teemtee/stable
|
|
43
|
+
|
|
44
|
+
# Copr jobs under the teemtee project
|
|
45
|
+
- &copr-under-teemtee
|
|
46
|
+
<<: *copr-under-packit
|
|
47
|
+
list_on_homepage: true
|
|
48
|
+
preserve_project: true
|
|
49
|
+
owner: "@teemtee"
|
|
50
|
+
|
|
51
|
+
jobs:
|
|
52
|
+
# Build pull requests
|
|
53
|
+
- <<: *copr-under-packit
|
|
54
|
+
trigger: pull_request
|
|
55
|
+
|
|
56
|
+
# Build commits merged to main to latest
|
|
57
|
+
- <<: *copr-under-teemtee
|
|
58
|
+
trigger: commit
|
|
59
|
+
branch: main
|
|
60
|
+
project: latest
|
|
61
|
+
release_suffix: "{PACKIT_PROJECT_BRANCH}"
|
|
62
|
+
|
|
63
|
+
# Build released bits to stable
|
|
64
|
+
- <<: *copr-under-teemtee
|
|
65
|
+
trigger: release
|
|
66
|
+
project: stable
|
|
67
|
+
|
|
68
|
+
# Test pull requests
|
|
69
|
+
- job: tests
|
|
70
|
+
trigger: pull_request
|
|
71
|
+
|
|
72
|
+
# Propose downstream pull requests
|
|
73
|
+
- job: propose_downstream
|
|
74
|
+
trigger: release
|
|
75
|
+
dist_git_branches:
|
|
76
|
+
rawhide:
|
|
77
|
+
fast_forward_merge_into:
|
|
78
|
+
- fedora-branched
|
|
79
|
+
- epel-10
|
|
80
|
+
- epel-9
|
|
81
|
+
|
|
82
|
+
# Create koji builds
|
|
83
|
+
- job: koji_build
|
|
84
|
+
trigger: commit
|
|
85
|
+
allowed_pr_authors: ["packit", "all_committers"]
|
|
86
|
+
dist_git_branches: *all-targets
|
|
87
|
+
|
|
88
|
+
# Create bodhi updates
|
|
89
|
+
- job: bodhi_update
|
|
90
|
+
trigger: commit
|
|
91
|
+
dist_git_branches:
|
|
92
|
+
- fedora-branched
|
|
93
|
+
- epel-10
|
|
94
|
+
- epel-9
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: testcloud
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: A tool to download and boot cloud images locally, with an easy to use API.
|
|
5
|
-
|
|
6
|
-
Author: Mike Ruckman
|
|
7
|
-
|
|
8
|
-
License: GPLv2+
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
5
|
+
Project-URL: Homepage, https://github.com/teemtee/testcloud
|
|
6
|
+
Author-email: Mike Ruckman <roshi@fedoraproject.org>
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
10
8
|
License-File: LICENSE
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Requires-Dist: fedora-distro-aliases>=1.5
|
|
11
11
|
Requires-Dist: libvirt-python
|
|
12
|
+
Requires-Dist: packaging
|
|
12
13
|
Requires-Dist: peewee
|
|
13
14
|
Requires-Dist: requests
|
|
14
|
-
Requires-Dist: packaging
|
|
15
15
|
Provides-Extra: image-resolve-caching
|
|
16
|
-
Requires-Dist:
|
|
16
|
+
Requires-Dist: requests-cache>=1.2; extra == 'image-resolve-caching'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
17
18
|
|
|
18
19
|
# testcloud
|
|
19
20
|
|
|
@@ -129,7 +130,7 @@ the **virt-manager** tool.
|
|
|
129
130
|
|
|
130
131
|
Instances can be created with a different architecture than the host architecture. You'll need to have a proper
|
|
131
132
|
qemu binary installed for this to work (eg. qemu-system-aarch64-core for aarch64 on x86_64 on Fedora). Supported
|
|
132
|
-
architectures in testcloud are: x86_64, aarch64, ppc64le, and
|
|
133
|
+
architectures in testcloud are: x86_64, aarch64, ppc64le, s390x, and riscv64. Any combinations of these are supported.
|
|
133
134
|
|
|
134
135
|
Some examples:
|
|
135
136
|
|
|
@@ -148,6 +149,11 @@ $ testcloud create centos-stream --arch x86_64
|
|
|
148
149
|
$ testcloud create fedora:rawhide --arch ppc64le
|
|
149
150
|
```
|
|
150
151
|
|
|
152
|
+
```
|
|
153
|
+
# Debian riscv64 on x86_64 (or any other)
|
|
154
|
+
$ testcloud create debian:13 --arch riscv64
|
|
155
|
+
```
|
|
156
|
+
|
|
151
157
|
### Starting, stopping, and removing an instance
|
|
152
158
|
|
|
153
159
|
Instances can be started and stopped using the `instance` interface of
|
|
@@ -435,21 +441,32 @@ This is a good place to contribute if you\'re looking to help out.
|
|
|
435
441
|
|
|
436
442
|
### Releasing
|
|
437
443
|
|
|
438
|
-
Testcloud is being released to all stable Fedora releases, EPEL branches, and
|
|
444
|
+
Testcloud is being released to all stable Fedora releases, EPEL branches, and PyPI.
|
|
439
445
|
The release process can be summed up to these steps:
|
|
440
446
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
447
|
+
* Make sure the documentation is up-to-date (README.md, docs, manpages)
|
|
448
|
+
* Add release notes as needed and commit as `Release x.y.z`
|
|
449
|
+
* Push changes, create a release pull request, make sure all tests pass, merge
|
|
450
|
+
* Tag the commit with `x.y.z`, push tags using `git push --tags`
|
|
451
|
+
* Create a new [github release](https://github.com/teemtee/testcloud/releases/) based on the tag above
|
|
452
|
+
* Mention the most important changes in the release name, do not include version
|
|
453
|
+
* Push the `Generate release notes` button to create the content, publish the release
|
|
454
|
+
* Check Fedora [pull requests](https://src.fedoraproject.org/rpms/testcloud/pull-requests) and review proposed changes
|
|
455
|
+
* Make sure that tests pass and merge individual pull requests
|
|
456
|
+
* Close the corresponding [release milestone](https://github.com/teemtee/testcloud/milestones)
|
|
457
|
+
|
|
458
|
+
### Releases
|
|
459
|
+
|
|
460
|
+
#### 0.13.0
|
|
461
|
+
|
|
462
|
+
* Better test for requests-cache presence and enablement
|
|
463
|
+
|
|
464
|
+
#### 0.12.0
|
|
465
|
+
|
|
466
|
+
* Add support for the RISC-V architecture
|
|
467
|
+
* Replace deprecated oraculum with `fedora-distro-aliases`
|
|
468
|
+
* Run `chcon` only on systems where SELinux is enabled
|
|
469
|
+
* Enable pull request testing and automate releases
|
|
453
470
|
|
|
454
471
|
### Issue Tracking and Roadmap
|
|
455
472
|
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: testcloud
|
|
3
|
-
Version: 0.11.8
|
|
4
|
-
Summary: A tool to download and boot cloud images locally, with an easy to use API.
|
|
5
|
-
Home-page: https://pagure.io/testcloud
|
|
6
|
-
Author: Mike Ruckman
|
|
7
|
-
Author-email: roshi@fedoraproject.org
|
|
8
|
-
License: GPLv2+
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: libvirt-python
|
|
12
|
-
Requires-Dist: peewee
|
|
13
|
-
Requires-Dist: requests
|
|
14
|
-
Requires-Dist: packaging
|
|
15
|
-
Provides-Extra: image-resolve-caching
|
|
16
|
-
Requires-Dist: requests_cache>=1.2; extra == "image-resolve-caching"
|
|
17
|
-
|
|
18
1
|
# testcloud
|
|
19
2
|
|
|
20
3
|
**testcloud** is a small helper script to download and boot cloud/coreos VM images
|
|
@@ -129,7 +112,7 @@ the **virt-manager** tool.
|
|
|
129
112
|
|
|
130
113
|
Instances can be created with a different architecture than the host architecture. You'll need to have a proper
|
|
131
114
|
qemu binary installed for this to work (eg. qemu-system-aarch64-core for aarch64 on x86_64 on Fedora). Supported
|
|
132
|
-
architectures in testcloud are: x86_64, aarch64, ppc64le, and
|
|
115
|
+
architectures in testcloud are: x86_64, aarch64, ppc64le, s390x, and riscv64. Any combinations of these are supported.
|
|
133
116
|
|
|
134
117
|
Some examples:
|
|
135
118
|
|
|
@@ -148,6 +131,11 @@ $ testcloud create centos-stream --arch x86_64
|
|
|
148
131
|
$ testcloud create fedora:rawhide --arch ppc64le
|
|
149
132
|
```
|
|
150
133
|
|
|
134
|
+
```
|
|
135
|
+
# Debian riscv64 on x86_64 (or any other)
|
|
136
|
+
$ testcloud create debian:13 --arch riscv64
|
|
137
|
+
```
|
|
138
|
+
|
|
151
139
|
### Starting, stopping, and removing an instance
|
|
152
140
|
|
|
153
141
|
Instances can be started and stopped using the `instance` interface of
|
|
@@ -435,21 +423,32 @@ This is a good place to contribute if you\'re looking to help out.
|
|
|
435
423
|
|
|
436
424
|
### Releasing
|
|
437
425
|
|
|
438
|
-
Testcloud is being released to all stable Fedora releases, EPEL branches, and
|
|
426
|
+
Testcloud is being released to all stable Fedora releases, EPEL branches, and PyPI.
|
|
439
427
|
The release process can be summed up to these steps:
|
|
440
428
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
429
|
+
* Make sure the documentation is up-to-date (README.md, docs, manpages)
|
|
430
|
+
* Add release notes as needed and commit as `Release x.y.z`
|
|
431
|
+
* Push changes, create a release pull request, make sure all tests pass, merge
|
|
432
|
+
* Tag the commit with `x.y.z`, push tags using `git push --tags`
|
|
433
|
+
* Create a new [github release](https://github.com/teemtee/testcloud/releases/) based on the tag above
|
|
434
|
+
* Mention the most important changes in the release name, do not include version
|
|
435
|
+
* Push the `Generate release notes` button to create the content, publish the release
|
|
436
|
+
* Check Fedora [pull requests](https://src.fedoraproject.org/rpms/testcloud/pull-requests) and review proposed changes
|
|
437
|
+
* Make sure that tests pass and merge individual pull requests
|
|
438
|
+
* Close the corresponding [release milestone](https://github.com/teemtee/testcloud/milestones)
|
|
439
|
+
|
|
440
|
+
### Releases
|
|
441
|
+
|
|
442
|
+
#### 0.13.0
|
|
443
|
+
|
|
444
|
+
* Better test for requests-cache presence and enablement
|
|
445
|
+
|
|
446
|
+
#### 0.12.0
|
|
447
|
+
|
|
448
|
+
* Add support for the RISC-V architecture
|
|
449
|
+
* Replace deprecated oraculum with `fedora-distro-aliases`
|
|
450
|
+
* Run `chcon` only on systems where SELinux is enabled
|
|
451
|
+
* Enable pull request testing and automate releases
|
|
453
452
|
|
|
454
453
|
### Issue Tracking and Roadmap
|
|
455
454
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# All configuration values have a default; values that are commented out
|
|
13
13
|
# serve to show the default.
|
|
14
14
|
|
|
15
|
+
import importlib.metadata
|
|
15
16
|
import sys
|
|
16
17
|
import os
|
|
17
18
|
|
|
@@ -55,7 +56,7 @@ copyright = "2016-2024, testCloud devs"
|
|
|
55
56
|
# built documents.
|
|
56
57
|
#
|
|
57
58
|
# The short X.Y version.
|
|
58
|
-
version =
|
|
59
|
+
version = importlib.metadata.version("testcloud")
|
|
59
60
|
# The full version, including alpha/beta/rc tags.
|
|
60
61
|
release = version
|
|
61
62
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.. _development:
|
|
2
|
+
|
|
3
|
+
=====================
|
|
4
|
+
Testcloud Development
|
|
5
|
+
=====================
|
|
6
|
+
|
|
7
|
+
To develop **testcloud**, you need to perform a more complicated process to install all its dependencies, download the source code and perform a set-up.
|
|
8
|
+
|
|
9
|
+
Prerequisites
|
|
10
|
+
=============
|
|
11
|
+
#. Install the dependencies for testcloud.
|
|
12
|
+
|
|
13
|
+
.. code-block:: bash
|
|
14
|
+
|
|
15
|
+
$ sudo dnf builddep testcloud
|
|
16
|
+
|
|
17
|
+
#. Start ``libvirtd``.
|
|
18
|
+
|
|
19
|
+
.. code-block:: bash
|
|
20
|
+
|
|
21
|
+
$ sudo systemctl start libvirtd
|
|
22
|
+
|
|
23
|
+
#. Add the ``testcloud`` group to the system.
|
|
24
|
+
|
|
25
|
+
.. code-block:: bash
|
|
26
|
+
|
|
27
|
+
$ sudo groupadd testcloud
|
|
28
|
+
|
|
29
|
+
#. Add a user into the ``testcloud`` group.
|
|
30
|
+
|
|
31
|
+
.. code-block:: bash
|
|
32
|
+
|
|
33
|
+
$ sudo usermod -a -G testcloud $USER
|
|
34
|
+
|
|
35
|
+
#. Log out of the system and log in again to update the group information on your user or use a login shell on a different terminal.
|
|
36
|
+
|
|
37
|
+
.. code-block:: bash
|
|
38
|
+
|
|
39
|
+
$ su - $USER
|
|
40
|
+
|
|
41
|
+
Installation
|
|
42
|
+
============
|
|
43
|
+
|
|
44
|
+
#. Clone the testcloud repository.
|
|
45
|
+
|
|
46
|
+
.. code-block:: bash
|
|
47
|
+
|
|
48
|
+
$ git clone https://pagure.io/testcloud.git
|
|
49
|
+
|
|
50
|
+
#. Create the application directories.
|
|
51
|
+
|
|
52
|
+
.. code-block:: bash
|
|
53
|
+
|
|
54
|
+
$ sudo mkdir -p -m 775 /var/lib/testcloud
|
|
55
|
+
|
|
56
|
+
$ sudo mkdir -p -m 775 /var/lib/testcloud/instances
|
|
57
|
+
|
|
58
|
+
$ sudo mkdir -p -m 775 /var/lib/testcloud/backingstores
|
|
59
|
+
|
|
60
|
+
#. Change ownership on these directories to enable their use with testcloud.
|
|
61
|
+
|
|
62
|
+
.. code-block:: bash
|
|
63
|
+
|
|
64
|
+
$ sudo chown qemu:testcloud /var/lib/testcloud
|
|
65
|
+
|
|
66
|
+
$ sudo chown qemu:testcloud /var/lib/testcloud/instances
|
|
67
|
+
|
|
68
|
+
$ sudo chown qemu:testcloud /var/lib/testcloud/backingstores
|
|
69
|
+
|
|
70
|
+
#. Copy the ``.rules`` file to the ``polkit`` rules.
|
|
71
|
+
|
|
72
|
+
.. code-block:: bash
|
|
73
|
+
|
|
74
|
+
$ sudo cp conf/99-testcloud-nonroot-libvirt-access.rules /etc/polkit-1/rules.d/
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Running testcloud
|
|
78
|
+
=================
|
|
79
|
+
|
|
80
|
+
#. Navigate to your testcloud git repository.
|
|
81
|
+
|
|
82
|
+
.. code-block:: bash
|
|
83
|
+
|
|
84
|
+
$ cd testcloud
|
|
85
|
+
|
|
86
|
+
#. Execute the ``run_testcloud.py`` script to run the testcloud. You can use any options as with the regular installation, for example:
|
|
87
|
+
|
|
88
|
+
.. code-block:: bash
|
|
89
|
+
|
|
90
|
+
$ ./run_testcloud.py instance create ...
|
|
91
|
+
|
|
92
|
+
.. tip::
|
|
93
|
+
|
|
94
|
+
Alternatively, you can use **pip** to install testcloud onto the system and then use it like it has been installed normally.
|
|
95
|
+
To do it, use the ``pip3 install -e . --user`` command in the project directory.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
Testing
|
|
99
|
+
=======
|
|
100
|
+
|
|
101
|
+
There is a small test suite that you can run using ``tox``, to start the tests:
|
|
102
|
+
|
|
103
|
+
.. code-block:: bash
|
|
104
|
+
|
|
105
|
+
$ tox
|
|
106
|
+
|
|
107
|
+
Thank you very much for contributions.
|
|
108
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
%if 0%{?rhel} <= 9
|
|
2
|
+
%global _sysusersdir /usr/lib/sysusers.d
|
|
3
|
+
%endif
|
|
4
|
+
|
|
5
|
+
Name: testcloud
|
|
6
|
+
Version: 0.0.0
|
|
7
|
+
Release: %autorelease
|
|
8
|
+
Summary: Tool for running cloud images locally
|
|
9
|
+
|
|
10
|
+
License: GPL-2.0-or-later
|
|
11
|
+
URL: https://github.com/teemtee/testcloud
|
|
12
|
+
Source0: %{pypi_source testcloud}
|
|
13
|
+
Source1: testcloud.sysusers
|
|
14
|
+
|
|
15
|
+
ExclusiveArch: %{kernel_arches} noarch
|
|
16
|
+
BuildArch: noarch
|
|
17
|
+
|
|
18
|
+
BuildRequires: systemd-rpm-macros
|
|
19
|
+
%{?sysusers_requires_compat}
|
|
20
|
+
|
|
21
|
+
Requires: polkit
|
|
22
|
+
|
|
23
|
+
Recommends: edk2-ovmf
|
|
24
|
+
|
|
25
|
+
Requires: python3-%{name} = %{version}-%{release}
|
|
26
|
+
|
|
27
|
+
%description
|
|
28
|
+
testcloud is a relatively simple system which is capable of booting images
|
|
29
|
+
designed for cloud systems on a local system with minimal configuration.
|
|
30
|
+
testcloud is designed to be (and remain) somewhat simple, trading fancy cloud
|
|
31
|
+
system features for ease of use and sanity in development.
|
|
32
|
+
|
|
33
|
+
%package -n python3-%{name}
|
|
34
|
+
Summary: Python 3 interface to testcloud
|
|
35
|
+
|
|
36
|
+
BuildRequires: bash-completion
|
|
37
|
+
BuildRequires: python3-devel
|
|
38
|
+
BuildRequires: python3-pytest
|
|
39
|
+
|
|
40
|
+
Requires: acl
|
|
41
|
+
Requires: genisoimage
|
|
42
|
+
Requires: libvirt-daemon
|
|
43
|
+
Requires: libvirt-daemon-config-network
|
|
44
|
+
Requires: libvirt-daemon-driver-qemu
|
|
45
|
+
Requires: libvirt-daemon-driver-storage-core
|
|
46
|
+
Requires: python3-fedora-distro-aliases
|
|
47
|
+
Recommends: butane
|
|
48
|
+
Suggests: python3-libguestfs
|
|
49
|
+
Suggests: libguestfs-tools-c
|
|
50
|
+
|
|
51
|
+
%description -n python3-%{name}
|
|
52
|
+
Python 3 interface to testcloud.
|
|
53
|
+
|
|
54
|
+
%pre
|
|
55
|
+
%sysusers_create_compat %{SOURCE1}
|
|
56
|
+
|
|
57
|
+
%prep
|
|
58
|
+
%autosetup -n %{name}-%{version} -p1
|
|
59
|
+
# Drop coverage testing
|
|
60
|
+
sed -i 's/ --cov-report=term-missing --cov testcloud//g' tox.ini
|
|
61
|
+
|
|
62
|
+
%generate_buildrequires
|
|
63
|
+
%pyproject_buildrequires
|
|
64
|
+
|
|
65
|
+
%build
|
|
66
|
+
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
|
67
|
+
%pyproject_wheel
|
|
68
|
+
|
|
69
|
+
%install
|
|
70
|
+
%pyproject_install
|
|
71
|
+
%pyproject_save_files testcloud
|
|
72
|
+
|
|
73
|
+
# man page
|
|
74
|
+
mkdir -p %{buildroot}%{_mandir}/man1
|
|
75
|
+
install -pm 644 manpages/testcloud.1 %{buildroot}%{_mandir}/man1
|
|
76
|
+
|
|
77
|
+
# bash completion
|
|
78
|
+
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
|
79
|
+
install -pm 644 conf/testcloud %{buildroot}%{_datadir}/bash-completion/completions/testcloud
|
|
80
|
+
|
|
81
|
+
# configuration files
|
|
82
|
+
mkdir -p %{buildroot}%{_sysconfdir}/testcloud/
|
|
83
|
+
install conf/settings-example.py %{buildroot}%{_sysconfdir}/testcloud/settings.py
|
|
84
|
+
|
|
85
|
+
# Create running directory for testcloud
|
|
86
|
+
install -d %{buildroot}%{_sharedstatedir}/testcloud/
|
|
87
|
+
|
|
88
|
+
# backingstores dir
|
|
89
|
+
install -d %{buildroot}/%{_sharedstatedir}/testcloud/backingstores
|
|
90
|
+
|
|
91
|
+
# instance dir
|
|
92
|
+
install -d %{buildroot}/%{_sharedstatedir}/testcloud/instances
|
|
93
|
+
|
|
94
|
+
# create polkit rules dir and install polkit rule
|
|
95
|
+
mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/rules.d
|
|
96
|
+
install conf/99-testcloud-nonroot-libvirt-access.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules
|
|
97
|
+
|
|
98
|
+
# sysusers conf file for creation of testcloud group
|
|
99
|
+
install -p -m644 -D %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
|
|
100
|
+
|
|
101
|
+
%check
|
|
102
|
+
%pyproject_check_import
|
|
103
|
+
%pytest
|
|
104
|
+
|
|
105
|
+
%files
|
|
106
|
+
%doc README.md
|
|
107
|
+
%{_mandir}/man1/testcloud.1*
|
|
108
|
+
%license LICENSE
|
|
109
|
+
|
|
110
|
+
%dir %{_sysconfdir}/testcloud
|
|
111
|
+
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud
|
|
112
|
+
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/backingstores
|
|
113
|
+
%dir %attr(0775, qemu, testcloud) %{_sharedstatedir}/testcloud/instances
|
|
114
|
+
|
|
115
|
+
%attr(0644, root, root) %{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules
|
|
116
|
+
|
|
117
|
+
%config(noreplace) %{_sysconfdir}/testcloud/settings.py
|
|
118
|
+
%{_bindir}/testcloud
|
|
119
|
+
%{_bindir}/t7d
|
|
120
|
+
%{_datadir}/bash-completion/completions/testcloud
|
|
121
|
+
|
|
122
|
+
%{_sysusersdir}/%{name}.conf
|
|
123
|
+
|
|
124
|
+
%files -n python3-%{name} -f %{pyproject_files}
|
|
125
|
+
|
|
126
|
+
%changelog
|
|
127
|
+
%autochangelog
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
g testcloud -
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
summary: Integration testing with tmt
|
|
2
|
+
|
|
3
|
+
discover:
|
|
4
|
+
how: fmf
|
|
5
|
+
test: /test/tmt
|
|
6
|
+
|
|
7
|
+
provision:
|
|
8
|
+
how: virtual
|
|
9
|
+
memory: 4096
|
|
10
|
+
|
|
11
|
+
execute:
|
|
12
|
+
how: tmt
|
|
13
|
+
|
|
14
|
+
adjust:
|
|
15
|
+
- provision:
|
|
16
|
+
hardware:
|
|
17
|
+
virtualization:
|
|
18
|
+
is-supported: true
|
|
19
|
+
memory: ">= 8 GB"
|
|
20
|
+
when: trigger == commit
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "testcloud"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "A tool to download and boot cloud images locally, with an easy to use API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "GPL-2.0-or-later"
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Mike Ruckman", email = "roshi@fedoraproject.org"},
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"libvirt-python",
|
|
17
|
+
"peewee",
|
|
18
|
+
"requests",
|
|
19
|
+
"packaging",
|
|
20
|
+
"fedora-distro-aliases>=1.5",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.optional-dependencies]
|
|
24
|
+
image_resolve_caching = ["requests_cache>=1.2"]
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
testcloud = "testcloud.cli:main"
|
|
28
|
+
t7d = "testcloud.cli:main"
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/teemtee/testcloud"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.version]
|
|
34
|
+
source = "vcs"
|
|
35
|
+
raw-options.version_scheme = "release-branch-semver"
|
|
36
|
+
raw-options.git_describe_command = [
|
|
37
|
+
"git", "describe", "--dirty", "--tags", "--long",
|
|
38
|
+
"--abbrev=9", "--match", "*[0-9]*",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[tool.black]
|
|
42
|
+
line-length=140
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
testpaths = ["test"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1
|