Giter Club home page Giter Club logo

kata-local-ci-setup's People

Contributors

alicefr avatar c3d avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

c3d jensfr

kata-local-ci-setup's Issues

Fix passing of `final_firstboot_cmd`

In issue #8 I noticed a quoting problem, but the fix I proposed simply allows the script to run. It does not do the right thing. Notably, it ends up not executing the chown for the kata user correctly.

virt-build-kata: review the parameters passed to virt-install

Here, I'd just like to check & suggest whether we need the parameters currently used.

We use, for now:

  • --ram, I'd suggest using --memory instead, just because it was introduced in order to deprecate --ram;
  • --vcpus`, that's ok;
  • --disk, that's ok;
  • --graphics vnc,listen=0.0.0.0, do we have to pass that? or can se just fallback to the console and happy about that?
  • --os-type=$osvariant, similarly to the --ram / --memory case, we better use --os-variant here;
  • --network network=default, why do we need this?

Last but not least, I wonder whether we could be opinionated and force people to use -c qemu:///system just to ensure we'll, later on, be able to ssh into the machine.

What do you think?

virt-build-kata: don't hardcode the VM name

Quite similar to #1, I'd suggest using kata-$d as the VM name. Here we don't have to explicitly check for the name as virt-install would just stop in case there's already a VM with such name.

virt-build-kata: don't hardcode the disk image name

This script could be used for spawning several VMs in parallel, which would result in errors in case the disk is not set by the user.

Here, I'd recommend a few things:

  1. Instead of kata.qcow2, use kata-$d.qcow2 by default, as this would already allow users to have different distros running in parallel;
  2. Check whether $disk already exists in the system, just to avoid overwriting something without advertising the user;

Note, I thought about trying a pseudo smart approach of naming the image kata-$d, checking for the existence, and creating a kata-$d-nn instead. However, I sincerely think it's over-engineering the problem at this point and I'd be way happier with only 1 and 2 being implemented.

virt-build-kata: don't hardcode an IP address

Instead of hardcoding an ip address, or even requiring the user to know the VM's IP address, what about enforcing the usage (in the documentation) of the libvirt-nss?

Having this module installed in the host allows the user to simply ssh $vm_name.

Misquoted final_firstboot_cmd

When running ./virt-build-kata -d ubuntu -k <key> -o <volume> I get:

+ virt-builder ubuntu-18.04 [...] --firstboot-command 'chown kata:kata -R /home/kata' '' [...]
virt-builder: error: too many parameters, expecting ‘os-version’

If reporting bugs, run virt-builder with debugging enabled and include the 
complete output:

  virt-builder -v -x [...]

Notice the misquoted ''.

ansible failing to create temporary directory with ubuntu VM

I'm running into a problem. The VM creation

virt-build-kata -d ubuntu -k <...> -o kata-ci-ubuntu.qcow2

goes well but then ansible fails pretty much immediately with

fatal: [192.168.122.249]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory.In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \" echo /home/kata/.ansible/tmp \"&& mkdir \" echo /home/kata/.ansible/tmp/ansible-tmp-1621497642.2791765-263890-25594791683090 \" && echo ansible-tmp-1621497642.2791765-263890-25594791683090=\" echo /home/kata/.ansible/tmp/ansible-tmp-1621497642.2791765-263890-25594791683090 \" ), exited with result 1", "unreachable": true}

Creating the VM, I requested Ubuntu and ended up with 18.04.5. I have changed the VM IP addresss in hosts.yaml to match my actual VM but otherwise I believe I'm following the instructions. @alicefr Any ideas what I'm doing wrong? (Sorry if it's something obvious - this is my first time with ansible...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.