redhat-openstack / tripleo-quickstart

Ansible roles for setting up TripleO virtual environments and building images
16 stars 15 forks source link

quickstart should be runnable without privileged access #10

Closed larsks closed 8 years ago

larsks commented 8 years ago

Currently, the quickstart requires root privileges on the target host and makes a number of system configuration changes. This makes some folks (understandably) nervous and may inhibit the adoption of the tool.

Most of the privileged access is required to configure networking.

We ought to be able to complete just about everything through the use of qemu user mode networking. There are a few options:

I kind of like the tcp model.

larsks commented 8 years ago

https://review.gerrithub.io/#/c/265256/ is sort of step 1 of this process. That change makes it so that we no longer care about the physical location of the libvirt storage pool, which means we don't care if it is in /var/lib/libvirt/image or $HOME/myimages or whatever.

larsks commented 8 years ago

I've been playing with this a bit over the weekend. Here are some more thoughts:

We need root privileges anyway for certain tasks, specifically:

So as long as we need root anyway, I think the easiest solution is just set up some bridges on the host and whitelist them in /etc/qemu/bridge.conf so that they can be used by an unprivileged user. This removes all the annoying complexity that would be introduced by the tunnel networks.

What we need to do is to clear separate "tasks that absolutely require privileges" from "tasks that can actually be run as anybody". I think we can start by moving the libvirt/setup/install role up one level, to libvirt/install, and isolate all the root-requiring tasks in that role. People who already have a virt-capable machine can then skip that part and run everything else as an unprivileged user.

trown commented 8 years ago

+1 to this approach. Having all of the privileged steps in a single place makes it easier for someone to audit what steps are need privileges as well.

larsks commented 8 years ago

I've opened a gerrit topic to explore this issue. So far it's mostly prep work, some of which I'm not entirely happy with it. Comments welcome.

larsks commented 8 years ago

This was resolved by https://review.gerrithub.io/#/c/265712/