Explorar el Código

HUE-8888 [docs] Refresh install README and update syncdb references

Romain hace 5 años
padre
commit
0fc591b43d

+ 2 - 2
apps/useradmin/src/useradmin/models.py

@@ -107,7 +107,7 @@ class UserProfile(models.Model):
       try:
         perm = self._lookup_permission(app, action)
       except HuePermission.DoesNotExist:
-        LOG.exception("Permission object %s - %s not available. Was syncdb run after installation?" % (app, action))
+        LOG.exception("Permission object %s - %s not available. Was Django migrate command run after installation?" % (app, action))
         return self.user.is_superuser
     if self.user.is_superuser:
       return True
@@ -249,7 +249,7 @@ def update_app_permissions(**kwargs):
   We never delete permissions automatically, because apps might come and go.
 
   Note that signing up to the "migrate" signal is not necessarily the best thing we can do, since some apps might not
-  have models, but nonetheless, "syncdb" is typically run when apps are installed.
+  have models, but nonetheless, "migrate" is typically run when apps are installed.
   """
   created_tables = connection.introspection.table_names()
   if u'useradmin_huepermission' in created_tables:  # Check if Useradmin has been installed.

+ 4 - 3
desktop/core/src/desktop/lib/django_db_util.py

@@ -16,14 +16,16 @@
 # limitations under the License.
 
 """
-Utilities for django database operations.
+Utilities for Django database operations.
 """
 
 import logging
 from django.contrib.contenttypes.models import ContentType
 
+
 LOG = logging.getLogger(__name__)
 
+
 def remove_content_type(app_label, model_name):
   """
   Delete from the Django ContentType table, as applications delete
@@ -34,8 +36,7 @@ def remove_content_type(app_label, model_name):
   be prompted with a question as they run syncdb.
   """
   try:
-    ct = ContentType.objects.get(app_label=app_label,
-                                 model=model_name.lower())
+    ct = ContentType.objects.get(app_label=app_label, model=model_name.lower())
     ct.delete()
   except ContentType.DoesNotExist:
     pass

+ 1 - 1
desktop/core/src/desktop/lib/django_test_util.py

@@ -130,7 +130,7 @@ def configure_django_for_test():
 def create_tables(model):
   """ Create all tables for the given model.
 
-  This is a subset of django.core.management.commands.syncdb
+  This is a subset of django.core.management.commands.migrate
   """
   from django.db import connection
   from django.db.models import Model

+ 29 - 32
dist/README

@@ -1,34 +1,39 @@
-=========================================
-        Hue - Data-warehouse Editor
-=========================================
+==============================
+Hue - DataWarehouse SQL Editor
+==============================
 
-Instructions to install the tarball release of Hue are available
-in the manual from http://gethue.com.
+Instructions to install the tarball release of Hue are available in the manual https://docs.gethue.com/administrator/installation/.
 
-If you're impatient, these are the key steps. Please check the full manual
-for more details.
+If you're impatient, these are the key steps. Please check the full manual for more details and browse https://gethue.com.
 
 
 Install
 -------
-## Install in any directory, e.g. /home/hue, /usr/share, /home/my_user
-PREFIX=/usr/share make install
 
-## If you don't have the permissions, you will need to 'sudo' the command and
-## make sure that the 'hue' user has write access to the 'logs' directory and 'desktop/desktop.db'.
-## e.g. sudo chown -R hue:hue /usr/local/hue
+    ## Install in any directory, e.g. /home/hue, /usr/share, /home/my_user
+    PREFIX=/usr/share make install
 
-## Run!
-${PREFIX}/hue/build/env/bin/supervisor
+    ## If you don't have the permissions, you will need to 'sudo' the command and
+    ## make sure that the 'hue' user has write access to the 'logs' directory and 'desktop/desktop.db'.
+    ## e.g. sudo chown -R hue:hue /usr/local/hue
+
+    ## Run!
+    ${PREFIX}/hue/build/env/bin/supervisor
 
 
 Upgrade
 -------
-Stop the current Hue and do a database backup.
-Install the new Hue to replace the old one and run the database migrations:
 
-./build/env/bin/hue syncdb
-./build/env/bin/hue migrate
+# Stop the current Hue and do a database backup.
+# Install the new Hue to replace the old one and run the database migrations:
+
+    ./build/env/bin/hue migrate
+
+
+Configure Hue
+-------------
+
+Point to other services: https://docs.gethue.com/administrator/configuration/
 
 
 Configure Hadoop
@@ -37,23 +42,15 @@ Configure Hadoop
 ## Configure HDFS
 Edit hdfs-site.xml:
 
-<property>
-  <name>dfs.webhdfs.enable</name>
-  <value>true</value>
-</property>
-
-
-Configure Hue
--------------
-
-Point to other services: http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/
+    <property>
+      <name>dfs.webhdfs.enable</name>
+      <value>true</value>
+    </property>
 
 
 Problems?
 ---------
 
-Search or ask questions on the forum and http://groups.google.com/a/cloudera.org/group/hue-user
-
-Some packages might be required during the 'make install': https://github.com/cloudera/hue#development-prerequisites)
+Search or ask questions on the forum https://discourse.gethue.com/
 
-Download a pre-built packaged version (apt-get/yum install...) of Hue on http://gethue.com
+Some packages might be required during the 'make install': https://docs.gethue.com/administrator/installation/dependencies/

+ 2 - 5
docs/docs-site/content/administrator/administration/database.md

@@ -101,14 +101,11 @@ To configure Hue to store data in MySQL:
     name=hue
     </pre>
 
-5. As the Hue user, configure Hue to load the existing data and create the
-   necessary database tables:
+5. As the Hue user, configure Hue to load the existing data and create the database tables:
 
-    <pre>
-    /usr/share/hue/build/env/bin/hue syncdb --noinput
+    /usr/share/hue/build/env/bin/hue migrate
     mysql -uhue -psecretpassword -e "DELETE FROM hue.django_content_type;"
     /usr/share/hue/build/env/bin/hue loaddata $temporary-file-containing-dumped-data.json
-    </pre>
 
 Your system is now configured and you can start the Hue server as normal.
 

+ 1 - 3
docs/docs-site/content/developer/development/_index.md

@@ -337,10 +337,8 @@ for regenerating the code from the interfaces.
 
 ### Upgrades
 
-After upgrading the version of Hue, running these two commands will make sure the
-database has the correct tables and fields.
+After upgrading the version of Hue, running these two commands will make sure the database has the correct tables and fields.
 
-    ./build/env/bin/hue syncdb
     ./build/env/bin/hue migrate
 
 

+ 0 - 1
tools/docker/hue/startup.sh

@@ -1,5 +1,4 @@
 #!/bin/sh
 
-./build/env/bin/hue syncdb --noinput
 ./build/env/bin/hue migrate
 ./build/env/bin/supervisor