copyenv

command module
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Cloud Foundry CLI Copy Env Plugin

Build Status

Cloud Foundry CLI plugin to export application VCAP_SERVICES and VCAP_APPLICATION onto the local machine.

Applications running on Cloud Foundry rely on the VCAP_SERVICES environment variable to provide service credentials. Application specific configuration environment is provided in VCAP_APPLICATION.

When running applications locally for development and testing, it's useful to have the same VCAP_SERVICES values available in the local environment to simulate running on the host platform.

This plugin will export the remote application environment variables, available using cf env, into a format that makes it simple to expose those same values locally. This plugin will only export VCAP_SERVICES by default. To include VCAP_APPLICATION as well use the --all option.

Install

$ go get github.com/jthomas/copyenv
$ cf install-plugin $GOPATH/bin/copyenv

or

$ make install-plugin

Usage

$ cf copyenv APP_NAME

export VCAP_SERVICES='...'

The plugin output needs to be evaluated in your shell to set up the local environment variables.

Using eval:

$ eval `cf copyenv APP_NAME` 

Using a temporary file:

$ cf copyenv APP_NAME > temp.json
$ source temp.json

You can obtain additional information with flags.

$ cf copyenv APP_NAME -all

export VCAP_SERVICES='...'
export VCAP_APPLICATION='...'

Uninstall

$ cf uninstall-plugin copyenv

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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