Lattice - GunSik2/experiments GitHub Wiki

  1. Spin up a virtual environment
wget https://github.com/cloudfoundry-incubator/lattice-release/releases/download/v0.7.0/lattice-bundle-v0.7.0.zip
unzip lattice-bundle-v0.7.0.zip
cd lattice-bundle-v0.7.0/vagrant
vagrant up --provider virtualbox
  1. Download compatible ltc
curl -O http://receptor.local.lattice.cf/v1/sync/linux/ltc
chmod +x ltc
(Windows 의 경우 http://receptor.local.lattice.cf/v1/sync/windows/ltc.exe 에서 다운로드)
  1. Use the Lattice CLI to target Lattice
./ltc target local.lattice.cf
  1. Lauching and Routing to a Container
ltc create lattice-app cloudfoundry/lattice-app
ltc logs lattice-app # Tailing logs
ltc list  #Listing Apps
ltc scale lattice-app 3 # Scaling apps
ltc status lattice-app # Getting app details
ltc visualize # Visualizing containers
ltc remove lattice-app # Delte apps
  1. Launching Docker image
  • Redis
ltc create redis redis --timeout=5m --memory-mb=256 --tcp-route=6379 --monitor-command="redis-cli --scan"
redis-cli -h 192.168.11.11
  • MySQL
ltc create mysql mysql --memory-mb 512 --env MYSQL_ROOT_PASSWORD=somesecret --tcp-route 3306:3306
mysql -h"192.168.11.11" -p"somesecret" -u"root"
ltc ssh mysql
  • Mongo
ltc create mongo mongo --user=root --memory-mb 256 --env LC_ALL=C --ports 27017 --tcp-route 27017:27017 -- /entrypoint.sh --smallfiles
mongo 192.168.11.11:27017