This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import json | |
import os | |
import urllib2 | |
def get_envs(app_name): | |
resp = request("/apps/{}/env".format(app_name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
echo "hello world!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ImportPath": "github.com/fsouza/go-dockerclient", | |
"GoVersion": "go1.4.1", | |
"Deps": [ | |
{ | |
"ImportPath": "github.com/Sirupsen/logrus", | |
"Comment": "v0.6.0", | |
"Rev": "6ebb4e7b3c24b9fef150d7693e728cb1ebadf1f5" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ImportPath": "github.com/fsouza/go-dockerclient", | |
"GoVersion": "devel +7579867 Fri Apr 24 05:45:36 2015 +0000", | |
"Deps": [ | |
{ | |
"ImportPath": "github.com/Sirupsen/logrus", | |
"Comment": "v0.6.0", | |
"Rev": "6ebb4e7b3c24b9fef150d7693e728cb1ebadf1f5", | |
"ws": "/Users/f", | |
"root": "github.com/Sirupsen/logrus", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/fsouza/go-dockerclient" | |
) | |
func main() { | |
endpoint := "http://192.168.50.4:2375" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql_host = get_env("MYSQL_HOST") | |
if not mysql_host: | |
mysql_host = "localhost" | |
mysql_port = get_env("MYSQL_PORT") | |
if not mysql_port: | |
mysql_port = 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% mongo --quiet -u my_user -p my_password my_host:27017/tsuru --eval 'db.docker_containers.findOne({id: "<container-id>"}).privatekey' > key_file.pem | |
% chmod 400 key_file.pem | |
% ssh localhost -p <container-port> -i key_file.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote: Reading package lists... | |
remote: Building dependency tree... | |
remote: Reading state information... | |
remote: The following NEW packages will be installed: | |
remote: libevent-core-2.0-5 libevent-extra-2.0-5 libevent-openssl-2.0-5 | |
remote: libevent-pthreads-2.0-5 | |
remote: 0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded. | |
remote: Need to get 154 kB of archives. | |
remote: After this operation, 488 kB of additional disk space will be used. | |
remote: Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libevent-core-2.0-5 amd64 2.0.21-stable-1ubuntu1 [77.9 kB] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote: ; Loading "cl-async" | |
remote: [package babel-encodings]......................... | |
remote: [package babel]................................... | |
remote: .................................................. | |
remote: [package cffi-sys]................................ | |
remote: [package cffi].................................... | |
remote: .................................................. | |
remote: [package cffi-features]........................... | |
remote: [package libevent2]............................... | |
remote: [package libevent2.accessors]..................... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -L https://raw.githubusercontent.com/tsuru/now/master/run.bash -o tsuru-now.bash | |
$ chmod +x tsuru-now.bash | |
$ ./tsuru-now.bash --tsuru-pkg --without-dashboard |