Skip to content

Instantly share code, notes, and snippets.

View msnelling's full-sized avatar

Mark Snelling msnelling

View GitHub Profile
@msnelling
msnelling / output.log
Created January 7, 2022 19:47
kbst / terraform-provider-kustomization test output for WSL
TF_ACC=1 go test -v ./kustomize
=== RUN TestAccDataSourceKustomization_basic
--- PASS: TestAccDataSourceKustomization_basic (0.64s)
=== RUN TestAccDataSourceKustomization_legacyName
--- PASS: TestAccDataSourceKustomization_legacyName (0.63s)
=== RUN TestAccDataSourceKustomization_helmChart
testing.go:705: Step 0 error: errors during refresh:
Error: kustomizationBuild: Kustomizer Run for path 'test_kustomizations/helm/initial' failed: : unable to run: 'helm version -c --short' with env=[HELM_CONFIG_HOME=/tmp/kustomize-helm-388156898/helm HELM_CACHE_HOME=/tmp/kustomize-helm-388156898/helm/.cache HELM_DATA_HOME=/tmp/kustomize-helm-388156898/helm/.data] (is 'helm' installed?)
export JAIL_IP="10.1.1.19"
export DEFAULT_GW_IP="10.1.1.1"
export CONFIG_PATH="/mnt/tank/apps/rslsync/config"
export DATA_PATH="/mnt/tank/apps/rslsync/data"
export INTERFACE="vnet0"
export RELEASE="12.2-RELEASE"
# make temp file that will cause iocage to install some packages
echo '{"pkgs":["bash", "nano", "ca_root_nss"]}' > /tmp/pkg.json
# create jail
sudo -i
nano /etc/iscsi/iscsi.conf
node.startup = automatic
iscsiadm -m discovery -t st -p 10.1.1.175
iscsiadm -m node
dmesg | grep sd
mount /dev/sd?? /srv
@msnelling
msnelling / install_guestinfo_datasource.sh
Created December 23, 2019 10:31
Install VMware GuestInfo Cloud-Init Datasource
#!/bin/bash
sudo apt update
sudo apt dist-upgrade -y
sudo apt install -y cloud-init python3-pip
sudo curl -sSL https://raw.githubusercontent.com/vmware/cloud-init-vmware-guestinfo/master/install.sh | sh -
sudo apt remove --purge -y python3-pip build-essential binutils
sudo apt autoremove --purge -y
sudo apt clean
@msnelling
msnelling / ubuntu_disco_cloud_init.yaml
Last active March 5, 2022 16:45
Rancher vSphere node template cloud-config.yml for Ubuntu 18.04
#cloud-config
chpasswd:
list: |
ubuntu:ubuntu
expire: false
groups:
- docker
users:
- default
- name: ubuntu
@msnelling
msnelling / rancher-cloud-config.yml
Last active December 9, 2019 12:11
Rancher vSphere node template cloud-config.yml
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6Tvl6E1eMdyvazTIRH3eA2qUqTn5lR7pVdWpQQeVT4sBxzN273XqPvxznmVBMxo0QSWYqLPWVLcygmUo/ZYcEOJBgpdDrX71km3iyEp07TMGJzpSJ6Ioy1HHK3P8G+XCESX6SxJS4XrD/IIM9MBL5yAjrjU8lmqQ5s4/y8LLzsTrPiSU3aFaFWRaRUmFSx07zq78pp+B+vVOvM4CC/uaASQbbIz+zfGlIDsOHXjUmYmZVpnHgQMbXldy+ftEGDwqZcFcJOqgEGEMe9+BILh24NuKq8jj6uHXlGw1hoXHn8FPUZ09yMnE5Z+PGgjWqDZa6BOxdcgo/I68l8Jj9pWRH
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcQE/cTtzHHZ6c1R0ZwGGmebYQI4mzZcdAydfJR/MlQnjW1974tP7EDQ4lM0jL/PqNoePc2t/5TVuG7e+JR/SnJi4wpflRuCZPVyfnf5Q6z/gXPzzdeL15XYPlZJNRrZF5UCBMVR6u9+nMCOLp5uIrSGisBya40elTvxxWeTbmhheXwlUgRFFqujgDm69LaqgQMfctrbjGqbMtmzWxtczYL2ArQKyuml6BYt9itrAb2MGJFLTyyqooWP2rcrrpoKEYhTj6cXA/b750q+CwXhieQuquy2E4ceDDqk2Z/ysiocnnfAsYiUI6lnDTjnJpGJetcR5zLftnHlYXJVxPwBSt
#runcmd:
# - apt update
# - apt dist-upgrade
rancher:
@msnelling
msnelling / rancheros-cloud-init.yml
Last active June 8, 2019 09:20
RancherOS basic cloud-config
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6Tvl6E1eMdyvazTIRH3eA2qUqTn5lR7pVdWpQQeVT4sBxzN273XqPvxznmVBMxo0QSWYqLPWVLcygmUo/ZYcEOJBgpdDrX71km3iyEp07TMGJzpSJ6Ioy1HHK3P8G+XCESX6SxJS4XrD/IIM9MBL5yAjrjU8lmqQ5s4/y8LLzsTrPiSU3aFaFWRaRUmFSx07zq78pp+B+vVOvM4CC/uaASQbbIz+zfGlIDsOHXjUmYmZVpnHgQMbXldy+ftEGDwqZcFcJOqgEGEMe9+BILh24NuKq8jj6uHXlGw1hoXHn8FPUZ09yMnE5Z+PGgjWqDZa6BOxdcgo/I68l8Jj9pWRH
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcQE/cTtzHHZ6c1R0ZwGGmebYQI4mzZcdAydfJR/MlQnjW1974tP7EDQ4lM0jL/PqNoePc2t/5TVuG7e+JR/SnJi4wpflRuCZPVyfnf5Q6z/gXPzzdeL15XYPlZJNRrZF5UCBMVR6u9+nMCOLp5uIrSGisBya40elTvxxWeTbmhheXwlUgRFFqujgDm69LaqgQMfctrbjGqbMtmzWxtczYL2ArQKyuml6BYt9itrAb2MGJFLTyyqooWP2rcrrpoKEYhTj6cXA/b750q+CwXhieQuquy2E4ceDDqk2Z/ysiocnnfAsYiUI6lnDTjnJpGJetcR5zLftnHlYXJVxPwBSt
runcmd:
- apt update
- apt dist-upgrade -y
- apt install -y python3
#!/bin/sh
echo nameserver 127.0.0.1 > /etc/resolvconf/resolv.conf.d/base
rm -f /etc/resolv.conf
ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf
resolvconf --enable-updates
resolvconf -u
systemctl disable systemd-resolved.service
systemctl stop systemd-resolved.service
@msnelling
msnelling / argo-tunnel.yaml
Last active June 9, 2023 07:54
Rancher Setup
apiVersion: v1
kind: Namespace
metadata:
name: ingress-cloudflare
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-tunnel
namespace: ingress-cloudflare
@msnelling
msnelling / change_column_collation.sql
Created February 8, 2019 09:45
Change the collation of SQL Server database columns
DECLARE @collate nvarchar(100);
DECLARE @schema nvarchar(255);
DECLARE @table nvarchar(255);
DECLARE @column_name nvarchar(255);
DECLARE @column_id int;
DECLARE @data_type nvarchar(255);
DECLARE @max_length nvarchar(255);
DECLARE @row_id int;
DECLARE @sql nvarchar(max);
DECLARE @nullable bit;