Skip to content

Instantly share code, notes, and snippets.

View psturc's full-sized avatar
🎸

Pavel Sturc psturc

🎸
  • Red Hat
  • Brno, Czech Republic
  • 08:34 (UTC +02:00)
View GitHub Profile
@psturc
psturc / aerogear-app-metrics.yml
Created March 5, 2018 08:40
OpenShift template for deployment of app-metrics connected to postgresql
---
# PV configuration commented out (see below)
apiVersion: v1
kind: Template
metadata:
name: test
objects:
- apiVersion: v1
kind: Service
@psturc
psturc / gist:355aba33949e54487d604732e93685b2
Created February 28, 2018 09:06
metrics api - make_build error
psturc@Pavels-MacBook-Pro ~/gocode/src/github.com/aerogear/aerogear-metrics-api [9:56:06]
> $make build_linux ⬡ 6.11.3 [±db-fix ✓]
dep ensure
env GOOS=linux GOARCH=amd64 go build -o ./dist/linux_amd64/aerogear-app-metrics ./cmd/metrics-api/metrics-api.go
# command-line-arguments
cmd/metrics-api/metrics-api.go:19:26: not enough arguments in call to dbHandler.Connect
cmd/metrics-api/metrics-api.go:19:33: config.DBConnectionString undefined (type map[string]string has no field or method DBConnectionString)
cmd/metrics-api/metrics-api.go:19:60: config.DBMaxConnections undefined (type map[string]string has no field or method DBMaxConnections)
cmd/metrics-api/metrics-api.go:45:68: config.ListenAddress undefined (type map[string]string has no field or method ListenAddress)
cmd/metrics-api/metrics-api.go:
@psturc
psturc / clean_pvs.sh
Last active May 4, 2018 11:50
Recreate PVs on NFS server
#!/bin/bash
# Login as admin user
oc login -u admin -p <password> > /dev/null
# List all Released pv names
for pv in `oc get pv | grep Released | awk '{print $1}'` ;
do
# Delete content of PV folders on NFS server
ssh 172.16.72.57 "echo ${pv} ; sudo rm -rf /exports/${pv}/*"
# Delete PV object
@psturc
psturc / build.sh
Last active July 2, 2016 10:38
fh-npm & s2i building script for Travis CI
#!/bin/bash
# Find out Node version => choose appropriate docker build-image
nodev=`node -v`
if [[ $nodev == "v4"* ]]
then
buildimage="registry.access.redhat.com/rhscl/nodejs-4-rhel7"
else
buildimage="registry.access.redhat.com/openshift3/nodejs-010-rhel7"
fi