Эх сурвалжийг харах

HUE-8888 [docs] Promote more the quick docker dev setup

Romain 5 жил өмнө
parent
commit
fe4aba768c

+ 6 - 1
README.md

@@ -55,7 +55,12 @@ Start Hue in a single click with the [Docker Guide](https://github.com/cloudera/
 
 Now Hue should be up and running on your default Docker IP on the port 8888 [http://localhost:8888](http://localhost:8888)!
 
-Read more about configurations [here](https://github.com/cloudera/hue/tree/master/tools/docker/hue#configuration).
+Read more about [configurations](https://github.com/cloudera/hue/tree/master/tools/docker/hue#configuration) then.
+
+Development Docker
+------------------
+
+For a very Quick Start and not even bother with installing a dev environment, go with the [Dev Docker](https://docs.gethue.com/developer/development/#dev-docker).
 
 Kubernetes
 ----------

+ 2 - 2
docs/docs-site/content/developer/development/_index.md

@@ -813,7 +813,7 @@ To publish gethue to NPM registry, the following command would have to be run. K
 
 ### Dev Docker
 
-Try basic changes in Hue without compiling it locally:
+Try basic changes [in 3 minutes](https://gethue.com/quick-start-a-hue-development-environment-in-3-minutes-with-docker/) without compiling Hue locally hence avoiding the setting up of [dependencies](/developer/):
 
     git clone https://github.com/cloudera/hue.git
     cd hue
@@ -821,7 +821,7 @@ Try basic changes in Hue without compiling it locally:
 
 Then edit the `[[database]]` section to specify a proper database, here MySql:
 
-    host=127.0.0.1 # Not localhost if Docker
+    host=127.0.0.1 # Don't use 'localhost' if Docker
     engine=mysql
     user=hue
     password=hue

+ 13 - 25
docs/gethue/content/en/posts/2019-07-24-quick-start-a-hue-development-environment-in-3-minutes-with-docker.md

@@ -48,45 +48,33 @@ Looking at simplifying the usage of Databases and Datawarehouses or learning how
 
 Typically the development is made [natively][1] but here is a new way to quickly get started with Docker:
 
- 
-
-<pre><code class="bash">git clone https://github.com/cloudera/hue.git
-
-cd hue
+    git clone https://github.com/cloudera/hue.git
 
-cp desktop/conf/pseudo-distributed.ini.tmpl desktop/conf/pseudo-distributed.ini
+    cd hue
 
-</code></pre>
+    cp desktop/conf/pseudo-distributed.ini.tmpl desktop/conf/pseudo-distributed.ini
 
-Then edit the [[database]] section to specify a proper database, here MySql:
+Then edit the `[[database]]` section to specify a proper database, here MySql:
 
-<div>
-<pre><code class="bash">
-host=127.0.0.1 # Not localhost if Docker
-engine=mysql
-user=hue
-password=hue
-name=huedb
-</code></pre>
-</div>
+    host=127.0.0.1 # Not localhost if Docker
+    engine=mysql
+    user=hue
+    password=hue
+    name=huedb
 
-<div>
-</div>
 
-<div>
-  Then map the local Hue source code into the running container (so that local edits are seen in the running Hue):
-</div>
+Then map the local Hue source code into the running container (so that local edits are seen in the running Hue):
 
-<pre><code class="bash">sudo docker run -it -v $PWD/apps:/usr/share/hue/apps -v $PWD/desktop:/usr/share/hue/desktop -v $PWD/desktop/conf/pseudo-distributed.ini:/usr/share/hue/desktop/conf/z-hue.ini --network="host" gethue/hue</code></pre>
+    sudo docker run -it -v $PWD/apps:/usr/share/hue/apps -v $PWD/desktop:/usr/share/hue/desktop -v $PWD/desktop/conf/pseudo-distributed.ini:/usr/share/hue/desktop/conf/z-hue.ini --network="host" gethue/hue
 
-Then open-up <http://127.0.0.1:8888>!
+And open-up <http://127.0.0.1:8888>!
 
 <a href="https://cdn.gethue.com/uploads/2017/12/Screen-Shot-2017-11-15-at-3.34.20-PM.png"><img src="https://cdn.gethue.com/uploads/2017/12/Screen-Shot-2017-11-15-at-3.34.20-PM.png" /></a>
 
 
 Note: code updates won&#8217;t be seen after the Docker container runs. For this Hue would need to be [started][3] in dev server mode by replacing the line by
 
-<pre><code class="bash">./build/env/bin/hue runserver 0.0.0.0:8888</code></pre>
+    ./build/env/bin/hue runserver 0.0.0.0:8888
 
 and it will auto-restart on Python code changes. For JavaScript, those would need to be [compiled][4].
 

+ 14 - 6
tools/docker/hue/README.md

@@ -2,7 +2,11 @@
 
 ## Run the image
 
-Hue can run in one line via the `docker` command (but needs to be configured to point to a traditional database instead of Sqlite). To have a zero configuration start use [kubernetes](/tools/kubernetes/) instead.
+Hue can run in one line via the `docker` command.
+
+It also needs to be configured to point to a traditional database instead of Sqlite so see below how to configure the docker image to point to a local MySql or use `docker-compose` which will start both services for you.
+
+To have a zero configuration start use [kubernetes](/tools/kubernetes/) is also a great option.
 
 ### Docker
 
@@ -12,6 +16,8 @@ Directly boot the image:
 
 Hue should then be up and running on your default Docker IP on the port 8888, so usually [http://127.0.0.1:8888](http://127.0.0.1:8888).
 
+Then to avoid the `database locked` error, please see below [Configuration](#configuration).
+
 ### Docker Compose
 
 Docker compose allows to start all the required services in one command line.
@@ -33,6 +39,7 @@ And to stop:
     docker-compose down
 
 **Note**
+
 If http://127.0.0.1:8888 does not work, get the IP of the docker container with:
 
     sudo docker ps
@@ -49,13 +56,13 @@ So in our case [http://172.17.0.2:8888](http://172.17.0.2:8888).
 By default the Hue container is using
 [``tools/docker/hue/conf/hue-overrides.ini``](/tools/docker/hue/conf/hue-overrides.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 will error out.
 
-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 be useful, configure Hue at runtime to point to external services. The simplified ini [``hue-overrides.ini``](/tools/docker/hue/conf/hue-overrides.ini) can be edited before starting Hue via:
+To configure Hue to point to the databases to query, the simplified ini [``hue-overrides.ini``](/tools/docker/hue/conf/hue-overrides.ini) can be edited before starting Hue via:
 
     cd tools/docker/hue
     cp conf/hue-overrides.ini hue.ini
 
+#### Hue's Database
+
 Edit the database settings in `hue.ini` for one of these two databases. Do not forget to create a 'hue' database too.
 
 Postgres
@@ -71,7 +78,6 @@ Postgres
 
 MySql
 
-
     [desktop]
     [[database]]
     engine=mysql
@@ -81,7 +87,9 @@ MySql
     password=secret
     name=hue
 
-If you want to be able to query a database out of the box, update the connector interpreters accordingly, e.g.:
+#### Querying Databases
+
+To be able to query a database, update the connector interpreters accordingly, e.g.:
 
 ```
 [notebook]