Bläddra i källkod

HUE-8730 [docker] Hook-in webpack bundle generation into the image

Romain Rigaux 6 år sedan
förälder
incheckning
02791a22c9
6 ändrade filer med 34 tillägg och 46 borttagningar
  1. 5 5
      README.md
  2. 0 25
      desktop/libs/librdbms/Makefile
  3. 1 1
      docs/admin-manual/manual.md
  4. 4 4
      docs/index.txt
  5. 19 7
      tools/docker/hue/Dockerfile
  6. 5 4
      tools/docker/hue/README.md

+ 5 - 5
README.md

@@ -8,10 +8,10 @@ Hue is an open source SQL Workbench for browsing, querying and visualizing data
 
 It features:
 
-   * [Editors](http://gethue.com/sql-editor/) to query with SQL and submit jobs.
-   * [Dashboards](http://gethue.com/search-dashboards/) to dynamically interact and visualize data.
-   * [Scheduler](http://gethue.com/scheduling/) of jobs and workflows.
-   * [Browsers](http://gethue.com/browsers/) for data and a Data Catalog.
+   * [Editors](http://gethue.com/sql-editor/) to query with SQL and submit jobs
+   * [Dashboards](http://gethue.com/search-dashboards/) to dynamically interact and visualize data
+   * [Scheduler](http://gethue.com/scheduling/) of jobs and workflows
+   * [Browsers](http://gethue.com/browsers/) for data and a Data Catalog
 
 
 ![alt text](https://raw.githubusercontent.com/cloudera/hue/master/docs/images/sql-editor.png "Hue Editor")
@@ -33,7 +33,7 @@ cd hue
 make apps
 build/env/bin/hue runserver
 ```
-Now Hue should be running on [http://localhost:8000](http://localhost:8000) ! The configuration in development mode is ``desktop/conf/pseudo-distributed.ini``.
+Now Hue should be running on [http://localhost:8000](http://localhost:8000) ! The configuration in development mode is [desktop/conf/pseudo-distributed.ini](desktop/conf/pseudo-distributed.ini).
 
 Read more in the [installation documentation](http://cloudera.github.io/hue/latest/admin-manual/manual.html#installation).
 

+ 0 - 25
desktop/libs/librdbms/Makefile

@@ -36,29 +36,4 @@ env-install: compile ext-env-install
 	@$(ENV_PYTHON) setup.py develop -N -q
 
 
-###################################
-# Build DBProxy plugin
-###################################
 
-PLUGIN_DIR := $(realpath .)
-PLUGIN_JAVA_LIB := $(PLUGIN_DIR)/java-lib
-PLUGIN_JAVA_DIR := $(PLUGIN_DIR)/java
-BLD_DIR_PLUGINS := $(PLUGIN_DIR)/java/target
-
-compile: $(DB_PROXY_JAR)
-
-# Build the plugin jar iff the source is present
-ifneq (,$(wildcard $(PLUGIN_JAVA_DIR)))
-$(DB_PROXY_JAR): $(shell find $(PLUGIN_JAVA_DIR) -type f)
-	mkdir -p $(PLUGIN_JAVA_LIB)
-	@echo "--- Building DBProxy plugin"
-	cd $(PLUGIN_JAVA_DIR) && mvn clean install -DskipTests $(MAVEN_OPTIONS)
-	cp $(BLD_DIR_PLUGINS)/dbproxy-1.0-SNAPSHOT.jar $(DB_PROXY_JAR)
-
-clean::
-	rm -rf $(PLUGIN_JAVA_LIB)
-	cd $(PLUGIN_JAVA_DIR) && mvn clean $(MAVEN_OPTIONS) ||:
-else
-$(DB_PROXY_JAR):
-	$(error Cannot build DBProxy plugin without source)
-endif

+ 1 - 1
docs/admin-manual/manual.md

@@ -180,7 +180,7 @@ that user's home directory, or in a directory within `/usr/share`.
 
 ## Docker
 
-Alternatively to building Hue, a [http://gethue.com/getting-started-with-hue-in-2-minutes-with-docker/](Hue Docker image) is available.
+Alternatively to building Hue into an image, the [Hue Docker Guide](https://github.com/cloudera/hue/tree/testing/tools/docker/hue) is available.
 
 ## Troubleshooting the tarball Installation
 

+ 4 - 4
docs/index.txt

@@ -1,8 +1,8 @@
 image:images/hue_logo.png[Hue Logo]
 ===================================
 
-Hue is an open source graphical user interface to operate and develop applications for
-performing self-service data analytics: link:http://gethue.com[gethue.com].
+Hue is an open source workbench for self-service operation and development of SQL applications
+in a Data Warehouse: link:http://gethue.com[gethue.com].
 
 Thousands of companies and organizations use Hue to open-up and query their data and make smarter decisions. Hue is heavily
 used by hundreds of Cloudera customers executing millions of queries daily.
@@ -10,7 +10,7 @@ used by hundreds of Cloudera customers executing millions of queries daily.
 
 Administrate
 ------------
-The link:admin-manual/manual.html[manual] has instructions to install and administrate Hue.
+The link:admin-manual/manual.html[manual] has instructions to install and configure Hue.
 
 User Guide
 ----------
@@ -18,7 +18,7 @@ The link:user-guide/user-guide.html[user guide] has instructions about how to us
 
 SDK
 ---
-It is encouraged to link:sdk/sdk.html[build or extend applications] within the Hue environment.
+It is encouraged to link:sdk/sdk.html[extend SQL connectors or applications] within the Hue environment.
 
 Release Notes
 -------------

+ 19 - 7
tools/docker/hue/Dockerfile

@@ -23,24 +23,24 @@ RUN apt-get update -y && apt-get install -y \
   libgmp3-dev \
   libz-dev \
   software-properties-common \
-  nodejs \
-  npm \
+  curl \
   git \
   sudo \
   maven \
    && rm -rf /var/lib/apt/lists/*
 
-RUN add-apt-repository -y ppa:webupd8team/java
-RUN apt-get update -y
-RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
-RUN apt-get install -y oracle-java8-installer
+#RUN add-apt-repository -y ppa:webupd8team/java
+#RUN apt-get update -y
+#RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
+#RUN apt-get install -y oracle-java8-installer
 
 ADD . /hue
 
 RUN cd /hue && PREFIX=/usr/share make install
 RUN useradd -ms /bin/bash hue && chown -R hue /usr/share/hue
+RUN chmod 777 /usr/share/hue/desktop/desktop.db
 
-# As not doing a `make prod` above
+# Not doing a `make prod` above yet, so manually get prod ini
 RUN rm /usr/share/hue/desktop/conf/*
 COPY desktop/conf.dist /usr/share/hue/desktop/conf
 
@@ -50,6 +50,18 @@ COPY tools/docker/hue/startup.sh /usr/share/hue
 WORKDIR  /usr/share/hue
 RUN ./build/env/bin/pip install psycopg2-binary
 
+# Webpack not integrated into make install yet
+COPY package.json /usr/share/hue
+COPY webpack.config.js /usr/share/hue
+
+# Need recent version for Ubuntu
+RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
+RUN apt-get install -y nodejs
+
+RUN npm install
+RUN npm run webpack
+
+RUN ./build/env/bin/hue collectstatic --noinput
 
 EXPOSE 8888
 CMD ["./startup.sh"]

+ 5 - 4
tools/docker/hue/README.md

@@ -52,11 +52,12 @@ Hue should then be up and running on your default Docker IP on the port 8888, so
 
 #### Configuration
 
-By default the Hue container is using 
-[``tools/docker/hue/conf/z-defaults.ini``](/tools/docker/hue/conf/z-defaults.ini) on top of [``desktop/conf/hue.ini``](/desktop/conf/hue.ini)
-which assumes localhost for all the data services and uses and embedded sqlite database that often errors.
+By default the Hue container is using
+[``tools/docker/hue/conf/z-defaults.ini``](/tools/docker/hue/conf/z-defaults.ini) on top of [``desktop/conf/hue.ini``](/desktop/conf/hue.ini) which assumes localhost for all the data services and uses and embedded sqlite database that often errors.
 
-In order to point to external services, use the simplified ini [``hue.ini``](/tools/docker/hue/hue.ini), edit the values before starting it via:
+The default ini is used for configuration at the image build time (e.g. which apps to always disable or certain settings like [banner customization](http://gethue.com/add-a-top-banner-to-hue/)).
+
+In order to configure Hue at runtime and for example point to external services, use the simplified ini [``hue.ini``](/tools/docker/hue/hue.ini), edit the values before starting it via:
 
 ```
 docker run -it -p 8888:8888 -v $PWD/tools/docker/hue/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini gethue/hue