This tutorial details workflows for developing applications within Labs Workbench.
Please be advised that Labs Workbench is still in beta, and should not be used to house critical or sensitive data.
See Appectable Use Policy for more details.
Start learning Docker with our Docker 101 tutorial.
If you don't already have an account, and wish to push your own custom images as a part of this tutorial, please register for an account on Docker Hub.
We offer several developer environments that allow you to build, tag, and push your own Docker images:
- Docker Web Terminal
- Cloud9 IDE with Docker support
Start up one of these environments to gain access to a Docker-enabled terminal.
We will start with a very simple example: cowsay-php.
In this example you will:
- Learn the basics of using Docker
- Using a Docker-enabled environment, build and push an image that can be consumed by Labs Workbench
- Run any image from Docker Hub using Labs Workbench (using the Add/Edit Spec view)
See a video of this feature in action!
The first thing you will need is a docker image. You can find plenty of images on Docker Hub, but we've provided the most simple of examples to illustrate the process of building an image from a Dockerfile.
You can build the cowsay-php image yourself from source by executing the following command:
docker build -t cowsay-php .Once the build is complete, running docker images should show your newly built image:
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
cowsay-php latest bf5dbf5675ef 46 hours ago 534.9 MBIf you have created a Docker Hub account, you can push this image to Docker Hub.
Login to your Docker Hub account:
docker loginWARNING: Your credentials will be stored in this environment, but only you will be able to access them.
Tag the image with a memorable name and push it:
docker tag cowsay-php USERNAME/cowsay-php
docker push USERNAME/cowsay-phpAny image that has been pushed to Docker Hub can then be pulled and run by Labs Workbench.
Now that we have a Docker image for our service, we need to tell Labs Workbench how to run this image by creating a JSON spec for it.
Luckily, the UI provides an easy way to create and edit these specs.
Now that we have our cowsay spec loaded, let's try to create an instance of it in Labs Workbench!
- Import the above JSON spec into your personal catalog
- You should now see "Cowsay" listed with the other services.
- Click the Add button beneath cowsay in the catalog
- Click the View button to navigate to your dashboard of added appliations.
- Expand the Cowsay accordion header to see a more fine-grained status.
- Click the "Launch" button at the bottom-right of the accordion pane.
- Wait for the application to start.
- NOTE: this may take several minutes the first time, as Docker will pull the image before running it.
- Once the application has started, navigate to its endpoint by click the link to the right of the service name.
- A new tab will open, where you will be able to admire your cow in all its majesty.
See a video of this feature in action!
For many projects, setting up a developer environment to build and test the source of a particular application can often be more tedious and error-prone than installing the software itself.
Labs Workbench seeks to mitigate this problem by providing developer environments that come preloaded with all of the necessary dependencies.
For example:
- The pyClowder flavor of the pyCharm IDE that allows users to quickly get started writing their own extractors for Clowder
- The Cloud9 Java IDE with its built-in Maven support allows you to modify and build Dataverse with relative ease
- The Cloud9 Python IDE can be used to easily make modification to the backend api of the NDS Analysis Toolbox
- The Cloud9 Node.js IDE can be used to quickly start developing any Node.js application, such as the frontend portions of Labs Workbench or the NDS Analysis Toolbox
- The Cloud9 Go IDE can be used to develop the Labs Workbench API server itself
- With novnc / xpra Docker base images, adding your favorite graphical desktop applications is a snap!
See a video of this feature in action!
If you'd rather use your desktop IDE than develop in the cloud, we offer a service called HTTP Tunnel (based on Chisel).
- Start the Chisel application in Labs Workbench
- Download and install the Chisel client
- Use the client to connect to your running Chisel application in Workbench
A secure tunnel will be established to the private subnet used by Labs Workbench.
This will allow you to develop locally against remotely running instances of MySQL, MongoDB, PostgreSQL, RabbitMQ or any other Docker-ized service - without exposing them to the public internet!
See a video of this feature in action!