diff --git a/apps/useradmin/src/useradmin/models.py b/apps/useradmin/src/useradmin/models.py index 24ab9e6138e..a72b6735ceb 100644 --- a/apps/useradmin/src/useradmin/models.py +++ b/apps/useradmin/src/useradmin/models.py @@ -107,7 +107,7 @@ def has_hue_permission(self, action=None, app=None, perm=None): 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. diff --git a/desktop/core/src/desktop/lib/django_db_util.py b/desktop/core/src/desktop/lib/django_db_util.py index 3ccb4717ad9..3247dc57cab 100644 --- a/desktop/core/src/desktop/lib/django_db_util.py +++ b/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 diff --git a/desktop/core/src/desktop/lib/django_test_util.py b/desktop/core/src/desktop/lib/django_test_util.py index bc0e86db66f..e2785088568 100644 --- a/desktop/core/src/desktop/lib/django_test_util.py +++ b/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 diff --git a/dist/README b/dist/README index 07f09ae9783..6e20c50c891 100644 --- a/dist/README +++ b/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: - - dfs.webhdfs.enable - true - - - -Configure Hue -------------- - -Point to other services: http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/ + + dfs.webhdfs.enable + true + 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/ diff --git a/docs/docs-site/content/administrator/administration/database.md b/docs/docs-site/content/administrator/administration/database.md index 15ed6efc5ba..507cd38a1a1 100644 --- a/docs/docs-site/content/administrator/administration/database.md +++ b/docs/docs-site/content/administrator/administration/database.md @@ -101,14 +101,11 @@ To configure Hue to store data in MySQL: name=hue -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: -
-    /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
-    
Your system is now configured and you can start the Hue server as normal. diff --git a/docs/docs-site/content/developer/development/_index.md b/docs/docs-site/content/developer/development/_index.md index 794c316b852..03b8da2fd9b 100644 --- a/docs/docs-site/content/developer/development/_index.md +++ b/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 diff --git a/tools/docker/hue/startup.sh b/tools/docker/hue/startup.sh index b17baf83188..66f21746574 100755 --- a/tools/docker/hue/startup.sh +++ b/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