Re: Compiling juju on openSUSE

2015-09-21 Thread Mark Shuttleworth

You might even just be able to run the unmodified juju client binary
from Ubuntu on OpenSUSE, I believe it's all still statically linked.

Mark

On 20/09/15 22:39, Herman Bergwerf wrote:
> Ok great!
> I looked up the source and I think it can be achieved by updating the
> juju/juju and the juju/utils repo. For some reason I only got the
> juju-local binary by installing the Go code though (I also spoofed my OS by
> pointing juju to a copy of the /etc/os-release from Ubuntu).
> However, I would only need this to make the juju client run on my primary
> linux OS which is currently openSUSE and I'm not sure if that is important
> enough to change the source code. I'm perfectly ok with using Ubuntu for
> the actual cluster although SLES compatibility might be interesting for
> other people.
>
> Op zo 20 sep. 2015 om 12:59 schreef Mark Shuttleworth :
>
>> On 20/09/15 02:23, Andrew Wilkins wrote:
>>> The OS-detection code exists primarily to decide how the Juju
>>> servers/agents should be installed, configured, and how they should
>> behave
>>> at runtime. We should stop being so pedantic on the client side.
>> Definitely, and we must already have a way around that because IIRC we
>> build the code for Windows and MacOS, and the server hasn't (yet :))
>> been ported to those. So I would look to figure out how to instruct the
>> build so as to build the client only on OpenSUSE as a starting point.
>> Then of course patches for the server/controller (should be easy enough)
>> and for agents (to enable SLES charms :)) would be next.
>>
>> Mark
>>


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


Re: Compiling juju on openSUSE

2015-09-20 Thread Herman Bergwerf
Ok great!
I looked up the source and I think it can be achieved by updating the
juju/juju and the juju/utils repo. For some reason I only got the
juju-local binary by installing the Go code though (I also spoofed my OS by
pointing juju to a copy of the /etc/os-release from Ubuntu).
However, I would only need this to make the juju client run on my primary
linux OS which is currently openSUSE and I'm not sure if that is important
enough to change the source code. I'm perfectly ok with using Ubuntu for
the actual cluster although SLES compatibility might be interesting for
other people.

Op zo 20 sep. 2015 om 12:59 schreef Mark Shuttleworth :

> On 20/09/15 02:23, Andrew Wilkins wrote:
> > The OS-detection code exists primarily to decide how the Juju
> > servers/agents should be installed, configured, and how they should
> behave
> > at runtime. We should stop being so pedantic on the client side.
>
> Definitely, and we must already have a way around that because IIRC we
> build the code for Windows and MacOS, and the server hasn't (yet :))
> been ported to those. So I would look to figure out how to instruct the
> build so as to build the client only on OpenSUSE as a starting point.
> Then of course patches for the server/controller (should be easy enough)
> and for agents (to enable SLES charms :)) would be next.
>
> Mark
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Compiling juju on openSUSE

2015-09-20 Thread Mark Shuttleworth
On 20/09/15 02:23, Andrew Wilkins wrote:
> The OS-detection code exists primarily to decide how the Juju
> servers/agents should be installed, configured, and how they should behave
> at runtime. We should stop being so pedantic on the client side.

Definitely, and we must already have a way around that because IIRC we
build the code for Windows and MacOS, and the server hasn't (yet :))
been ported to those. So I would look to figure out how to instruct the
build so as to build the client only on OpenSUSE as a starting point.
Then of course patches for the server/controller (should be easy enough)
and for agents (to enable SLES charms :)) would be next.

Mark

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


Re: Compiling juju on openSUSE

2015-09-19 Thread Andrew Wilkins
On Sat, Sep 19, 2015 at 11:12 PM Herman Bergwerf 
wrote:

> So I installed the Go code without make install-dependencies and it
> paniced because my os was not supported (these versions are supported:
> https://github.com/juju/juju/blob/master/juju/series/supportedseries.go)
> I thought Go code was pretty platform independent. So why is this OS check
> there... Because those OS's are tested?
>

The OS-detection code exists primarily to decide how the Juju
servers/agents should be installed, configured, and how they should behave
at runtime. We should stop being so pedantic on the client side.

Having said that, it would be simplest in the short term to extend the
OS/series-detection code to handle openSUSE as well: this would address
your immediate goal, and would also pave the way for running workloads on
openSUSE, should that ever be desirable. We would be happy to review and
merge patches to detect the openSUSE version.


> Does anyone know what exactly is in the ppa's added by `make
> install-dependencies`? It seems it's all about mongodb, but does the juju
> client even need mongodb? I mean, a juju cluster does not depend on the
> client, or does it? I thought the client was only used for bootstrapping
> and some management...
>

The PPAs are only there for developing and testing Juju. You do not need
them to build and run the client only.

Cheers,
Andrew

Op vr 18 sep. 2015 om 21:41 schreef Curtis Hovey-Canonical <
> cur...@canonical.com>:
>
>> On Fri, Sep 18, 2015 at 1:18 PM, Jorge O. Castro 
>> wrote:
>> > On Fri, Sep 18, 2015 at 1:35 PM, Herman Bergwerf
>> >  wrote:
>> >> Anyone who has experience compiling juju on openSUSE?
>>
>> As the juju is staticly compiled for most archs, and series/os-version
>> is irrelevant, you can use any Juju that matched your os and
>> architecture. eg. you can download a linux amd64 client and expect it
>> to work.
>>
>> e.g. I downloaded the centos7 client from
>> https://launchpad.net/juju-core/+milestone/1.24.5  and ran it on
>> Ubuntu precise and Ubuntu wily.
>>
>> You probably do need to hack and compile your own client though.
>> Juju's client thinks it needs to know the version of linux which is
>> bogus for the common case of bootstrapping and maintaining a server in
>> a cloud.
>> https://bugs.launchpad.net/juju-core/+bug/1465317
>>
>> See version/osversion.go and version/supportedseries.go
>>
>>
>>
>>
>>
>> --
>> Curtis Hovey
>> Canonical Cloud Development and Operations
>> http://launchpad.net/~sinzui
>>
>> --
>> 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: Compiling juju on openSUSE

2015-09-19 Thread Herman Bergwerf
So I installed the Go code without make install-dependencies and it paniced
because my os was not supported (these versions are supported:
https://github.com/juju/juju/blob/master/juju/series/supportedseries.go) I
thought Go code was pretty platform independent. So why is this OS check
there... Because those OS's are tested?

Does anyone know what exactly is in the ppa's added by `make
install-dependencies`? It seems it's all about mongodb, but does the juju
client even need mongodb? I mean, a juju cluster does not depend on the
client, or does it? I thought the client was only used for bootstrapping
and some management...

Op vr 18 sep. 2015 om 21:41 schreef Curtis Hovey-Canonical <
cur...@canonical.com>:

> On Fri, Sep 18, 2015 at 1:18 PM, Jorge O. Castro  wrote:
> > On Fri, Sep 18, 2015 at 1:35 PM, Herman Bergwerf
> >  wrote:
> >> Anyone who has experience compiling juju on openSUSE?
>
> As the juju is staticly compiled for most archs, and series/os-version
> is irrelevant, you can use any Juju that matched your os and
> architecture. eg. you can download a linux amd64 client and expect it
> to work.
>
> e.g. I downloaded the centos7 client from
> https://launchpad.net/juju-core/+milestone/1.24.5  and ran it on
> Ubuntu precise and Ubuntu wily.
>
> You probably do need to hack and compile your own client though.
> Juju's client thinks it needs to know the version of linux which is
> bogus for the common case of bootstrapping and maintaining a server in
> a cloud.
> https://bugs.launchpad.net/juju-core/+bug/1465317
>
> See version/osversion.go and version/supportedseries.go
>
>
>
>
>
> --
> Curtis Hovey
> Canonical Cloud Development and Operations
> http://launchpad.net/~sinzui
>
> --
> 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: Compiling juju on openSUSE

2015-09-19 Thread Mark Shuttleworth
On 18/09/15 18:35, Herman Bergwerf wrote:
> Anyone who has experience compiling juju on openSUSE?
> I'm an openSUSE users myself and I wanted to use the juju client on
> openSUSE. Everything worked out until I came to make install-dependencies
> because there are Ubuntu/Debian commands in the Makefile. Is it possible to
> compile juju on openSUSE and is there someone who could give me some leads
> for this?

Great to see this, thank you for digging into it, we will of course
gladly take the patch!

Mark

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


Re: Compiling juju on openSUSE

2015-09-18 Thread Curtis Hovey-Canonical
On Fri, Sep 18, 2015 at 1:18 PM, Jorge O. Castro  wrote:
> On Fri, Sep 18, 2015 at 1:35 PM, Herman Bergwerf
>  wrote:
>> Anyone who has experience compiling juju on openSUSE?

As the juju is staticly compiled for most archs, and series/os-version
is irrelevant, you can use any Juju that matched your os and
architecture. eg. you can download a linux amd64 client and expect it
to work.

e.g. I downloaded the centos7 client from
https://launchpad.net/juju-core/+milestone/1.24.5  and ran it on
Ubuntu precise and Ubuntu wily.

You probably do need to hack and compile your own client though.
Juju's client thinks it needs to know the version of linux which is
bogus for the common case of bootstrapping and maintaining a server in
a cloud.
https://bugs.launchpad.net/juju-core/+bug/1465317

See version/osversion.go and version/supportedseries.go





-- 
Curtis Hovey
Canonical Cloud Development and Operations
http://launchpad.net/~sinzui

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


Re: Compiling juju on openSUSE

2015-09-18 Thread Charles Butler
To continue this thread you have a few options to you Herman.

We have a great experience with the VagrantBox workflow

https://jujucharms.com/docs/stable/config-vagrant

There is also the 'jujubox' and 'charmbox' docker images which will achieve
the same result, however they do not fully support the local provider in
your configuration. They will however get you started with any of the cloud
providers, or a MAAS / OpenStack server if you happen to have one of those
envirionments available to you.

https://hub.docker.com/r/jujusolutions/charmbox/

Whats great about these solutions, as @jcastro alluded to, you don't have
to build them. The docker images are refreshed nightly at 3am EDT, and the
vagrant images are rebuilt any time we publish a new cloud image (typically
every few days). The vagrant box is my recommended path forward if you want
the full experience. The docker images while we the ~charmer team publish
and maintain them, i would classify them as a community contribution more
than a recommended and official way to get started.


I did a quick write up about the docker images here:
http://blog.dasroot.net/2015-unofficial-docker-images.html

Hope this helps!




Charles Butler  - Juju Charmer
Come see the future of datacenter orchestration: http://jujucharms.com

On Fri, Sep 18, 2015 at 1:35 PM, Herman Bergwerf 
wrote:

> Anyone who has experience compiling juju on openSUSE?
> I'm an openSUSE users myself and I wanted to use the juju client on
> openSUSE. Everything worked out until I came to make install-dependencies
> because there are Ubuntu/Debian commands in the Makefile. Is it possible to
> compile juju on openSUSE and is there someone who could give me some leads
> for this?
>
> --
> 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: Compiling juju on openSUSE

2015-09-18 Thread Jorge O. Castro
On Fri, Sep 18, 2015 at 1:35 PM, Herman Bergwerf
 wrote:
> Anyone who has experience compiling juju on openSUSE?

If you're looking for just running the client, the dockerized Juju box
is a good place to start:

https://github.com/juju-solutions/jujubox

That is much less complicated than compiling Juju and everything. In
the past we had community RPM builds, if you have experience with
using the OpenSUSE Build Service or something and want to help us sort
that, any contributions in that direction would be happily accepted!

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


Re: Compiling juju on openSUSE

2015-09-18 Thread Nate Finch
Compiling juju on any Linux is actually very straight forward... however
*running* Juju on any Linux except Ubuntu and Centos is not going to work
(due to some platform-specific code we have)... but if all you want to do
is compile, that's easy:

Install git, bzr, and mercurial (pretty sure mercurial is no longer
required at this point, though).
install go, version 1.2.1 or higher (1.2.1 is the officially supported
version for Juju... newer versions *should* work, but are not official yet).

export GOPATH=$HOME
this tells go where to store its code, you could pick a different
gopath if you want.

run these commands to compile juju's master branch:

go get github.com/juju/juju/...
this will download and compile juju, but there may be a couple compiler
errors... that's ok
go get launchpad.net/godeps
this will download and compile the godeps application, and copy it to
$GOPATH/bin
cd $GOPATH/src/github.com/juju/juju
$GOPATH/bin/godeps -u dependencies.tsv
this will update the various repos that juju uses to the correct
versions (and thus fix the compiler errors from above)
go install ./...
this will recompile with the newly updated juju code and copy the juju
and jujud binaries to $GOPATH/bin

You can, of course, use git to switch from the master juju branch to a
release branchand compile that instead.  Just do that in $GOPATH/src/
github.com/juju/juju before running godeps, and then follow the rest of the
steps.

-Nate

On Fri, Sep 18, 2015 at 1:35 PM Herman Bergwerf 
wrote:

> Anyone who has experience compiling juju on openSUSE?
> I'm an openSUSE users myself and I wanted to use the juju client on
> openSUSE. Everything worked out until I came to make install-dependencies
> because there are Ubuntu/Debian commands in the Makefile. Is it possible to
> compile juju on openSUSE and is there someone who could give me some leads
> for this?
> --
> 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


Compiling juju on openSUSE

2015-09-18 Thread Herman Bergwerf
Anyone who has experience compiling juju on openSUSE?
I'm an openSUSE users myself and I wanted to use the juju client on
openSUSE. Everything worked out until I came to make install-dependencies
because there are Ubuntu/Debian commands in the Makefile. Is it possible to
compile juju on openSUSE and is there someone who could give me some leads
for this?
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju