On Tue, Apr 5, 2016 at 7:30 AM Andrew Wilkins <andrew.wilk...@canonical.com>
wrote:

> On Mon, Apr 4, 2016 at 10:42 PM Marco Ceppi <marco.ce...@canonical.com>
> wrote:
>
>> There are two things that need to be done. The first, we need the
>> reactive framework to be ported to powershell - that way we can have charms
>> written in powershell and compiled as such. I know the cloud base folks
>> poked at that a bit in Gent during the Summit but I haven't heard much from
>> there.
>>
>> The second, is two base layers. The first is a powershell base layer so
>> you get the awesome powerhshell helpers cloudbase has created (like the
>> python charm helpers). That way native power shell layers can be written.
>> The second is to create a python-windows base layer, this would be the
>> basic layer and then the necessary methods to install Python on the windows
>> machine so that python layers work properly.
>>
>> Some of this we can pilot ourselves, (mostly the python-windows layer) -
>> some of the team is sprinting so I'll add that as a stretch goal. The
>> powershell native features we'll need help and I admit I've done a terrible
>> job keeping up with the cloudbase folks who have been invaluable as a
>> windows + juju resource thus far.
>>
>
> Thanks, Marco. FWIW, I had imagined an MVP just as Stuart described: add
> the Windows bootstrap scripts (install.ps1|bat|cmd, etc.), which should
> just need to install Python and then defer to the reactive framework. Going
> full Powershell support sounds ideal, but not what I'm after.
>

Brief update: I managed to get a Hello World reactive charm running on a
Windows VM in Azure.

My charm:
 - includes the Python 3.5.1 web installer. It's reasonably small (just
under 1MiB).
 - has a short PowerShell hook script (install.ps1) that installs Python
and PyYAML; and then defers to the standard Python hook (install.py)

To enable private cloud deployments, it would probably make more sense for
the charm to require Python as a resource. I just did what I did for
expedience.

I had to make a handful of changes to the basic layer, charm-helpers, and
charms.reactive.
In the basic layer, there are some Ubuntu assumptions that I had to remove:
it wants to apt-get install stuff. Also, I changed it to use "python -m
pip", rather than the pip command directly, which I didn't have available.

I had to make three classes of changes to charm-helpers and charms.reactive:
 - refer to hook tools as (e.g.) status-set.exe, rather than status-set
 - don't require unix-specific Python modules, like "pwd" and "grp"
 - run Python hooks with python(.exe), rather than assuming
shebang/executable

If it's acceptable to do so, I'll propose changes to charmhelpers and
charms.reactive at some point. It would be nice to be able to have a core
set of Python helpers that work on all platforms.

And just to be clear: I'm not suggesting that all all of charmhelpers
should be OS neutral; but at least the core bits for interacting with Juju,
and for writing reactive charms.

Cheers,
Andrew

Cheers,
> Andrew
>
>
>> Marco
>>
>> On Mon, Apr 4, 2016 at 7:46 AM Rick Harding <rick.hard...@canonical.com>
>> wrote:
>>
>>> I know that Gabriel and some of the CloudBase folks seemed interested in
>>> layers and possibly some tooling with powershell. I'm not sure how far that
>>> went but I thought they were experimenting during the charmer's summit.
>>> That would help with a charm build on windows, but not for some common code
>>> between both operating systems.
>>>
>>> An interesting thing is how much setup and how ootb the Ubuntu on
>>> Windows needs. If it's working out of the box, it might be an interesting
>>> move for us and our tools that Windows users could get a Linux experience.
>>> I guess that it won't be ideal though as I'm not sure what the server side
>>> plans around that work is.
>>>
>>> On Mon, Apr 4, 2016 at 3:18 AM Andrew Wilkins <
>>> andrew.wilk...@canonical.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to write a charm that should be mostly identical on
>>>> Windows and Linux, so I think it would make sense to have common code in
>>>> the form of a layer.
>>>>
>>>> Is anyone working on getting "charm build", layers, and friends to work
>>>> with Windows workloads? If not, I may look into it myself.
>>>>
>>>> Cheers,
>>>> Andrew
>>>> --
>>>> 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

Reply via email to