/srv/irclogs.ubuntu.com/2012/04/30/#juju-dev.txt

TheMuemorning07:27
fwereadeheya TheMue07:29
TheMuefwereade: just went outside on our veranda to work there. the nice side of home office.07:30
rogpeppefwereade, TheMue: mornin'07:35
TheMuerogpeppe: heya07:35
fwereadeheya rogpeppe07:44
fwereadeTheMue, sounds lovely :)07:45
fwereadeTheMue, I find my balcony is just too damn hot/bright at the times I'd generally want to work out there, but hey ho07:45
rogpeppeah, sun, i have vague memories of that.07:46
* rogpeppe looks out at yet another grey wet day07:48
TheMueHope that the weather next week is fine.07:55
rogpeppeme too07:55
rogpeppefwereade: niemeyer is suggesting that UploadTools becomes part of PutFile's functionality. i'm not quite sure how that'll work though, as there are two possible places to put and get things.07:56
rogpeppefwereade: i'm wondering what you thing07:56
rogpeppethink07:56
fwereaderogpeppe, sorry, which are the places? I saw that suggestion, looked sane at first glance07:56
rogpeppefwereade: if you're a user, you get the tools from a public place, but you get bootstrap info from a private place07:57
fwereaderogpeppe, ah, I'd had a vague assumption that the "local" version of the tools would always be stored in filestorage, and that would be the canonical location for that particular deployment, regardless of original source07:58
fwereaderogpeppe, like charms (right?)07:58
rogpeppefwereade: i don't think every user should be charged with 5MB+ of uploads every bootstrap07:59
rogpeppefwereade: it slows it down apart from anything else.07:59
fwereaderogpeppe, well, it wouldn't *necessarily* have to go through the user's machine (although not doing so would be somewhat fiddlier)07:59
rogpeppefwereade: it would using that API08:00
rogpeppefwereade: and in fact i'm not sure it's possible to initiate S3->S3 transfers without involving either a new machine in the cloud or shuttling the data through the local machine08:01
rogpeppebut there might be i guess08:01
rogpeppeinteresting: http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html08:03
fwereaderogpeppe, I'd been thinking that in the local case, we upload somewhere and somehow communicate "there" to the bootstrap machine; which would always copy the juju files to the canonical location, regardless of source (but yeah, that could maybe shortcut it)08:03
fwereaderogpeppe, (it actually feels like things could be a bit annoying if we upload to the canonical location directly from the client)08:04
rogpeppefwereade: by "the canonical location" are you thinking of a file path or a URL?08:04
fwereaderogpeppe, URL08:04
rogpeppefwereade: so in the local case you're suggesting we store the binaries at two URLs?08:05
rogpeppefwereade: one for the initial upload and one "canonical" place?08:06
fwereaderogpeppe, I'm not sure it's *actually* necessary to do so, and I think it's an implementation detail08:06
rogpeppefwereade: i'm not sure i see the advantage in doing so08:06
fwereaderogpeppe, I'm really just saying that I don't think a deployment-local copy of the source code necessarily involves copying publicly available stuff through the user's machine08:07
rogpeppefwereade: we've got to copy things *from* the user's machine, right?08:08
fwereaderogpeppe, only in dev mode, surely?08:08
rogpeppefwereade: yeah, sorry i thought that's what you meant by "deployment-local'08:08
rogpeppe"08:08
fwereaderogpeppe, ha, sorry08:09
rogpeppefwereade: why would non-devs need a deployment-local copy of the source code?08:09
fwereaderogpeppe, I'm just having a quick look at the python to remind myself of something08:09
rogpeppeor the binaries, come to that?08:09
fwereaderogpeppe, I'm not privy to the details of the original discussions; my only non-waffly/hedged argument is "because we decided to do that for charms", and I'm not convinced the two cases are different enough to warrant inconsistency ;)08:13
fwereaderogpeppe, it doesn't feel to me like an intrinsically bad thing for a deployment to pull in all its dependencies as they become apparent, though08:14
fwereaderogpeppe, it should I think just make things a little less dependent on the vagaries of the wider internets ;)08:15
fwereadebrb08:15
=== lynxman- is now known as lynxman
rogpeppefwereade: yes, i agree with that. and it seems like the storage cost of storing the tools once per deployment is small.08:18
rogpeppefwereade: however...08:18
rogpeppefwereade: what about multiple architectures/OS versions etc?08:19
fwereaderogpeppe, sorry, not sure: what about them? won't we potentially need copies for each, whatever we do, independent of anything else?08:26
rogpeppefwereade: so you're suggesting that every time we add a unit, we potentially copy toos to the local provider storage08:27
rogpeppe?08:27
rogpeppes/toos/tools/08:27
fwereaderogpeppe, I think so; just like we do on deploy, right?08:28
rogpeppefwereade: this wasn't the plan i'd understood. but maybe it's a good thing to do.08:28
fwereaderogpeppe, hm, I don't think it's necessarily intrinsically incompatible with what we'd discussed08:29
rogpeppefwereade: i'd thought that upload-client was an explicit flag that we would give08:29
fwereaderogpeppe, I think we have a bit of freedom to do dev/real slightly differently08:30
rogpeppefwereade: how would dev and real be different?08:31
fwereaderogpeppe, I'd seen the upload-client flag as an explicit I'm-in-dev-mode thing08:31
rogpeppefwereade: me too. but i think you're suggesting that real deployments do something similar?08:32
fwereaderogpeppe, I'm suggesting that deployments should internally take responsibility for distributing juju binaries just as they do with charms08:33
fwereaderogpeppe, and that the dev mode stuff simply give devs an opportunity to hook into that mechanism at a useful point08:33
fwereaderogpeppe, it may ofc be that the charm-distribution strategy is a historical accident and I'm entirely on crack08:34
rogpeppefwereade: how do we deal with different charm versions for different platforms?08:35
fwereaderogpeppe, I don't think we do08:35
rogpeppefwereade: 'cos that's something we need to deal with for juju tools08:35
fwereaderogpeppe, I think that's up to the charm authors08:35
rogpeppefwereade: i thought so08:36
fwereaderogpeppe, and yes, I see that they're not 100% the same situation08:36
fwereaderogpeppe, (well, in a sense we do, in that we have separate oneiric and precise versions of some charms, and that means they carry a different identifier)08:36
rogpeppefwereade: but not, say, 386 vs amd64 vs arm?08:37
fwereaderogpeppe, there's nothing stopping me running wordpress on precise and oneiric in the same deployment, although I'm not sure why I'd want to08:37
fwereaderogpeppe, no; I think the core idea of variation is still in there08:37
rogpeppefwereade: so... if we go this direction, how does the initial bootstrap happen?08:39
rogpeppefwereade: bootstrap init pulls from a URL and pushes to local provider storage?08:39
fwereaderogpeppe, I think so, yes08:39
rogpeppefwereade: maybe that only needs to happen when the first unit is deployed.08:42
fwereaderogpeppe, yeah, I think so; it feels sensible to me to keep using the same versions everywhere until we're told to upgrade08:42
fwereaderogpeppe, (but then I also think it makes sense to be lazy about grabbing (say) the 2.4.2 ARM binaries until we actually dpeloy to ARM08:43
fwereade)08:43
rogpeppefwereade: yeah. that's where i was coming from.08:44
fwereaderogpeppe, I'm just not quite sure where that fits in with dev mode08:44
rogpeppefwereade: indeed. i'm all a bit confused about how things would work exactly now.08:45
fwereaderogpeppe, but a build-absolutely-everything script, and a dev-mode bootstrap that pushes everything, sounds, well, plausible at least08:45
fwereaderogpeppe, I'm definitely drawing heavy inspiration from how charm publishing works atm08:46
fwereaderogpeppe, er, in python, not in the store08:46
fwereaderogpeppe, that's something that appears to "just work" pretty well08:47
fwereaderogpeppe, but I am suddenly starting to worry that there are enough subtle differences that I've led myself astray08:48
rogpeppefwereade: so... is this about right: when you want to deploy a service, an agent (the machine agent?) pulls the charm from a URL and pushes to the local provider storage. then when a unit starts, the unit agent pulls the charm from local provider storage and runs it?08:48
fwereaderogpeppe, unless I've really missed something, the charms even from the store round-trip through your local machine08:49
rogpeppefwereade: i don't know. the main significant difference AFAICS is that there are no bootstrapping issues with charms.08:49
fwereaderogpeppe, I consider this to be sucky *but* an implementation detail08:49
rogpeppefwereade: really?08:49
fwereaderogpeppe, pretty sure08:49
rogpeppefwereade: i'd prefer that not to be true for the tools. they're 10MB already and will be larger.08:50
fwereaderogpeppe, "charm = yield repo.find(charm_url)"08:50
fwereaderogpeppe, hence my talking about it being an implementation detail08:50
fwereaderogpeppe, hm wait a mo08:50
fwereaderogpeppe, no, I'm right, repo.find downloads08:51
fwereaderogpeppe, I'd prefer also that it not be true for the charms08:51
rogpeppefwereade: agreed.08:51
fwereaderogpeppe, but I think that in neither case is it actually *necessary* that the publicly available stuff be downloaded08:52
fwereaderogpeppe, I'm suggesting the philosophy is worth copying not the implementation08:52
rogpeppefwereade: i think i agree. i'm just trying to work out what it means.08:57
rogpeppefwereade: how's this for a sketch: http://paste.ubuntu.com/956991/08:59
rogpeppefwereade: actually, one slight mod: http://paste.ubuntu.com/956997/09:00
fwereaderogpeppe, in essence yes; I think there are maybe some arch-related subtleties around the "version" there, but I think-hope they're impishdetails rather than fully devilish ones09:00
rogpeppefwereade: what kind of things are you thinking of there?09:01
fwereaderogpeppe, I *think* it'll only be an issue in dev mode09:01
fwereaderogpeppe, and I think as a dev I can put up with building everything I plan to need for my env before bootstrapping and just splurging them all up there at bootstrap time09:02
rogpeppefwereade: yeah. i think you have to.09:03
fwereaderogpeppe, with that assumption in place it feels like it'd work09:03
rogpeppefwereade: and you *can't* deploy to a version with a different arch if you want to use your local version09:03
rogpeppes/deploy to a version/deploy to a machine/09:04
fwereaderogpeppe, hmm, can't we cross-compile?09:06
rogpeppefwereade: not if we want to use DNS.09:07
rogpeppe(DNS uses cgo, which means that we need the dynamic libraries available when we compile)09:07
fwereaderogpeppe, ty09:08
fwereaderogpeppe, but this means we are actually not able to cross-compile at all?09:08
rogpeppe(i might be wrong about some of the details there)09:08
rogpeppefwereade: pretty much, yeah.09:08
fwereaderogpeppe, I'm comfortable avoiding a deep-dive on the subject, that sounds like the critical issue09:09
rogpeppefwereade: well... no, you can, and it's dead easy09:09
fwereaderogpeppe, ah ok...09:09
rogpeppefwereade: but you don't get certain packages09:09
fwereaderogpeppe, ah, got it; so DNS really did mean DNS :)09:09
rogpeppefwereade: the go compiler is always a cross compiler too09:09
fwereaderogpeppe, so I had thought :)09:09
rogpeppefwereade: yeah.09:09
rogpeppefwereade: the problem is that on some platforms you just can't do everything by invoking syscalls09:10
rogpeppefwereade: there's magic in the local libraries too, so you need to call them.09:10
fwereaderogpeppe, that said I think we touchedon it in the thread and niemeyer agreed that no-foreign-dev-builds was an acceptable tradeoff for now anyway09:10
fwereaderogpeppe, ha, ok09:11
fwereaderogpeppe, TheMue: https://codereview.appspot.com/612905312:34
fwereade...and lunch12:34
TheMuefwereade: enjoy12:35
rogpeppefwereade: reviewed13:16
fwereaderogpeppe, tyvm13:17
rogpeppefwereade: i've updated the uploadtools proposal in the light of gustavo's comments, which i think are compatible with the result of our discussion earlier. https://codereview.appspot.com/6128046/14:47
fwereaderog, cheers14:48
rogpeppe(it's a pity that codereview/lbox doesn't deal with file moves well)14:48
* rogpeppe just deleted >70 lines of slightly dubious code. oh, the pleasure!15:15
rogpeppemake that >10015:16
niemeyerHello!15:31
niemeyerfwereade, rogpeppe, TheMue: Anyone around still?15:32
rogpeppeniemeyer: yo!15:32
rogpeppeniemeyer: i think we all are, probably15:33
rogpeppeniemeyer: we could even have our start-the-week meeting maybe15:33
rogpeppeniemeyer: how's things in californeye-ay?15:33
TheMueniemeyer: Heya.15:33
niemeyerrogpeppe: Probably not today, at least.. we're about to have the kick off talk by Mark15:34
rogpeppeniemeyer: k15:34
TheMuerogpeppe: BBQ is already hot here.15:34
niemeyerrogpeppe: I could wake up earlier tomorrow so we can do it, though15:34
niemeyerTheMue: Nice :)15:34
rogpeppeTheMue: sounds like you've got nice weather. jealous!15:34
rogpeppeniemeyer: that sounds good15:34
TheMueniemeyer: Yes, indeed, traditional party starting into May.15:34
TheMuerogpeppe: 20°C, sun is shining.15:35
rogpeppeniemeyer: i wonder if i could run something past you briefly that i discussed with fwereade this morning15:35
niemeyerrogpeppe: Sure, what's up?15:35
rogpeppeniemeyer: it's to do with how we do the bootstrap stuff15:35
rogpeppeniemeyer: here's a sketch of how i *think* it might work15:36
rogpeppeniemeyer: http://paste.ubuntu.com/957728/15:36
rogpeppeniemeyer: the difficulty being that unlike Put/GetFile, upload tools has two places to go to15:36
* niemeyer reading through15:37
rogpeppeniemeyer: there should be a blank line before "on bootstrap machine init" BTW15:37
niemeyerrogpeppe:It all sounds good until the provisioning agent bits15:38
rogpeppeniemeyer: go on15:38
niemeyerrogpeppe: I'm wondering why it has to recompute15:39
niemeyerrogpeppe: I guess it makes sense, since there are different circumstances depending on what's being run15:39
rogpeppeniemeyer: exactly15:39
fwereadeniemeyer, heyhey; sorry, landlady cam round early15:39
niemeyerfwereade: Heya!15:40
rogpeppeniemeyer: different versions might be appropriate for different os/arch combinations15:40
niemeyerrogpeppe: That scheme looks reasonable15:40
rogpeppeniemeyer: the only really new bit is that the binaries are usually copied to private storage15:40
rogpeppeniemeyer: that doesn't happen with the bootstrap machine, unless you force it with --upload-client15:41
niemeyerrogpeppe: Hmm15:41
niemeyerrogpeppe: private doesn't have to be private.. that might make things simpler15:41
rogpeppeniemeyer: fwereade's suggestion, based around what we do with charms15:41
rogpeppeniemeyer: how do you mean?15:42
niemeyerrogpeppe: Private might be a bit misleading, in the sense that this is the environment storage to which the client has write access15:43
niemeyerrogpeppe: There's no intrinsic reason why *those* files, specifically, have to be private15:43
rogpeppeniemeyer: it's also the same storage name space that's used for storing the environment zookeeper addresses15:43
niemeyerrogpeppe: Hmmm.. on S3, though, we can do even better15:44
niemeyerrogpeppe: We can make $u a signed URL, that has read access from the bucket even though it is private15:44
rogpeppeniemeyer: i'm not sure i see how that helps15:45
niemeyerrogpeppe: Hold on, sorry.. why is $u being copied?15:45
niemeyerrogpeppe: i've missed that in the scheme15:45
rogpeppeniemeyer: the idea is that an environent gets a stable, local copy of the juju tools, even if the originals have come from a remote, potentially unstable source.15:46
niemeyerrogpeppe: We shouldn't worry about that now IMO.. $PUBLIC is going to be configurable15:47
niemeyerrogpeppe: and right now both private and public are equally trustable, being in S315:47
rogpeppeniemeyer: the difficulty i'm having is that we've subsumed UploadTools into PutFile, but there are now *two* name spaces not one15:48
rogpeppeniemeyer: we've got the place that the tools are stored and the place that the environment settings (zookeeper addresses currently) are stored15:48
niemeyerrogpeppe: We've always had two.. that's not related to UploadTools vs. PutFile15:48
rogpeppeniemeyer: we didn't use PutFile for the other storage space though, right?15:49
niemeyerrogpeppe: Which other storage space?15:49
rogpeppeniemeyer: the storage space for the executable files15:49
niemeyerrogpeppe: Sorry, let's get a bit more specific15:50
niemeyerrogpeppe: PutFile should be used by the client to upload the tools to the environment storage15:50
niemeyerrogpeppe: PutFile is not used to upload to the public storage because it's not maintained by the juju client15:50
niemeyerrogpeppe: Does that make sense?15:52
niemeyerrogpeppe: If it does, I'm not sure about what you mean15:52
rogpeppeniemeyer: yes it does. and i think my confusion has gone. if i delete the lines that copy $u, it all looks fine.15:53
niemeyerrogpeppe: Sweet15:53
rogpeppeniemeyer: one other reservation was that the prefix "tools/" becomes rather special, but i think that's fine - i've documented it on Environ.PutFile: http://paste.ubuntu.com/957764/15:55
niemeyerrogpeppe: Agreed15:55
rogpeppeniemeyer: and that makes it reasonable for an Environ implementation to know about files of that form when searching for tools15:55
niemeyerrogpeppe: We'll have another special prefix too: charms/15:55
rogpeppeniemeyer: cool.15:56
niemeyerrogpeppe: That's how it was originally designed, but the ancient "nova object store" couldn't deal with slashes (!)15:56
niemeyerrogpeppe: We don't care about that anymore, so can do the right thing15:56
rogpeppeniemeyer: great.15:56
rogpeppeniemeyer: i've just been deleting the "juju-origin" code BTW and it feels marvellous15:57
niemeyerrogpeppe: +1000 :)15:58
rogpeppeniemeyer: >100 lines of code gone, just like that (and that's not even including the tests!)15:58
* fwereade approves :)16:00
niemeyerrogpeppe: re. this:16:01
niemeyer"""16:01
niemeyerrogpeppe: Well, I did suggest16:01
niemeyerArm16:01
niemeyerThanks copy & paste16:01
niemeyeri don't think so. "t" is for "test" here - i'm not sure that there's a16:01
niemeyersingle set of arguments that will result in characteristic for all16:01
niemeyercommands, so we use the test table above.16:01
niemeyer"""16:01
niemeyerrogpeppe: The only difference in that table is the "juju" vs "jujud" string16:02
niemeyerrogpeppe: It's really not worth a table in that case..16:02
rogpeppeniemeyer: i guess, if we can force a similar-looking usage message out of all juju commands by passing them the same arguments16:03
rogpeppeniemeyer: it's probably true of jujuc too, and perhaps that's all we'll ever have16:03
rogpeppeniemeyer: ok, will remove the table16:03
niemeyerrogpeppe: That's my guess, and we can always change back when it does make sense to have it16:03
niemeyerrogpeppe: Mostly a "doesn't look like it's necessary", rather than "we can't do this"16:04
rogpeppeniemeyer: k16:04
TheMueSo, just came back to wish you a happy labour day tomorrow and you a good time in IAK, niemeyer.16:05
TheMueniemeyer: I've done the watcher test refactoring, it's proposed.16:06
niemeyerTheMue: Thanks a lot, have a good time too!16:06
niemeyerTheMue: Cheers.. I'll do a review pass tonight16:06
TheMueniemeyer: Thank you, will have. And looking forward to next week. But we'll meet here on Wednesday again.16:07
TheMueBye16:07
rogpeppeniemeyer: i've made that change BTW16:10
niemeyerrogpeppe: Thanks!16:11
=== TheMue_ is now known as TheMue
niemeyerrogpeppe: Looking, tentatively :)16:22
niemeyerHave to move16:29
niemeyerbiab16:29
rogpeppefwereade: ping16:43
fwereaderogpeppe, pong16:43
rogpeppefwereade: here's a thought: rather than having a --upload-client flag, we have an upload-client command16:44
fwereaderogpeppe, hmm, that sounds like a good idea to me16:44
fwereaderogpeppe, although it makes me less certain that that's precisely the right name16:44
rogpeppefwereade: 'cos i was just looking at looking as it as a flag and it's not really appropriate on quite a few commands, but seems like it might work well as a command in its own right16:45
rogpeppefwereade: upload-tools? upload?16:45
fwereaderogpeppe, upload-tools sounds pretty good16:45
rogpeppefwereade: the idea is you can execute it *before* bootstrap if you want16:46
fwereaderogpeppe, yes, very nice16:46
rogpeppefwereade: good, thanks.16:46
rogpeppefwereade: ok, i'll give that a go16:47
rogpeppefwereade: unless you wanna16:47
fwereaderogpeppe, I'm very happily fiddling with the hook commands atm16:48
rogpeppefwereade: ok great16:48
rogpepperight, i'm off for the evening. see y'all tomorrow17:00
fwereadelikewise17:01
fwereadetake care all17:01

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