Before beginning this installation process ensure the Data Cube has been properly installed and data has been ingested. For installation and ingestion instructions, refer to this guide.
The UI application is designed for high level use of the Data Cube. It allows for users to:
This document outlines the steps required to set up the UI given the previous DataCube base installation instructions have been followed.
The code should be checked out to the Datacube directory that was created from the previous datacube installation document:
cd ~/Datacube git clone https://github.com/ceos-seo/data_cube_ui.git -b master cd ~/Datacube/data_cube_ui git submodule init && git submodule update
There are two dependencies that will need to be installed that accompany the application:
The admin will also need to install
Apache2 and the
Mod-WSGI with the following commands:
sudo apt-get install -y apache2 sudo apt-get install -y libapache2-mod-wsgi-py3
The next set of dependencies are installed in the python virtual environment:
source ~/Datacube/datacube_env/bin/activate pip install django==1.9.7 pip install redis==2.10.5 pip install celery==3.1.23 pip install imageio pip install scipy
NOTE: If Notebooks were installed then this dependency is already installed.
sudo apt-get install -y redis-server
dc_ui.conf file found at
localuser, you can just copy this into your apache sites directory in the next step.
localuser, change all instances of
localuserto your username and ensure that your directory structure matches that listed in the configuration file.
dc_ui.conf file to your apache folder and activate the site.
sudo cp ~/Datacube/data_cube_ui/config/dc_ui.conf /etc/apache2/sites-available/dc_ui.conf sudo a2ensite dc_ui.conf sudo a2dissite 000-default.conf sudo service apache2 restart
.datacube.conf file found at
Ensure that the hostname is commented out with a ‘#’,
Ensure that the
db_password fields match the
postgresql user that was used to create the datacube database in the Data Cube installation procedure.
This should be
.datacube.conf file to your home directory:
sudo cp ~/Datacube/data_cube_ui/config/.datacube.conf ~/.datacube.conf
In order to log in to the application, a user account must be created to authenticate against.
To start the user creation process, open a terminal and launch the python virtual environment
Navigate to the root directory of the UI application
Open the file located at
Make sure the username is
dc_user and the password is
Note: This should match the postgresql username and password used when installing the Data Cube.
Migrate the auth tables with the command:
cd ~/Datacube/data_cube_ui python manage.py migrate auth
Migrate the other tables with the command:
python manage.py makemigrations python manage.py migrate
Type the following command: python manage.py createsuperuser
The terminal will ask for three pieces of information:
user name- this should be
email address- this can be left blank by simply hitting return
password- alpha-numeric (at least 8 characters long). For the sake of easy/consistent installation, use
In order to run the application,
Redis must be started.
To start Celery:
Open a terminal for each process
Master process started with:
cd ~/Datacube/data_cube_ui celery -A data_cube_ui worker -l info -c 4
Slave process started with:
celery -A data_cube_ui worker -l info -c 8 -Q chunk_processing -n chunk_processing
-c 8represents the number of workers. For less powerful machines, this number should be lower as it will consume more resources the higher it is.
Navigate to the site’s home page by getting the IP address (ifconfig) and typing that directly into the URL box in the browser.
The DataCube UI comes with a set of default areas along with having the ability to add new areas with ease:
To import the list of areas run the following series of commands:
source ~/Datacube/datacube_env/bin/activate cd ~/Datacube/data_cube_ui python manage.py loaddata db_backups/empty_db.json
DATA_CUBE_UI, there is an areas with an
I’m getting a “Permission denied error.” How do I fix this?
More often than not the issue is caused by a lack of permissions on the folder where the application is located. Grant full access to the folder and its subfolders and files (this can be done by using the command “chmod -R 777 FOLDER_NAME”).
DoesNotExistpage appears when I click on the details for a given task.
This is probably due to bad data in the database. It is best to simply remove this particular task and run it again.
I ran a query but it’s not showing in the Track History section. I don’t see a popup with any error.
Celery is designed to handle any failures gracefully. This means that you may need to bring up the terminal that has Celery running to look for errors.
I typed in the correct username and password but it still won’t let me log in.
This problem usually occurs when trying to export the application to another computer. It can be fixed easily with the following command:
python manage.py changepassword USER_NAME
You’ll be prompted to enter the password then once more for confirmation. Try logging in again the problem should be resolved.