ks pkg install

Install a package (e.g. extra prototypes) for the current ksonnet app

Synopsis

The install command caches a ksonnet package locally, and makes it available
for use in the current ksonnet application. Enough info and metadata is recorded in
app.yaml that new users can retrieve the dependency after a fresh clone of this app.

The package itself needs to be located in a registry (e.g. Github repo). By default,
ksonnet knows about two registries: incubator and stable, which are the release
channels for official ksonnet packages.

  • ks pkg list — List all packages known (downloaded or not) for the current ksonnet app
  • ks prototype list — List all locally available ksonnet prototypes
  • ks registry describe — Describe a ksonnet registry and the packages it contains

Syntax

  1. ks pkg install <registry>/<package>@<version> [flags]

Examples

  1. # Install an nginx dependency, based on the tip defined by the registry URI.
  2. # In a ksonnet source file, this can be referenced as:
  3. # local nginx = import "incubator/nginx/nginx.libsonnet";
  4. ks pkg install incubator/nginx
  5. # Install an nginx dependency, based on the 'master' branch.
  6. # In a ksonnet source file, this can be referenced as:
  7. # local nginx = import "incubator/nginx/nginx.libsonnet";
  8. ks pkg install incubator/nginx@master
  9. # Install a specific nginx version into the stage environment.
  10. # In a ksonnet source file, this can be referenced as:
  11. # local nginx = import "incubator/nginx/nginx.libsonnet";
  12. ks pkg install --env stage incubator/nginx@40285d8a14f1ac5787e405e1023cf0c07f6aa28c

Options

  1. --env string Environment to install package into (optional)
  2. --force Force installation
  3. -h, --help help for install
  4. --name string Name to give the dependency, to use within the ksonnet app

Options inherited from parent commands

  1. --dir string Ksonnet application root to use; Defaults to CWD
  2. --tls-skip-verify Skip verification of TLS server certificates
  3. -v, --verbose count Increase verbosity. May be given multiple times.

SEE ALSO

  • ks pkg - Manage packages and dependencies for the current ksonnet application