ci/deploy.sh: Allow non-root deploys 47/38547/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 17 Jul 2017 23:10:25 +0000 (23:10 +0000)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 1 Aug 2017 19:20:21 +0000 (21:20 +0200)
commitedcc8b696d9b249f2514c0322db90315465155c6
tree0c91effced8beb7eb9a525ebc4e8d5363bc17df6
parentb0370b31d3649893d57b1729979b1124a47a6f05
ci/deploy.sh: Allow non-root deploys

Currently, deploying Fuel@OPNFV requires the `ci/deploy.sh` to be ran
as root user, for:
- hypervisor access (virsh);
- installing prerequisite packages;

We can support non-root deploys if we relax above restriction into:
- current user should have hypervisor access beforehand
  (new check added);
- current user has passwordless sudo rights, for installing packages;

Later, we should move the package installation out of the deploy
script (`ci/deploy.sh`), making the whole deploy possible without
sudo, only hypervisor access.

After this change, the old way (sudo ci/deploy.sh) should work just
like it used to before, so no regression/behavior change should be
introduced with this.

Change-Id: Ib2ea96aa7b6d67ba0606318407a8adeb51e6969d
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh