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
package main | |
import ( | |
"flag" | |
"bytes" | |
"encoding/xml" | |
"fmt" | |
"io" | |
"net/http" |
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 | |
###### CREATE USER WTTH TAGS FOR PROGRAMMATIC ACCESS AND ATTACH A POLICY | |
USER_NAME="test-user" | |
CUSTOMER_NAME="foo" | |
POLICY=_NAME="s3-access" | |
# Create a user, disable portal login | |
aws iam create-user --user-name $USER_NAME --tags Key=Customer,Value=$CUSTOMER_NAME |
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 | |
sudo setenforce 0 | |
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config | |
sudo modprobe overlay | |
sudo modprobe br_netfilter | |
sudo tee /etc/sysctl.d/kubernetes.conf<<EOF | |
net.bridge.bridge-nf-call-ip6tables = 1 |
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 | |
K8S_MASTER_IP1="16.143.21.1" | |
K8S_MASTER_IP2="16.143.21.3" | |
K8S_MASTER_IP3="16.143.21.4" | |
K8S_API_PORT="6443" | |
VIRTUAL_IP="10.96.0.12" | |
VIRTUAL_PORT="443" |
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
SERVICE_ACCOUNT=hpecp-bootstrap | |
SECRET=$(kubectl -n hpecp-bootstrap get serviceaccount ${SERVICE_ACCOUNT} -o jsonpath='{.secrets[].name}') | |
TOKEN=$(kubectl -n hpecp-bootstrap get secret ${SECRET} -o jsonpath={.data.token} | base64 -d) | |
kubectl -n hpecp-bootstrap get secret ${SECRET} -o jsonpath='{.data.ca\.crt}' | base64 -d > /tmp/ca.crt | |
# Set this to the apiserver endpoint | |
APISERVER="" | |
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 | |
cat > /usr/bin/sriov.sh <<EOF | |
HOSTNAME="$(hostname -f)" | |
PEN_CARDS=`/sbin/lspci -Dnn|grep -i pensando|grep -v Virtual|awk '{print $1}'` | |
## Enable SRIOV Profile, 16 for each card | |
for l in $PEN_CARDS | |
do | |
SRV=`find /sys -name sriov_numvfs|grep $l` | |
if [ -z "$SRV" ] |
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
# STEP - 1 Enabling sriov on PFs | |
# Use following commands to find the path to enable sriov | |
lspci -nn | grep -i "Mellanox" | |
find /sys -name sriov_numvfs | |
# Enable SRIOV from the above path for (e.g) | |
# echo "2" > /sys/devices/pci0000:85/0000:85:00.0/0000:86:00.0/0000:87:00.0/0000:88:00.0/sriov_numvfs | |
# echo "2" > /sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/0000:b0:00.0/0000:b1:00.0/sriov_numvfs | |
# Above will configure two VFs on each IB device |
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 a file (update_worker_disk.sh) with the following contents and store them under /opt/bluedata/bundles/hpe-*/scripts | |
# Run as following | |
# /opt/bluedata/bundles/hpe-cp*/scripts/startscript -a update_worker_disk | |
#! /bin/bash | |
# Set the following parameters | |
WORKER_IP="16.143.21.4" | |
CONTAINER_DISKS="/dev/sdf" | |
MAPR_DISKS="/dev/sdd,/dev/sde" |
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 | |
mkdir test | |
cd test | |
# Path where etcd ca files are stored | |
CA_CRT_FILE="/etc/etcd/pki/ca.crt" | |
CA_KEY_FILE="/etc/etcd/pki/ca.key" | |
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
# STEP 1 - Deploy lxcfs as a daemonset. Following yaml should be used for deployment. It deploys lxcfs in kube-system namespace | |
# This yaml doesn't have the master node toleration, so lxcfs will not be deployed on master | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: lxcfs | |
namespace: kube-system | |
labels: | |
app: lxcfs |
NewerOlder