Skip to content

Instantly share code, notes, and snippets.

View pichuang's full-sized avatar

Phil Huang pichuang

View GitHub Profile
@pichuang
pichuang / autounattend.xml
Last active June 13, 2022 02:31
Default Values for TKG Windows Nodes
<?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>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webserver-simple-deployment
spec:
replicas: 2
selector:
matchLabels:
app: webserver-simple-app
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
#!/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
#######
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
$ 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
$ 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 January 3, 2022 06:33
Tanzu Kubernetes Grid - VMware Log Insight
<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>
@pichuang
pichuang / etc_sysconfig_gitlab
Created December 20, 2019 16:12
Running GitLab Container with podman and systemd
IMAGE=docker.io/gitlab/gitlab-ce:12.2.0-ce.0
HOSTNAME=gitlab.pichuang.local
NAME=gitlab-ce
apiVersion: v1
kind: ConfigMap
metadata:
name: advanced-config
namespace: wavefront
data:
wavefront.conf: |
proxyHost = domain
proxyPort = port