Topology and Orchestration Specification for Cloud Applications (TOSCA) and Juju
Dražen Lučanin
drazen.lucanin at gmail.com
Thu Aug 23 22:00:09 UTC 2012
Hi Johannes,
On Thu, Aug 23, 2012 at 10:44 PM, Johannes Wettinger <mail at jowettinger.de>wrote:
> But how should this be implemented in practice? Assuming we have a
> series of charms such as
>
> - mysql-server (requires "mysql-server-implementation")
> - mysql-server-ubuntu (provides "mysql-server-implementation")
> - mysql-server-fedora (provides "mysql-server-implementation")
> - mysql-server-windows (provides "mysql-server-implementation")
>
> Is that what you meant by a "series of juju charms which do offer
> conditional logic based on platform"? Because from what I understood,
> a hook inside a charm is a binary, i.e. a shell script, a python file
> or anything else which can be executed. As a result, a hook of a
> particular charm cannot be a platform-independent artifact (e.g., a
> binary that runs on both Windows and Linux). The consequence is that
> we cannot have any conditional logic based on platform inside a hook,
> can we?
>
Neither shell nor Python scripts need to be compiled and are therefore not
binaries. Practically the same shell scripts can run on e.g. Linux and Mac
(would be possible on Windows too, using MiniGW or some similar emulator, I
guess) and Python is fully cross-platform. What is meant by conditional
logic is that you can for example specify some OS-specific properties (such
as paths) using "if" guards.
Basically, you could have a smart mysql-server charm that works everywhere.
Cheers,
Dražen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20120824/21111c6d/attachment-0001.html>
More information about the Juju
mailing list