Skip to content

Instantly share code, notes, and snippets.

View ddebroy's full-sized avatar

Deep Debroy ddebroy

View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"outputs": {
"DefaultDNSTarget": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Network/publicIPAddresses', variables('lbPublicIPAddressName'))).ipAddress]"
},
"SSH Targets": {
"type": "string",
#Variables
$Date = Get-Date -Format "yyyy-MM-dd HHmmss"
$DockerDataPath = "C:\ProgramData\Docker"
function Disable-RealTimeMonitoring () {
Set-MpPreference -DisableRealtimeMonitoring $true
}
function Install-Container () {
# add Windows Container image
@ddebroy
ddebroy / createIPs.sh
Last active January 26, 2018 06:53
Configure multiple IP addresses on a NIC of a Azure VM
#!/bin/bash
if [ "$#" -ne 4 ]; then
echo "usage: createAZips SP_name SP_secret AZ_tenant_ID address_count"
fi
az login --service-principal -u $1 -p $2 --tenant $3 || { echo "Azure login failed" ; exit 1 ; }
address_count=$4
@ddebroy
ddebroy / config-vms.sh
Last active March 16, 2018 21:09
configure azure VMs
#!/bin/bash
echo "starting config" > /tmp/config.log
curl -fsSL https://get.docker.com/ -o docker.sh
sh docker.sh
echo "username $1"
echo "docker installation completed" >> /tmp/config.log
@ddebroy
ddebroy / Dockerfile.network-test-image-builder
Created March 28, 2018 22:27
network-test-image-builder
FROM golang:1.8-alpine
RUN apk add --update bash git
WORKDIR /go/src/github.com/docker/libnetwork/cmd/test-image/
COPY . ./
RUN go get github.com/sirupsen/logrus
RUN mkdir -p /go/bin/
RUN go install
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: azfile
provisioner: kubernetes.io/azure-file
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=0
- gid=0
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "azfsvol"
spec:
capacity:
storage: "5Gi"
accessModes:
- "ReadWriteMany"
azureFile:
Enable-WindowsOptionalFeature -Online -FeatureName containers –All
Invoke-WebRequest -uri https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/windows-server/18.09/docker-18.09.0-ee-1-tp5.zip -OutFile docker.zip -UseBasicParsing
Expand-Archive .\docker.zip $env:ProgramFiles -f
$env:Path += ";$env:programfiles\docker"
setx /M PATH "$env:Path"
dockerd --register-service
start-service docker
netsh advfirewall set allprofiles state off
docker pull microsoft/windowsservercore-insider:10.0.17666.1000
docker pull microsoft/nanoserver-insider:10.0.17666.1000
diff --git a/deploy/kubernetes/delete-driver.sh b/deploy/kubernetes/delete-driver.sh
index c56a0e0..c711d87 100755
--- a/deploy/kubernetes/delete-driver.sh
+++ b/deploy/kubernetes/delete-driver.sh
@@ -9,7 +9,8 @@
set -o nounset
set -o errexit
-readonly PKGDIR="${GOPATH}/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver"
+# readonly PKGDIR="${GOPATH}/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver"
@ddebroy
ddebroy / gist:184db1aa25730923841bc8fc8ceb4a4e
Last active December 5, 2018 11:34
DCEU demo scripts
Prepare the GCP CSI driver on UCP master setup with dockereng/ucp:3.1.1-5de1ca6 :
=================================================================================
mkdir /home/ddebroy/v2
curl https://gist.githubusercontent.com/ddebroy/113e17e23abe427d6d877fb457ace22c/raw/99fe23131582e23d46a7592405e0d2a9555ee3d5/gistfile1.txt > /tmp/csi-patch
git clone https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver.git
cd gcp-compute-persistent-disk-csi-driver
git checkout tags/v0.2.0
## the images in hub/gcr are already up-to-date - this is mainly to get around some auth issues with GCP and file paths in host
git apply /tmp/csi-patch
mkdir -p /tmp/key