Skip to content

Instantly share code, notes, and snippets.

@warroyo
warroyo / knife-vsphere-plugin.rb
Last active November 8, 2019 07:45
plugin for knife-vsphere to add extend disk, extra disk, and memory reservation during clone
require 'rbvmomi'
class KnifeVspherePlugin
##
# example json data
# disk_num will default to 1
# datastore will default to the first disks datastore
# pass the below json as a string using the --cplugin-data option
# {"memory_reservation":200, "extend_disk":{"new_size_gb":11,"disk_num":1},"extra_disk":{"size":10,"datastore":"somedatastore"}}
##
@warroyo
warroyo / curl.sh
Created November 29, 2018 01:04
curl loop
while true; do sleep .01; curl <your-url> ; echo -e '\n\n';done
@warroyo
warroyo / access.ps1
Created January 8, 2019 07:07
make folder full access
$sharepath = "workspace"
$Acl = Get-ACL $SharePath
$AccessRule= New-Object System.Security.AccessControl.FileSystemAccessRule("everyone","FullControl","ContainerInherit,Objectinherit","none","Allow")
$Acl.AddAccessRule($AccessRule)
Set-Acl $SharePath $Acl
@warroyo
warroyo / secret-test.yml
Created March 19, 2019 20:06
secret-test
---
jobs:
- name: test
serial: true
plan:
- task: test
params:
SECRET: ((pks-test))
@warroyo
warroyo / config.yml
Last active June 14, 2019 17:45
metal lb install
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
@warroyo
warroyo / vsphere-storage-k8s-default.yml
Created July 15, 2019 14:55
default storage class
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: thin
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: thin
@warroyo
warroyo / vsphere-storage-k8s-default.yml
Created July 15, 2019 14:55
default storage class
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: thin
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: thin
@warroyo
warroyo / addons.yml
Created August 5, 2019 18:22
gpu addons
# Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@warroyo
warroyo / tf.yml
Created August 6, 2019 16:35
tensorflow sample
apiVersion: batch/v1
kind: Job
metadata:
labels:
app: samples-tf-mnist-demo
name: samples-tf-mnist-demo
spec:
template:
metadata:
labels:
@warroyo
warroyo / custom-networking.cfg
Created August 23, 2019 01:06
network config for cloud-init
network:
version: 1
config:
- id: ens192
name: ens192
subnets:
- address: 10.20.1.100
dns_nameservers:
- 192.168.1.1
gateway: 10.20.1.1