[openstack-dev] [Fuel] Building Fuel plugins with UI part
Anton Zemlyanov
azemlyanov at mirantis.com
Mon Dec 15 13:26:54 UTC 2014
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
2) I have to run grunt build on the whole fuel-web
3) I have to copy files back to original location to pack them
4) I cannot easily switch between development/production versions (no way
to easily change entry point)
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
Anton
On Mon, Dec 15, 2014 at 3:30 PM, Przemyslaw Kaminski <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 listOpenStack-dev at lists.openstack.orghttp://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/8510cf6c/attachment.html>
More information about the OpenStack-dev
mailing list