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
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" | |
}); |
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
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 |
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
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: |
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
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' |
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
# 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 |
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 -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 \ |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"cloudformation:CreateStack", | |
"cloudformation:DeleteStack", | |
"cloudformation:DescribeStackEvents", | |
"cloudformation:DescribeStacks", | |
"cloudformation:ListStackResources", | |
"ec2:CreateTags", |
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
# Feature Branch | |
git checkout --orphan fixit | |
git add -A | |
git commit -m "update" | |
git branch -D feature/bastion-create | |
git branch -m feature/bastion-create | |
git push -f origin feature/bastion-create | |
git gc --aggressive --prune=all | |
# Master Branch |
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
# Custom Node lables | |
https://access.redhat.com/solutions/4287111 | |
# VMware Volume permissions | |
https://access.redhat.com/solutions/4821601 | |
# Vmware Service account Permissons |
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 | |
if [ -z "$1" ]; then | |
echo "pass a namespace" && exit 1 | |
fi | |
APIURL=$(oc whoami --show-server) | |
NAMESPACE=${1} | |
oc get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >/tmp/$NAMESPACE.json | |
curl -k -H "Authorization: Bearer $(oc whoami -t)" -H "Content-Type: application/json" -X PUT --data-binary @/tmp/$NAMESPACE.json "$APIURL/api/v1/namespaces/$NAMESPACE/finalize" |
OlderNewer