cli/

directory
v0.0.0-...-a94d4d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2022 License: BSD-2-Clause

README

Build Status

Lattice CLI (ltc)

ltc provides an easy-to-use command line interface for Lattice

With ltc you can:

  • target a Lattice deployment
  • start, scale, stop and remove Dockerimage-based applications
  • tail logs for your running applications
  • list all running applications and visualize their distributions across the Lattice cluster
  • fetch detail status information for a running application

##Setup:

Download the appropriate binary for your architecture:

MacOS | amd64 | https://lattice.s3.amazonaws.com/latest/darwin-amd64/ltc Linux | amd64 | https://lattice.s3.amazonaws.com/latest/linux-amd64/ltc

Here's a simple installation script. It assumes $HOME/bin is on your $PATH

Mac:

  mkdir -p $HOME/bin
  pushd $HOME/bin
  wget https://lattice.s3.amazonaws.com/latest/darwin-amd64/ltc
  chmod +x ./ltc
  popd

Linux:

  mkdir -p $HOME/bin
  pushd $HOME/bin
  wget https://lattice.s3.amazonaws.com/latest/linux-amd64/ltc
  chmod +x ./ltc
  popd
Installing From Source

You must have Go 1.4+ installed and set up correctly.

go get github.com/pivotal-cf-experimental/lattice-cli/ltc

Usage:

ltc includes a number of subcommands. To learn about them:

ltc help
ltc help SUBCOMMAND

Here are a few key subcommands.

Target a Lattice cluster:
ltc target LATTICE_TARGET

When running Lattice locally with Vagrant the default LATTICE_TARGET is 192.168.11.11.xip.io When deployed to a cloud provider using Terraform you can inspect the resulting tfstate file to fetch the LATTICE_TARGET

Start a docker-based app:
ltc start APP_NAME DOCKER_IMAGE

will start a Dockerimage-based application on Lattice.

We have a simple demo-application that you can play with:

ltc start lattice-app cloudfoundry/lattice-app

ltc help start documents a number of useful options for starting your application.

Tail an app's logs:
ltc logs APP_NAME

will start streaming logs emanating from all instances of APP_NAME

See what's running:
ltc list

Will print out a list of all running applications.

ltc status APP_NAME

Will print out detailed information about an application.

ltc visualize

Will print an ascii-art representation of the distribution of containers across the Lattice cluster.

Example Usage:
ltc target 192.168.11.11.xip.io
ltc start lattice-app cloudfoundry/lattice-app
ltc logs lattice-app

To view the app in a browser visit http://lattice-app.192.168.11.11.xip.io/

To scale up the app:

ltc scale lattice-app 5

Refresh the browser to see the requests routing to different Docker containers running lattice-app.

Directories

Path Synopsis
fake_app_examiner
This file was generated by counterfeiter
This file was generated by counterfeiter
app_runner
docker_app_runner/fake_app_runner
This file was generated by counterfeiter
This file was generated by counterfeiter
docker_metadata_fetcher/fake_docker_metadata_fetcher
This file was generated by counterfeiter
This file was generated by counterfeiter
docker_metadata_fetcher/fake_docker_session
This file was generated by counterfeiter
This file was generated by counterfeiter
target_verifier/fake_target_verifier
This file was generated by counterfeiter
This file was generated by counterfeiter
console_tailed_logs_outputter/fake_tailed_logs_outputter
This file was generated by counterfeiter
This file was generated by counterfeiter
ltc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL