[00:20] marcoceppi: sure, but there are issues with the way it reads in deployer config files. So I have been using deployer to parse things. Which is only py2 at this point. === timrc is now known as timrc-afk === CyberJacob is now known as CyberJacob|Away === mwhudsono is now known as zz_mwhudsono === freeflying_away is now known as freeflying === zz_mwhudsono is now known as mwhudson === mwhudson is now known as zz_mwhudson === CyberJacob|Away is now known as CyberJacob === frobware is now known as zz_frobware === timrc-afk is now known as timrc === freeflying is now known as freeflying_away [18:56] Hi there, I'm a newbie to juju, I was trying to setup gerrit just to see if it could help my infrastructure but i could not get it working properly, and the readme in the charm are not so helpful :( Is there any good URL you could point me too? === freeflying_away is now known as freeflying === zz_mwhudson is now known as mwhudson [19:41] Hi there, I'm a newbie to juju, I was trying to setup gerrit just to see if it could help my infrastructure but i could not get it working properly, and the readme in the charm are not so helpful :( Is there any good URL you could point me too? [20:10] Greetings jcverdie, I just pulled up the Gerrit charm on jujucharms.com and started reviewing the README. On which portion are you stuck? [20:11] hi lazyPower first of all thanks. My first try the ec2 instance kept "pending" forever (a couple of hours). I can retry now but I'm confused about what I need to put for volume-map [20:12] i chose canonical-ci/gerrit-59 don't know if you have the same one [20:13] also for public_url not sure i need to fill it [20:15] jcverdie: ah ok well the ec2 instance sitting in a pending state - is that resolved now? [20:15] looks random lazyPower... right now I'm experiencing the same issue on a different charm (gitolite) [20:16] i might be doing something wrong but can't figure what [20:16] its a sign that something isn't right in the EC2 config. [20:16] do you suggest to start over? [20:16] destroy environment and bootstrap again ? [20:16] I'm bootstrapping on amazon right now to verify there isn't something hinky upstream. [20:17] also, to note, it appears you are working towards building a git based repository service? [20:17] absolutely [20:18] if so, may i recommend our gitlab charm? It has all of these features out of the box [20:19] it may save you a few dollars in running hosts so you can run the review service, hosted repositories, and web interface on the same machine. I've run a self hosted gitlab server for a little over a year now and its been rock solid for me. [20:19] We have been using gitlab as a test run for 6 months [20:20] Ok i'm bootstrapped, bringing up my first node now [20:20] but my team still prefers gerrit so we are now interfacing gitlab with gerrit, so I wonder if it makes sense to keep gitlab just for the repository [20:20] i mean not using merge request nor wiki nor issue tracker [20:20] I don't have much experience with gerrit, so this will be an exploratory session for the both of us [20:21] BTW I have a pending gitolite EC2 instance, it seems stuck. I cannot find the reverse function for "juju deploy" ? [20:22] juju help commands will give you the output, but you're going to look for juju destroy-service and juju destroy-machine to wipe the machine and service from your deployment map [20:23] got it :) [20:23] Ok my first node just became active. To recap, it took approx 3 minutes from bootstrap to machine1 being active and deploying the gui. still pending the gui completion [20:24] i cleaned my environment: just one machine, with juju-gui deployed on it (and running) [20:24] nothing else [20:24] you should be seeing approx the same timelapse on yoru operations, that will give you a good benchmark on how long you should be waiting for your instances to be "active" or "started" in the juju status output. [20:24] ok, let me fish up the gerrit readme again, and lets walk through a sample deployment from the readme. It looks al ittle more complex than most since you are base64 encoding configurations and setting them as configuration values of the charm. [20:25] lucky me the one i need is more complex than casual charms :) [20:26] juju deploy postgresql && juju deploy cs:~canonical-ci/precise/gerrit [20:27] juju add-relation gerrit postgresql:db [20:29] it looks like the readme could some some formatting cleanup, the associated 'code blocks' for deploying apache 2 in front of gerrit is missing the proper formatting [20:29] but other than that this looks to be fairly straight forward. My Postgres and Gerrit units just became active. Are you following along at home? [20:30] still pending [20:30] ok, do either of the instances have public-ip's yet/ [20:30] actually the apache2 part is simply impossible to understand to me :( and the volume map part I don't know what I should put there (I don't want it to be ephemeral obviously) [20:31] right, i'm taking this one step at a time :) If your instances aren't getting an IP it means theres a mismatch somewhere in the controller and what the nodes are expected to do as i understand it. [20:31] postgre started not gerrit so far [20:31] ok, which region are you running in? [20:31] ok all is up now [20:32] eu-west-1 [20:32] Ok. I'm running US-East-1 so there may be a bit of difference in latency then. [20:32] i have all the public addresses (but no service exposed, except for my juju-gui) [20:32] I'm pending a db-relation-changed hook failure after relating the two services. [20:32] 1 moment [20:35] ok it appears that gerrit wants to be configured befor eyou add the database relationship [20:35] Exception: Cannot create admin user. Missing required charm configuration.Must set admin_username, admin_external_id, admin_email, admin_pubkey, admin_name. [20:35] i haven't got the same error ? Where could you see it? [20:35] I attached to the unit: juju debug-hooks gerrit/0 [20:36] this allows you to run hook execution interactively and collect any errors / modify the hooks to get them completing successfully. This information would have also crossed the logs, if you attach to `juju debug-log` all of this information gets output there as well. [20:37] jcverdie: https://juju.ubuntu.com/docs/authors-hook-debug.html [20:37] ok got it [20:37] debug-hooks is a tmux session that creates new sessions based on the scope of the currently executing hook. There's some good information in those docs, and its a very handy tool to have in your juju-toolbelt [20:39] jcverdie: brb, phone. [20:40] so i need to remove gerrit and setup all the settings [20:41] not necessarily. You can configure the charm post deployment. Its idempotent so it will reconfigure itself appropriately. [20:45] back, thank you for your patience. [20:45] you're kidding... Thanks for _your_ patience :) [20:46] :) We'll discuss my bill later [20:46] j/k [20:46] :p [20:46] OK so, i picked the canonical-ci flavor of the charm.. and now i have to find my Ubuntu SSO ID [20:46] i'm not sure where to get that since the web interface isn't making it very apparent [20:47] according to the readme I thought we could use any openID ? [20:47] that should be the case [20:47] let me look a bit closer. i'm probably looking for the wrong thing [20:49] can't seem to add ssh key to juju bootstrap node [20:50] juju by default uses your ~/.ssh/id_rsa* files and copies them for you [20:52] hobbyBobby: there is a command to add more ssh keys to juju, however I don't remember what it is and I can't seem to find it in the docs. [20:53] marcoceppi: when you get this, if you recall the juju command to add keys, can you reference for me? [20:54] lazyPower: I'm looking at preseed alternatives, I am doing this from root user on maas node, I just put id_rsa.pub as the public ssh key [20:55] hobbyBobby: http://maas.ubuntu.com/docs/juju-quick-start.html - following that documentation? [20:55] jcverdie: interesting i'm getting schema migration failure too [20:55] lazyPower: :( [20:55] This may be something I've done incorrectly with the charm config, but i'm not having much success in getting the charm to behave. [20:56] you changed something to the charm? [20:56] just the configuration values, but i'm seeing permission denied on the postgres migration. This may be a leftover from removing/re-adding the relationship [20:56] let me wipe the services and start from scratch [20:57] like it may have a cached db user that's no longer valid in postgres [20:57] lazyPower: thanks, I'll recheck [20:57] k [21:03] agent-state: error [21:03] agent-state-info: 'hook failed: "db-relation-changed"' [21:03] now i have the same error you got [21:03] Whats the output in debug-log? [21:04] can you pastebin it for me? [21:04] https://gist.github.com/jicheu/7d02efca7b4933198193 [21:04] ok, since you weren't attached during the time of hook execution we will need to interactively debug the hook to fetch the associated error [21:05] have 2 terminals ready from your juju workstation, and in one, juju debug-hooks gerrit/0 [21:05] on the other terminal, juju resolved -r gerrit/0 [21:05] let me know once you've completed those steps [21:05] ready [21:05] in the debug-hooks window, you should see a new session pop up, "db-relation-changed" yes? [21:05] I got it on the debug hooks terminal : gerrit/0:db-relation-changed % [21:06] yes:) [21:06] perfect, run `hooks/db-relation-changed` [21:06] on the debug-hooks terminal? [21:06] correct [21:07] not so good... https://gist.github.com/jicheu/e528cf65d3d7a36f5fd8 [21:07] Ok so thats what i initially ran into. The charm expects these values to be configured. It implicitly states this within the configuration yaml of the charm, but doesn't make reference to that in the README [21:08] I'll open a bug against the charm to update the README, however in the meantime, we need to set those configuration flags. I'm not sure this iwll introduce an issue - let me finish my redeployment to validate this will yield good results [21:08] sure [21:09] Ok that seems to have corrected the issue. You will need remove gerrit from the deployment map and re-add it. Set the configuration values BEFORE you relate gerrit with postgresql [21:09] a bit annoying since this could have been mitigated, but live and learn right? [21:11] ok so I guess the first step is to remove the unit? [21:11] That works, you dont need to destroy the machine. [21:11] juju remove-unit gerrit/0 [21:11] juju add-unit gerrit --to [21:12] should I setup the config value before the add-unit? or after? [21:12] after the add unit, but do not relate it with postgres until you have configured the admin user [21:13] ok done [21:13] but when I added the unit it immediately showed the relation with postgre [21:13] should I remove the relation before readding the unit ? [21:14] ah ok, we didn't remove the relationship and juju has that cached [21:14] my mistake, i should have directed you to remove the relationship first [21:14] ok so i remove the relation, the unit, and re-add the unit [21:14] correct [21:16] strange... juju remove-unit gerrit/1 [21:16] but juju status still lists it: [21:16] is the charm still in an error state? [21:17] yes [21:17] that is by design. Juju will not remove anything until the error has been resolved [21:17] ouch [21:17] you may need to resolve teh charm more than once if it errors on the database departed hook execution too. [21:18] it's getting worse... resolve now tells me: ERROR cannot set resolved mode for unit "gerrit/1": already resolved [21:19] and the unit is listed as "life: dying" [21:19] but still here [21:19] it's working on the tear down [21:19] it may still error between the end of life of that service and now, but its actively workin gon removing the unit [21:19] ok so let's wait:) [21:19] Are you working on Micro instances? [21:19] or small? [21:20] hmmm... whatever is set by default :) [21:20] should be small then [21:20] hmm... i wonder why the execution is taking longer for you than what i'm seeing. [21:20] This may be a prime opportunity to do some benchmarking this week [21:20] may be I should move to another region at least for testing [21:21] That's not necessary. I may just be impatient. [21:21] it's been dying for a few minutes.... [21:21] but now i'm wondering what the differences are in the response times in different regions. [21:21] there's no juju kill -9 :) [21:21] does it appear to be stuck then? Resolving does nothing? [21:21] nop [21:22] is postgres in an error state? [21:22] may be i'd better start over [21:22] no postgresql is doing fine [21:22] yeah, i would destroy the env and start over if you can afford the timesink. [21:22] ok [21:22] we got a little hinky with removing services and redeploying to the same box. it shoul dhave been fine but if its acting up lets rule out that possibility [21:23] how would i go about refreshing from envuironments.yaml, it seems to be using old configuration [21:23] I'm not sure what you're asking me [21:23] well I go bootstrap and get this [21:24] lazyPower:014-02-02 21:21:17 DEBUG juju.environs open.go:75 ConfigForName found bootstrap config map[string]interface {}{"name":"maas", "state-port":37017, "tools-url":"", "api-port":17070, "authorized-keys":"ssh-rsa", "default-series":"precise", "development":false, "image-metadata-url":"", "admin-secret":"somethingReallyReally99Secrety", "logging-config":"=DEBUG", "maas-agent-name":"ec9bca2a-0aca-4f5b-8a1a-7fdead74774c", "maas-server":"http://$192 [21:24] .168.100.3:80/MAAS"} [21:24] 2014-02-02 21:21:17 DEBUG juju.environs.configstore disk.go:77 Making /root/.juju/environments [21:24] 2014-02-02 21:21:17 INFO juju.environs open.go:156 environment info already exists; using New not Prepare [21:24] 2014-02-02 21:21:17 DEBUG juju.provider.maas environprovider.go:33 opening environment "maas". [21:25] hobbyBobby: whoa whoa [21:25] 2014-02-02 21:21:17 ERROR juju supercommand.go:282 could not access file 'ec9bca2a-0aca-4f5b-8a1a-7fdead74774c-provider-state': Get http://$192.168.100.3:80/MAAS/api/1.0/files/ec9bca2a-0aca-4f5b-8a1a-7fdead74774c-provider-state/: lookup $192.168.100.3: no such host [21:25] hobbyBobby: pastebin please [21:25] lazyPower: ok, sorry, it's using old host from old config [21:26] its ok :) general rule of thumb is > 2 lines, use pastebin [21:26] lazyPower: i'm deploying again, but not creating the relation [21:26] jcverdie: good plan. Get gerrit's admin config options filled in the GUI before you progress to adding the relationship and it should be fine [21:27] hobbyBobby: ok reading through this log output one second. [21:27] when you talk about the GUI you mean juju-gui? [21:28] Yeah. I use juju-gui for ~ 60% of my deployment testing so i get an accurate view of what an end user would be seeing coming into this from scratch. The gui is bar none the easiest method to interface with juju. [21:29] lazyPower: I got it [21:29] excellent, what was the answer? [21:30] just delete ~// [21:30] ah ok. Good to know. Thanks [21:30] ~/.juju/environments/maas.jenv [21:30] i was thinking you would have to destroy the environment and rebootstrap [21:30] but i'm not very familiar with maas - I don't have the hardware required to test it. [21:33] filling info now... lazyPower should i fill admin_privkey and _pubkey? [21:33] Those are required fields. yes [21:34] so I need to put my private rsa key there?? [21:34] Correct. if you dont want to put your personal private key, generate a new keypair and use those. [21:37] ok another silly question public_url ? what should i put [21:37] the EC2 public address of the machine for now, unless you have a DNS Entry you want to put there, eg: myawesomecodereview.com [21:38] not yes dns for this :) [21:38] re: sendmail settings did you fill them too ? [21:38] i did not [21:38] I only filled in the admin user configuration fields and it deployed without an issue. [21:39] ok so i filled everything except smtp settings, and I left the ephemeral storage for the moment... go deploying now [21:39] * lazyPower crosses fingers [21:40] I don't see any "deploy" buttn on the GUI but the unit is listed as running [21:40] did you click "Save settings" after you filled in the configuration fields? [21:40] yep [21:40] ok, and the charm is green on the GUI right? [21:40] right [21:40] juju has already handed off to running hooks/config-changed [21:40] you should be ok to add that DB relationship now [21:41] hooks are queued and run sequentially [21:41] lazyPower:so now I have my ssh key in /root/.ssh/id_rsa.pub and running bootstrap with that user with the config in the guide. I still can't ssh into that machine without being asked for some password [21:41] is there a password on the SSH key? [21:41] lazyPower:no [21:41] run ssh -vv user@host [21:42] the output should tell if you if there's an issue [21:42] let's try :) [21:42] liek pubkey(Denied) [21:43] got it, no error [21:43] jcverdie: success! [21:43] time to grab a beer, your gerrit setup should be working and responding on port 8081 of the host [21:43] lazyPower: that's the very first step but at least you solved that one for me :) [21:43] nop it doesnt [21:43] juju expose gerrit [21:44] according to the readme I need to deploy apache2 ? [21:44] lazyPower:Trying private key: /root/.ssh/id_dsa, debug1: Trying private key: /root/.ssh/id_ecdsa, debug2: we did not send a packet, disable method [21:44] thats for the reverse proxy, so you can access it on port 80 [21:44] wow no I can see it now (I couldn't 5 minutes ago) :) [21:44] thanks a lot for your help it is invaluable [21:45] hobbyBobby: May be permissions problem? [21:45] and now I'm back to my volume-map and ephemeral stuff... not to bother you but since you seem on the ball you might have an idea :) [21:45] jcverdie: save your deployment map as a yaml using hte gui so you can restore from a known good restore point of configuration. [21:46] export bundle ? [21:46] yep [21:46] done :) [21:46] lazyPower:if I understand correctly we're not allowing the user to use rsa key to validate the public one from the bootstrap node? [21:46] hobbyBobby: i wish i knew more about maas to answer that question. Maybe echo it in #maas and someone will be available to answer? [21:47] FWIW I cannot "sign in" on my gerrit :( [21:47] jcverdie: i used my email that i have associated with login.ubuntu.com as my SSO id, and it worked. [21:47] lazyPower: ok thanks [21:47] you have a sign in link at the top right corner ? clicking on it does nothign here [21:48] i did, but id estroyed the environment already... [21:48] 1 sec let me pull up the charm config on jujucharms.com and i'll see what i put in there [21:49] jcverdie: http://i.imgur.com/5q4zHXP.png [21:50] but i'm also already signed into Ubuntu SSO [21:50] so that may have been the secret sauce [21:50] I have a ubuntu account don't know if i have sso.. I used my yahoo openid, did not work [21:51] well i know this is built by the guys on canonical's CI team so i figured the Ubuntu SSO would be the 1:1 testing mechanism [21:51] what is strange is that it does not even ask me for a login...S ign in just does nothing [21:51] but it should work equally across the board. === mwhudson is now known as zz_mwhudson === zz_mwhudson is now known as mwhudson [22:17] god kills me... openid was not working because when I setup the charm I forgot in the public address to put "http" so my url was not canonical :( [22:29] gerrit did not installed a git with it.. There are not git charms ? I cant find them if there are somewhere [22:31] jcverdie: looking at hooks/gerrit_utils.py, it installs git and gitweb [22:32] ok I might need to push a first project (im dumb sometimes) [22:32] jcverdie: i'm about to leave to attend a superbowl party. Best of luck in your adventures. If you get stuck, try emailing the juju list for non-time sensitive questions. [22:32] sure. thanks a lot for your help [22:33] No Problem :) [22:33] enjoy the party :) I'll check on the seahawks tomorrow in the morning :) === mwhudson is now known as zz_mwhudson === zz_mwhudson is now known as mwhudson === mwhudson is now known as zz_mwhudson === zz_mwhudson is now known as mwhudson === mwhudson is now known as zz_mwhudson === zz_mwhudson is now known as mwhudson