Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
benchmark pin cloudbuild bazel image to a pinned version by digest (0.18.0) Dec 11, 2018
cached fix node caching Dec 13, 2018
common cut FTL 0.14.0 release Jan 16, 2019
integration_tests Merge pull request #755 from aaron-prindle/invalid-package-json Jan 16, 2019
node Merge pull request #754 from aaron-prindle/fix-php-flags Jan 16, 2019
php fix flags for gcp-build scripts using php Jan 16, 2019
python add --venv command option to FTL Nov 16, 2018
BUILD
CHANGELOG.md Update Changelog.md with FTL 0.14.0 changes Jan 16, 2019
README.md cut FTL 0.14.0 release Jan 16, 2019
__init__.py
cache_cloudbuild.yaml implement global cache runner (#578) Apr 18, 2018
config.json Add the GCR cred helper and basic config to the Node.js FTL builder. (#… Oct 31, 2017
ftl_node_release.yaml
ftl_php_release.yaml pin cloudbuild bazel image to a pinned version by digest (0.18.0) Dec 11, 2018
ftl_python_release.yaml pin cloudbuild bazel image to a pinned version by digest (0.18.0) Dec 11, 2018
ftl_release.yaml
requirements.txt implement global cache runner (#578) Apr 18, 2018

README.md

FTL

"FTL" stands for "faster than light", and represents a strategy for constructing container images quickly.

In this context, the "speed of light" is considered to be the time taken to do a standard "docker build" followed by a "docker push" to a registry.

By constructing the container image layers cleverly and reproducibly, we can use the registry as a cache and speed up the build/push steps of many common language package managers.

This repository currently contains Cloud Build steps and binaries for Node.js, Python and PHP languages and package managers.

Usage

The typical usage of an FTL binary is:

$ ftl.par --directory=$dir --base=$base --image=$img

This command can be read as "Build the source code in directory $dir into an image named $img, based on the image $base.

These binaries do not depend on Docker, and construct images directly in the registry.

As an example, we will demonstrate using the Node FTL builder to create a container for a node application from a node app's source code: Assume we are deploying the node source for the app https://github.com/JustinBeckwith/cloudcats. First download the node ftl.par file from https://storage.googleapis.com/gcp-container-tools/ftl/node/latest/ftl.par. Then we run the ftl.par file pointing to our application:

$ ftl.par --directory=$HOME/cloudcats/web --base=gcr.io/google-appengine/nodejs:latest --image=gcr.i
o/my-project/cloudcats-node-app:latest

Releases

Currently FTL is released in .par format for each supported runtime. The latest release is v0.14.0, changelog here

node

v0.14.0

HEAD

Specific version (based on git $COMMIT_SHA) https://storage.googleapis.com/gcp-container-tools/ftl/node/$COMMIT_SHA/ftl.par

python

v0.14.0

HEAD

Specific version (based on git $COMMIT_SHA) https://storage.googleapis.com/gcp-container-tools/ftl/python/$COMMIT_SHA/ftl.par

php

v0.14.0

HEAD

Specific version (based on git $COMMIT_SHA) https://storage.googleapis.com/gcp-container-tools/ftl/php/$COMMIT_SHA/ftl.par

Building and Running

FTL is built using bazel so bazel must be installed. NOTE: FTL requires a bazel version of 0.19.1 due to syntax changes in later versions. To build artifacts with FTL, use bazel build and then one of the bazel rules specified in a BUILD file. The most common rules are //ftl:node_builder, //ftl:python_builder, and //ftl:python_builder. To run FTL locally, bazel run can be used, passing flag args to the command. An example is below:

bazel run //ftl:python_builder -- \
  --base=gcr.io/google-appengine/python:latest \
  --name=gcr.io/aprindle-vm/python-ftl-v50:latest \
  --directory=$(pwd)/ftl/python/testdata/packages_test  \
  --virtualenv-dir=$HOME/env \
  --verbosity=INFO

FTL also supports a --tar_base_image_path=$TARGET_PATH flag if users do not which to upload to a registry

Developing - Integration Tests

To run the FTL integration tests, run the following command locally from the root directory:

python ftl/ftl_<RUNTIME={node,php,python}>_integration_tests_yaml.py | gcloud builds submit --config /dev/fd/0 .

FTL Runtime Design Documents

php

python