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

hatchdanob you can use lxc's00:03
hatchdeploy the charm using the 'local' environment00:03
danobhatch: i am using lxc's :)00:04
hatchohh, well then :)00:04
hatchso do you just want to test the individual scripts?00:04
marcoceppidanob: what's your end goal?00:12
danobhatch: to test individual scripts i am reading juju debug-hooks now, will it do?00:17
hatchthat will allow you to watch the debug logs while the hooks are executing00:17
hatchbut like marcoceppi asked....what is your end goal? What are you trying to achieve here?00:17
marcoceppithat will allow you to use execute commands as if you were that hook*00:18
danobmarcoceppi: my end gole is to test and debug my charm as if i am just running a python script. i just want to make charm test and debug simple for me.00:20
hatcher yes and that too....sorry :)00:20
marcoceppidanob: well, we have two ways to do that. One is to simply unit test your hooks. So if you wrote them in Python you'll want to use unittest module to then test your python code as you woudl any python project00:20
danobmarcoceppi: what is the best workflow for this (test/debug)?00:21
marcoceppidanob: the other is to write charm tests, however those are desigend as integration tests, which will actually deploy the charm, and other charms00:21
marcoceppidanob: debug-hooks is not what you want, that's something different00:21
hatchdanob I test mine as individual scripts00:21
hatchjust fyi00:21
marcoceppiWhat you want is unittests, and that depends entirely on the language of the charm00:22
danobmarcoceppi: "the other is to write charm tests" like python-django charm?00:33
marcoceppidanob: there are quite a few charms that have charm tests00:34
marcoceppidanob: python-django is one example00:35
marcoceppidanob: memcached is another example, https://bazaar.launchpad.net/~charmers/charms/precise/memcached/trunk/files/head:/tests/00:37
danobmarcoceppi: hmm thanks :)00:38
danobmarcoceppi: "One is to simply unit test your hooks" in this way can i run config-get in subprocess.call ?00:40
danobmarcoceppi: i think not ryt?00:40
marcoceppidanob: no, you can't, you would mock calls to config-get and the other hook commands00:40
marcoceppiyou can't run those commands unless the service is deployed in a juju context00:40
marcoceppiThose only exist in the context of a deployed service in a juju environment00:41
danobmarcoceppi: hmm i understand00:43
danobmarcoceppi: is it possible to develop a emulator to emulate a juju context/environment, I will be happy to contribute that project :)00:46
marcoceppiI have considered it, but it's not a priority at the moment. You're welcome to try00:46
danobmarcoceppi: hmm, then where I can get full information about 'how juju context/environment created?' or how a charm deployed detail step by step with source code reference? I am not going to start developing by starting a project, just want to know deep inside?00:57
marcoceppidanob: I mean, we have docs here and there, have you looked at our documentation? http://juju.ubuntu.com/docs00:58
danobmarcoceppi: yes.00:58
marcoceppithat's pretty much it, if you want to see what the environment looks like, deploy a charm, run juju debug-hooks, then initiage a config change with `juju set <service> key=val`, when the hook gets trapped, you can run config-get, you can type env to see the environment, etc00:59
=== hatch___ is now known as hatch
danobmarcoceppi: hmm thanks :)01:02
=== CyberJacob is now known as CyberJacob|Away
milkcould anyone tell me how to promote a mysql-slave to master using juju?03:09
=== freeflying is now known as freeflying_away
=== mwhudson is now known as zz_mwhudson
=== freeflying_away is now known as freeflying
marcoceppimilk: remove the the slave relation, then recreate the relation with the slave as the master03:48
milkmarcoceppi: there are two units in the mysql-slave service. i want to promote one of them to master and keep the other as slave.03:51
marcoceppimilk: in short, you can't03:51
milkhmm....03:52
marcoceppithose are the units of a service group, so what you could do was deploy a new mysql service as mysql-master, then scale the slave down, then create the relation03:52
milkbut the data would be destroyed.03:53
marcoceppimilk: stand up the new mysql-master, make it a slave of the mysql-slave, have it sync, break the relation, re-establish as it being master to the slaves, verify data is there, scale down the mysql-slave service group03:54
marcoceppior just leave it where the new "mysql-master" is the slave03:54
marcoceppiand scale down the slave group to only have one03:54
milkthanks, but it will take too much time for the failover to finish..03:58
milki think this single-master-multiple-slave scenorio is a pretty common one.03:58
milkbut juju's model seems not to be able to handle it properly...03:59
milk:)03:59
marcoceppiit handles it, just differently than you'd expect04:07
marcoceppihaving master - master replication is a better model embodied in juju04:07
marcoceppimilk: I've been working on charming this http://www.proxysql.com/ which would make the underlying which is master, which is slave, which do I failover to in juju easier04:09
milkmarcoceppi: i agree, the multi-master databases(like riak) can fit in juju's model easily.04:14
milkmarcoceppi: so, with proxysql, we should put both master and slave into a single service, and let the proxy do the rest of the work?04:15
milkmarcoceppi: and the failover will happen in that service, instead of between two services?( mysql-master and mysql-slave)04:16
marcoceppimilk: yes, using the same relation schema, then proxy sql would know how to failover. Charms would use proxy sql as a single point of contact, and it'd be configured to fail over to slave and promte slave as  master directly04:16
milkmarcoceppi: so the proxysql would be a subordinate service deployed with the mysql server?04:17
marcoceppimilk: probably, yes04:19
marcoceppimilk: could also be a subordinate deployed on the actual application servers04:19
marcoceppior both04:19
marcoceppiproxysql is kind of...flexible in how it can be deployed04:19
milkmarcoceppi: or as a separate principle service..04:19
marcoceppithat as well04:20
lazyPowermarcoceppi: good news, amulet installs in precise.04:20
milkmarcoceppi: agree. seems no difference.04:20
marcoceppilazyPower: with the pkg-test ppa?04:21
lazyPowerI did add that, yes.04:21
marcoceppilazyPower: sorry, apparently I killed the wrong process and display server died, going to have to reboot04:21
lazyPowernbd04:21
lazyPowerdo i need to nuke the vm and retry from the juju ppa?04:22
lazyPoweror is it there yet?04:22
milkmarcoceppi: thanks for your time :)04:23
marcoceppimilk: np! let me know if you have any other questions04:32
=== CyberJacob|Away is now known as CyberJacob
=== CyberJacob is now known as CyberJacob|Away
tomixxx3hi, i when i try to enter "instances & volumes" in openstack dashboard, i only get a "Interal Server Error" message. However, i have not deployed "nova-volume". do i need "nova-volume" for this functionality? the same error comes when i try to open "images & snapshots"13:31
marcoceppitomixxx3: I don't know if that's required for the dashboard to work but it might be13:40
tomixxx3marcoceppi: kk, i guess i will figure out this when i actually will USE openstack to deploy my task.13:41
roadmrtomixxx3: can you "juju ssh openstack-dashboard/0", then go to /var/log/apache2 and look at errors.log? the error should give a clue as to what's wrong13:41
roadmrtomixxx3: (I *think* it's related to the django version mismatch with grizzly but I haven't looked at it further; yes, I have the same problem)13:42
tomixxx3apache log says: The request you have made requires authentication. http 40113:43
=== BradCrittenden is now known as bac
=== freeflying is now known as freeflying_away
=== gianr_ is now known as gianr
bitgandtterhello good day18:05
bitgandttercan anyone make a successfull deployment of juju on rackspace?18:05
bitgandtteranyone?18:08
=== sarnold_ is now known as sarnold
MingIs it a way for juju-log log as ERROR?18:32
danobwhat will be the best practice if I want to download a *.tar.gz file form charm install python script??18:51
hatchdanob in my latest charm review it was suggested to package it in the charm18:52
hatchdanob but in the current version this is how my Ghost charm does it https://github.com/hatched/ghost-charm/blob/master/hooks/install18:53
danobhatch: thanks man :) is there any size restrictions in charm store?18:54
danobhatch: or in juju env?18:54
hatchnot as far as I know...but if it's excessive it might be rejected in review18:54
hatchI just say 'might' because if it was 1GB I would reject it lol18:55
* hatch is not a reviewer however18:55
danobhatch: lol18:55
hatchmarcoceppi ^^18:55
rick_h_danob: you can always do that in a charm you write, but for best results in getting it to users it should be able to work offline19:09
rick_h_danob: many charms contain a files or releases directory that contains the downloaded file so that it can work offline19:09
rick_h_danob: I think that's policy for reviewed charms going forward.19:10
=== CyberJacob|Away is now known as CyberJacob
=== zz_mwhudson is now known as mwhudson
danobrick_h_: hmm19:11
danobrick_h_: thanks19:11
hatchdanob what charm are you writing?19:13
danobhatch: i am writing a charm which will deploy apache2 mod and apache2 so i need to download this mod using wget19:17
danobhatch: this mod is precompiled binary19:17
hatchahh did you look into the current apache 2 charm to see if you could use it to add your mod? http://manage.jujucharms.com/charms/precise/apache219:18
hatchor maybe enhance it to allow you to add custom mods?19:18
danobhatch: no, but i will. i was thinking that i will install apache2 using apt-get. i was wanted my own unit like my-charm-name/019:22
hatchon deploy you can call a service almost whatever you want19:24
hatchor you can fork the promoted apache2 charm and make your own modifications to it19:24
hatchjust throwing ideas out there for ya, take them as you will :)19:24
maxcan_is there any way to configure juju to add a unit to a service wehn a service dies?19:27
danobhatch: I appreciate ideas :) thanks man19:31
hatch:)19:32
danobhatch: if i deploy an apache2 charm then how i put may mod.so file in /usr/lib/apache2/modules and other configuration files in apathe2/0 unit?19:41
danobhatch: i am confused in here19:44
danobhatch: can you point me a charm who does this type of operation19:45
danobif i deploy an apache2 charm then how i put may mod.so file in /usr/lib/apache2/modules and other configuration files in apathe2/0 unit?19:45
danobi am confused in here19:46
danobcan you point me a charm who does this type of operation19:46
lazyPower_maxcan_: Example of what you're trying to do?19:49
maxcan_have resilience against AWS's random killing of ec2 instances19:49
lazyPower_maxcan_: ah, juju should be doing that automagically if the environment says a service shoul dhave X units, and on a pulse check it realizes it only has 1, it should be spinning up a replacement unit19:50
maxcan_hm, i'll go back and check19:51
sarnoldlazyPower_: _really_?? cool19:51
sarnoldlazyPower_: though if the billing department sees the other units are still up, that could get expensive :)19:51
maxcan_IIRC, when I killed an ec2 instance, the machine state went to terminated as did the agent-state but no new machines got spun up19:51
lazyPower_sarnold: i overheard this prior. Please feel free to correct me if i'm misinformed19:52
lazyPower_let me bootstrap and validate that statement, 1 moment maxcan_19:54
maxcan_i'm also on on old version19:54
maxcan_let me confirm it on my end.. dont want to bother you since i'm not sure19:54
maxcan_s/sure/certain19:54
lazyPower_well i just regurgitated information i read in chat, so there's no evidence aside from heresay19:54
lazyPower_i may have read some late night conversation that's not valid - so i'll check regardless19:55
lazyPower_maxcan_: ok i'm seeing the machine terminated status on 1.17.220:02
lazyPower_so the behavior you are seeing is by design, i was misinformed.20:02
hatchmaxcan_ you are probably looking for something like what https://landscape.canonical.com/ provides20:02
=== mwhudson is now known as zz_mwhudson
=== zz_mwhudson is now known as mwhudson
=== tvansteenburgh1 is now known as tvansteenburgh
=== CyberJacob_ is now known as cyberJacob_
=== cyberJacob_ is now known as CyberJacob_
=== CyberJacob_ is now known as cyberjacob_
=== cyberjacob_ is now known as CyberJacob
=== CyberJacob is now known as CyberJacob_
=== CyberJacob_ is now known as CyberJacob
=== ev_ is now known as ev
=== cmars` is now known as cmars
* timrc considers writing the charm for: https://github.com/robmerrell/hipsterdb22:26
=== allenap_ is now known as allenap
=== tris- is now known as tris
lazyPower_timrc: do it!22:45
timrclazyPower_, ;)22:46
=== lazyPower_ is now known as lazyPower
lazyPowerThe icon for the service would have to randomly not show up though, because it became too mainstream22:50
=== gianr_ is now known as gianr
=== hazmat` is now known as hazmat
=== ppetraki_ is now known as ppetraki
=== freeflying_away is now known as freeflying
=== CyberJacob is now known as CyberJacob|Away

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