This sample application demonstrates how to build an application that has split some of its code into a separate bundle. The extra bundle for this application is found in multiple-bundles-lib .
Refer to container components and the bundle plugin for more information.
Docker requirements same as in the quick-start.
Check-out, compile and run:
$ git clone https://github.com/vespa-engine/sample-apps.git $ VESPA_SAMPLE_APPS=`pwd`/sample-apps
Build the "library" bundle:
$ cd $VESPA_SAMPLE_APPS/multiple-bundles-lib && mvn clean install
Build the main bundle and start the docker container:
$ cd $VESPA_SAMPLE_APPS/multiple-bundles && mvn clean verify $ docker run --detach --name vespa --hostname vespa-container --privileged \ --volume $VESPA_SAMPLE_APPS:/vespa-sample-apps --publish 8080:8080 vespaengine/vespa
Wait for the configserver to start - wait for HTTP/1.1 200 OK:
$ docker exec vespa bash -c 'curl -s --head http://localhost:19071/ApplicationStatus'
Deploy the application:
$ docker exec vespa bash -c '/opt/vespa/bin/vespa-deploy prepare /vespa-sample-apps/multiple-bundles/target/application.zip && \ /opt/vespa/bin/vespa-deploy activate'
Wait for the application to start:
$ curl -s --head http://localhost:8080/ApplicationStatus
Test the application:
$ curl -s http://localhost:8080/search/
Sending multiple requests generates the Fibonacci number sequence in the 'message' field of the search result.
Shutdown and remove the container:
$ docker rm -f vespa