[openstack-dev] [Fuel] Building Fuel plugins with UI part

Przemyslaw Kaminski pkaminski at mirantis.com
Mon Dec 15 13:48:05 UTC 2014


On 12/15/2014 02:26 PM, Anton Zemlyanov wrote:
> The building of the UI plugin has several things I do not like
>
> 1) I need to extract the UI part of the plugin and copy/symlink it to 
> fuel-web

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.

> 2) I have to run grunt build on the whole fuel-web

This shouldn't at all be necessary.

> 3) I have to copy files back to original location to pack them

Shouldn't be necessary.

> 4) I cannot easily switch between development/production versions (no 
> way to easily change entry point)

Development/production versions should only differ by serving 
raw/compressed files. The compressed files should be published by the 
plugin author.

>
> 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

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).

P.

>
> Anton
>
> On Mon, Dec 15, 2014 at 3:30 PM, Przemyslaw Kaminski 
> <pkaminski at mirantis.com <mailto:pkaminski at mirantis.com>> wrote:
>
>     First of all, compiling of statics shouldn't be a required step.
>     No one does this during development.
>     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.
>     The npm install step is mostly one-time.
>     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? :)
>
>     P.
>
>
>     On 12/15/2014 11:35 AM, Anton Zemlyanov wrote:
>>     My experience with building Fuel plugins with UI part is
>>     following. To build a ui-less plugin, it takes 3 seconds and
>>     those commands:
>>
>>     git clone https://github.com/AlgoTrader/test-plugin.git
>>     cd ./test-plugin
>>     fpb --build ./
>>
>>     When UI added, build start to look like this and takes many minutes:
>>
>>     git clone https://github.com/AlgoTrader/test-plugin.git
>>     git clone https://github.com/stackforge/fuel-web.git
>>     cd ./fuel-web
>>     git fetch https://review.openstack.org/stackforge/fuel-web
>>     refs/changes/00/112600/24 && git checkout FETCH_HEAD
>>     cd ..
>>     mkdir -p ./fuel-web/nailgun/static/plugins/test-plugin
>>     cp -R ./test-plugin/ui/*
>>     ./fuel-web/nailgun/static/plugins/test-plugin
>>     cd ./fuel-web/nailgun
>>     npm install && npm update
>>     grunt build --static-dir=static_compressed
>>     cd ../..
>>     rm -rf ./test-plugin/ui
>>     mkdir ./test-plugin/ui
>>     cp -R ./fuel-web/nailgun/static_compressed/plugins/test-plugin/*
>>     ./test-plugin/ui
>>     cd ./test-plugin
>>     fpb --build ./
>>
>>     I think we need something not so complex and fragile
>>
>>     Anton
>>
>>
>>
>>
>>     _______________________________________________
>>     OpenStack-dev mailing list
>>     OpenStack-dev at lists.openstack.org  <mailto:OpenStack-dev at lists.openstack.org>
>>     http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>     _______________________________________________
>     OpenStack-dev mailing list
>     OpenStack-dev at lists.openstack.org
>     <mailto:OpenStack-dev at lists.openstack.org>
>     http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141215/e0bfdee8/attachment.html>


More information about the OpenStack-dev mailing list