/srv/irclogs.ubuntu.com/2014/02/02/#juju.txt

dpb1marcoceppi: 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.00:20
=== 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
jcverdieHi 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?18:56
=== freeflying_away is now known as freeflying
=== zz_mwhudson is now known as mwhudson
jcverdieHi 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?19:41
lazyPowerGreetings jcverdie, I just pulled up the Gerrit charm on jujucharms.com and started reviewing the README. On which portion are you stuck?20:10
jcverdiehi 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-map20:11
jcverdiei chose canonical-ci/gerrit-59 don't know if you have the same one20:12
jcverdiealso for public_url not sure i need to fill it20:13
lazyPowerjcverdie: ah ok well the ec2 instance sitting in a pending state - is that resolved now?20:15
jcverdielooks random lazyPower... right now I'm experiencing the same issue on a different charm (gitolite)20:15
jcverdiei might be doing something wrong but can't figure what20:16
lazyPowerits a sign that something isn't right in the EC2 config.20:16
jcverdiedo you suggest to start over?20:16
jcverdiedestroy environment and bootstrap again ?20:16
lazyPowerI'm bootstrapping on amazon right now to verify there isn't something hinky upstream.20:16
lazyPoweralso, to note, it appears you are working towards building a git based repository service?20:17
jcverdieabsolutely20:17
lazyPowerif so, may i recommend our gitlab charm? It has all of these features out of the box20:18
lazyPowerit 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
jcverdieWe have been using gitlab as a test run for 6 months20:19
lazyPowerOk i'm bootstrapped, bringing up my first node now20:20
jcverdiebut 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 repository20:20
jcverdiei mean not using merge request nor wiki nor issue tracker20:20
lazyPowerI don't have much experience with gerrit, so this will be an exploratory session for the both of us20:20
jcverdieBTW I have a pending gitolite EC2 instance, it seems stuck. I cannot find the reverse function for "juju deploy" ?20:21
lazyPowerjuju 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 map20:22
jcverdiegot it :)20:23
lazyPowerOk 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 completion20:23
jcverdiei cleaned my environment: just one machine, with juju-gui deployed on it (and running)20:24
jcverdienothing else20:24
lazyPoweryou 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
lazyPowerok, 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:24
jcverdielucky me the one i need is more complex than casual charms :)20:25
lazyPowerjuju deploy postgresql && juju deploy cs:~canonical-ci/precise/gerrit20:26
lazyPowerjuju add-relation gerrit postgresql:db20:27
lazyPowerit 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 formatting20:29
lazyPowerbut 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:29
jcverdiestill pending20:30
lazyPowerok, do either of the instances have public-ip's yet/20:30
jcverdieactually 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:30
lazyPowerright, 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
jcverdiepostgre started not gerrit so far20:31
lazyPowerok, which region are you running in?20:31
jcverdieok all is up now20:31
jcverdieeu-west-120:32
lazyPowerOk. I'm running US-East-1 so there may be a bit of difference in latency then.20:32
jcverdiei have all the public addresses (but no service exposed, except for my juju-gui)20:32
lazyPowerI'm pending a db-relation-changed hook failure after relating the two services.20:32
lazyPower1 moment20:32
lazyPowerok it appears that gerrit wants to be configured befor eyou add the database relationship20:35
lazyPowerException: Cannot create admin user.  Missing required charm configuration.Must set admin_username, admin_external_id, admin_email, admin_pubkey, admin_name.20:35
jcverdiei haven't got the same error ? Where could you see it?20:35
lazyPowerI attached to the unit: juju debug-hooks gerrit/020:35
lazyPowerthis 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:36
lazyPowerjcverdie: https://juju.ubuntu.com/docs/authors-hook-debug.html20:37
jcverdieok got it20:37
lazyPowerdebug-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-toolbelt20:37
lazyPowerjcverdie: brb, phone.20:39
jcverdieso i need to remove gerrit and setup all the settings20:40
lazyPowernot necessarily. You can configure the charm post deployment. Its idempotent so it will reconfigure itself appropriately.20:41
lazyPowerback, thank you for your patience.20:45
jcverdieyou're kidding... Thanks for _your_ patience :)20:45
lazyPower:) We'll discuss my bill later20:46
lazyPowerj/k20:46
jcverdie:p20:46
lazyPowerOK so, i picked the canonical-ci flavor of the charm.. and now i have to find my Ubuntu SSO ID20:46
lazyPoweri'm not sure where to get that since the web interface isn't making it very apparent20:46
jcverdieaccording to the readme I thought we could use any openID ?20:47
lazyPowerthat should be the case20:47
lazyPowerlet me look a bit closer. i'm probably looking for the wrong thing20:47
hobbyBobbycan't seem to add ssh key to juju bootstrap node20:49
lazyPowerjuju by default uses your ~/.ssh/id_rsa* files and copies them for you20:50
lazyPowerhobbyBobby: 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:52
lazyPowermarcoceppi: when you get this, if you recall the juju command to add keys, can you reference for me?20:53
hobbyBobbylazyPower: 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 key20:54
lazyPowerhobbyBobby: http://maas.ubuntu.com/docs/juju-quick-start.html - following that documentation?20:55
lazyPowerjcverdie: interesting i'm getting schema migration failure too20:55
jcverdielazyPower:  :(20:55
lazyPowerThis 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:55
jcverdieyou changed something to the charm?20:56
lazyPowerjust the configuration values, but i'm seeing permission denied on the postgres migration. This may be a leftover from removing/re-adding the relationship20:56
lazyPowerlet me wipe the services and start from scratch20:56
lazyPowerlike it may have a cached db user that's no longer valid in postgres20:57
hobbyBobbylazyPower: thanks, I'll recheck20:57
jcverdiek20:57
jcverdieagent-state: error21:03
jcverdie        agent-state-info: 'hook failed: "db-relation-changed"'21:03
jcverdienow i have the same error you got21:03
lazyPowerWhats the output in debug-log?21:03
lazyPowercan you pastebin it for me?21:04
jcverdiehttps://gist.github.com/jicheu/7d02efca7b493319819321:04
lazyPowerok, since you weren't attached during the time of hook execution we will need to interactively debug the hook to fetch the associated error21:04
lazyPowerhave 2 terminals ready from your juju workstation, and in one, juju debug-hooks gerrit/021:05
lazyPoweron the other terminal, juju resolved -r gerrit/021:05
lazyPowerlet me know once you've completed those steps21:05
jcverdieready21:05
lazyPowerin the debug-hooks window, you should see a new session pop up, "db-relation-changed" yes?21:05
jcverdieI got it on the debug hooks terminal : gerrit/0:db-relation-changed %21:05
jcverdieyes:)21:06
lazyPowerperfect, run `hooks/db-relation-changed`21:06
jcverdieon the debug-hooks terminal?21:06
lazyPowercorrect21:06
jcverdienot so good... https://gist.github.com/jicheu/e528cf65d3d7a36f5fd821:07
lazyPowerOk 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 README21:07
lazyPowerI'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 results21:08
jcverdiesure21:08
lazyPowerOk 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 postgresql21:09
lazyPowera bit annoying since this could have been mitigated, but live and learn right?21:09
jcverdieok so I guess the first step is to remove the unit?21:11
lazyPowerThat works, you dont need to destroy the machine.21:11
lazyPowerjuju remove-unit gerrit/021:11
lazyPowerjuju add-unit gerrit --to <machine id of original gerrit deployment>21:11
jcverdieshould I setup the config value before the add-unit? or after?21:12
lazyPowerafter the add unit, but do not relate it with postgres until you have configured the admin user21:12
jcverdieok done21:13
jcverdiebut when I added the unit it immediately showed the relation with postgre21:13
jcverdieshould I remove the relation before readding the unit ?21:13
lazyPowerah ok, we didn't remove the relationship and juju has that cached21:14
lazyPowermy mistake, i should have directed you to remove the relationship first21:14
jcverdieok so i remove the relation, the unit, and re-add the unit21:14
lazyPowercorrect21:14
jcverdiestrange... juju remove-unit gerrit/121:16
jcverdiebut juju status still lists it:21:16
lazyPoweris the charm still in an error state?21:16
jcverdieyes21:17
lazyPowerthat is by design. Juju will not remove anything until the error has been resolved21:17
jcverdieouch21:17
lazyPoweryou may need to resolve teh charm more than once if it errors on the database departed hook execution too.21:17
jcverdieit's getting worse... resolve now tells me: ERROR cannot set resolved mode for unit "gerrit/1": already resolved21:18
jcverdieand the unit is listed as "life: dying"21:19
jcverdiebut still here21:19
lazyPowerit's working on the tear down21:19
lazyPowerit may still error between the end of life of that service and now, but its actively workin gon removing the unit21:19
jcverdieok so let's wait:)21:19
lazyPowerAre you working on Micro instances?21:19
lazyPoweror small?21:19
jcverdiehmmm... whatever is set by default :)21:20
lazyPowershould be small then21:20
lazyPowerhmm... i wonder why the execution is taking longer for you than what i'm seeing.21:20
lazyPowerThis may be a prime opportunity to do some benchmarking this week21:20
jcverdiemay be I should move to another region at least for testing21:20
lazyPowerThat's not necessary. I may just be impatient.21:21
jcverdieit's been dying for a few minutes....21:21
lazyPowerbut now i'm wondering what the differences are in the response times in different regions.21:21
jcverdiethere's no juju kill -9 :)21:21
lazyPowerdoes it appear to be stuck then? Resolving does nothing?21:21
jcverdienop21:21
lazyPoweris postgres in an error state?21:22
jcverdiemay be i'd better start over21:22
jcverdieno postgresql is doing fine21:22
lazyPoweryeah, i would destroy the env and start over if you can afford the timesink.21:22
jcverdieok21:22
lazyPowerwe 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 possibility21:22
hobbyBobbyhow would i go about refreshing from envuironments.yaml, it seems to be using old configuration21:23
lazyPowerI'm not sure what you're asking me21:23
hobbyBobbywell I go bootstrap and get this21:23
hobbyBobbylazyPower: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":"<root>=DEBUG", "maas-agent-name":"ec9bca2a-0aca-4f5b-8a1a-7fdead74774c", "maas-server":"http://$19221:24
hobbyBobby.168.100.3:80/MAAS"}21:24
hobbyBobby2014-02-02 21:21:17 DEBUG juju.environs.configstore disk.go:77 Making /root/.juju/environments21:24
hobbyBobby2014-02-02 21:21:17 INFO juju.environs open.go:156 environment info already exists; using New not Prepare21:24
hobbyBobby2014-02-02 21:21:17 DEBUG juju.provider.maas environprovider.go:33 opening environment "maas".21:24
lazyPowerhobbyBobby: whoa whoa21:25
hobbyBobby2014-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 host21:25
lazyPowerhobbyBobby: pastebin please21:25
hobbyBobbylazyPower: ok, sorry, it's using old host from old config21:25
lazyPowerits ok :) general rule of thumb is > 2 lines, use pastebin21:26
jcverdielazyPower: i'm deploying again, but not creating the relation21:26
lazyPowerjcverdie: good plan. Get gerrit's admin config options filled in the GUI before you progress to adding the relationship and it should be fine21:26
lazyPowerhobbyBobby: ok reading through this log output one second.21:27
jcverdiewhen you talk about the GUI you mean juju-gui?21:27
lazyPowerYeah. 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:28
hobbyBobbylazyPower: I got it21:29
lazyPowerexcellent, what was the answer?21:29
hobbyBobbyjust delete ~//21:30
lazyPowerah ok. Good to know. Thanks21:30
hobbyBobby~/.juju/environments/maas.jenv21:30
lazyPoweri was thinking you would have to destroy the environment and rebootstrap21:30
lazyPowerbut i'm not very familiar with maas - I don't have the hardware required to test it.21:30
jcverdiefilling info now... lazyPower should i fill admin_privkey and _pubkey?21:33
lazyPowerThose are required fields. yes21:33
jcverdieso I need to put my private rsa key there??21:34
lazyPowerCorrect. if you dont want to put your personal private key, generate a new keypair and use those.21:34
jcverdieok another silly question public_url ? what should i put21:37
lazyPowerthe EC2 public address of the machine for now, unless you have a DNS Entry you want to put there, eg: myawesomecodereview.com21:37
jcverdienot yes dns for this :)21:38
jcverdiere: sendmail settings did you fill them too ?21:38
lazyPoweri did not21:38
lazyPowerI only filled in the admin user configuration fields and it deployed without an issue.21:38
jcverdieok so i filled everything except smtp settings, and I left the ephemeral storage for the moment... go deploying now21:39
* lazyPower crosses fingers21:39
jcverdieI don't see any "deploy" buttn on the GUI but the unit is listed as running21:40
lazyPowerdid you click "Save settings" after you filled in the configuration fields?21:40
jcverdieyep21:40
lazyPowerok, and the charm is green on the GUI right?21:40
jcverdieright21:40
lazyPowerjuju has already handed off to running hooks/config-changed21:40
lazyPoweryou should be ok to add that DB relationship now21:40
lazyPowerhooks are queued and run sequentially21:41
hobbyBobbylazyPower: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 password21:41
lazyPoweris there a password on the SSH key?21:41
hobbyBobbylazyPower:no21:41
lazyPowerrun ssh -vv user@host21:41
lazyPowerthe output should tell if you if there's an issue21:42
jcverdielet's try :)21:42
lazyPowerliek pubkey(Denied)21:42
jcverdiegot it, no error21:43
lazyPowerjcverdie: success!21:43
lazyPowertime to grab a beer, your gerrit setup should be working and responding on port 8081 of the host21:43
jcverdielazyPower: that's the very first step but at least you solved that one for me :)21:43
jcverdienop it doesnt21:43
lazyPowerjuju expose gerrit21:43
jcverdieaccording to the readme I need to deploy apache2 ?21:44
hobbyBobbylazyPower:Trying private key: /root/.ssh/id_dsa, debug1: Trying private key: /root/.ssh/id_ecdsa, debug2: we did not send a packet, disable method21:44
lazyPowerthats for the reverse proxy, so you can access it on port 8021:44
jcverdiewow no I can see it now (I couldn't 5 minutes ago) :)21:44
jcverdiethanks a lot for your help it is invaluable21:44
lazyPowerhobbyBobby: May be permissions problem?21:45
jcverdieand 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
lazyPowerjcverdie: save your deployment map as a yaml using hte gui so you can restore from a known good restore point of configuration.21:45
jcverdieexport bundle ?21:46
lazyPoweryep21:46
jcverdiedone :)21:46
hobbyBobbylazyPower: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
lazyPowerhobbyBobby: i wish i knew more about maas to answer that question. Maybe echo it in #maas and someone will be available to answer?21:46
jcverdieFWIW I cannot "sign in" on my gerrit :(21:47
lazyPowerjcverdie: i used my email that i have associated with login.ubuntu.com as my SSO id, and it worked.21:47
hobbyBobbylazyPower: ok thanks21:47
jcverdieyou have a sign in link at the top right corner ? clicking on it does nothign here21:47
lazyPoweri did, but id estroyed the environment already...21:48
lazyPower1 sec let me pull up the charm config on jujucharms.com and i'll see what i put in there21:48
lazyPowerjcverdie: http://i.imgur.com/5q4zHXP.png21:49
lazyPowerbut i'm also already signed into Ubuntu SSO21:50
lazyPowerso that may have been the secret sauce21:50
jcverdieI have a ubuntu account don't know if i have sso.. I used my yahoo openid, did not work21:50
lazyPowerwell 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 mechanism21:51
jcverdiewhat is strange is that it does not even ask me for a login...S ign in just does nothing21:51
lazyPowerbut it should work equally across the board.21:51
=== mwhudson is now known as zz_mwhudson
=== zz_mwhudson is now known as mwhudson
jcverdiegod 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:17
jcverdiegerrit did not installed a git with it.. There are not git charms ? I cant find them if there are somewhere22:29
lazyPowerjcverdie: looking at hooks/gerrit_utils.py, it installs git and gitweb22:31
jcverdieok I might need to push a first project (im dumb sometimes)22:32
lazyPowerjcverdie: 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
jcverdiesure. thanks a lot for your help22:32
lazyPowerNo Problem :)22:33
jcverdieenjoy the party :) I'll check on the seahawks tomorrow in the morning :)22:33
=== 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

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!