[00:03] danob you can use lxc's [00:03] deploy the charm using the 'local' environment [00:04] hatch: i am using lxc's :) [00:04] ohh, well then :) [00:04] so do you just want to test the individual scripts? [00:12] danob: what's your end goal? [00:17] hatch: to test individual scripts i am reading juju debug-hooks now, will it do? [00:17] that will allow you to watch the debug logs while the hooks are executing [00:17] but like marcoceppi asked....what is your end goal? What are you trying to achieve here? [00:18] that will allow you to use execute commands as if you were that hook* [00:20] marcoceppi: 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] er yes and that too....sorry :) [00:20] danob: 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 project [00:21] marcoceppi: what is the best workflow for this (test/debug)? [00:21] danob: the other is to write charm tests, however those are desigend as integration tests, which will actually deploy the charm, and other charms [00:21] danob: debug-hooks is not what you want, that's something different [00:21] danob I test mine as individual scripts [00:21] just fyi [00:22] What you want is unittests, and that depends entirely on the language of the charm [00:33] marcoceppi: "the other is to write charm tests" like python-django charm? [00:34] danob: there are quite a few charms that have charm tests [00:35] danob: python-django is one example [00:37] danob: memcached is another example, https://bazaar.launchpad.net/~charmers/charms/precise/memcached/trunk/files/head:/tests/ [00:38] marcoceppi: hmm thanks :) [00:40] marcoceppi: "One is to simply unit test your hooks" in this way can i run config-get in subprocess.call ? [00:40] marcoceppi: i think not ryt? [00:40] danob: no, you can't, you would mock calls to config-get and the other hook commands [00:40] you can't run those commands unless the service is deployed in a juju context [00:41] Those only exist in the context of a deployed service in a juju environment [00:43] marcoceppi: hmm i understand [00:46] marcoceppi: is it possible to develop a emulator to emulate a juju context/environment, I will be happy to contribute that project :) [00:46] I have considered it, but it's not a priority at the moment. You're welcome to try [00:57] marcoceppi: 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:58] danob: I mean, we have docs here and there, have you looked at our documentation? http://juju.ubuntu.com/docs [00:58] marcoceppi: yes. [00:59] that'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 key=val`, when the hook gets trapped, you can run config-get, you can type env to see the environment, etc === hatch___ is now known as hatch [01:02] marcoceppi: hmm thanks :) === CyberJacob is now known as CyberJacob|Away [03:09] could anyone tell me how to promote a mysql-slave to master using juju? === freeflying is now known as freeflying_away === mwhudson is now known as zz_mwhudson === freeflying_away is now known as freeflying [03:48] milk: remove the the slave relation, then recreate the relation with the slave as the master [03:51] marcoceppi: 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] milk: in short, you can't [03:52] hmm.... [03:52] those 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 relation [03:53] but the data would be destroyed. [03:54] milk: 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 group [03:54] or just leave it where the new "mysql-master" is the slave [03:54] and scale down the slave group to only have one [03:58] thanks, but it will take too much time for the failover to finish.. [03:58] i think this single-master-multiple-slave scenorio is a pretty common one. [03:59] but juju's model seems not to be able to handle it properly... [03:59] :) [04:07] it handles it, just differently than you'd expect [04:07] having master - master replication is a better model embodied in juju [04:09] milk: 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 easier [04:14] marcoceppi: i agree, the multi-master databases(like riak) can fit in juju's model easily. [04:15] marcoceppi: 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:16] marcoceppi: and the failover will happen in that service, instead of between two services?( mysql-master and mysql-slave) [04:16] milk: 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 directly [04:17] marcoceppi: so the proxysql would be a subordinate service deployed with the mysql server? [04:19] milk: probably, yes [04:19] milk: could also be a subordinate deployed on the actual application servers [04:19] or both [04:19] proxysql is kind of...flexible in how it can be deployed [04:19] marcoceppi: or as a separate principle service.. [04:20] that as well [04:20] marcoceppi: good news, amulet installs in precise. [04:20] marcoceppi: agree. seems no difference. [04:21] lazyPower: with the pkg-test ppa? [04:21] I did add that, yes. [04:21] lazyPower: sorry, apparently I killed the wrong process and display server died, going to have to reboot [04:21] nbd [04:22] do i need to nuke the vm and retry from the juju ppa? [04:22] or is it there yet? [04:23] marcoceppi: thanks for your time :) [04:32] milk: np! let me know if you have any other questions === CyberJacob|Away is now known as CyberJacob === CyberJacob is now known as CyberJacob|Away [13:31] hi, 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:40] tomixxx3: I don't know if that's required for the dashboard to work but it might be [13:41] marcoceppi: kk, i guess i will figure out this when i actually will USE openstack to deploy my task. [13:41] tomixxx3: 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 wrong [13:42] tomixxx3: (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:43] apache log says: The request you have made requires authentication. http 401 === BradCrittenden is now known as bac === freeflying is now known as freeflying_away === gianr_ is now known as gianr [18:05] hello good day [18:05] can anyone make a successfull deployment of juju on rackspace? [18:08] anyone? === sarnold_ is now known as sarnold [18:32] Is it a way for juju-log log as ERROR? [18:51] what will be the best practice if I want to download a *.tar.gz file form charm install python script?? [18:52] danob in my latest charm review it was suggested to package it in the charm [18:53] danob but in the current version this is how my Ghost charm does it https://github.com/hatched/ghost-charm/blob/master/hooks/install [18:54] hatch: thanks man :) is there any size restrictions in charm store? [18:54] hatch: or in juju env? [18:54] not as far as I know...but if it's excessive it might be rejected in review [18:55] I just say 'might' because if it was 1GB I would reject it lol [18:55] * hatch is not a reviewer however [18:55] hatch: lol [18:55] marcoceppi ^^ [19:09] 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 offline [19:09] danob: many charms contain a files or releases directory that contains the downloaded file so that it can work offline [19:10] danob: I think that's policy for reviewed charms going forward. === CyberJacob|Away is now known as CyberJacob === zz_mwhudson is now known as mwhudson [19:11] rick_h_: hmm [19:11] rick_h_: thanks [19:13] danob what charm are you writing? [19:17] hatch: i am writing a charm which will deploy apache2 mod and apache2 so i need to download this mod using wget [19:17] hatch: this mod is precompiled binary [19:18] ahh 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/apache2 [19:18] or maybe enhance it to allow you to add custom mods? [19:22] hatch: 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/0 [19:24] on deploy you can call a service almost whatever you want [19:24] or you can fork the promoted apache2 charm and make your own modifications to it [19:24] just throwing ideas out there for ya, take them as you will :) [19:27] is there any way to configure juju to add a unit to a service wehn a service dies? [19:31] hatch: I appreciate ideas :) thanks man [19:32] :) [19:41] hatch: 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:44] hatch: i am confused in here [19:45] hatch: can you point me a charm who does this type of operation [19:45] 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:46] i am confused in here [19:46] can you point me a charm who does this type of operation [19:49] maxcan_: Example of what you're trying to do? [19:49] have resilience against AWS's random killing of ec2 instances [19:50] 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 unit [19:51] hm, i'll go back and check [19:51] lazyPower_: _really_?? cool [19:51] lazyPower_: though if the billing department sees the other units are still up, that could get expensive :) [19:51] IIRC, when I killed an ec2 instance, the machine state went to terminated as did the agent-state but no new machines got spun up [19:52] sarnold: i overheard this prior. Please feel free to correct me if i'm misinformed [19:54] let me bootstrap and validate that statement, 1 moment maxcan_ [19:54] i'm also on on old version [19:54] let me confirm it on my end.. dont want to bother you since i'm not sure [19:54] s/sure/certain [19:54] well i just regurgitated information i read in chat, so there's no evidence aside from heresay [19:55] i may have read some late night conversation that's not valid - so i'll check regardless [20:02] maxcan_: ok i'm seeing the machine terminated status on 1.17.2 [20:02] so the behavior you are seeing is by design, i was misinformed. [20:02] maxcan_ you are probably looking for something like what https://landscape.canonical.com/ provides === 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 [22:26] * timrc considers writing the charm for: https://github.com/robmerrell/hipsterdb === allenap_ is now known as allenap === tris- is now known as tris [22:45] timrc: do it! [22:46] lazyPower_, ;) === lazyPower_ is now known as lazyPower [22:50] The icon for the service would have to randomly not show up though, because it became too mainstream === 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