This file contains hidden or 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
# Launch the container from bd_mgmt and invoke the following through a bdconfig command. Two parameters NEW_SIZE and INSTANCE_NAME | |
# docker run -d --name test bluedata/centos6 | |
INSTANCE_NAME="test" | |
NEW_SIZE_GB="30" | |
NEW_SIZE=$(( $NEW_SIZE_GB*1024*1024*1024 )) | |
CONT_ID=$(docker inspect -f {{.Id}} $INSTANCE_NAME) |
This file contains hidden or 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
f(). | |
ClientCertFromKubeconfig = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJZkY0OFZJcTRFZmN3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TURBek1EVXhPREl6TVRGYUZ3MHlNVEF6TURVeE9ESXpNVFJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXVJL1c1eTA0NEZPUWlwSlEKclovSjBINW50VmhwbkQ5cUZNaWg0L3kyQVdKMDNBd3NmbU1HbE81d3RnZUNwSGRFZFdzQ05yWDE2N3Y3RUtWVApxUU1MWFBmN1Njd0Z4R1VNUVdaZUZHMTJjc2wzMmxkbEdMc1FtM24vSk5EM1NlZVU5N0Q2cHhMTHRQK2J3UE1wClZkRm8zZG1ER1MwUEtEd3RWY0prdVZNbU1jMFRaY3ovWmN0YUVySVpxUTZqZHdTZWM2NzQ1VDJiOG1nS0JkZ0kKRjhnS2pFQnVCNEFRbzd3OXRuQjhnWjczZUdZb203Q215MGJaYzRRQnBqUWk2V1YzL2tDeExHbW5hSVZDOFRoOQo3VldsTTFZaDB1WDdUbTlrVndwQnZOYVd6UXllTlU5K0RnZmVsRHUzTGdEY2xQM3NZYTB3WWNHci9xUXVDRjVmCkN1QkxoUUlEQVFBQm95Y3dKVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFDZVBNV0toUERZeTlJQ3ByY2ErblRITFU3MjY5Y0MwNWc3agp |
This file contains hidden or 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
NAMESPACE="hpecp-bootstrap" | |
PVC_NAME="hpecp-bootstrap-harbor" | |
# Fetch pv name | |
PV_NAME=$(kubectl -n $NAMESPACE get pvc/$PVC_NAME -o jsonpath={.spec.volumeName}) | |
# Fetch volume name | |
VOL_NAME=$(kubectl -n $NAMESPACE get pv/$PV_NAME -o jsonpath='{.spec.csi.volumeHandle}') | |
# From hcp controller, expand the volume |
This file contains hidden or 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
# With kube-flow istio setup, fsGroup is being modified by Istio to 1337, this causes issues with notebook connecting to | |
# pvcs | |
#! /bin/bash | |
NAMESPACE="$1" | |
NOTEBOOK="$2" | |
# This is default user and group id of kubeflow notebook container | |
JOVYAN_USER="1000" | |
USERS_GROUP="100" |
This file contains hidden or 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 | |
DEPLOYMENT_NAME="$1" | |
OP="$2" | |
if [ "$OP" == "stop" ] | |
then | |
EC2_OP="aws ec2 stop-instances --instance-ids" | |
else | |
EC2_OP="aws ec2 start-instances --instance-ids" | |
fi |
This file contains hidden or 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
NOT_RUNNING=$(kubectl get pods --no-headers -A | grep -v Running | awk '{printf "%s:%s\n", $1, $2}') | |
for not_running in $NOT_RUNNING | |
do | |
NS=$(echo $not_running | cut -d':' -f1) | |
POD=$(echo $not_running | cut -d':' -f2) | |
echo "deleting pod $NS:$POD" | |
kubectl -n $NS delete pod $POD | |
done |
This file contains hidden or 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 | |
# This document assumes following information is available for configuring routable ips | |
# for containers | |
# Primary interface to use | |
# Primary Subnet | |
# External Gateway ip | |
# Two static ipaddresses for the containers to use | |
# Ensure that primary nic is enabled with promiscuous mode. | |
# For ESX based vms, this has to be done from the vSwitch. For baremetal |
This file contains hidden or 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
yum install cryptsetup -y | |
DEVICE_NAME="/dev/xvdb" | |
PASSWORD="dummy password" | |
# Create a secret key file | |
mkdir -p /etc/luks-keys | |
echo "$PASSWORD" > /etc/luks-keys/secret | |
cat /etc/luks-keys/secret |
This file contains hidden or 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 | |
ALL_BUCKETS=$(aws s3 ls s3:// | awk '{print $3}') | |
for bucket in $ALL_BUCKETS | |
do | |
echo "BUCKET: $bucket" | |
aws s3 ls s3://$bucket --recursive --human-readable --summarize | tail -2 | |
echo | |
done |