Skip to content

Instantly share code, notes, and snippets.

View pichuang's full-sized avatar

Phil Huang pichuang

View GitHub Profile
#######
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
#!/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
@pichuang
pichuang / octant-workflow
Created November 30, 2021 15:15
octant
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"
apiVersion: v1
kind: ConfigMap
metadata:
name: advanced-config
namespace: wavefront
data:
wavefront.conf: |
proxyHost = domain
proxyPort = port
@pichuang
pichuang / sample-tmc-deployment.yaml
Created November 12, 2021 03:09
Tanzu Mission Control Agent Deployment
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: extension-manager
tmc-extension: "true"
controller-tools.k8s.io: "1.0"
name: vmware-system-tmc
---
apiVersion: v1
# Copyright Istio Authors
#
# 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,
#!/bin/bash
helm completion bash > /etc/bash_completion.d/helm
kubectl completion bash > /etc/bash_completion.d/kubectl
octant completion bash > /etc/bash_completion.d/octant
tanzu completion bash > /etc/bash_completion.d/tanzu
k9s completion bash > /etc/bash_completion.d/k9s
@pichuang
pichuang / seccomp.json
Last active June 16, 2021 10:10
20210616 OCP4.6 CoreOS: cat /etc/crio/seccomp.json
{
"defaultAction":"SCMP_ACT_ERRNO",
"archMap":[
{
"architecture":"SCMP_ARCH_X86_64",
"subArchitectures":[
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
]
},
---
apiVersion: v1
id: hello-openshift
kind: Pod
metadata:
name: hello-openshift
labels:
name: hello-openshift
spec:
volumes:
FROM registry.access.redhat.com/ubi8/ubi:8.3
RUN dnf -y install nginx && \
dnf -y clean all