[chef] Automating Gerrit Ssh Keys


Chronological Thread 
  • From: Stephen Nelson-Smith < >
  • To:
  • Subject: [chef] Automating Gerrit Ssh Keys
  • Date: Thu, 9 Jan 2014 18:35:15 +0000

Ohai,

I find myself in a bit of a dependency cycle.  I want to be able to automate the creation of accounts and running of gerrit commands over ssh.  In the simplest case, I want to automate the creation of a non-interactive Jenkins user, but that's just a specific example of a general requirement.

As far as I can tell, there are three ways to get ssh keys for Gerrit users into Gerrit:

1) Upload them via the web interface
2) Supply them via the gerrit create-account command
3) Stick them directly in the database and flush the cache

I have issues with all 3:

1) This just really sucks.  Sure I can automate it, but… really?
2) This has a dependency problem - you need a user with an ssh key in the first place
3) This is a bit nasty, and so far I haven't found a way to flush the cache without using the ssh command, so has the same dependency issue

Have any of you chefs solved this?

S.

-- 
Stephen Nelson-Smith
@LordCope
http://www.agilesysadmin.net



Archive powered by MHonArc 2.6.16.

§