M0ses / kanku

Kanku - Bridging the gap between Open-Build-Service and DevOPS
http://m0ses.github.io/kanku/
GNU General Public License v3.0
9 stars 6 forks source link

Featurerequest: make it possible that kanku can work with vagrant boxes nicely #59

Open denknorr opened 1 month ago

denknorr commented 1 month ago

Hi, I would like that kanku supports using vagrant boxes.

Let's say, you saw on https://app.vagrantup.com/boxes/search that there's https://app.vagrantup.com/debian/boxes/bookworm64 and https://app.vagrantup.com/opensuse/boxes/Leap-15.2.x86_64 which you both need so you can test you your software which builds against both systems. Therefore i can similarly as with vagrant initialize two systems:

# vagrant: 
vagrant init -m opensuse/Leap-15.2
# kanku:
kanku init --type vagrant --box opensuse/Leap-15.2
  1. It would be important that these can run in the shell and in some kind of script, as there are environments which automatically set up things.
  2. The developer also has to think if he wants to support multiple boxes like Vagrant in his Kankufile, but IMHO this is not as needed, as you can simulate this in other ways.
  3. As with init, it would be important, that kanku works similarly to vagrant with the subcommands up and ssh.
  4. vagrant also chooses based on the host automatically the architecture, for example opensuse/Leap-15.2 would be expanded on my laptop to opensuse/Leap-15.2.x86_64
  5. Vagrant is very versatile on the guest operating systems (i even saw macos, windows and react images out there), but it has some requirements: 5.1 user vagrant, password vagrant, with sudo privileges 5.2 vagrant ssh does a passwordless login with an known vagrant public/private key login 5.3 vagrant uses a certain network setup so network with ssh is always available
  6. I worked as a consultant often with vagrant, in my experience these were also important parts which should be thought about including: 6.1 shared folder support. Some kind of shared folder support, perhaps with virtiofs or 9pfs 6.2 besides salt/salt ssh, ansible is used very often to deploy to the vagrant machines (even more often than stuff like salt/puppet/chef as vagrant is often used for rapid deployment/testing) 6.3 vagrant rdp enables some kind of remote gui login.

I am aware that this is a HUGE bunch of request and i would fully understand if someone rejects at least some of the requirements here, but it would be a huge help in development and rapid prototyping.

Please consider if you make this a reality, now that vagrant itself will be hard to be integrated in our workflows.

M0ses commented 1 month ago

for a first POC see https://github.com/M0ses/kanku/pull/61

denknorr commented 1 day ago

so when i do "kanku up" i see repeated terminal output where "ls" does nothing or it seems to trigger systemctl output. but i think that's just the initializiation. but when i do "kanku ssh -u vagrant" in another terminal it asks for the vagrant password (which is vagrant on vagrant machines) but it does not accept the password?

denknorr commented 1 day ago

withouth "-u vagrant" i can login though and my user is kanku... but i do not know where in the kankufile i actually could reference a vagrant box from the vagrant cloud? because this is from devel:kanku:images?