DOCKER_SOCKET=/var/run/docker.sock
DOCKER_GROUP=docker
JENKINS_USER=jenkins
if [ -S ${DOCKER_SOCKET} ]; then
DOCKER_GID=$(stat -c '%g' ${DOCKER_SOCKET})
sudo groupadd -for -g ${DOCKER_GID} ${DOCKER_GROUP}
sudo usermod -aG ${DOCKER_GROUP} ${JENKINS_USER}
fi
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
.1.3.6.1.2.1.1.1.0 = STRING: Linux IL-ESXI-01-IDRAC 2.6.23.1 #1 PREEMPT Thu Jun 21 13:11:48 UTC 2018 armv5tejl | |
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.674.10892.2 | |
.1.3.6.1.2.1.1.3.0 = Timeticks: (16810910) 1 day, 22:41:49.10 | |
.1.3.6.1.2.1.1.4.0 = STRING: \"[email protected]\" | |
.1.3.6.1.2.1.1.5.0 = STRING: RAC_FNN8R4J | |
.1.3.6.1.2.1.1.6.0 = STRING: \"unknown\" | |
.1.3.6.1.2.1.1.8.0 = Timeticks: (19) 0:00:00.19 | |
.1.3.6.1.2.1.1.9.1.2.1 = OID: .1.3.6.1.6.3.1 | |
.1.3.6.1.2.1.1.9.1.2.2 = OID: .1.3.6.1.6.3.16.2.2.1 | |
.1.3.6.1.2.1.1.9.1.2.3 = OID: .1.3.6.1.6.3.10.3.1.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
.1.3.6.1.2.1.1.1.0 = STRING: Integrated Lights-Out 4 2.55 Aug 16 2017 | |
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.232.9.4.10 | |
.1.3.6.1.2.1.1.3.0 = Timeticks: (559592629) 64 days, 18:25:26.29 | |
.1.3.6.1.2.1.1.4.0 = STRING: | |
.1.3.6.1.2.1.1.5.0 = STRING: ILOCZJ8140TSD.act.local | |
.1.3.6.1.2.1.1.6.0 = STRING: unknown | |
.1.3.6.1.4.1.232.1.1.1.0 = INTEGER: 1 | |
.1.3.6.1.4.1.232.1.1.2.0 = INTEGER: 31 | |
.1.3.6.1.4.1.232.1.1.3.0 = INTEGER: 2 | |
.1.3.6.1.4.1.232.1.2.2.1.1.1.0 = INTEGER: 0 |
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
get_iostat(){ | |
echo "IOSTAT | Top 4 Device IO activity" | |
iostat -m |awk 'NR == 1 {next} {print}'| head -n 9 | |
} | |
get_vmstat(){ | |
echo "\n\nVMSTATS" | |
vmstat | awk ' END {print "No_process_waiting_for_CPU: " $1, "\nMemory_Idle: " $4, "\n\nSwapped_In_memory: " $9, "\nSwapped_Out_Memory: " $10, "\n\nCPU_time_runnning_user_code: " $15, "\nCPU_time_runnning_system_code: " $16, "\n\nInterupts_per_sec: " $13, "\nContext_switches_per_sec: " $14} '| column -t | |
} |
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: fluentd-es-config-v0.1.5 | |
namespace: default | |
labels: | |
addonmanager.kubernetes.io/mode: Reconcile | |
data: | |
system.conf: |- | |
<system> |
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: ServiceAccount | |
metadata: | |
name: fluentd-es | |
namespace: default | |
labels: | |
k8s-app: fluentd-es | |
kubernetes.io/cluster-service: "true" | |
addonmanager.kubernetes.io/mode: Reconcile | |
--- |
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 | |
### | |
# This is the first part which can be used to prepare base-image | |
### | |
# output log of userdata to /var/log/user-data.log | |
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
# Install awscli |
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 | |
echo "Updates packages" | |
sudo apt-get update -y | |
echo "Installing packages" | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs -y | |
echo "Installs RVM (Ruby Version Manager) for handling Ruby installation" | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 |
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
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB(); | |
exports.handler = function(event, context) { | |
console.log("Request received:\n", JSON.stringify(event)); | |
console.log("Context received:\n", JSON.stringify(context)); | |
var tableName = "myinfo"; | |
var datetime = new Date().getTime().toString(); |
NewerOlder