Skip to content
/ tranor Public

Standalone client which adds the "environment" concept (eg. dev, QA, prod) to Tsuru PaaS

License

Notifications You must be signed in to change notification settings

ef-ctx/tranor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tranor

Build Status codecov Go Report Card

Plugin which adds the "environment" concept (eg. dev, QA, prod) to Tsuru PaaS.

Using

In order to use tranor, one needs to install and configure it. Assuming that Go is installed and configured, the two commands below should get tranor up and running:

% go get github.com/ef-ctx/tranor
% tranor target-set <remote-tranor-config-server>

The config server is an HTTP endpoint that contains the Tsuru target server, the Docker registry used by the tsuru setup and the list of environment names and DNS suffixes, in the following format:

{
	"target": "http://tsuru.example.com",
	"registry": "docker-registry.example.com",
	"envs": [
		{
			"name": "dev",
			"dnsSuffix": "dev.example.com"
		},
		{
			"name": "stage",
			"dnsSuffix": "stage.example.com"
		},
		{
			"name": "prod",
			"dnsSuffix": "example.com"
		}
	]
}

For more details and some terminal session examples, check the usage.md page.

Contributing and running tests

Contributions are welcome! In order to run tests locally, you need to be have Go 1.7+ and run:

% go test

You can run integration tests against a real tsuru server. The test suite assumes that the platform python is available, as well as the pools dev\dev.example.com, qa\qa.example.com, stage\stage.example.com and prod\example.com, the plan medium and the team myteam. Having all requirements satisfied, one can run:

% TSURU_TEST_HOST=<tsuru-server> TSURU_TEST_TOKEN=<token-value> make integration

You can get the value of TSURU_TEST_HOST with the command tsuru target-list and the value of TSURU_TEST_TOKEN with the command tsuru token-show.

You can also enable coverage report with the -cover flag:

% go test -cover

It's possible to get a nicer report in the browser by using the cover tool:

% go test -coverprofile cover.out
% go tool cover -html cover.out

We also have a script to check code formatting and lint the code:

% ./check-fmt.sh

About

Standalone client which adds the "environment" concept (eg. dev, QA, prod) to Tsuru PaaS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •