Harbor is a simple backend, written in Java, capable to launch k8s YAML definitions in a cluster deployment.
Of course we have a Javadoc! To generate one, clone the project and then run in a terminal:
mvn javadoc:javadocThis will generate a javadoc in ./target/site/apidocs.
To build it, first of all check to have kubernetes-client/java installed in your system. To install it, open a terminal and write:
git clone --recursive https://github.com/kubernetes-client/java && \
cd java && \
git checkout 8d6ab536f565ee951141b14bfd170629399d8c67 && \
mvn install -DskipTests && \
cd ..This will install the Java client necessary to Harbor to properly work. Next, compile Harbor as follows:
git clone https://github.com/Augugrumi/harbor.git && \
cd harbor && \
mvn packageThis will create a "jar with dependencies" in target/. You can launch
this with java -jar from the project root:
java -jar target/harbor-<version>-jar-with-dependencies.jar -f api_definition.json -p 57684There are different flags that can be used to customize Harbor behaviour:
-f: file pointing to an API definition (the default one will use the hello world API definition)-p: specify the port where Harbor will run (default to 80)-k: specify kubernetes api URL (default to localhost or, if it's running as a container in docker, to kubernetes environment variables)-h: specify Harbor home (default to.harbor/yaml)
There is also a docker image that you can use. Download it with:
docker pull augugrumi/harborAt this point, you can run it with:
docker run --rm -p57684:80 augugrumi/harborThere are environment variables, equal to the flags previously described, that allow you to customize Harbor behaviour. These are:
HARBOR_PORT: custom port in which harbor will runHARBOR_API_CONFIG: path to your API configuration jsonHARBOR_KUBERNETES_URL: url to your Kubernetes API endpointHARBOR_STORAGE_PATH: path to an empty folder where Harbor will create it's home for YAML storage
The Dockerfile in the project uses multi-stage docker builds. To build it, open a terminal and type:
docker build -t <your nickname>/harbor .This software is under GPLv3+ License