Lattice includes features like:
- Cluster scheduling
- HTTP load balancing
- Log aggregation
- Health management
Lattice does this by packaging a subset of the components found in the Cloud Foundry elastic runtime. The result is an open, single-tenant environment suitable for rapid application development. Applications developed using Lattice should migrate unchanged to full Cloud Foundry deployments.
- Download and install Virtual box
- Download and install Vagrant
- Download and install git
- git clone https://github.com/cloudfoundry-incubator/lattice.git
- cd lattice
- vagrant up –provider virtualbox (run this command from lattice folder)
- This will take some time, when finished will show the message something like this.
192.168.11.11.xip.io. Note it for later usage.
Deploying a Containerized Spring Cloud app with Lattice
With Lattice set up, you will now install a Spring Cloud sample application into your lattice installation from Docker’s hub location.
- Point ltc at your Lattice setup by typing:
ltc target <lattice address>
LATTICE_CLI_TIMEOUT=180 ltc create spring-cloud-lattice-sample springcloud/spring-cloud-lattice-sample --memory-mb=0(0 means no memory limits. See http://lattice.cf/docs/ltc/ for more details.)
- Scale the app to three instances by typing
ltc scale spring-cloud-lattice-sample 3
- Visit http://spring-cloud-lattice-sample.192.168.11.11.xip.io?service=spring-cloud-lattice-sample and verify you can see the JSON service record. Refresh the browser multiple times notice how the uri attribute rotates.
- Visit http://spring-cloud-lattice-sample.192.168.11.11.xip.io/me and see a pared down record that also rotates the uri.
See http://lattice.cf/docs/ltc/ for more details about the various CLI commands you can run.