Skip to content

Instantly share code, notes, and snippets.

View shinji62's full-sized avatar

Etourneau Gwenn shinji62

View GitHub Profile
panic: runtime error: index out of range
goroutine 35 [running]:
runtime.panic(0xc1a800, 0x14a9bbc)
/.gvm/gos/go1.3.1/src/pkg/runtime/panic.c:279 +0xf5
github.com/influxdb/influxdb/api/collectd.(*Server).getAuth(0xc208000150)
/gocodez/src/github.com/influxdb/influxdb/api/collectd/api.go:46 +0x88
github.com/influxdb/influxdb/api/collectd.(*Server).ListenAndServe(0xc208000150)
/gocodez/src/github.com/influxdb/influxdb/api/collectd/api.go:52 +0x44
created by github.com/influxdb/influxdb/server.(*Server).ListenAndServe
/gocodez/src/github.com/influxdb/influxdb/server/server.go:175 +0x1270
# Welcome to the InfluxDB configuration file.
# hostname = ""
bind-address = "0.0.0.0"
reporting-disabled = false
[logging]
# logging level can be one of "debug", "info", "warn" or "error"
level = "debug"
file = "/var/vcap/sys/log/influxdb/influxdb.log" # stdout to log to standard out, or syslog facility
- name: httpd-mod_access_compat
version: 2.4.12
uri: https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/lucid/httpd/2.4.12/httpd-mod_access_compat-2.4.12.tar.gz
cf_stacks:
- lucid64
md5: c95eef665bb80fad52c67e564a8626e3
- name: http-mod_mymodule
version: 2.4.12
uri: https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/http-mod_mymodule-2.4.12.tar.gz
cf_stacks:
@shinji62
shinji62 / lattice-jenkins.sh
Last active April 28, 2016 17:18
Blue Green deployment with lattice
#!/bin/bash
#let say you application name is todo-apps-ge-
ltc target 192.168.11.11.xip.io
TAG_VERSION=$VERSION_TODO_APP
DEPLOYED_VERSION_CMD=$(ltc li | grep 'todo-apps-ge-' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | awk '{print $1}')
DEPLOYED_VERSION="$DEPLOYED_VERSION_CMD"
ROUTE_VERSION=$(echo "${VERSION_TODO_APP}" | cut -d"." -f1-3 | tr '.' '-')
VERSION_TODO_APP=$ROUTE_VERSION
ogs/production.log <==
Started GET "/api/installation_asset_collection" for 127.0.0.1 at 2015-09-11 12:35:07 +0000
Processing by Api::InstallationAssetCollectionController#show as HTML
Exception caught via rescue_from (code 500):
(See app/controllers/application_controller.rb)
No such file or directory - getcwd
/home/tempest-web/tempest/gems/zip_file_creator/lib/zip_file_creator.rb:24:in `chdir'
/home/tempest-web/tempest/gems/zip_file_creator/lib/zip_file_creator.rb:24:in `create'
/home/tempest-web/tempest/web/app/models/tempest/export.rb:25:in `export'
/home/tempest-web/tempest/web/app/controllers/api/installation_asset_collection_controller.rb:6:in `show'
@shinji62
shinji62 / sh
Created February 2, 2016 05:33
Fix MySQL Changing service plan definition issue
#!bin/bash
# Need CF and admin user
# Need to install jq (sudo apt-get install jq)
# First we need to get the plan id / MYSQL
# cf curl v2/service_plans | jq '.resources[] | (.metadata.guid ) + " " + (.entity | ( .name + " " + .description) ) '
PLAN_GUID=9209a2c0-e7d7-499d-b2fd-e8c886a80dcf
Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.gtid_slave_pos OK
mysql.help_category OK
@shinji62
shinji62 / deploy.sh
Created February 11, 2016 09:44
Simple deployment script java App
cf login -a https://api.$CF_SYSTEM_DOMAIN -u $CF_USER -p $CF_USER_PASS -o $CF_ORG -s $CF_SPACE --skip-ssl-validation
VERSION_TODO_APP=$VERSION_TEST
CF_APPS_DOMAIN=$CF_SYSTEM_DOMAIN
DEPLOYED_VERSION_CMD=$(CF_COLOR=false cf apps | grep "${FINAL_ROUTE_SUBDOMAIN}.${CF_APP_DOMAIN}" | grep started | awk '{print $1}')
DEPLOYED_VERSION=$(echo "${DEPLOYED_VERSION_CMD}")
ROUTE_VERSION=$(echo "${VERSION_TODO_APP}" | cut -d"." -f1-3 | tr '.' '-')
echo "Deployed Version: $DEPLOYED_VERSION"
echo "Route Version: $ROUTE_VERSION"
@shinji62
shinji62 / gist:b38080b07ccfd190c9af
Last active March 14, 2016 07:47
start-stop.sh
#!/bin/bash
# Set for 1.5.x Jobs
export BUNDLE_GEMFILE=/home/tempest-web/tempest/web/bosh.Gemfile
if [ "$1" == "shut" ] || [ "$1" == "start" ];
then
echo "Running PCF $1 Process..."
else
echo "Only shut or start are valid args!"
exit 1
###
For PCFDEV due to the self signed certificate I have to use http
I used the docker image
Of course you need to register the concourse client inside the UAA
For the space you need to use the space uuid (cf space yourcpase --guid)
## For Main team (ATC) settings
CONCOURSE_UAA_AUTH_CLIENT_ID: "concourse"
CONCOURSE_UAA_AUTH_CLIENT_SECRET: "concourse-secret"