Skip to content

Instantly share code, notes, and snippets.

@matiasinsaurralde
Last active February 24, 2017 05:44
Show Gist options
  • Save matiasinsaurralde/a7c03f29ee78a5ea25f04fc807b522e9 to your computer and use it in GitHub Desktop.
Save matiasinsaurralde/a7c03f29ee78a5ea25f04fc807b522e9 to your computer and use it in GitHub Desktop.
CF
App tyk-gateway was started using this command `$HOME/start.sh`
Showing health and status for app tyk-gateway in org matias-org / space tyk-deployment as [email protected]...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: tyk-gateway.cfapps.io
last uploaded: Fri Feb 24 05:37:27 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/matiasinsaurralde/tyk-buildpack
state since cpu memory disk details
#0 running 2017-02-24 06:39:12 AM 0.0% 10.1M of 1G 88.5M of 1G
% curl http://tyk-gateway.cfapps.io/tyk-api-test/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip",
"Host": "httpbin.org",
"User-Agent": "curl/7.43.0",
"X-B3-Spanid": "7cf40cfef27fedc5",
"X-B3-Traceid": "7cf40cfef27fedc5",
"X-Cf-Applicationid": "3e3abe3c-410b-42ea-8f20-c4736823df6a",
"X-Cf-Instanceid": "0088cb92-f739-46a4-4e54-4340180efe0f",
"X-Vcap-Request-Id": "fa424ae1-fbc2-41d2-7505-16590a8024da"
}
}
% curl http://tyk-gateway.cfapps.io/tyk-api-test/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip",
"Host": "httpbin.org",
"User-Agent": "curl/7.43.0",
"X-B3-Spanid": "11079b6fd2f3cf44",
"X-B3-Traceid": "11079b6fd2f3cf44",
"X-Cf-Applicationid": "3e3abe3c-410b-42ea-8f20-c4736823df6a",
"X-Cf-Instanceid": "0088cb92-f739-46a4-4e54-4340180efe0f",
"X-Vcap-Request-Id": "aa567eaa-2b40-44b0-521c-aa89a5eb306a"
}
}
$ ccf scale tyk-gateway -i 2
Scaling app tyk-gateway in org matias-org / space tyk-deployment as [email protected]...
OK
OK
% curl http://tyk-gateway.cfapps.io/tyk-api-test/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip",
"Host": "httpbin.org",
"User-Agent": "curl/7.43.0",
"X-B3-Spanid": "555e3a1148e66f4c",
"X-B3-Traceid": "555e3a1148e66f4c",
"X-Cf-Applicationid": "3e3abe3c-410b-42ea-8f20-c4736823df6a",
"X-Cf-Instanceid": "0088cb92-f739-46a4-4e54-4340180efe0f",
"X-Vcap-Request-Id": "8b85f7ab-8417-4f21-65f1-d2873df16cd9"
}
}
% curl http://tyk-gateway.cfapps.io/tyk-api-test/headers
{
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip",
"Host": "httpbin.org",
"User-Agent": "curl/7.43.0",
"X-B3-Spanid": "521d6da7174e10a4",
"X-B3-Traceid": "521d6da7174e10a4",
"X-Cf-Applicationid": "3e3abe3c-410b-42ea-8f20-c4736823df6a",
"X-Cf-Instanceid": "bf8fd0e3-3563-4fd1-7f2d-0b48cfe180da",
"X-Vcap-Request-Id": "772868b3-d9cc-4d30-44ed-ffa3e27e9d96"
}
}

Buildpack

$ git clone https://github.com/matiasinsaurralde/tyk-buildpack.git

$ cd tyk-buildpack

$ cf login -a https://api.run.pivotal.io

$ cf create-space tyk-deployment

$ cf target -o 'matias-org' -s 'tyk-deployment'

Tyk Gateway

$ cf push tyk-gateway -b https://github.com/matiasinsaurralde/tyk-buildpack

Redis

$ cf create-service rediscloud 30mb tyk-redis

$ cf bind-service tyk-gateway tyk-redis

$ cf restage tyk-gateway

Scaling

$ cf scale tyk-gateway -i 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment