/srv/irclogs.ubuntu.com/2018/03/20/#juju.txt

=== frankban|afk is now known as frankban
gnuoyCan I specify a relative local directory as the charm source in a bundle ?10:26
admcleod_gnuoy: pretty sure you can10:27
gnuoyEverything I try results in one form of explosion or another eg https://paste.ubuntu.com/p/rdFhVWn6kg/10:29
gnuoyFully qualified paths seem fine10:29
admcleod_gnuoy: try specifying the series as an option10:34
admcleod_gnuoy: for the vault charm10:35
gnuoyadmcleod_, hurray \o/10:36
gnuoyadmcleod_, thank you10:36
admcleod_gnuoy: it looks like it assumes a series, so charm: xenial/vault would work if you also had ./xenial/vault10:36
gnuoythat didn't seem to work10:37
admcleod_gnuoy: i know ive done something like that in the past but perhaps its changed10:37
admcleod_gnuoy: i guess series specification isnt a huge issue10:37
gnuoyI mean xenial/vault didn't, the series option is golden10:37
gnuoyadmcleod_, not to me, I'm happy to restate it10:37
TheAbsentOneHow can one use a sql file in a hook to create and populate a database with the reactive framework properly? Or is there an option in the mysql charm itself for this?10:55
rick_h_TheAbsentOne: so normally there'd be some flag set that the db is up and ready and at that point in time you'd use whatever db library to connect with the information stored from the relation and such and write out the data to the database.11:17
TheAbsentOneyeah got to that point, I'm just not that familiar with how python can achieve this properly but Im testing things out right now, thanks rick_h_11:19
rick_h_TheAbsentOne: what db is it?11:19
TheAbsentOnethe app will use and need both a mysql and mongo connection but for now I'm focussing on mysql11:22
rick_h_TheAbsentOne: check out https://github.com/PyMySQL/PyMySQL11:26
rick_h_TheAbsentOne: you should be able to add it to the requirements file for the charm I think and then use that from within the hooks11:26
TheAbsentOneohn nice that should work rick_h_ thanks for leading me somewhere! ^^11:27
rick_h_TheAbsentOne: no problem, have fun!11:28
=== salmankhan1 is now known as salmankhan
TheAbsentOnerick_h_: still here by any chance? If 1 charm needs both a mongodb and a mysql charm for example can juju handle this like the first method or doe I need the second way (https://pastebin.com/0GbiHFE4)12:59
magicaltroutyou'd need the second TheAbsentOne13:00
TheAbsentOneI thought so, and can the charms from the charmstore handle this? magicaltrout13:01
magicaltrouti'm not really following what went before.... handle what?13:02
magicaltrouti'm working on a jdbc relation for example that wouild sorta evenually do what your first example did, but to my knowledge, if you want mysql and mongo related in one charm, that'll be fine as long as you have 2 hooks and tell them what to do13:03
TheAbsentOnethere's nothing special actually. (It's for a POC) I'm gonna use the apache php layer and I have a few php files I want to deploy as a service. One of these files reads from a mongodb and anoher from a mysql one13:03
magicaltroutyeah thats fine, you'll have 2 functions one for mysql available and the other for mongo available13:03
TheAbsentOneare you really working on that? That's basicly one of the subjects of my dissertation here! :o13:04
magicaltroutwell actually you could nest it in one probably13:04
magicaltroutbuit from a usability point of view you'd probably want to feed back to the user if one service wasn't available and the other was13:04
TheAbsentOneyep that was my first step and in a next iteration I kinda want to build a "generic type of database"-charm13:04
TheAbsentOnecorrect!13:04
magicaltrouti've got an apache drill charm so i've got a jdbc relation13:05
magicaltroutthats generic enough to do stuff13:05
magicaltroutand then my ui charm can accept that13:05
magicaltroutfrom mysql, drill, postgres or whatever13:05
TheAbsentOneis it on github? I might learn a stuff or two13:05
magicaltroutalthough i've not upstreamed mysql support yet13:05
magicaltroutmaybe let13:05
magicaltroutme look13:05
TheAbsentOneif you are interested btw, I did some basic writing on a gitbook about my research: https://ciberth.gitbooks.io/logboek-thesis/content/problem.html13:06
magicaltrouthttps://gitlab.com/spiculedata/juju/interface-jdbc13:09
magicaltroutdoesn't do much currently other than offer up some jdbc details13:09
magicaltroutborrowed mostly from the mysql interface13:09
TheAbsentOnestill usefull! Thanks a lot13:12
TheAbsentOneIt's pretty hard finding my way through all the documentation and examples13:12
TheAbsentOneas a novice13:12
magicaltrouttell me about it13:13
magicaltroutthe only way i understood anything was from sitting with kwmonroe and cory_fu for about 6 hours in Gent13:14
magicaltroutturns out kwmonroe hacks for beer13:14
TheAbsentOneIt's actually funny how we have this big paradox. We want to simplify things by sometimes adding complexity13:14
TheAbsentOnein Ghent? You are from Belgium? :)13:15
magicaltroutnope13:15
magicaltroutbut if someone pays13:15
magicaltrouti'll go anywhere13:15
TheAbsentOnehehe as a matter of fact I'm from Ghent city xD13:15
magicaltroutthere was a juju track at devops days twice13:15
magicaltroutso we all met up there13:15
TheAbsentOneand at configmngmtncmp a few years back, that's where I got to know juju13:15
magicaltroutyeah13:16
magicaltrouti was lying you got the correct name :P13:16
magicaltrouti will have been lurking at the back somewhere13:16
TheAbsentOnehehe13:18
TheAbsentOnewhat can cause an unknown status and workloud even if every function has a status_set: https://github.com/Ciberth/mycustomcharms/blob/master/firstiterations/step0/reactive/step0.py14:18
TheAbsentOneloggin in with ssh shows that he didn't even install apache and debug hooks doesn't really work, as there is no hooks folder or anything yet14:19
rick_h_TheAbsentOne: that means you forgot to run charm build and to use the built charm to deploy14:20
rick_h_TheAbsentOne: a common error that there's definitely a bug about warning a user when no hooks found14:20
rick_h_TheAbsentOne: have to get into the habit of checking charm build and charm proof to sanity check before deploying/upgrading/testing14:21
TheAbsentOneoh god you are right I build it but I still ran the well not the builded one xD guess I'm tired. Thanks rick_h_ I could have lost a lot of stupid time here14:22
TheAbsentOnecharm proof said everything was fine xD14:22
rick_h_TheAbsentOne: yea, I usually end up with one terminal in the charm code directory and one in the build directory so I split the work of editing/etc of the charm and deploy/juju interactions while testing14:22
TheAbsentOnethat's exactly what I'm gonna do, I feel so stupid lol14:23
magicaltrouti've done that about 6000 times14:23
rick_h_don't, you don't know how many times I've done that14:23
rick_h_well...not sure it's 6k but magicaltrout is generally more #winning than me :P14:24
TheAbsentOneyeah kinda figures that it happened to others before14:24
=== frankban is now known as frankban|afk
rick_h_kwmonroe: around? having issues auth'ing to the k8s webui and curious if I'm missing something19:59
kwmonroeyup rick_h_19:59
kwmonroerick_h_: do you see the login prompt on the webui, or does it show some gobbledeegook json/xml?19:59
rick_h_hey, so I have the proxy going and I go to my /ui URL and get redirected asked about uploading a config file or using a service account token20:00
kwmonroerick_h_: SKIP20:00
rick_h_kwmonroe: so I point it at my .kube/config and it says "Authentication failed. Please try again."20:00
rick_h_oooooh...ummm...wtf?20:00
kwmonroeisn't there a skip option?  i never use that config file doohickey20:00
kwmonroejust type admin/<password> and go about your business20:00
rick_h_yea, fair enough, there is a skip. I guess I kind of read that like "GO" and "Cancel" and didn't catch it was skip20:01
rick_h_I didn't even have to do that much20:01
rick_h_it took me straight to the dash20:01
kwmonroeto be fair rick_h_, i have no idea what that token/config would allow you to do that skipping prevents.20:01
rick_h_oh hmm, but a crossed out head in the corner20:01
rick_h_if I click that it'll bring back up the dialog20:01
rick_h_kwmonroe: so where do I go to auth with user/pass?20:02
rick_h_kwmonroe: if I go to "settings" in the dashboard I get a 40320:02
kwmonroehm, you should have been prompted for a user/pass first, then you'd get the "upload a config / token" -- the latter is what i skip20:02
rick_h_kwmonroe: nope20:02
kwmonroerick_h_: did you conjure-up this thing, or juju deploy?20:03
rick_h_kwmonroe: juju deploy canonical-kubernetes20:03
rick_h_well, I had to download the bundle to put etcd on containers so I can fit it in 6 machines :/20:03
rick_h_but same diff20:03
kwmonroerick_h_: does "kubectl cluster-info" give you output that says "k8s dashboard available at:  blah"?20:05
rick_h_kwmonroe: rgr it does20:06
kwmonroeand is that the URL you're trying to access?20:06
rick_h_kwmonroe: no, I ran kubeproxy and went to the 127. address20:06
kwmonroebecause maybe you're trying to hit the master/ui directly versus the proxy20:06
rick_h_per the instructions :)20:06
kwmonroeoh mylanta, didn't know we had instructions20:06
kwmonroeryebot: help this poor soul ^^20:06
rick_h_ah yea, hitting the url directly w/o proxy has a basic http dialog20:07
ryebotlookin'20:07
kwmonroeok - try admin and the password from ~/.kube/config-$JUJU_MODEL20:07
rick_h_hah, so I can login with my .kube/config file except that it doesn't really log me in20:07
rick_h_it let's me through the htaccess stuff but I still get 403 on settings/etc20:08
kwmonroeyou have to login, then click skip, then physically skip around the room, then press cancel.20:08
rick_h_kwmonroe: so I argue one cannot login to the dashboard properly20:08
kwmonroelol20:08
rick_h_kwmonroe: ooooh, I forgot the cancel part20:08
kwmonroeyour argument is noted20:08
rick_h_:P20:08
ryebotrick_h_ use the kubeconfig from /root on a k8s worker20:08
rick_h_ryebot: not the instructions "juju scp kubernetes-master/0:config ~/.kube/config" ?20:09
rick_h_that's the config I'm using, is the worker ones different?20:09
ryebotthere's two sets of credentials, for whatever reason the ones in /root on a worker get me logged in20:10
ryebotthey're probably somewhere on the master too, but idk where20:10
rick_h_ryebot: /root/cdk/kubeconfig ?20:10
rick_h_ryebot: there's no config in /root20:10
rick_h_ryebot: my /root looks like "cdk  curtin-install-cfg.yaml  curtin-install.log  snap"20:10
ryebotrick_h_ yeah that sounds right, sorry going off memory here20:10
rick_h_ryebot: gotcha, ok20:11
rick_h_ryebot: ah, yea the kubeconfig is a service token vs a user account20:11
ryebotit's ... a little screwy and kinda grew into that organically. I think we have a task to make that less awful.20:11
rick_h_ryebot: hmm, ok. I'm working out how things work so I'll tinker and find the service account stuff and see if I can list/create them and such then20:12
rick_h_so thanks for skip kwmonroe and ty ryebot for saying I'm not holding it wrong20:13
ryebotxD20:13
kwmonroedoes that mean you're in rick_h_?20:14
tvansteenburghwe should update the instructions20:16
tvansteenburghand we should not be telling users to auth as service accounts :P20:18
tvansteenburghi'm trying to remember why we used to kubectl proxy to reach the dashboard20:21
tvansteenburghi haven't done that in ages20:21
tvansteenburghalthough i would expect it to work with basic auth anyway20:22
knobbytvansteenburgh: what is your preference? an ingress or loadbalancer depending on substrate?20:25
tvansteenburghknobby: well with cdk the lb is already there20:28
knobbytvansteenburgh: so the load balancer for the api server would pull double duty to pass off to the dashboard service?20:30
tvansteenburgheh, doesn't it already? if i kubectl cluster-info, my dash url is the lb ip address20:31
* knobby isn't certain20:31
knobbyI'm just trying to figure out what the goal is here20:32
tvansteenburghknobby: the problem is that rick_h_ followed our bundle instructions, which tell you to run kubectl proxy to access the dash, but then he discovered he couldn't basic auth using that method20:33
tvansteenburghi haven't tried this myself yet20:34
tvansteenburghi can't remember the last time i used kubectl proxy though20:34
knobbytvansteenburgh: right, I get that the general problem is that the CDK instructions aren't as good as they should be for the dashboard and I'd like to see what we need to do to fix it. But I think step one there is to define the ideal experience. How do we talk to the dashboard? Is it an ingress, through a lb, or hidden behind kube proxy? Then we work towards that. kjackal has done some work here recently and20:36
knobbymight have some opinions...20:36
knobbytvansteenburgh: I don't use my dashboard either and that hurts my perspective here20:37
rick_h_tvansteenburgh: the bigger issue is that you cannot log into the dashboard login UX with your config21:09
rick_h_tvansteenburgh: I'm not sure how that's supposed to work, but the proxy just bypasses the http basic auth and you end up at the dashboard and logging into that itself doesn't work21:09
rick_h_kwmonroe: so no, I'm into the main dashboard but as an anon user vs as "admin"21:10
rick_h_that's why things like the settings nav menu give me a 403 (I assume)21:10
rick_h_kwmonroe: tvansteenburgh let me know if you want me to screenshare what I mean if I'm not being clear21:12
=== salmankhan1 is now known as salmankhan

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