Re: Docker compose in Juju

2016-06-06 Thread Gayan Gunarathne
Hi Samuel,

Thank you very much for the details.

As you mention if we wrap the Docker image in the Charm, it is just like a
single instance.Isn't? It just like that I run this docker containers in a
single instance in IaaS like EC2, GCE etc. Within this instance it will
spawn the containers. So for my deployment I need to manager it within the
docker image in the Charm.Isn't?

Thanks,
Gayan





On Mon, Jun 6, 2016 at 7:39 PM, Samuel Cozannet <
samuel.cozan...@canonical.com> wrote:

> Hi Gayan,
>
> Juju cannot operate with app containers as it operates with "os-based"
> systems.
> The difference is that Juju expects the node it spins to run a Juju agent.
> In the case of a Docker container, which runs a single process, that would
> mean the sole purpose of the container is running... Juju itself. So long
> for your app.
> So that means Juju cannot provision Docker containers "directly" (which is
> what you seem to expect with the provider idea).
>
> If you want to run Docker containers via Juju, you have the following
> methods:
> * Wrap the Docker image in the charm. Essentially, the charm would then be
> a set of commands to run, scale, integrate... the container with the rest
> of the world (for example, managing the fact that the host port is not
> necessarily the same as the container port, or managing storage for the
> image and so on and so on)
> In this context, you would run docker images, under the form of a docker
> compose, on a single host.
> * Wrap the docker-compose in the Swarm layer: here you would do the same
> as above, but Juju would run at the host level of your Swarm cluster.
> * Create a specific charm to interact with the cluster API (k8s, Mesos,
> Swarm): this charm would be your deployer. It could receive hooks from the
> outside world, triggering deployment or other stuff. In this case, the
> charm can be a subordinate (running on all cluster instances), which you
> could potentially load balance, or a standalone service running on the
> side.
>
> Now, if you are looking into building a container based IaaS equivalent, I
> suggest you look into LXD
> , which would spin
> containers that look and behave like VMs.
> From a Juju perspective, there is a LXD provider.
> The diff with Docker is that LXD doesn't natively provide image based
> deployment, but follows the Juju philosophy to always start with a blank
> image.
> So your charms will have to deploy the code in LXD from scratch.
>
> Additional nodes: in the docs, pick the "/devel" branch, it's better if
> you use Juju 2.x
>
> I hope this helps.
> ++
> Sam
>
>
>
>
> --
> Samuel Cozannet
> Cloud, Big Data and IoT Strategy Team
> Business Development - Cloud and ISV Ecosystem
> Changing the Future of Cloud
> Ubuntu   / Canonical UK LTD  /
> Juju 
> samuel.cozan...@canonical.com
> mob: +33 616 702 389
> skype: samnco
> Twitter: @SaMnCo_23
> [image: View Samuel Cozannet's profile on LinkedIn]
> 
>
> On Mon, Jun 6, 2016 at 2:36 PM, Gayan Gunarathne 
> wrote:
>
>>
>> Hi Charles/Samuel,
>>
>> Thanks for the information.
>>
>> What I am try to do is to run a docker compose to start docker containers
>> in a single machine. Still I am not clear how we can use the docker with
>> Juju.I am following this[1]
>>
>> Simple I need to use the Juju UI[2] and create my deployment there.Then
>> can I do the deployment with the docker.How can I select  the docker as a
>> IaaS. I couldn't find the docker configuration section in
>> environment.yaml.I am not clear how can I provide the docker as a cloud
>> provider.
>>
>> [1]https://jujucharms.com/docs/stable/getting-started
>> [2]https://demo.jujucharms.com/
>>
>> Thanks,
>> Gayan
>>
>> On Wed, Jun 1, 2016 at 3:08 AM, Samuel Cozannet <
>> samuel.cozan...@canonical.com> wrote:
>>
>>> And finally to add to this, there is a community effort around Mesos and
>>> DCOS to provide the same idea as the k8s stuff.
>>>
>>> I am also interested in your use case and feedback :)
>>>
>>> Best,
>>> Sam
>>> On May 31, 2016 7:17 PM, "Charles Butler" 
>>> wrote:
>>>
 Greetings Gayan!

 You most certainly can compose and use a full docker-provided stack,
 mix and match with charms - thats the power of wrapping your compose-based
 service with layer-docker.

 https://github.com/juju-solutions/layer-docker

 Which is a great starting place for charming up your dockerized app
 using charms.docker to lend a hand with the ops knowledge to get it running
 :)

 https://github.com/juju-solutions/charms.docker
 http://pythonhosted.org/charms.docker/modules.html

 There are several examples in the charm store from myself (lazypower)
 and Matt Bruzek (mbruzek)  that are docker based. I believe the most
 straight forward example that I can illustrate 

Re: Bash completion

2016-06-06 Thread Adam Stokes
It looks like it still doesn't work, running

juju version
2.0-beta8.4022-xenial-amd64

I'm unable to juju to get a list of subcommands

On Mon, Jun 6, 2016 at 11:59 AM, Nicholas Skaggs <
nicholas.ska...@canonical.com> wrote:

> Beta8 contains what I hope are some fixes for bash completion. It should
> complete properly for 'juju', whether /usr/bin/juju is pointed at juju2 or
> juju1. That solves bug #1 below I hope; #2 and #3 still need work. Comments
> appreciated!
>
> Nicholas
>
>
> On 06/02/2016 11:28 AM, Martin Packman wrote:
>
>> Hi all,
>>
>> We need someone who cares about bash completion to step up and make
>> sure it works well for juju 2.0. There are several reported issues and
>> changes needed:
>>
>> 1) Bash completion sometimes? doesn't work at all
>> 
>>
>> If you can reproduce this, please try adding 'set -x' to the top of
>> /usr/share/bash-completion/completions/juju2 and completing again, and
>> see if the output spam is enlightening. Add details to the bug.
>>
>> 2) Update to completion script
>> 
>>
>> JuanJo proposed some updates a while back, but the branch needs
>> picking up and finishing off. This is also a prerequisite for...
>>
>> 3) Bash completion for versioned juju commands
>> 
>>
>> When we're installing version-numbered aliases for juju, those should
>> also have completion scripts.
>>
>> Thanks,
>>
>> Martin
>>
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Bash completion

2016-06-06 Thread Nicholas Skaggs
Beta8 contains what I hope are some fixes for bash completion. It should 
complete properly for 'juju', whether /usr/bin/juju is pointed at juju2 
or juju1. That solves bug #1 below I hope; #2 and #3 still need work. 
Comments appreciated!


Nicholas

On 06/02/2016 11:28 AM, Martin Packman wrote:

Hi all,

We need someone who cares about bash completion to step up and make
sure it works well for juju 2.0. There are several reported issues and
changes needed:

1) Bash completion sometimes? doesn't work at all


If you can reproduce this, please try adding 'set -x' to the top of
/usr/share/bash-completion/completions/juju2 and completing again, and
see if the output spam is enlightening. Add details to the bug.

2) Update to completion script


JuanJo proposed some updates a while back, but the branch needs
picking up and finishing off. This is also a prerequisite for...

3) Bash completion for versioned juju commands


When we're installing version-numbered aliases for juju, those should
also have completion scripts.

Thanks,

Martin




--
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: error with mariadb

2016-06-06 Thread Jay Wren
Clicking that URL and reading the InRelease file, you can see that the
mirror at http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ does not have
ppc64el packages.

A quick search at packages.ubuntu.com shows that trusty has mariadb 5.5
packaged.
http://packages.ubuntu.com/search?keywords=mariadb=names=trusty=all

I took a quick look at the mariadb charm at https://jujucharms.com/mariadb/
and I do not see a PPA or other repository config value. Are you using that
charm or some other charm?

In Daniel's reply he wrote "I can confirm that the MariaDB Foundation
repositories do have
packages for MariaDB 5.5 for Trusty on Power 8 Little Endian."

It does not sound like  http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/
is a full mirror of the MariaDB Foundation repositories.

A list of mirrors is here:
https://downloads.mariadb.org/mariadb/repositories/#mirror=jaleco=Ubuntu_release=trusty--ubuntu_trusty=5.5

I selected each mirror and each one appears to only mirror [arch=amd64,i386]
.

I'm afraid I don't know the next step to help you, but I hope this
information is helpful. Maybe Daniel could reply with the location of the
Maria DB Foundation repositories which include ppc64le trusty packages.

On Mon, Jun 6, 2016 at 8:55 AM, Rajith P Venkata 
wrote:

> Hi
>
> Thanks for below information, I tried with below options, after mariadb
> 5.5  got installed, I tried install my charm but I am getting error: INFO
> install W: Failed to fetch
> http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/dists/trusty/InRelease 
> Unable
> to find expected entry 'main/binary-ppc64el/Packages' in Release file
> (Wrong sources.list entry or malformed file)
>
> Please check below logs .
>
>
>
>
> Rajith
>
> IBM AIX Certified, OCPCertified
> 
>
> Cell- 9901966577
> Email: rajith...@in.ibm.com
>
>
>
> From:Daniel Bartholomew 
> To:Rajith P Venkata/India/IBM@IBMIN
> Cc:juju 
> Date:03-06-16 10:55 PM
> Subject:Re: error with mariadb
> --
>
>
>
> On Fri, Jun 3, 2016 at 6:18 AM, Rajith P Venkata 
> wrote:
> > I am trying to use  Mariadb 5.5 on  Ubuntu 14.x on Power 8 Little Endian
> > with this we are getting error as unexpected token,
> > Token I have used form https://mariadb.com/my_portal
> >
> > With verision Mariadb 10.05 we do not get this error but the plugin we
> are
> > installing needs Mariadb 5.5.
> >
> > Please refer the logs below and let us know if Mariadb 5.5 works on
> Ubuntu
> > 14.x on Power 8 Little Endian
>
> MariaDB 5.5 does work on Ubuntu 14.x on Power 8 Little Endian.
> However, after looking at the logs, I'm not sure what your error is.
>
> In the unit-mariadb-5.log file, I see one error where something is
> trying to connect to MariaDB when MariaDB isn't running, but I'm not
> sure exactly what is trying to connect. A few lines further down in
> the log MariaDB is started again, so if whatever was trying to access
> MariaDB had waited a few seconds I would assume the connection attempt
> would have succeeded. During installation and upgrades MariaDB is
> stopped and started at various points as needed to apply updates to
> internal system tables and other tasks.
>
> In the unit-ibm-platform-rtm-4.log I see that line 203 of the
> ibm-prtm.sh script has a syntax error, but I don't know anything about
> that script that would enable me to comment further. I also see that
> the script runs a ibm-prtm-mariadb.available test several times, but
> again I don't know anything about that test or what it is checking
> for.
>
> I don't know if it will help you or not, but I recently pushed some
> updates to my personal launchpad tree -
> lp:~dbart/charms/trusty/mariadb/trunk - that sets the MariaDB charm to
> use the MariaDB Foundation repositories by default if the MariaDB Inc
> EULA and token are not provided as specified in the README. This new
> version of the charm is not in the charm store yet, but hopefully it
> will be soon.
>
> I can confirm that the MariaDB Foundation repositories do have
> packages for MariaDB 5.5 for Trusty on Power 8 Little Endian. The only
> caveat I would add is that you'll get much better performance on Power
> 8 using MariaDB 10.0 or 10.1.
>
>
> Also, the choice of which series to use should be changed using a
> local config.yaml file with the series variable set to one of "5.5",
> "10.0", or "10.1" (the default in the charm store is currently 10.0,
> but my new update bumps the default up to 10.1). For example:
>
> mariadb:
>series: "5.5"
>
> When using my repository locally I can then deploy MariaDB 5.5 with:
> juju deploy --config ./mariadb.yaml
> --repository="/home/${USER}/src/charms/" local:trusty/mariadb
>
>
> And FYI, using something like:
>
> juju set mariadb series="5.5"
>
> ...after the initial deployment to downgrade MariaDB from the default
> series to 5.5 does not work. It has to be 

[Review Queue] MariaDB

2016-06-06 Thread Charles Butler
Greetings,

Today I took some time to peruse the MariaDB Charm submission by dbart
https://bugs.launchpad.net/charms/+bug/1587641

+1 - merged and published as cs:trusty/mariadb-3
https://jujucharms.com/mariadb/

All the best,

Charles
-- 
Juju Charmer
Canonical Group Ltd.
Ubuntu - Linux for human beings | www.ubuntu.com
Juju - The fastest way to model your service | www.jujucharms.com
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Missing "solutions" on website

2016-06-06 Thread Rick Harding
Thanks Tom, it's interesting to look at the "What can this do for me"
aspect with the current buzzwords and such. I've cc'd Tom from marketing
and Ale from design and will bring it up in the next sprint as they work on
the jujucharms.com design and IA of the site.



On Sat, Jun 4, 2016 at 2:37 PM Tom Barber  wrote:

> Alright folks,
>
> Just one for the marketing people more than anyone else.
>
> I was perusing the PuppetLabs website the other day as they do similar
> stuff and I was curious to know how they positioned themselves more than
> anything else.
>
> I couldn't help but notice when comparing jujucharms.com and puppet.com
> that whilst you guys do a decent job of explaining how the tech works, to
> the drive by visitors and people wondering how juju compares to the likes
> of puppet and chef etc, you don't have a solutions page, or obvious link
> through at the top to juju big data.
>
> I can't help but feel that those people who don't know juju would struggle
> to know if it would help solve their problems or not. You know, stuff like,
> "I need a way to deploy and maintain my databases", or "I need a sane way
> to manage my internal applications", "Can I easily spin up a massive CI
> testing cluster?" which puppet seems to answer in seconds by hovering over
> their solutions tab.
>
> Anyway, my 2 cents.
>
> Tom
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Juju charm/platform support

2016-06-06 Thread Rick Harding
Thanks Tom, that's a really good point and something we'll take as feedback
and see what we can come up with.

On Sat, Jun 4, 2016 at 2:45 PM Tom Barber  wrote:

> Another thing:
>
> Puppet make it very easy to find out how to get platform support:
> https://puppet.com/support-services, you guys dont.
>
> Plus another thought I had the other day for a feature would be a way in
> metadata.yaml or something to toggle a "supported charm" setting.
>
> So, for example I have DC/OS, Saiku etc, and I'd quite like to offer
> commercial support for the software even if I don't charge for the software
> itself. Now, of course I could add some stuff to Readme.md etc to indicate
> I am happy to do consultancy and support around my charms. But it would be
> very cool to be able to toggle a setting for a charm, so that the charm
> store user can click a button and instantly get in contact with me to
> discuss it, rather than having to grep my contact details from a Readme
> file.
>
> From a commercial perspective it would be a good way to open a dialogue
> with users and the potential to up sell more services to the users at the
> same time.
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Best way to create CI pipeline for Charms

2016-06-06 Thread Rick Harding
Merlijn, this is great and exactly what I've been hoping someone would do
for charms with the new tooling that's been put together.

Personally, we're a heavy jenkins shop internally and know that the best.
Charles did some good work with Drone, but I've not tried it out.

One other thing to think about is I wonder if the Cloud Weather Report tool
provides output to gate CI on. It might be interesting because you'll get a
good visual output of the history, the tests are already there and it runs
against multiple clouds. You'd just trigger CWR from Jenkins and if that
passes, do the push to the store.

I've coped in Seman and Fabrice in as I think the two questions there are
if the CWR can provide good pass/fail error codes to Jenkins and the one
trick you'll need to be able to push the charm update to the store is a bot
based auth token to get the push to work properly.

 Hopefully they can speak to that more explicitly.

On Mon, Jun 6, 2016 at 5:14 AM Merlijn Sebrechts <
merlijn.sebrec...@gmail.com> wrote:

> Hi
>
>
> I'd like to setup a CI pipeline for Charms. Something that pulls code from
> Github after a push and runs unit and integration tests. When the tests
> succeed, it publishes the result to a personal namespace in the charms
> store.
>
> What's the best way to do this? I'm currently evaluating two options.
>
> - Charles' blogpost about Drone seems the most promising, but the project
> seems unmaintained.
> https://insights.ubuntu.com/2015/07/15/continuous-integration-with-juju-and-drone-ci/
>
> - Or I can just build it myself using Jenkins and bundletester.
>
>
>
> Kind regards
> Merlijn Sebrechts
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Docker compose in Juju

2016-06-06 Thread Samuel Cozannet
Hi Gayan,

Juju cannot operate with app containers as it operates with "os-based"
systems.
The difference is that Juju expects the node it spins to run a Juju agent.
In the case of a Docker container, which runs a single process, that would
mean the sole purpose of the container is running... Juju itself. So long
for your app.
So that means Juju cannot provision Docker containers "directly" (which is
what you seem to expect with the provider idea).

If you want to run Docker containers via Juju, you have the following
methods:
* Wrap the Docker image in the charm. Essentially, the charm would then be
a set of commands to run, scale, integrate... the container with the rest
of the world (for example, managing the fact that the host port is not
necessarily the same as the container port, or managing storage for the
image and so on and so on)
In this context, you would run docker images, under the form of a docker
compose, on a single host.
* Wrap the docker-compose in the Swarm layer: here you would do the same as
above, but Juju would run at the host level of your Swarm cluster.
* Create a specific charm to interact with the cluster API (k8s, Mesos,
Swarm): this charm would be your deployer. It could receive hooks from the
outside world, triggering deployment or other stuff. In this case, the
charm can be a subordinate (running on all cluster instances), which you
could potentially load balance, or a standalone service running on the
side.

Now, if you are looking into building a container based IaaS equivalent, I
suggest you look into LXD
, which would spin
containers that look and behave like VMs.
>From a Juju perspective, there is a LXD provider.
The diff with Docker is that LXD doesn't natively provide image based
deployment, but follows the Juju philosophy to always start with a blank
image.
So your charms will have to deploy the code in LXD from scratch.

Additional nodes: in the docs, pick the "/devel" branch, it's better if you
use Juju 2.x

I hope this helps.
++
Sam




--
Samuel Cozannet
Cloud, Big Data and IoT Strategy Team
Business Development - Cloud and ISV Ecosystem
Changing the Future of Cloud
Ubuntu   / Canonical UK LTD  / Juju

samuel.cozan...@canonical.com
mob: +33 616 702 389
skype: samnco
Twitter: @SaMnCo_23
[image: View Samuel Cozannet's profile on LinkedIn]


On Mon, Jun 6, 2016 at 2:36 PM, Gayan Gunarathne  wrote:

>
> Hi Charles/Samuel,
>
> Thanks for the information.
>
> What I am try to do is to run a docker compose to start docker containers
> in a single machine. Still I am not clear how we can use the docker with
> Juju.I am following this[1]
>
> Simple I need to use the Juju UI[2] and create my deployment there.Then
> can I do the deployment with the docker.How can I select  the docker as a
> IaaS. I couldn't find the docker configuration section in
> environment.yaml.I am not clear how can I provide the docker as a cloud
> provider.
>
> [1]https://jujucharms.com/docs/stable/getting-started
> [2]https://demo.jujucharms.com/
>
> Thanks,
> Gayan
>
> On Wed, Jun 1, 2016 at 3:08 AM, Samuel Cozannet <
> samuel.cozan...@canonical.com> wrote:
>
>> And finally to add to this, there is a community effort around Mesos and
>> DCOS to provide the same idea as the k8s stuff.
>>
>> I am also interested in your use case and feedback :)
>>
>> Best,
>> Sam
>> On May 31, 2016 7:17 PM, "Charles Butler" 
>> wrote:
>>
>>> Greetings Gayan!
>>>
>>> You most certainly can compose and use a full docker-provided stack, mix
>>> and match with charms - thats the power of wrapping your compose-based
>>> service with layer-docker.
>>>
>>> https://github.com/juju-solutions/layer-docker
>>>
>>> Which is a great starting place for charming up your dockerized app
>>> using charms.docker to lend a hand with the ops knowledge to get it running
>>> :)
>>>
>>> https://github.com/juju-solutions/charms.docker
>>> http://pythonhosted.org/charms.docker/modules.html
>>>
>>> There are several examples in the charm store from myself (lazypower)
>>> and Matt Bruzek (mbruzek)  that are docker based. I believe the most
>>> straight forward example that I can illustrate today is the swarm layer,
>>> which builds the swarm charm.
>>>
>>> https://github.com/juju-solutions/layer-swarm
>>> https://jujucharms.com/u/containers/swarm-core
>>>
>>> This is a multi-series charm that delivers swarm via containers,
>>> backended by consul or etcd as the discovery mechanism. This has a good mix
>>> of relationships, base layers, top-layers (what you would be writing), and
>>> uses the docker-native tooling to bring everything up with some help from
>>> juju.
>>>
>>> There are even more complex examples, such as Kubernetes - all being
>>> brought up and controlled in a similar manner
>>>
>>> 

Re: Python install hook working under both trusty and xenial

2016-06-06 Thread John Meinel
I think the question is whether it is available by default. Not whether it
could be installed. But as mentioned, if the answer is a short bash script
that ensures "apt-get install python3" and then everything else in Python3
that sounds like an answer.

John
=:->


On Mon, Jun 6, 2016 at 3:55 PM, Marco Ceppi 
wrote:

> Python 3 does exist in Trusty, what cloud are you using?
>
> Marco
>
> On Mon, Jun 6, 2016, 5:41 AM Bilal Baqar  wrote:
>
>> You can have a install hook in bash calls a install.real hook which is in
>> python. Something like this
>> .
>> See if this solves anything for you.
>>
>> On Fri, Jun 3, 2016 at 8:14 PM, Junien Fridrick <
>> junien.fridr...@canonical.com> wrote:
>>
>>> Hi,
>>>
>>> I have a trusty charm with an install hook in python. The code works for
>>> both python2 and python3.
>>>
>>> Is there a way to keep the install hook in python and have the charm
>>> work under both trusty and xenial ?
>>>
>>> The issue lies at the shebang : python3 doesn't exist by default on
>>> trusty, and python doesn't exist by default on xenial.
>>>
>>> I know I can make a diversion and use a shell script to work around
>>> that, but I'd like to avoid this.
>>>
>>> Is it possible ?
>>>
>>> Thanks !
>>>
>>> --
>>> Juju mailing list
>>> Juju@lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>
>>
>>
>>
>> --
>> Bilal Baqar
>> MTS - PLUMgrid Inc.
>>
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: How to coordinate status messaging between layers?

2016-06-06 Thread John Meinel
Using the workload message as a single location to convey information to
the outside world was certainly never intended. Generally those messages
were meant to convey information to a human who would be looking at them.

We've actually had quite a few conversations about opening up more avenues
for charms to convey information to the outside world (and possibly to each
other). It was something that got pushed out of this cycle, but I certainly
believe it is still in the "things to be done" rather than the "things we
won't do" pile.

John
=:->


On Fri, Jun 3, 2016 at 3:26 PM, Stuart Bishop 
wrote:

> On 3 June 2016 at 16:26, Merlijn Sebrechts 
> wrote:
> > Hi all
> >
> >
> > I'm having a hard time doing status reporting from a reactive Charm. I
> can't
> > find a good way to coordinate status messaging between different handlers
> > and layers.
> >
> > Let me explain one of my use-cases.
> >
> > 1. We have a service that connects to a gateway to request a port
> forward.
> > When the service receives such a forward, it displays this forward in its
> > status message. Our management software uses this message to figure out
> how
> > to connect to the service from the internet.
> >
> > 2. The service has the ability to deploy a bundle. When the bundle
> > deployment fails, it goes into blocked state and shows a message
> explaining
> > what went wrong.
> >
> >
> > At this point, the port-forward message isn't visible anymore meaning our
> > management program can't connect to the service anymore.
> >
> >
> > Message 1 and 2 are displayed by two different layers. I can't find a
> good
> > way to coordinate status messaging between the two layers in a way that
> > keeps compatibility with all the existing layers at
> > interfaces.juju.solutions.
> >
> > I guess what I'd like to do is have status messages that consist of
> multiple
> > parts. Each handler can choose what part of the message to update. This
> > would enable my charm to keep the port-forward information in the message
> > even though another layer displays a "bundle deployment failed" message.
> >
> > Any idea how I can solve this? Have other people experienced similar
> issues?
>
> If you need your management program to see the port-forward message
> from status even after your unit has gone tits up and blocked, you
> could retrieve it from the status history rather than the current
> status message. I recall allowing a charm to return some extra
> information to the operator separate from the workload state being
> argued to death and the feature eventually killed, but maybe we do
> need it.
>
> For my work I'm using a helper to set workload status. It allows me to
> pass None for the status, meaning keep the same status but change the
> message. I find I can use this in most circumstances and solves a lot
> of issues. Particularly dependent layers, which usually have no
> business setting maintenance or active and only occasionally waiting
> or blocked.
>
> But I don't have a true solution. Its still difficult to avoid
> handlers stomping over important messages when we are writing
> decoupled code.
>
> --
> Stuart Bishop 
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Docker compose in Juju

2016-06-06 Thread Gayan Gunarathne
Hi Charles/Samuel,

Thanks for the information.

What I am try to do is to run a docker compose to start docker containers
in a single machine. Still I am not clear how we can use the docker with
Juju.I am following this[1]

Simple I need to use the Juju UI[2] and create my deployment there.Then can
I do the deployment with the docker.How can I select  the docker as a IaaS.
I couldn't find the docker configuration section in environment.yaml.I am
not clear how can I provide the docker as a cloud provider.

[1]https://jujucharms.com/docs/stable/getting-started
[2]https://demo.jujucharms.com/

Thanks,
Gayan

On Wed, Jun 1, 2016 at 3:08 AM, Samuel Cozannet <
samuel.cozan...@canonical.com> wrote:

> And finally to add to this, there is a community effort around Mesos and
> DCOS to provide the same idea as the k8s stuff.
>
> I am also interested in your use case and feedback :)
>
> Best,
> Sam
> On May 31, 2016 7:17 PM, "Charles Butler" 
> wrote:
>
>> Greetings Gayan!
>>
>> You most certainly can compose and use a full docker-provided stack, mix
>> and match with charms - thats the power of wrapping your compose-based
>> service with layer-docker.
>>
>> https://github.com/juju-solutions/layer-docker
>>
>> Which is a great starting place for charming up your dockerized app using
>> charms.docker to lend a hand with the ops knowledge to get it running :)
>>
>> https://github.com/juju-solutions/charms.docker
>> http://pythonhosted.org/charms.docker/modules.html
>>
>> There are several examples in the charm store from myself (lazypower) and
>> Matt Bruzek (mbruzek)  that are docker based. I believe the most straight
>> forward example that I can illustrate today is the swarm layer, which
>> builds the swarm charm.
>>
>> https://github.com/juju-solutions/layer-swarm
>> https://jujucharms.com/u/containers/swarm-core
>>
>> This is a multi-series charm that delivers swarm via containers,
>> backended by consul or etcd as the discovery mechanism. This has a good mix
>> of relationships, base layers, top-layers (what you would be writing), and
>> uses the docker-native tooling to bring everything up with some help from
>> juju.
>>
>> There are even more complex examples, such as Kubernetes - all being
>> brought up and controlled in a similar manner
>>
>> https://github.com/kubernetes/kubernetes/tree/master/cluster/juju
>> https://jujucharms.com/u/containers/kubernetes-core
>>
>> If you need any help charming with Docker you can get in touch with
>> myself on the mailing list here, or join us on irc in #juju on
>> irc.freenode.net
>>
>> I'd love to hear any feedback/questions/comments about the developer
>> tooling we have here, as its really ramped up our capacity to churn out
>> high quality charms quickly that are docker based, and if there's any rough
>> edges we can sand out for other developers would be great starting points.
>>
>> All the best,
>>
>> Charles
>>
>> On Tue, May 31, 2016 at 9:41 AM Gayan Gunarathne 
>> wrote:
>>
>>> Hi Marco,
>>>
>>> Thanks for the details.
>>>
>>> Actually I just want to do something like this. Lets say I have tomcat
>>> and mysql composite application. So I need to deploy these two application
>>> in docker with depends on(I am really glad if I can use demo UI[1]). How
>>> can I do that?
>>>
>>> Do you already have charms that run in docker with the same? Can you
>>> point me to some sample?
>>>
>>> [1]https://demo.jujucharms.com/
>>>
>>> Thanks,
>>> Gayan
>>>
>>> On Tue, May 31, 2016 at 6:52 PM, Marco Ceppi 
>>> wrote:
>>>
 Hi Gayan,

 I've added the general Juju list which covers more of these general
 topics.

 So, because of the nature of LXC machines and Docker style application
 containers it's hard to model that style application container in Juju in
 the same way LXC machines work. However, it's quite easy to wrap something
 like a Docker container, which works really well as a payload/software
 delivery tool, but then you can use Juju to wrap that immutable object and
 make it mutable inside of a Juju deployment.

 I know there are quite a few people on the juju mailing list doing this
 today, so I'll let them weigh in. In short, yes you can use Docker and
 docker style application containers with Juju, but not in the same direct
 way you would a LXC machine just because of the differences in function and
 form.

 Marco

 On Tue, May 31, 2016 at 7:09 AM Gayan Gunarathne 
 wrote:

> Hello,
>
> Can we run docker directly with Juju? I saw Juju is supporting the LXC
> containers. I need to know whether we can spawn docker containers as the
> same.
>
> If we support this can you point me to any document?
>
> Thanks,
> Gayan
> --
> Juju-dev mailing list
> Juju-dev@lists.ubuntu.com
> Modify settings or unsubscribe at:
> 

Re: Python install hook working under both trusty and xenial

2016-06-06 Thread Bilal Baqar
You can have a install hook in bash calls a install.real hook which is in
python. Something like this
.
See if this solves anything for you.

On Fri, Jun 3, 2016 at 8:14 PM, Junien Fridrick <
junien.fridr...@canonical.com> wrote:

> Hi,
>
> I have a trusty charm with an install hook in python. The code works for
> both python2 and python3.
>
> Is there a way to keep the install hook in python and have the charm
> work under both trusty and xenial ?
>
> The issue lies at the shebang : python3 doesn't exist by default on
> trusty, and python doesn't exist by default on xenial.
>
> I know I can make a diversion and use a shell script to work around
> that, but I'd like to avoid this.
>
> Is it possible ?
>
> Thanks !
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>



-- 
Bilal Baqar
MTS - PLUMgrid Inc.
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju