<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 12/15/2014 02:26 PM, Anton Zemlyanov
wrote:<br>
</div>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">The building of the UI plugin has several things I
do not like
<div><br>
<div>1) I need to extract the UI part of the plugin and
copy/symlink it to fuel-web</div>
</div>
</div>
</blockquote>
<br>
This is required, the UI part should live somewhere in statics/js.
This directory is served by nginx and symlinking/copying is I think
the best way, far better than adding new directories to nginx
configuration.<br>
<br>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>2) I have to run grunt build on the whole fuel-web</div>
</div>
</div>
</blockquote>
<br>
This shouldn't at all be necessary.<br>
<br>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>3) I have to copy files back to original location to pack
them</div>
</div>
</blockquote>
<br>
Shouldn't be necessary.<br>
<br>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>4) I cannot easily switch between development/production
versions (no way to easily change entry point)</div>
</div>
</blockquote>
<br>
Development/production versions should only differ by serving
raw/compressed files. The compressed files should be published by
the plugin author.<br>
<br>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>The only way to install plugin is `fuel plugins --install`,
no matter development or production, so even development
plugins should be packed to tar.gz</div>
</div>
</blockquote>
<br>
The UI part should be working immediately after symlinking somewhere
in the statics/js directory imho (and after API is aware of the new
pugin but).<br>
<br>
P.<br>
<br>
<blockquote
cite="mid:CA+ABCunD99vPXHQ-PR3JOYwFSTzWf_Z0KZmxPx-YaY6ggDfwBw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Anton</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 15, 2014 at 3:30 PM,
Przemyslaw Kaminski <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:pkaminski@mirantis.com" target="_blank">pkaminski@mirantis.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> First of all,
compiling of statics shouldn't be a required step. No one
does this during development.<br>
For production-ready plugins, the compiled files should
already be included in the GitHub repos and installation
of plugin should just be a matter of downloading it. The
API should then take care of informing the UI what plugins
are installed.<br>
The npm install step is mostly one-time.<br>
The grunt build step for the plugin should basically just
compile the staticfiles of the plugin and not the whole
project. Besides with one file this is not extendable --
for N plugins we would build 2^N files with all possible
combinations of including the plugins? :)<br>
<br>
P.
<div>
<div class="h5"><br>
<br>
<div>On 12/15/2014 11:35 AM, Anton Zemlyanov wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">My experience with building Fuel
plugins with UI part is following. To build a
ui-less plugin, it takes 3 seconds and those
commands:
<div><br>
</div>
<div>
<div><font face="monospace">git clone <a
moz-do-not-send="true"
href="https://github.com/AlgoTrader/test-plugin.git"
target="_blank">https://github.com/AlgoTrader/test-plugin.git</a></font></div>
</div>
<div>
<div><font face="monospace">cd ./test-plugin</font></div>
<div><font face="monospace">fpb --build ./</font></div>
</div>
<div><br>
</div>
<div>When UI added, build start to look like this
and takes many minutes:</div>
<div><br>
</div>
<div>
<div><font face="monospace">git clone <a
moz-do-not-send="true"
href="https://github.com/AlgoTrader/test-plugin.git"
target="_blank">https://github.com/AlgoTrader/test-plugin.git</a></font></div>
<div><font face="monospace">git clone <a
moz-do-not-send="true"
href="https://github.com/stackforge/fuel-web.git"
target="_blank">https://github.com/stackforge/fuel-web.git</a></font></div>
<div><font face="monospace">cd ./fuel-web</font></div>
<div><font face="monospace">git fetch <a
moz-do-not-send="true"
href="https://review.openstack.org/stackforge/fuel-web"
target="_blank">https://review.openstack.org/stackforge/fuel-web</a>
refs/changes/00/112600/24 && git
checkout FETCH_HEAD</font></div>
<div><font face="monospace">cd ..</font></div>
<div><font face="monospace">mkdir -p
./fuel-web/nailgun/static/plugins/test-plugin</font></div>
<div><font face="monospace">cp -R
./test-plugin/ui/*
./fuel-web/nailgun/static/plugins/test-plugin</font></div>
<div><font face="monospace">cd
./fuel-web/nailgun</font></div>
<div><font face="monospace">npm install
&& npm update</font></div>
<div><font face="monospace">grunt build
--static-dir=static_compressed</font></div>
<div><font face="monospace">cd ../..</font></div>
<div><font face="monospace">rm -rf
./test-plugin/ui</font></div>
<div><font face="monospace">mkdir
./test-plugin/ui</font></div>
<div><font face="monospace">cp -R
./fuel-web/nailgun/static_compressed/plugins/test-plugin/*
./test-plugin/ui</font></div>
<div><font face="monospace">cd ./test-plugin</font></div>
<div><font face="monospace">fpb --build ./</font></div>
</div>
<div><font face="monospace"><br>
</font></div>
<div>I think we need something not so complex and
fragile<br>
</div>
<div><br>
</div>
<div>Anton</div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace"><br>
</font></div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
OpenStack-dev mailing list
<a moz-do-not-send="true" href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a moz-do-not-send="true" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a moz-do-not-send="true"
href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>