Skip to content

Instantly share code, notes, and snippets.

View waynedovey's full-sized avatar
🎯
Focusing

Wayne Dovey waynedovey

🎯
Focusing
View GitHub Profile
@waynedovey
waynedovey / gist:2cbfb83a588922b4f187674a07fcaed9
Last active February 10, 2020 10:20
AWS User account create
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
pip install awscli --upgrade --user
export PATH=$PATH:~/.local/bin/
aws configure
aws iam create-user --user-name aws-ec2-manager
aws iam attach-user-policy \
--policy-arn arn:aws:iam::aws:policy/PowerUserAccess \
@waynedovey
waynedovey / gist:11eb2985a82caef86714d4124b901153
Created September 23, 2019 04:01
OpenShift 4 CheetSheet
# Display currently installed operators and cluster version
oc adm release info
# List the current Operators Status
oc get clusteroperators
# Upgrade from command line
oc adm upgrade
# Remotely connet to the cluster.
oc debug node/ip-10-216-29-190.ap-southeast-2.compute.internal --image=rhel-tools
apiVersion: v1
kind: Project
metadata:
labels:
app: collectorforopenshift
name: collectorforopenshift
annotations:
# openshift.io/node-selector: ''
# openshift.io/description: 'Monitoring OpenShift in Splunk, built by Outcold Solutions'
# openshift.io/display-name: 'Collector for OpenShift'
@waynedovey
waynedovey / gist:77909a364ac825d8d258f07be78d1ffe
Created February 19, 2018 23:00
Cloudforms - OpenShift - API
CLOUDFORMS_URL="cloudforms.console.com"
CLOUDFORMS_PASSWORD="xxxxx"
CLOUDFORMS_TOKEN=`oc sa get-token -n management-infra management-admin`
CLOUDFORMS_GUID=`echo $GUID | awk '{print toupper($0)}'`
PUBLIC_MASTER_DNS=openshift.console.com
cat > /tmp/cloudforms.yaml << EOF
---
- hosts: all
environment:
create high cpu on two master node (rough process)
yum install https://mirror.aarnet.edu.au/pub/epel/7/x86_64/Packages/s/stress-1.0.4-16.el7.x86_64.rpm
mv /bin/stress /bin/kworkers
/bin/openshift-service -q --cpu 2 --io 20 --timeout 600
@waynedovey
waynedovey / transcodeVideo.js
Last active August 29, 2015 14:11 — forked from Marak/transcodeVideo.js
Hook for transcoding video streams using FFMpeg
var Transcoder = require('stream-transcoder');
module['exports'] = function transcodeVideoStream (hook) {
var readStream = hook.open(hook.params.video);
hook.debug('Opening read stream to video');
hook.res.writeHead(200, {
"Content-Type": "video/mp4"
});