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

Implement usage of Vagrant images #61

Open
wants to merge 175 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
4a43bba
[handler] add Kanku::Handler::Vagrant
M0ses May 29, 2024
d4be472
[examples] add KankuFile.vagrant for testing while fixing #59
M0ses May 29, 2024
e4b3b3f
[templates] add ssh_user/ssh_pass to vagrant KankuFile template
M0ses Jun 7, 2024
b83a4cf
[templates] copy authorized_keys from vagrant to root
M0ses Jun 7, 2024
75f0183
[cli] remove Kanku::Roles::SSH from Kanku::Cli:snapshot
M0ses Jun 7, 2024
4f6bc2c
[util] enhance regex for seen bootloader in K::U::VM::Console
M0ses Jun 7, 2024
c2b7dd6
[core] refactor multiple handlers/roles
M0ses Jun 17, 2024
69e808e
[handler] change attr 'distributable' from Bool to Int
M0ses Jun 19, 2024
1821450
[core] fix calling distributable in K::Dispatch::RabbitMQ
M0ses Jun 20, 2024
4cdd749
[core] gui_config is now MooseX::ClassAttribute
M0ses Jun 20, 2024
7bd10be
[core] fix overwriting of cache_dir by Kanku::Config::GlobalVars->cac…
M0ses Jun 21, 2024
e033406
[util] fix get_image_size for vmdk images
M0ses Jun 21, 2024
d41df93
[handler] distributable as simple sub again
M0ses Jun 21, 2024
28b7f9d
[web] add filter `state` to guest list filter
M0ses Jun 25, 2024
60b269e
[util] use qemu-img for virtual-size query for all image types
M0ses Jun 26, 2024
f2ca30f
[handler] finally removed MooseX::ClassAttributes
M0ses Jun 25, 2024
0d03feb
[handler] avoid perl warnings in PrepareSSH
M0ses Jun 25, 2024
a883a65
[cli] new subcommands console/ssh/list for command rguest
M0ses Jun 27, 2024
1ccc962
[cli] improve docu for `rguest` subcommands
M0ses Jun 27, 2024
0c124f9
[cli] fixed typo in rguest::console
M0ses Jun 27, 2024
947f567
[cli] workaround for broken bash completion
M0ses Jun 27, 2024
8e09f8c
[cli] cleanup rguest/* commands
M0ses Jun 27, 2024
2fbafd0
[dist] fixed typo in Makefile
M0ses Jun 27, 2024
d589c7a
[core] refactoring and cleanup
M0ses Jul 4, 2024
a823666
[examples] updated KankuFile.simple to 15.6
M0ses Jul 5, 2024
d0e5377
[dist] add Kanku/Logger.pm to files list in spec
M0ses Jul 5, 2024
f176f7f
[core] fixed publickey_path auth in SSH role
M0ses Jul 5, 2024
b64a111
[handler] GIT: change cache_dir to K:C:Defaults
M0ses Jul 11, 2024
38de9ec
[handler] OBSServerFrontendTests: verbose option
M0ses Jul 11, 2024
aacd82c
[handler] PrepareSSH: new option enable_daemon_debug
M0ses Jul 15, 2024
d15ad6e
[cli] remove role ::Logger from cli commands
M0ses Jul 12, 2024
f828a31
[views] add `-q` option to ssh.tt
M0ses Jul 12, 2024
2760a1e
[cli] up: new aliases for option '--skip_all_checks'
M0ses Jul 16, 2024
1eb97e1
[cli] disabled POST_CHOMP for TT views
M0ses Jul 17, 2024
7231d3c
[cli] lsi: rename and refactor to use views
M0ses Jul 17, 2024
ae33eb2
[cli] use Kanku::Config::Defaults in Kanku::Cli
M0ses Jul 17, 2024
fdf5c74
[core] calc arch in Kanku::Config::Defaults
M0ses Jul 17, 2024
9bb776b
[handler] CopyProfile: silence scp warnings
M0ses Jul 17, 2024
ff3909c
[util] IPTables: suppress warnings on STDERR
M0ses Jul 17, 2024
c4e30cd
[cli] rr: cleanup
M0ses Jul 17, 2024
2305989
[cli] ssh: log RC code of 'ssh' call
M0ses Jul 17, 2024
b0da1d8
[util] VM::Console: fallback to wicked/nmcli if 'ip' not installed
M0ses Jul 17, 2024
ec80c1d
[cli] PFwd: make perlcritics happy
M0ses Jul 17, 2024
477cc22
[cli] Startvm: make perlcritics happy
M0ses Jul 17, 2024
c359cfb
[cli] role VM: make perlcritic happy
M0ses Jul 17, 2024
43568a2
[core] new package Kanku::File incl. tests
M0ses Jul 24, 2024
cf315b7
[tests] improved t/001_base.t
M0ses Jul 24, 2024
2daaa59
[schema] update database version 19
M0ses Aug 13, 2024
a429415
[dist] Kanku::File in kanku-common package
M0ses Aug 13, 2024
286a030
[dist] add MooseX::App::* to kanku-cli
M0ses Aug 13, 2024
66f865a
[dist] add MooseX to kanku-common
M0ses Aug 13, 2024
e49abca
[dist] add Kanku::TypeConstraints to kanku-common package
M0ses Aug 13, 2024
80d60e7
[dist] fix %files list in kanku-common
M0ses Aug 13, 2024
dc59e02
[cli] improved output of various commands
M0ses Aug 14, 2024
1d9f99d
[ci] fixed wait_for_job.sh
M0ses Aug 14, 2024
01e1e2b
[cli] more views cleanup and package split
M0ses Aug 16, 2024
c746ac7
[cli] fix for missing template method
M0ses Aug 17, 2024
da90835
[handler] OBSCheck: get base_url via K:C:Defaults
M0ses Aug 20, 2024
b27cb6b
[core] cleanup defaults generation
M0ses Aug 20, 2024
b40796e
[web] improved defaults evaluation for subtasks in 'Job' menu
M0ses Aug 20, 2024
c28143b
[web] remove invalid trace statement
M0ses Aug 21, 2024
c9d1051
[cli] fix use of 'KANKU_CONFIG='
M0ses Aug 21, 2024
ac26bbd
[cli] lsi: fix arch and repo per package
M0ses Sep 17, 2024
5004790
[dist] fix template for net-kanku.xml
M0ses Sep 18, 2024
3dbc11f
[cli] lsi: fix package filtering and data consistency (repository/arch)
M0ses Sep 18, 2024
938bb0e
[cli] check memory but use the original input
M0ses Sep 25, 2024
9357717
[dispatcher] fix notifier config loading
M0ses Oct 4, 2024
e85f53a
[cli] fixed typos in various commands
M0ses Oct 4, 2024
1934807
[core] refactor: migrate File::Slurp to Path::Tiny
M0ses Oct 7, 2024
59e556c
[setup] refactor: migrate Path::Class to Path::Tiny
M0ses Oct 7, 2024
5fd84e3
[util] refactor: migrate Path::Class to Path::Tiny
M0ses Oct 7, 2024
4ed4c89
[handler] refactor: migrate Path::Class to Path::Tiny
M0ses Oct 7, 2024
19cb690
[core] refactor: replace multiple packages by Path::Tiny
M0ses Oct 8, 2024
ae36206
[dist] improved example KankuFiles and Makefiles
M0ses Oct 8, 2024
ef16751
[dist] remove obsolete packages from debian.control and update version
M0ses Oct 8, 2024
c1365d3
[core] fix missing semicolon in try/catch
M0ses Oct 8, 2024
4f5ecb0
[util] fix method name after refactor
M0ses Oct 8, 2024
2574509
[handler] OBSServerFrontendTests: fix import tempdir
M0ses Oct 9, 2024
e9c275a
[util] VM::Image: change broken method 'filename' to Path::Tiny
M0ses Oct 9, 2024
6a67216
[dist] add requires for Path::Tiny >=0.125
M0ses Oct 9, 2024
10e4843
[dist] add Requires for Path::Tiny 1.125
M0ses Oct 9, 2024
e8eea98
[core] fix missing semicolon in try/catch
M0ses Oct 9, 2024
c7e6161
[notifier] add Kanku::Notifier::Console
M0ses Oct 16, 2024
5844ca3
[notifier] Console: use print instead of logger->log
M0ses Oct 18, 2024
2ae713a
[util] VM::Console: avoid `uninitialized` warnings
M0ses Oct 18, 2024
a974b02
[handler] Vagrant: fix PrepareSSH to use insecure vagrant privkey auth
M0ses Oct 22, 2024
095dea6
[cli] Up: job_groups in KankuFile
M0ses Oct 22, 2024
9cebf9a
[cli] Up: improve error handling if unknown job_group given as option
M0ses Oct 22, 2024
7f14c8e
[cli] SSH: use login_user from KankuFile as fallback
M0ses Oct 22, 2024
a37ba6e
[templates] improve vagrant init template
M0ses Oct 22, 2024
09f8df1
[examples] fix KankuFile.vagrant
M0ses Oct 22, 2024
3fd8351
[cli] Roles::DB: fix typo
M0ses Oct 22, 2024
ce1e702
[cli] DB::Install: fix dbdir creation
M0ses Oct 22, 2024
d46427f
[cli] DB::Install: fix typos
M0ses Oct 22, 2024
f194440
[cli] added template with-spice to vagrant Kankufile template
M0ses Oct 22, 2024
bea6b8c
[cli] Rguest::List: cleanup includes
M0ses Oct 22, 2024
03c67b4
[cli] Rhistory::List: fix filter for job name
M0ses Oct 22, 2024
a90fc08
[cli] Rjob::List: cleanup includes
M0ses Oct 22, 2024
ac4f1bc
[cli] Rworker::List: cleanup includes
M0ses Oct 22, 2024
9b88fd0
[core] refactoring helpers
M0ses Oct 22, 2024
aa1292f
[cli] SSH: change option --user to --ssh_user to avoid conflicts
M0ses Oct 22, 2024
5e757a1
[handler] Vagrant: fix various bugs
M0ses Oct 22, 2024
6fe892d
[core] refactor Roles::SSH to use builder instead of default
M0ses Oct 22, 2024
512a3f1
[util] VM::Image: add method get_image_info and use it in get_image_size
M0ses Oct 22, 2024
3eeebea
[views] improved cli views ssh.tt, rguest/list.tt and rjob/list.tt
M0ses Oct 22, 2024
6d630d0
[core] fix Kanku::SSH::Role
M0ses Oct 22, 2024
a3a5352
[core] cleanup and fixes after refactoring Helpers
M0ses Oct 22, 2024
142ade4
[dist] add Kanku::Helpers to spec file (kanku-common)
M0ses Oct 22, 2024
a0d7c7b
[core] fix problem rooted in Helpers refactor
M0ses Oct 23, 2024
674b5a6
[testing] added tons of new (integration) tests
M0ses Oct 23, 2024
9eca98a
[cli] CA::Create: fix leftover from Helpers refactoring
M0ses Oct 23, 2024
2c12b82
[dist] setup - return explicitly 0 at end of setup method
M0ses Oct 24, 2024
33b6d4a
[handler] Vagrant: try to extract with bsdtar if tar fails
M0ses Oct 24, 2024
f79c519
[cli] info: new command to show a overview of KankuFile information
M0ses Oct 25, 2024
6058007
[cli] Info: add KankuFile section 'info' for summary and description
M0ses Oct 25, 2024
e30aa89
[cli] Info: remove empty lines from view/cli/info.tt
M0ses Oct 25, 2024
e5ffd0e
[dist] KankuFile: improve info.description
M0ses Oct 25, 2024
d655fe0
[templates] improvements for init templates (default and vagrant)
M0ses Oct 25, 2024
e380674
[cli] Urlwrapper: fix regressions after refactoring
M0ses Oct 25, 2024
e8331cf
[cli] Browser: new command
M0ses Oct 31, 2024
08ecc61
[dist] KankuFile: added guest.url template
M0ses Oct 31, 2024
0ea6eb3
[cli] Verify: new command
M0ses Oct 31, 2024
8943532
[handler] fix cache_dir problem in ImageDownload
M0ses Oct 31, 2024
1b990d6
[examples] move openSUSE-Leap-15.5-official to kanku-hub
M0ses Oct 31, 2024
bb655aa
[examples] move openQA to kanku-hub
M0ses Oct 31, 2024
dab0dff
[examples] migrate icinga to kanku-hub
M0ses Oct 31, 2024
1ccae68
[examples] migrate centos-current to kanku-hub centos/8
M0ses Oct 31, 2024
7345779
[examples] multivm: migrate to kanku-hub
M0ses Nov 5, 2024
241ea84
[examples] rabbitmq: migrate to kanku-hub
M0ses Nov 5, 2024
074f070
[examples] migrate simple/ubuntu-current to kanku-hub
M0ses Nov 5, 2024
7714949
[examples] migrate openSUSE-Tumbleweed-sdboot to kanku-hub
M0ses Nov 5, 2024
3569e7d
[examples] migrate KankuFile.vmdk to kanku-hub
M0ses Nov 8, 2024
f18d2cb
[tests] copied KankuFile as fixture for devel integration tests
M0ses Nov 11, 2024
6a2912a
[handler] ExecuteCommandViaConsole: add option context2env
M0ses Nov 11, 2024
7f50539
[handler] PrepareSSH: improve ssh service detection/handling
M0ses Nov 11, 2024
01a3b53
[cli] Info: die unless info section in KankuFile
M0ses Nov 11, 2024
4c9a2db
[util] VM: guess management_interface and new method network_restart
M0ses Nov 11, 2024
115a1ea
[util] VM::Console: change for loop to while
M0ses Nov 12, 2024
0f9f996
[util] VM::Console: changed attr network_tooling from Str to Object
M0ses Nov 12, 2024
e3f9814
[cli] Rjob::Config: change default format from view to none
M0ses Nov 12, 2024
259f1a2
[dist] spec: add Requires for perl(User::pwent)
M0ses Nov 12, 2024
37b8de2
[cli] Info: change die if no info section found into warn
M0ses Nov 12, 2024
1311656
[util] VM: add missing `use` for Kanku::Util
M0ses Nov 12, 2024
30e1863
[config] new base_url defaults
M0ses Nov 12, 2024
4b254d2
[dist] spec: kick out 'BuildArch: noarch'
M0ses Nov 12, 2024
9ee25ed
[cli] Setup: split out subcommands devel/server/worker
M0ses Nov 13, 2024
ca55250
[dist] change `kanku setup` in KankuFile.d to use subcommands
M0ses Nov 13, 2024
d5c7fef
[dist] update etc/templates/default-vm.tt2.aarch64
M0ses Nov 13, 2024
39ce927
[dist] new package kanku-tests
M0ses Nov 13, 2024
169143c
[tests] improve 2000-kanku_devel_integration.td
M0ses Nov 13, 2024
28c6fdc
[tests] change LinkRelativePath to fit for kanku-tests package
M0ses Nov 13, 2024
f89c035
[tests] improve developer mode tests
M0ses Nov 14, 2024
5b450cd
[dist] remove update-message in %post of kanku-cli
M0ses Nov 14, 2024
70bfae8
[tests] make 2000-kanku_devel_integration.td path independent
M0ses Nov 15, 2024
1259a9f
[hub] added submodule kanku-hub
M0ses Nov 16, 2024
5124776
[cli] new hub commands sign and test
M0ses Nov 16, 2024
d113fce
[dist] new package kanku-config-example-jobs
M0ses Nov 16, 2024
7c41c44
[dist] change url for submodule 'hub'
M0ses Nov 21, 2024
1e04ad5
[examples] remove broken kubernetes example
M0ses Nov 21, 2024
6e54675
[cli] Hub::Test: use extra_argv pass list of KankuFile's
M0ses Nov 21, 2024
3e9077e
[tests] server: additional commands to test
M0ses Nov 21, 2024
49e0495
[hub] update ref
M0ses Nov 21, 2024
84327cc
[dist] ssh url for submodule hub
M0ses Nov 21, 2024
1834cba
[cli] Hub::Test: fix extra_argv checking
M0ses Nov 22, 2024
0624062
[dist] include rguest views in spec
M0ses Nov 22, 2024
3e2a289
[cli] cleanup and improve 'kanku rcomment' commands
M0ses Nov 22, 2024
3fca9e5
[cli] cleanup and improve 'kanku rcomment' commands
M0ses Nov 22, 2024
8bc3f4d
[cli] cleanup and improve 'kanku rguest' list
M0ses Nov 22, 2024
5f3c8a4
[test] server: add more kanku cli commands to test
M0ses Nov 22, 2024
464c163
[dist] add rcomment templates to spec %files
M0ses Nov 22, 2024
5473349
[cli] refactor: remove role RemoteCommand
M0ses Nov 23, 2024
b4fd098
[cli] reduce default loglevel to INFO
M0ses Nov 27, 2024
f48ab57
[cli] add command 'kanku doc ...'
M0ses Jan 20, 2025
13a55db
[handler] CreateDomain: improved POD for addidtional_disks
M0ses Jan 20, 2025
986c0a8
[cli] Urlwrapper: fix tempdir handling
M0ses Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hub"]
path = hub
url = [email protected]:M0ses/kanku-hub.git
6 changes: 6 additions & 0 deletions .perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ allow = $@ $! $$ $? $|

[ControlStructures::ProhibitCascadingIfElse]
max_elsif = 5

[RegularExpressions::RequireExtendedFormatting]
minimum_regex_length_to_complain_about = 5

[Subroutines::ProhibitUnusedPrivateSubroutines]
private_name_regex = _(?!build_)\w+
48 changes: 40 additions & 8 deletions KankuFile
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
#
Kanku::Util::IPTables:
start_port: 49001
info:
summary: Kanku development jobs
description: |+
This KankuFile supports developers in

* developing kanku
* testing kanku
* setting up VMs for kanku in server/developer mode

The following jobs are available:
* sm: create tested kanku vm in server mode
* dm: create tested kanku vm in developer mode
* tm: create kanku vm in testing mode and run resonable test suites
* cl: cleanup - remove domains like `kanku destroy` does
(for usage in job_groups)

You can start each job separatly with:

`kanku up -j <job_name>`

Enjoy YLWK!

guest:
url: https://[% ctx.ipaddress %]/kanku/#/job_history/1
domain_name: kanku-devel
default_job: devel
default_job: dm

jobs:
###### JOB:
sostw: !include KankuFile.d/server-openSUSE-Tumbleweed.yml
devel: !include KankuFile.d/devel.yml
test: !include KankuFile.d/test.yml
sm: !include KankuFile.d/server-mode.yml
dm: !include KankuFile.d/developer-mode.yml
tm: !include KankuFile.d/test.yml
cl:
-
use_module: Kanku::Handler::SetJobContext
-
use_module: Kanku::Handler::RemoveDomain

job_groups:
all:
- tm
- cl
- dm
- cl
- sm
64 changes: 0 additions & 64 deletions KankuFile.d/devel.yml

This file was deleted.

61 changes: 61 additions & 0 deletions KankuFile.d/developer-mode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-
use_module: Kanku::Handler::SetJobContext
options:
host_interface: eth0
login_user: root
login_pass: kankudai
-
use_module: Kanku::Handler::OBSCheck
options:
project: devel:kanku:images
repository: images_tumbleweed
package: openSUSE-Tumbleweed-JeOS:ext4
-
use_module: Kanku::Handler::ImageDownload
-
use_module: Kanku::Handler::ResizeImage
options:
disk_size: 100G
-
use_module: Kanku::Handler::CreateDomain
options:
memory: 6G
vcpu: 2
use_9p: 1
pwrand:
users:
- root
- kanku
-
use_module: Kanku::Handler::PrepareSSH
-
use_module: Kanku::Handler::CopyProfile
options:
users:
- root
- kanku
-
use_module: Kanku::Handler::ExecuteCommandViaSSH
options:
commands:
- zypper -n ar https://download.opensuse.org/repositories/devel:/kanku:/perl/openSUSE_Tumbleweed/devel:kanku:perl.repo
- zypper -n ar https://download.opensuse.org/repositories/devel:/kanku:/staging/openSUSE_Tumbleweed/devel:kanku:staging.repo
- zypper --gpg-auto-import-keys ref -s
# Only for development
- zypper -n in make apache2 sqlite3
# Install kanku developer mode and run tests
-
use_module: Kanku::Handler::ExecuteCommandViaSSH
options:
commands:
- zypper -n in kanku-cli kanku-tests
- make -C /tmp/kanku install configs
- "systemctl stop libvirtd;perl -p -i -e 's/192.168.122/192.168.128/g' /etc/libvirt/qemu/networks/default.xml ; systemctl start libvirtd"
- kanku setup devel --traceback --ll TRACE --user kanku > /tmp/setup.log 2>&1 || { cat /tmp/setup.log; exit 1; }
- 'echo "kanku ALL=(ALL:ALL) NOPASSWD: ALL" > /usr/etc/sudoers.d/kanku'
-
use_module: Kanku::Handler::ExecuteCommandViaSSH
options:
username: kanku
commands:
- prove -v /usr/share/kanku/t/*.td
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use_module: Kanku::Handler::ResizeImage
options:
disk_size: 100G
-
use_module: Kanku::Handler::RemoveDomain
-
use_module: Kanku::Handler::CreateDomain
options:
Expand Down Expand Up @@ -45,8 +47,9 @@
commands:
- rcnetwork restart
- zypper -n in rabbitmq-server rabbitmq-server-plugins openvswitch kanku openssh-clients
- rm -rf /usr/lib/kanku/lib
- make -C /tmp/kanku install 2>&1 |tee /tmp/make.log
- /usr/bin/kanku setup --apache --distributed --ssl 2>&1 |tee /tmp/setup-server.log
- kanku setup server --apache --ssl > /tmp/setup.log 2>&1 || { cat /tmp/setup.log; exit 1; }
- cp -r /tmp/kanku/etc/jobs/examples/* /etc/kanku/jobs/
- cp /tmp/kanku/etc/job_groups/examples/* /etc/kanku/job_groups/
- systemctl enable --now kanku-iptables
Expand All @@ -55,8 +58,9 @@
- systemctl enable --now kanku-triggerd
- systemctl enable --now kanku-scheduler
- virsh net-start kanku-ovs
- kanku login -a http://localhost:5000/kanku -u admin -p opensuse
- kanku login -a http://localhost:5000/kanku -u admin -p opensuse -k None
- /tmp/kanku/contrib/set_ip
- rcapache2 restart
- systemctl enable --now kanku-worker
- /tmp/kanku/contrib/wait_for_job.sh
- prove -v /tmp/kanku/t/*.ts
44 changes: 0 additions & 44 deletions KankuFile.examples/KankuFile.centos-current

This file was deleted.

76 changes: 0 additions & 76 deletions KankuFile.examples/KankuFile.icinga2

This file was deleted.

Loading