Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/712#discussion_r134804476
  
    --- Diff: metron-deployment/packaging/docker/rpm-docker/Dockerfile ---
    @@ -27,3 +27,7 @@ RUN mv apache-maven-3.2.5 /opt/maven
     RUN ln -s /opt/maven/bin/mvn /usr/bin/mvn
     RUN yum -y install asciidoc rpm-build rpm2cpio tar unzip xmlto zip rpmlint 
&& yum clean all
     WORKDIR /root
    +
    +# install node so that the node dependencies can be packaged into the RPMs
    +RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
    +RUN yum -y install gcc-c++ make nodejs
    --- End diff --
    
    I actually tried this approach first and ran into some headaches.  Here are 
the headaches...:)
    
    First, the build host may be different than the installation host.  `npm 
install ...` sometimes builds/rebuilds dependencies that I assume are 
customized for the installation environment.  So if I build the RPMs on my Mac, 
I don't want NPM dependencies built for the Mac to be included in an RPM 
destined for a CentOS host.
    
    In addition the dependencies built on the build machine are the 
"development" dependencies and not the "production" dependencies.  We only want 
the "production" deps to be packaged.
    
    Also, there are two different `package.json` files.  I don't understand 
why, but there are.  The deps that get built on the build machine are defined 
by the root `metron-interface/metron-config/package.json` file.  While what we 
actually need to run the Management UI is defined in 
`metron-interface/metron-config/scripts/package.json`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to