CDATWeb 2.0 alpha
##Please read the Devlopment Guidelines
This is an early version of CDAT Web 2.0 with the basic organizational
structure in place. Work is ongoing to restore features and document
the development process. For the moment, the application relies on
starting two web servers:
A standard django test server with no difficult to install
A visualization server running vtkWeb. This server requires
a UV-CDAT installation with vtkWeb enabled. You can check if
vktWeb is enabled by sourcing your
running the following:
python -c "import vtk.web"
If that gives you an import error, then you need to rebuild VTK
or enable the ParaView option for UV-CDAT. It is also possible
to compile without ParaView but to enable vtkWeb support. For
now this requires patching the UV-CDAT source.
Installing the django components is relatively simple. It is recommended
you aren't in your UV-CDAT environment for this section. It is also
recommended that you run inside a
pip install virtualenv virtualenv django source django/bin/activate
You can leave the virtual environment at any time by running
To install the dependencies, just run:
pip install -r requirements.txt -r requirements-dev.txt
Now install the application into your virtualenv, create the database, and start up
python setup.py develop manage.py syncdb --noinput manage.py runserver
The front end is now browseable at http://localhost:8000/.
Refer to one of the items below for starting up the visualization server.
Once the server is running, browse to
In case of trouble, see the server logs in
tmp/logs. By default, CDATWeb is
configured to use a development visualization server at LLNL. In order to use
a local visualization server, you will need to modify your django configuration
cdatweb/settings/development.py. The value of
should be set to your launcher service endpoint. By default this is
VISUALIZATION_LAUNCHER = 'http://localhost:7000/vtk'
Running vtkWeb from a docker image (Mac OS or Linux ony)
You first must have Docker installed. See the
installation guide for more information. On OSX, the setup here assumes you have
PATHand that you have a docker machine named
docker(see the docker setup instructions below).
First, get the latest docker image from dockerhub by running
docker pull uvcdat/cdatweb-vtkweb
Now go to the
vis_serverdirectory and install the requirements
for the vtkweb launcher
pip install -r requirements.txt
You should now be able to run the launcher
python launcher.py config-docker.json
This will serve the launcher at port 7000 on your machine.
At this point, you can start up the django server from a different terminal
window as described above. If everything is working correctly, you
should see a list of files when you browse to
Running a local vtkWeb instance
As noted above, you may be able use a prebuilt UV-CDAT, but if you run
into troubles, try to rebuild the latest version with the following
cmake -D -DCDAT_BUILD_WEB=ON /path/to/uvcdat. Make sure
you are not in your django virtual environment and source your
UV-CDAT setup script. Source uvcdat environment:
and make sure netcdf is built with DAP support by
nc-config --alland checking if
--has-dapis on. If that
is not the case you won't be able to open files from
If everything is setup correctly, you should be
able to run the following:
cd vis_server ./start.sh
Running vtkWeb on a remote machine
The procedure for serving vtkWeb from a remote machine (or a cluster) is
similar to running locally; however, you must edit the file
vis_server/config.json. The details of making this work are beyond
the scope of this document. See ParaViewWeb documentation
for more details.
Docker setup on OS X
On Mac OS, docker containers must run inside a light weight virtual machine.
There is a command line utility for managing instances of these VM's called
docker-machine. Docker-machine replaces
and earlier tool called boot2docker and supports provisioning on to VirtualBox,
VMWare, as well as many cloud providers. For local development, the following
command will provision a docker host in VirtualBox with the machine name of
docker-machine create docker
To use that host in you're current shell, you need to run
eval "$(docker-machine env docker)"
after which you can use docker as normal. For the
docker.py script in this repository,
it is assumed that the docker host is called "
Building a new docker container
If you make changes to the visualization server component, you will need to rebuild
the docker container. This can be done simply by going into the
and running the following command:
docker build -t uvcdat/cdatweb-vtkweb .