All of lore.kernel.org
 help / color / mirror / Atom feed
* Building dashboard_v2
@ 2018-02-13 15:29 John Spray
  2018-02-13 15:37 ` Ricardo Dias
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: John Spray @ 2018-02-13 15:29 UTC (permalink / raw)
  To: Ceph Development

Hi folks,

Having just built the awesome new dashboard code
(https://github.com/ceph/ceph/pull/20103) in my dev environment for
the first time, I'll share my notes...

When building on Ubuntu 16.04, which does not have a recent enough
node.js for the build -- had to get one from an external source.  It
looks like Fedora and EPEL do have more recent ones.  Not sure if
there is a sufficiently trusted third party Ubuntu repo to add to
install_deps.sh.

My fedora 26 machine had a sufficiently recent node/npm, so building
there was simpler.  Just had to install the python2-bcrypt package (in
addition to what is already covered in install_deps).

The frontend build only takes 25 seconds, which I think is pretty
good.  The resulting dist/ dir is 18M at the moment, which is very
similar to the existing dashboard static files size.  I would suggest
we can decrease that a bit by restricting the font formats included:
by default we're getting eog/svg/ttf output, but we probably only need
WOFF.

I didn't need a virtualenv or any pip-installed things to run the
dashboard in development (presumably would have needed that to run
unit tests on the backend python code).

Detailed notes below.

Cheers,
John




On Ubuntu 16.04 (aka senta04)
=============

Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
dependencies depends on it)

The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>= 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
your node is old then you just get a nasty syntax error during "npm
run build".

Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its README).

Repo with a more recent node is here:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
This is linked from the nodejs official page, but I have no idea of
provenance beyond that.

If you had already tried "npm run build" with an older node before
installing the newer one, do a "npm rebuild node-sass" after
installing the new node before trying to build dashboard frontend
again.

Had to install python-bcrypt.

Fedora 26 (aka my laptop)
========

This distro appears to come with node 6.12.

dnf install python2-bcrypt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:29 Building dashboard_v2 John Spray
@ 2018-02-13 15:37 ` Ricardo Dias
  2018-02-13 15:42   ` John Spray
  2018-02-13 15:43   ` Ricardo Dias
  2018-02-13 16:32 ` Lenz Grimmer
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Ricardo Dias @ 2018-02-13 15:37 UTC (permalink / raw)
  To: John Spray, Ceph Development


On 13-02-2018 15:29, John Spray wrote:
> Hi folks,
> 
> Having just built the awesome new dashboard code
> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
> the first time, I'll share my notes...
> 
> When building on Ubuntu 16.04, which does not have a recent enough
> node.js for the build -- had to get one from an external source.  It
> looks like Fedora and EPEL do have more recent ones.  Not sure if
> there is a sufficiently trusted third party Ubuntu repo to add to
> install_deps.sh.
> 
> My fedora 26 machine had a sufficiently recent node/npm, so building
> there was simpler.  Just had to install the python2-bcrypt package (in
> addition to what is already covered in install_deps).
> 
> The frontend build only takes 25 seconds, which I think is pretty
> good.  The resulting dist/ dir is 18M at the moment, which is very
> similar to the existing dashboard static files size.  I would suggest
> we can decrease that a bit by restricting the font formats included:
> by default we're getting eog/svg/ttf output, but we probably only need
> WOFF.

The frontend build result is 18M if build for development purposes.
When building in production mode, which will be the default when
generating the ceph tarball (WIP PR in 
https://github.com/openattic/ceph/pull/91), the result is only 3.2M

> 
> I didn't need a virtualenv or any pip-installed things to run the
> dashboard in development (presumably would have needed that to run
> unit tests on the backend python code).
> 
> Detailed notes below.
> 
> Cheers,
> John
> 
> 
> 
> 
> On Ubuntu 16.04 (aka senta04)
> =============
> 
> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
> dependencies depends on it)
> 
> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
> your node is old then you just get a nasty syntax error during "npm
> run build".
> 
> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its README).
> 
> Repo with a more recent node is here:
> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
> This is linked from the nodejs official page, but I have no idea of
> provenance beyond that.
> 
> If you had already tried "npm run build" with an older node before
> installing the newer one, do a "npm rebuild node-sass" after
> installing the new node before trying to build dashboard frontend
> again.
> 
> Had to install python-bcrypt.
> 
> Fedora 26 (aka my laptop)
> ========
> 
> This distro appears to come with node 6.12.
> 
> dnf install python2-bcrypt
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:37 ` Ricardo Dias
@ 2018-02-13 15:42   ` John Spray
  2018-02-13 15:43   ` Ricardo Dias
  1 sibling, 0 replies; 14+ messages in thread
From: John Spray @ 2018-02-13 15:42 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Ceph Development

On Tue, Feb 13, 2018 at 3:37 PM, Ricardo Dias <rdias@suse.com> wrote:
>
> On 13-02-2018 15:29, John Spray wrote:
>>
>> Hi folks,
>>
>> Having just built the awesome new dashboard code
>> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
>> the first time, I'll share my notes...
>>
>> When building on Ubuntu 16.04, which does not have a recent enough
>> node.js for the build -- had to get one from an external source.  It
>> looks like Fedora and EPEL do have more recent ones.  Not sure if
>> there is a sufficiently trusted third party Ubuntu repo to add to
>> install_deps.sh.
>>
>> My fedora 26 machine had a sufficiently recent node/npm, so building
>> there was simpler.  Just had to install the python2-bcrypt package (in
>> addition to what is already covered in install_deps).
>>
>> The frontend build only takes 25 seconds, which I think is pretty
>> good.  The resulting dist/ dir is 18M at the moment, which is very
>> similar to the existing dashboard static files size.  I would suggest
>> we can decrease that a bit by restricting the font formats included:
>> by default we're getting eog/svg/ttf output, but we probably only need
>> WOFF.
>
>
> The frontend build result is 18M if build for development purposes.
> When building in production mode, which will be the default when
> generating the ceph tarball (WIP PR in
> https://github.com/openattic/ceph/pull/91), the result is only 3.2M

Ah, excellent!

John

>>
>> I didn't need a virtualenv or any pip-installed things to run the
>> dashboard in development (presumably would have needed that to run
>> unit tests on the backend python code).
>>
>>
>> Detailed notes below.
>>
>> Cheers,
>> John
>>
>>
>>
>>
>> On Ubuntu 16.04 (aka senta04)
>> =============
>>
>> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
>> dependencies depends on it)
>>
>> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>>>
>>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
>>
>> your node is old then you just get a nasty syntax error during "npm
>> run build".
>>
>> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its
>> README).
>>
>> Repo with a more recent node is here:
>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
>> This is linked from the nodejs official page, but I have no idea of
>> provenance beyond that.
>>
>> If you had already tried "npm run build" with an older node before
>> installing the newer one, do a "npm rebuild node-sass" after
>> installing the new node before trying to build dashboard frontend
>> again.
>>
>> Had to install python-bcrypt.
>>
>> Fedora 26 (aka my laptop)
>> ========
>>
>> This distro appears to come with node 6.12.
>>
>> dnf install python2-bcrypt
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> --
> Ricardo Dias
> Senior Software Engineer - Storage Team
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
> HRB 21284
> (AG Nürnberg)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:37 ` Ricardo Dias
  2018-02-13 15:42   ` John Spray
@ 2018-02-13 15:43   ` Ricardo Dias
  1 sibling, 0 replies; 14+ messages in thread
From: Ricardo Dias @ 2018-02-13 15:43 UTC (permalink / raw)
  To: John Spray, Ceph Development

On 13-02-2018 15:37, Ricardo Dias wrote:
> 
> On 13-02-2018 15:29, John Spray wrote:
>> Hi folks,
>>
>> Having just built the awesome new dashboard code
>> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
>> the first time, I'll share my notes...
>>
>> When building on Ubuntu 16.04, which does not have a recent enough
>> node.js for the build -- had to get one from an external source.  It
>> looks like Fedora and EPEL do have more recent ones.  Not sure if
>> there is a sufficiently trusted third party Ubuntu repo to add to
>> install_deps.sh.
>>
>> My fedora 26 machine had a sufficiently recent node/npm, so building
>> there was simpler.  Just had to install the python2-bcrypt package (in
>> addition to what is already covered in install_deps).
>>
>> The frontend build only takes 25 seconds, which I think is pretty
>> good.  The resulting dist/ dir is 18M at the moment, which is very
>> similar to the existing dashboard static files size.  I would suggest
>> we can decrease that a bit by restricting the font formats included:
>> by default we're getting eog/svg/ttf output, but we probably only need
>> WOFF.
> 
> The frontend build result is 18M if build for development purposes.
> When building in production mode, which will be the default when
> generating the ceph tarball (WIP PR in 
> https://github.com/openattic/ceph/pull/91), the result is only 3.2M

Just forgot to add that, building the frontend in production mode
takes 102s, a bit more than in development mode.

> 
>>
>> I didn't need a virtualenv or any pip-installed things to run the
>> dashboard in development (presumably would have needed that to run
>> unit tests on the backend python code).
>>
>> Detailed notes below.
>>
>> Cheers,
>> John
>>
>>
>>
>>
>> On Ubuntu 16.04 (aka senta04)
>> =============
>>
>> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
>> dependencies depends on it)
>>
>> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
>> your node is old then you just get a nasty syntax error during "npm
>> run build".
>>
>> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its 
>> README).
>>
>> Repo with a more recent node is here:
>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
>> This is linked from the nodejs official page, but I have no idea of
>> provenance beyond that.
>>
>> If you had already tried "npm run build" with an older node before
>> installing the newer one, do a "npm rebuild node-sass" after
>> installing the new node before trying to build dashboard frontend
>> again.
>>
>> Had to install python-bcrypt.
>>
>> Fedora 26 (aka my laptop)
>> ========
>>
>> This distro appears to come with node 6.12.
>>
>> dnf install python2-bcrypt
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:29 Building dashboard_v2 John Spray
  2018-02-13 15:37 ` Ricardo Dias
@ 2018-02-13 16:32 ` Lenz Grimmer
  2018-02-13 18:13   ` Tiago Melo
  2018-02-13 20:35 ` Ken Dreyer
  2018-02-14 16:34 ` Ricardo Dias
  3 siblings, 1 reply; 14+ messages in thread
From: Lenz Grimmer @ 2018-02-13 16:32 UTC (permalink / raw)
  To: Ceph Development


[-- Attachment #1.1: Type: text/plain, Size: 3301 bytes --]

Hi John,

thanks for the feedback!

On 02/13/2018 04:29 PM, John Spray wrote:

> Having just built the awesome new dashboard code
> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
> the first time, I'll share my notes...
> 
> When building on Ubuntu 16.04, which does not have a recent enough
> node.js for the build -- had to get one from an external source.  It
> looks like Fedora and EPEL do have more recent ones.  Not sure if
> there is a sufficiently trusted third party Ubuntu repo to add to
> install_deps.sh.

There are some hints on how to get a recent version of Node.js installed
on Ubuntu, using either an upstream PPA or nvm:

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04


> My fedora 26 machine had a sufficiently recent node/npm, so building
> there was simpler.  Just had to install the python2-bcrypt package (in
> addition to what is already covered in install_deps).

Good to know. Most of the developers currently working on the Dashboard
v2 use a Docker build environment based on this:

https://github.com/ricardoasmarques/ceph-dev-docker/

> The frontend build only takes 25 seconds, which I think is pretty
> good.  The resulting dist/ dir is 18M at the moment, which is very
> similar to the existing dashboard static files size.  I would suggest
> we can decrease that a bit by restricting the font formats included:
> by default we're getting eog/svg/ttf output, but we probably only need
> WOFF.

We'll take a look at that, to check what the "production" build will
include.

> I didn't need a virtualenv or any pip-installed things to run the
> dashboard in development (presumably would have needed that to run
> unit tests on the backend python code).
> 
> Detailed notes below.
> 
> 
> On Ubuntu 16.04 (aka senta04)
> =============
> 
> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
> dependencies depends on it)

Yes, that's a common annoyance on Ubuntu - you can install the package
"nodejs-legacy" to create that symlink automatically.

> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
> your node is old then you just get a nasty syntax error during "npm
> run build".
> 
> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its README).
> 
> Repo with a more recent node is here:
> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
> This is linked from the nodejs official page, but I have no idea of
> provenance beyond that.
> 
> If you had already tried "npm run build" with an older node before
> installing the newer one, do a "npm rebuild node-sass" after
> installing the new node before trying to build dashboard frontend
> again.
> 
> Had to install python-bcrypt.
> 
> Fedora 26 (aka my laptop)
> ========
> 
> This distro appears to come with node 6.12.
> 
> dnf install python2-bcrypt

Thanks for the notes! I'll see if I can incorporate some of that into
the README/HACKING documents included in that directory.

Lenz

-- 
SUSE Linux GmbH - Maxfeldstr. 5 - 90409 Nuernberg (Germany)
GF:Felix Imendörffer,Jane Smithard,Graham Norton,HRB 21284 (AG Nürnberg)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 16:32 ` Lenz Grimmer
@ 2018-02-13 18:13   ` Tiago Melo
  0 siblings, 0 replies; 14+ messages in thread
From: Tiago Melo @ 2018-02-13 18:13 UTC (permalink / raw)
  To: Lenz Grimmer, Ceph Development



On 02/13/2018 04:32 PM, Lenz Grimmer wrote:
> Hi John,
> 
> thanks for the feedback!
> 
> On 02/13/2018 04:29 PM, John Spray wrote:
> 
>> Having just built the awesome new dashboard code
>> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
>> the first time, I'll share my notes...
>>
>> When building on Ubuntu 16.04, which does not have a recent enough
>> node.js for the build -- had to get one from an external source.  It
>> looks like Fedora and EPEL do have more recent ones.  Not sure if
>> there is a sufficiently trusted third party Ubuntu repo to add to
>> install_deps.sh.
> 
> There are some hints on how to get a recent version of Node.js installed
> on Ubuntu, using either an upstream PPA or nvm:
> 
> https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04
> 

It seems this can be overcomed by including node (v8.9.4) as a local
dependency.
By doing this the npm scripts defined on package.json will use the local
version instead of the global one.

I just tried to run 'npm run build' on a machine with node v4.8.7 and
npm v5.6.0, and it worked great.

PR: https://github.com/openattic/ceph/pull/93

> 
>> My fedora 26 machine had a sufficiently recent node/npm, so building
>> there was simpler.  Just had to install the python2-bcrypt package (in
>> addition to what is already covered in install_deps).
> 
> Good to know. Most of the developers currently working on the Dashboard
> v2 use a Docker build environment based on this:
> 
> https://github.com/ricardoasmarques/ceph-dev-docker/
> 
>> The frontend build only takes 25 seconds, which I think is pretty
>> good.  The resulting dist/ dir is 18M at the moment, which is very
>> similar to the existing dashboard static files size.  I would suggest
>> we can decrease that a bit by restricting the font formats included:
>> by default we're getting eog/svg/ttf output, but we probably only need
>> WOFF.
> 
> We'll take a look at that, to check what the "production" build will
> include.
> 
>> I didn't need a virtualenv or any pip-installed things to run the
>> dashboard in development (presumably would have needed that to run
>> unit tests on the backend python code).
>>
>> Detailed notes below.
>>
>>
>> On Ubuntu 16.04 (aka senta04)
>> =============
>>
>> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
>> dependencies depends on it)
> 
> Yes, that's a common annoyance on Ubuntu - you can install the package
> "nodejs-legacy" to create that symlink automatically.
> 
>> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
>> your node is old then you just get a nasty syntax error during "npm
>> run build".
>>
>> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its README).
>>
>> Repo with a more recent node is here:
>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
>> This is linked from the nodejs official page, but I have no idea of
>> provenance beyond that.
>>
>> If you had already tried "npm run build" with an older node before
>> installing the newer one, do a "npm rebuild node-sass" after
>> installing the new node before trying to build dashboard frontend
>> again.
>>
>> Had to install python-bcrypt.
>>
>> Fedora 26 (aka my laptop)
>> ========
>>
>> This distro appears to come with node 6.12.
>>
>> dnf install python2-bcrypt
> 
> Thanks for the notes! I'll see if I can incorporate some of that into
> the README/HACKING documents included in that directory.
> 
> Lenz
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:29 Building dashboard_v2 John Spray
  2018-02-13 15:37 ` Ricardo Dias
  2018-02-13 16:32 ` Lenz Grimmer
@ 2018-02-13 20:35 ` Ken Dreyer
  2018-02-14  6:24   ` Kai Wagner
  2018-02-14 16:34 ` Ricardo Dias
  3 siblings, 1 reply; 14+ messages in thread
From: Ken Dreyer @ 2018-02-13 20:35 UTC (permalink / raw)
  To: John Spray; +Cc: Ceph Development

On Tue, Feb 13, 2018 at 8:29 AM, John Spray <jspray@redhat.com> wrote:
> Not sure if
> there is a sufficiently trusted third party Ubuntu repo to add to
> install_deps.sh.

Instead of adding another repository dependency, we could not build
the dashboard on Xenial, and target Ubuntu >= 18.04 for that.

https://packages.ubuntu.com/bionic/nodejs

- Ken

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 20:35 ` Ken Dreyer
@ 2018-02-14  6:24   ` Kai Wagner
  2018-02-14  8:54     ` Lenz Grimmer
  0 siblings, 1 reply; 14+ messages in thread
From: Kai Wagner @ 2018-02-14  6:24 UTC (permalink / raw)
  To: Ken Dreyer, John Spray; +Cc: Ceph Development


[-- Attachment #1.1: Type: text/plain, Size: 999 bytes --]



On 02/13/2018 09:35 PM, Ken Dreyer wrote:
> On Tue, Feb 13, 2018 at 8:29 AM, John Spray <jspray@redhat.com> wrote:
>> Not sure if
>> there is a sufficiently trusted third party Ubuntu repo to add to
>> install_deps.sh.
> Instead of adding another repository dependency, we could not build
> the dashboard on Xenial, and target Ubuntu >= 18.04 for that.
>
> https://packages.ubuntu.com/bionic/nodejs
You're right, but we should make sure to at least support 16.04 as well.
Lot's of folks won't be updating their underlaying OS immediately after
it's released and also it's not officially released, so we should
support the latest LTS release in my mind.
>
> - Ken
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-14  6:24   ` Kai Wagner
@ 2018-02-14  8:54     ` Lenz Grimmer
  2018-02-14  9:05       ` Kai Wagner
  0 siblings, 1 reply; 14+ messages in thread
From: Lenz Grimmer @ 2018-02-14  8:54 UTC (permalink / raw)
  To: Kai Wagner, Ken Dreyer, John Spray; +Cc: Ceph Development


[-- Attachment #1.1: Type: text/plain, Size: 1215 bytes --]

On 02/14/2018 07:24 AM, Kai Wagner wrote:

> On 02/13/2018 09:35 PM, Ken Dreyer wrote:
> 
>> On Tue, Feb 13, 2018 at 8:29 AM, John Spray <jspray@redhat.com> 
>> wrote:
>> 
>>> Not sure if there is a sufficiently trusted third party Ubuntu 
>>> repo to add to install_deps.sh.
>> 
>> Instead of adding another repository dependency, we could not
>> build the dashboard on Xenial, and target Ubuntu >= 18.04 for
>> that.
>> 
>> https://packages.ubuntu.com/bionic/nodejs
> 
> You're right, but we should make sure to at least support 16.04 as 
> well. Lot's of folks won't be updating their underlaying OS 
> immediately after it's released and also it's not officially 
> released, so we should support the latest LTS release in my mind.

I think we need to differentiate between the platforms/version we
support for *building* the UI code vs *running* it. The current
discussion is about the availability of the required development
toolchain for a given platform.

The Dashboard v2 does not have any run-time dependencies on Node.JS.

Lenz

-- 
SUSE Linux GmbH - Maxfeldstr. 5 - 90409 Nuernberg (Germany)
GF:Felix Imendörffer,Jane Smithard,Graham Norton,HRB 21284 (AG Nürnberg)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-14  8:54     ` Lenz Grimmer
@ 2018-02-14  9:05       ` Kai Wagner
  0 siblings, 0 replies; 14+ messages in thread
From: Kai Wagner @ 2018-02-14  9:05 UTC (permalink / raw)
  To: Lenz Grimmer, Ken Dreyer, John Spray; +Cc: Ceph Development


[-- Attachment #1.1: Type: text/plain, Size: 257 bytes --]

Valid point indeed. Thanks


On 02/14/2018 09:54 AM, Lenz Grimmer wrote:
> The Dashboard v2 does not have any run-time dependencies on Node.JS.

-- 
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-13 15:29 Building dashboard_v2 John Spray
                   ` (2 preceding siblings ...)
  2018-02-13 20:35 ` Ken Dreyer
@ 2018-02-14 16:34 ` Ricardo Dias
  2018-02-14 18:15   ` Alfredo Deza
  2018-02-16  6:24   ` Kai Wagner
  3 siblings, 2 replies; 14+ messages in thread
From: Ricardo Dias @ 2018-02-14 16:34 UTC (permalink / raw)
  To: Ceph Development; +Cc: John Spray

Hi,

The PR https://github.com/openattic/ceph/pull/91 updates
install-deps.sh script to install the development dependencies
required by dashboard_v2.

Since I can only test this in openSUSE based distros in a reliable way
I ask if there are some volunteers that can test this in other distros.

Thanks,
Ricardo Dias

On 13-02-2018 15:29, John Spray wrote:
> Hi folks,
> 
> Having just built the awesome new dashboard code
> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
> the first time, I'll share my notes...
> 
> When building on Ubuntu 16.04, which does not have a recent enough
> node.js for the build -- had to get one from an external source.  It
> looks like Fedora and EPEL do have more recent ones.  Not sure if
> there is a sufficiently trusted third party Ubuntu repo to add to
> install_deps.sh.
> 
> My fedora 26 machine had a sufficiently recent node/npm, so building
> there was simpler.  Just had to install the python2-bcrypt package (in
> addition to what is already covered in install_deps).
> 
> The frontend build only takes 25 seconds, which I think is pretty
> good.  The resulting dist/ dir is 18M at the moment, which is very
> similar to the existing dashboard static files size.  I would suggest
> we can decrease that a bit by restricting the font formats included:
> by default we're getting eog/svg/ttf output, but we probably only need
> WOFF.
> 
> I didn't need a virtualenv or any pip-installed things to run the
> dashboard in development (presumably would have needed that to run
> unit tests on the backend python code).
> 
> Detailed notes below.
> 
> Cheers,
> John
> 
> 
> 
> 
> On Ubuntu 16.04 (aka senta04)
> =============
> 
> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
> dependencies depends on it)
> 
> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
> your node is old then you just get a nasty syntax error during "npm
> run build".
> 
> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its README).
> 
> Repo with a more recent node is here:
> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
> This is linked from the nodejs official page, but I have no idea of
> provenance beyond that.
> 
> If you had already tried "npm run build" with an older node before
> installing the newer one, do a "npm rebuild node-sass" after
> installing the new node before trying to build dashboard frontend
> again.
> 
> Had to install python-bcrypt.
> 
> Fedora 26 (aka my laptop)
> ========
> 
> This distro appears to come with node 6.12.
> 
> dnf install python2-bcrypt
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-14 16:34 ` Ricardo Dias
@ 2018-02-14 18:15   ` Alfredo Deza
  2018-02-14 18:21     ` Ricardo Dias
  2018-02-16  6:24   ` Kai Wagner
  1 sibling, 1 reply; 14+ messages in thread
From: Alfredo Deza @ 2018-02-14 18:15 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Ceph Development, John Spray

On Wed, Feb 14, 2018 at 11:34 AM, Ricardo Dias <rdias@suse.com> wrote:
> Hi,
>
> The PR https://github.com/openattic/ceph/pull/91 updates
> install-deps.sh script to install the development dependencies
> required by dashboard_v2.
>
> Since I can only test this in openSUSE based distros in a reliable way
> I ask if there are some volunteers that can test this in other distros.

Please note that the install-deps.sh script is used for building Ceph
binaries, including those for
actual releases.

Unsure what distinctions (if any) are being made to separate
"development" of the dashboard vs. "running" the dashboard (as pointed
out earlier in the thread)
>
> Thanks,
> Ricardo Dias
>
> On 13-02-2018 15:29, John Spray wrote:
>>
>> Hi folks,
>>
>> Having just built the awesome new dashboard code
>> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
>> the first time, I'll share my notes...
>>
>> When building on Ubuntu 16.04, which does not have a recent enough
>> node.js for the build -- had to get one from an external source.  It
>> looks like Fedora and EPEL do have more recent ones.  Not sure if
>> there is a sufficiently trusted third party Ubuntu repo to add to
>> install_deps.sh.
>>
>> My fedora 26 machine had a sufficiently recent node/npm, so building
>> there was simpler.  Just had to install the python2-bcrypt package (in
>> addition to what is already covered in install_deps).
>>
>> The frontend build only takes 25 seconds, which I think is pretty
>> good.  The resulting dist/ dir is 18M at the moment, which is very
>> similar to the existing dashboard static files size.  I would suggest
>> we can decrease that a bit by restricting the font formats included:
>> by default we're getting eog/svg/ttf output, but we probably only need
>> WOFF.
>>
>> I didn't need a virtualenv or any pip-installed things to run the
>> dashboard in development (presumably would have needed that to run
>> unit tests on the backend python code).
>>
>> Detailed notes below.
>>
>> Cheers,
>> John
>>
>>
>>
>>
>> On Ubuntu 16.04 (aka senta04)
>> =============
>>
>> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
>> dependencies depends on it)
>>
>> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>>>
>>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
>>
>> your node is old then you just get a nasty syntax error during "npm
>> run build".
>>
>> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its
>> README).
>>
>> Repo with a more recent node is here:
>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
>> This is linked from the nodejs official page, but I have no idea of
>> provenance beyond that.
>>
>> If you had already tried "npm run build" with an older node before
>> installing the newer one, do a "npm rebuild node-sass" after
>> installing the new node before trying to build dashboard frontend
>> again.
>>
>> Had to install python-bcrypt.
>>
>> Fedora 26 (aka my laptop)
>> ========
>>
>> This distro appears to come with node 6.12.
>>
>> dnf install python2-bcrypt
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-14 18:15   ` Alfredo Deza
@ 2018-02-14 18:21     ` Ricardo Dias
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Dias @ 2018-02-14 18:21 UTC (permalink / raw)
  To: Alfredo Deza; +Cc: Ceph Development, John Spray



On 14-02-2018 18:15, Alfredo Deza wrote:
> On Wed, Feb 14, 2018 at 11:34 AM, Ricardo Dias <rdias@suse.com> wrote:
>> Hi,
>>
>> The PR https://github.com/openattic/ceph/pull/91 updates
>> install-deps.sh script to install the development dependencies
>> required by dashboard_v2.
>>
>> Since I can only test this in openSUSE based distros in a reliable way
>> I ask if there are some volunteers that can test this in other distros.
> 
> Please note that the install-deps.sh script is used for building Ceph
> binaries, including those for
> actual releases.
> 
> Unsure what distinctions (if any) are being made to separate
> "development" of the dashboard vs. "running" the dashboard (as pointed
> out earlier in the thread)

The only runtime dependency required by the dashboard that wasn't still
in the spec file, is python-bcrypt and is also added in the PR.
I think we covered both development and runtime with this PR, but
testing is needed.

>>
>> Thanks,
>> Ricardo Dias
>>
>> On 13-02-2018 15:29, John Spray wrote:
>>>
>>> Hi folks,
>>>
>>> Having just built the awesome new dashboard code
>>> (https://github.com/ceph/ceph/pull/20103) in my dev environment for
>>> the first time, I'll share my notes...
>>>
>>> When building on Ubuntu 16.04, which does not have a recent enough
>>> node.js for the build -- had to get one from an external source.  It
>>> looks like Fedora and EPEL do have more recent ones.  Not sure if
>>> there is a sufficiently trusted third party Ubuntu repo to add to
>>> install_deps.sh.
>>>
>>> My fedora 26 machine had a sufficiently recent node/npm, so building
>>> there was simpler.  Just had to install the python2-bcrypt package (in
>>> addition to what is already covered in install_deps).
>>>
>>> The frontend build only takes 25 seconds, which I think is pretty
>>> good.  The resulting dist/ dir is 18M at the moment, which is very
>>> similar to the existing dashboard static files size.  I would suggest
>>> we can decrease that a bit by restricting the font formats included:
>>> by default we're getting eog/svg/ttf output, but we probably only need
>>> WOFF.
>>>
>>> I didn't need a virtualenv or any pip-installed things to run the
>>> dashboard in development (presumably would have needed that to run
>>> unit tests on the backend python code).
>>>
>>> Detailed notes below.
>>>
>>> Cheers,
>>> John
>>>
>>>
>>>
>>>
>>> On Ubuntu 16.04 (aka senta04)
>>> =============
>>>
>>> Had to symlink /usr/bin/nodejs to /usr/bin/node (one of the
>>> dependencies depends on it)
>>>
>>> The distro comes with node 4.2.6.  The dashboard_v2 code requires node
>>>>
>>>> = 6.9.0 (per tmelo) -- that isn't being explicitly checked, so if
>>>
>>> your node is old then you just get a nasty syntax error during "npm
>>> run build".
>>>
>>> Angular CLI depends on node >= 6.9.0 and npm >= 3 (according to its
>>> README).
>>>
>>> Repo with a more recent node is here:
>>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
>>> This is linked from the nodejs official page, but I have no idea of
>>> provenance beyond that.
>>>
>>> If you had already tried "npm run build" with an older node before
>>> installing the newer one, do a "npm rebuild node-sass" after
>>> installing the new node before trying to build dashboard frontend
>>> again.
>>>
>>> Had to install python-bcrypt.
>>>
>>> Fedora 26 (aka my laptop)
>>> ========
>>>
>>> This distro appears to come with node 6.12.
>>>
>>> dnf install python2-bcrypt
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Ricardo Dias
Senior Software Engineer - Storage Team
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284
(AG Nürnberg)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Building dashboard_v2
  2018-02-14 16:34 ` Ricardo Dias
  2018-02-14 18:15   ` Alfredo Deza
@ 2018-02-16  6:24   ` Kai Wagner
  1 sibling, 0 replies; 14+ messages in thread
From: Kai Wagner @ 2018-02-16  6:24 UTC (permalink / raw)
  To: Ricardo Dias, Ceph Development; +Cc: John Spray


[-- Attachment #1.1: Type: text/plain, Size: 586 bytes --]

Hey,

I tested the build on ubuntu-16.04 and 18.04 without any problems.

Well done!

Kai


On 02/14/2018 05:34 PM, Ricardo Dias wrote:
> Hi,
>
> The PR https://github.com/openattic/ceph/pull/91 updates
> install-deps.sh script to install the development dependencies
> required by dashboard_v2.
>
> Since I can only test this in openSUSE based distros in a reliable way
> I ask if there are some volunteers that can test this in other distros.
>
> Thanks, 

-- 
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-02-16  6:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 15:29 Building dashboard_v2 John Spray
2018-02-13 15:37 ` Ricardo Dias
2018-02-13 15:42   ` John Spray
2018-02-13 15:43   ` Ricardo Dias
2018-02-13 16:32 ` Lenz Grimmer
2018-02-13 18:13   ` Tiago Melo
2018-02-13 20:35 ` Ken Dreyer
2018-02-14  6:24   ` Kai Wagner
2018-02-14  8:54     ` Lenz Grimmer
2018-02-14  9:05       ` Kai Wagner
2018-02-14 16:34 ` Ricardo Dias
2018-02-14 18:15   ` Alfredo Deza
2018-02-14 18:21     ` Ricardo Dias
2018-02-16  6:24   ` Kai Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.