Knotx stack builder
The Knot.x stack is Knot.x + Vert.x + common dependencies. That's the way you can obtain full instance of running Knot.x with all dependencies.
Structure of the stack is following
├── bin │ └── knotx // shell script used to resolve and run knotx instance ├── conf // contains application and logger configuration files │ ├── application.conf // defines all modules that Knot.x instance is running, provides configuration for Knot.x Core and global variables for other config files │ ├── bootstrap.json // config retriever options, defines application configuration stores (e.g. points to `application.conf` - the main configuration) │ ├── default-cluster.xml // basic configuration of Knot.x instance cluster │ ├── includes // additional modules configuration which are included in `application.conf` │ │ ├── actionKnot.conf │ │ ├── hbsKnot.conf │ │ ├── httpRepo.conf │ │ ├── server.conf │ │ ├── serviceAdapter.conf │ │ └── serviceKnot.conf │ └── logback.xml // logger configuration ├── knotx-stack.json // stack descriptor, defines instance libraries and dependencies ├── lib // contains instance libraries and dependencies, instance classpath │ ├── list of project dependency libraries │ ├── ...
mvn clean package to build your version of Knot.x stack or simply use one from the
latest release. Knot.x stack artifact is a ZIP file
with the structure described above. To start playing with Knot.x stack unzip the archive.
From the root stack folder, execute:
to run the instance.
To resolve all the dependencies defined in the
knotx-stack.json execute from the root stack folder:
Enable TRACE level logging on your logback.xml
<logger name="knotx-stack-resolver" level="TRACE"/>
Working with snapshots
To build docker images, you need docker 1.3+ and run
mvn clean install
It builds the 2 main images :
- knotx base - the base image provisionning the knotx appplication (
- knotx base alpine - the base image based on Java alpine image (
Examples of docker image usages are in https://github.com/Knotx/knotx-example-project/docker
Pushing Docker image to Docker Hub
The images can be pushed to Docker Hub. Before, be sure you are in the knotx organisation on docker hub (https://hub.docker.com/u/knotx/). Then, add your credentials into
<server> <id>docker-hub</id> <username>username</username> <password>password</password> </server>
Once done, in the
knotx-docker project just launch:
WARNING: This is going to take a while.....