forked from KxSystems/jupyterq
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis docker build and updated docs
- Loading branch information
Showing
3 changed files
with
40 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,42 @@ | ||
This project builds the Docker image. | ||
The instructions below are for building your own Docker image. A prebuilt Docker image is available on Docker Cloud, if you only want to run the jupyterq image then install Docker and [read the instructions on the main page](../README.md#docker) on how to do this. | ||
|
||
## Related Links | ||
|
||
* [Docker](https://docker.com) | ||
* [`Dockerfile`](https://docs.docker.com/engine/reference/builder/) | ||
* [Automated Builds](https://docs.docker.com/docker-cloud/builds/automated-build/) | ||
* [Advanced options for Autobuild and Autotest](https://docs.docker.com/docker-cloud/builds/advanced/) | ||
|
||
# Preflight | ||
## Preflight | ||
|
||
You will need [Docker installed](https://www.docker.com/community-edition) on your workstation; make sure it is a recent version. | ||
|
||
Check out a copy of the project with: | ||
|
||
git clone https://github.com/KxSystems/jupyterq.git | ||
|
||
# Deploy | ||
## Building | ||
|
||
[Docker Cloud](https://cloud.docker.com/) is configured to monitor when tags of the format `/^[0-9.]+/` are added to the [GitHub hosted project](https://github.com/KxSystems/jupyterq), a corresponding Docker image file is generated and made available. | ||
To build the project locally you run: | ||
|
||
This is all done server side as the resulting image is north of 2.5GB and uploading that sort of thing is likely to prompt the network team to Release the Kraken! | ||
docker build -t jupyterq -f docker/Dockerfile . | ||
|
||
To do a deploy, you simply tag and push your releases as usual: | ||
Once built, you should have a local `jupyterq` image, you can run the following to use it: | ||
|
||
git push | ||
git tag 0.7 | ||
git push --tag | ||
docker run -it jupyterq | ||
|
||
## First Time Configuration | ||
|
||
1. Log into [Docker Cloud](https://cloud.docker.com/) | ||
1. Create the new repository called `jupyterq` | ||
1. Go to the 'Builds' tab | ||
1. Set the 'Source Repository' to the GitHub account 'KxSystems' and project `jupyterq` | ||
1. Set the 'Build Rules' to: | ||
* **Source Type:** Tag | ||
* **Source:** `/^[0-9.]+/` | ||
* **Docker Tag:** `{sourceref}` | ||
* **Dockerfile location:** `docker/Dockerfile` | ||
* **Build Context:** `/` | ||
* **Autobuild:** enabled | ||
* **Build Caching:** disabled (Docker Cloud is *really* buggy, `nocache=1` as a build env may help) | ||
1. Click on the 'Save' button | ||
**N.B.** if you wish to use an alternative source for [embedPy](https://github.com/KxSystems/embedPy) then you can append `--build-arg embedpy_img=embedpy` to your argument list. | ||
|
||
If you prefer to not have Docker Cloud build on every tag push, you can alternatively: | ||
Other build arguments are supported and you should browse the `Dockerfile` to see what they are. | ||
|
||
1. Under 'Build Rules' disable 'Autobuild' | ||
1. Click on 'Save' | ||
1. At the bottom of the configuration page under 'Build triggers', create a URL that you can use to fire off a build | ||
# Deploy | ||
|
||
You should now be able to call `curl` on the supplied URL to trigger the build, sparing you from having to log in to click a button. | ||
[travisCI](https://travis-ci.org/) is configured to monitor when tags of the format `/^[0-9]+\./` are added to the [GitHub hosted project](https://github.com/KxSystems/jupyterq), a corresponding Docker image is generated and made available on [Docker Cloud](https://cloud.docker.com/) | ||
|
||
# Build | ||
This is all done server side as the resulting image is large. | ||
|
||
To build locally the project you run: | ||
To do a deploy, you simply tag and push your releases as usual: | ||
|
||
docker build -t jupyterq -f docker/Dockerfile . | ||
git push | ||
git tag 0.7 | ||
git push --tag | ||
|
||
**N.B.** if you wish to use an alternative source for [embedPy](https://github.com/KxSystems/embedPy) then you can append `--build-arg embedpy_img=embedpy` to your argument list. | ||
|
||
Other build arguments are supported and you should browse the `Dockerfile` to see what they are, but note for Docker Cloud you will need to make sure they are also explicitly exported in [`docker/hooks/build`](hooks/build) too. | ||
## Related Links | ||
|
||
* [Docker](https://docker.com) | ||
* [`Dockerfile`](https://docs.docker.com/engine/reference/builder/) |