CDrive apps are web applications running inside a docker container. Apps can expose a GUI or a REST API or both. Ideally apps should expose both so that users can run the apps through the browser or any of CDrive's programmatic interfaces.
- Create a docker image of the app on your local machine
- The image should expose the GUI and/or REST API on port 8000 of the container
- GUI should be on the path /app/<user_name>/<app_name>/
- REST API should be on the path /app/<user_name>/<app_name>/api/
- The app should use the Oauth service provided by CDrive to authenticate users.
- Apps can use Kubernetes REST API to create their own resources on the Kubernetes cluster for different purposes such as scaling up execution
- Once you have built the app on your local machine, you can follow the steps in the next section to push it to a private or public image registry.
Once an app has been built, it can be pushed to a public image registry such as Docker Hub or Google Container Registry or it can be pushed to a private registry. CDrive deployment instructions contains optional steps for deploying a private image registry on CDrive.
Let's say you created an app image named my-cdrive-app on your local machine with the following command:
docker build -t my-cdrive-app:1.0 .You can now push it to a registry of your choice as detailed below.
Login to docker hub
docker loginand then enter username and password when prompted
Tag your image
docker tag my-cdrive-app:1.0 <docker_username>/my-cdrive-app:1.0Push image to Docker Hub
docker push <docker_username>/my-cdrive-app:1.0Follow the instructions on CDrive installation page to deploy a private registry.The private registry will be located at registry.<CDRIVE_URL>
Login to the registry
docker login <REGISTRY_URL>and then enter username and password when prompted
Tag your image
docker tag my-cdrive-app:1.0 <REGISTRY_URL>/<registry_username>/my-cdrive-app:1.0Push image to registry
docker push <REGISTRY_URL>/<registry_username>/my-cdrive-app:1.0Once your app has been pushed to an image registry, you can follow the instructions in the user guide to download and deploy it on your Columbus deployment.