Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Huang pichuang

View GitHub Profile
@pichuang
pichuang / autounattend.xml
Last active Jun 13, 2022
Default Values for TKG Windows Nodes
View autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="A">
<Path>a:\</Path>
</PathAndCredentials>
View webserver-simple-deployment.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webserver-simple-deployment
spec:
replicas: 2
selector:
matchLabels:
app: webserver-simple-app
View gist:e111702aaf3602a8111dda2ff1e443a0
fdisk -l
df -h
fdisk /dev/sda
...
pvcreate /dev/sda3
vgdisplay | grep "VG Name"
vgextend ubuntu-vg /dev/sda3
lvdisplay | grep "LV Path"
lvextend /dev/ubuntu-vg/ubuntu-lv /dev/sda3
View squid.conf
$ cat squid.conf
#
# Recommended minimum configuration:
#
# allow all requests
acl all src 0.0.0.0/0
http_access allow all
# And finally deny all other access to this proxy
View vmrest-cannot-poweron
$ tail -f /Users/pichuang/Library/Logs/VMware\ Fusion/vmware-vmfusion.log
2022-02-10T08:12:59.643Z In(05) VMware Fusion VMMgr::OpenVM (cfgPath=/Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx)
2022-02-10T08:12:59.664Z In(05) host-24220517 /Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx: Reloading config state.
2022-02-10T08:12:59.671Z In(05) host-24220517 VMHS: Transitioned vmx/execState/val to poweredOff
2022-02-10T08:12:59.680Z In(05) RemoteDeviceMgr VTHREAD 123145527058432 "RemoteDeviceMgr" tid 24220520
2022-02-10T08:12:59.680Z In(05) vigorCnx VTHREAD 123145527595008 "vigorCnx" tid 24220521
2022-02-10T08:12:59.682Z In(05) VMware Fusion SnapshotTree: Emitting refresh (/Users/pichuang/vm_pool/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx)
2022-02-10T08:12:59.684Z In(05) vigorCnx VigorOfflineGetToolsVersion: updated tools version to 0
2022-02-10T08:12:59.685Z In(05) VMware Fusion ReadProxyFile: Failed to read file: /etc/vmware/hostd/proxy.xml
2022-02-10T08:12:59.692Z In
@pichuang
pichuang / fluent.conf
Created Jan 3, 2022
Tanzu Kubernetes Grid - VMware Log Insight
View fluent.conf
<source>
@id in_tail_container_logs
@type tail
path /var/log/containers/*.log
pos_file /var/log/fluentd-containers.log.pos
tag raw.kubernetes.*
read_from_head true
# Open below line if you need have filename as tag field (now without prefix kubernetes.)
# path_key tag
<parse>
View prepare-tce-v0.10.0-rc.2-on-docker.txt
#######
Phase 1
#######
# Install an NTP Server with Chrony on Ubuntu 20.04
sudo timedatectl set-timezone Asia/Taipei
sudo apt update
sudo apt install chrony -y
sudo systemctl start chronyd
sudo systemctl status chronyd
View install-docker-ubuntu2004.sh
#!/bin/bash
sudo timedatectl set-timezone Asia/Taipei
sudo apt update
sudo apt install chrony -y
sudo systemctl start chronyd
sudo systemctl status chronyd
sudo timedatectl set-ntp true
sudo systemctl restart chronyd
chronyc activity
View octant-workflow
tee /usr/lib/systemd/system/octant.service <<-'EOF'
[Unit]
Description=octant
[Service]
Environment="HOME=/root"
Environment="OCTANT_ACCEPTED_HOSTS=10.45.112.173"
Environment="KUBECONFIG=/home/livefire/.kube/config"
Environment="OCTANT_LISTENER_ADDR=0.0.0.0:8900"
View cm.yml
apiVersion: v1
kind: ConfigMap
metadata:
name: advanced-config
namespace: wavefront
data:
wavefront.conf: |
proxyHost = domain
proxyPort = port