Skip to content

Instantly share code, notes, and snippets.

🇹🇼
o p e n

Phil Huang pichuang

View GitHub Profile
View ansible.cfg
[defaults]
forks = 20
host_key_checking = False
roles_path = roles/
gathering = smart
fact_caching = jsonfile
fact_caching_connection = $HOME/ansible/facts
fact_caching_timeout = 600
log_path = ./ansible.log
nocows = 1
@pichuang
pichuang / redhat-10y.sh
Last active Jan 21, 2019
Red Hat #10yearchallenge + #10yearchallenge
View redhat-10y.sh
#!/bin/bash
# 10 Years ago
for i in {1..10};
do
ssh ${i}.redhat.taiwan "echo before #10yearchallenge ";
done
# On-going
ansible -i redhat all -m command -a "echo next #20yearchallenge "
@pichuang
pichuang / ansible.cfg
Last active Aug 30, 2018
Recommended Ansible Configuration
View ansible.cfg
[defaults]
forks = 20
host_key_checking = False
roles_path = roles/
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp/ansible/facts
fact_caching_timeout = 600
log_path = /tmp/ansible.log
nocows = 1
View Create PV
mkdir -p /var/lib/docker/pv/{01..10}
chmod g+w /var/lib/docker/pv/{01..10}
chcon -Rt svirt_sandbox_file_t /var/lib/docker/pv/
@pichuang
pichuang / gist:8986b88405f51b03fd46bdc8af539c35
Created Apr 13, 2017 — forked from timdream/gist:5968469
Github 發 Pull Request & 貢獻流程速查
View gist:8986b88405f51b03fd46bdc8af539c35

Github 發 Pull Request & 貢獻流程速查

前言

此文目標讀者需先自行學會

  • 開 Github 帳號
  • 會 fork 程式 repository
  • 會在自己的電腦使用命令列 git
  • 會 clone 自己的 repository
@pichuang
pichuang / Boot_ONL
Last active Mar 5, 2017
Install ONL on AS5712-54X
View Boot_ONL
2017-03-05 12:38:43.418 INFO onie-upgrade: ************************************************************
2017-03-05 12:38:43.418 INFO onie-upgrade: * ONIE Upgrade Check
2017-03-05 12:38:43.418 INFO onie-upgrade: ************************************************************
2017-03-05 12:38:43.418 INFO onie-upgrade:
2017-03-05 12:38:43.418 INFO onie-upgrade:
2017-03-05 12:38:43.418 INFO onie-upgrade: No ONIE updater available for the current platform.
2017-03-05 12:38:43.419 INFO onie-upgrade:
2017-03-05 12:38:43.419 INFO onie-upgrade: ************************************************************
2017-03-05 12:38:43.853 INFO firmware-upgrade: ************************************************************
@pichuang
pichuang / rc.boot
Last active Jan 4, 2017
OpenNetworkingLinux /mnt/onl/data/rc.boot
View rc.boot
#!/bin/bash
ip addr add 192.168.11.2/24 dev ma1
ip route add default via 192.168.11.254
hostname edgecore-5712
echo "nameserver 168.95.1.1" > /etc/resolvconf/resolv.conf.d/base
resolvconf -u
View intra-tenant
tenant Red
logical-router
interface segment App
ip address 10.0.1.1/24
interface segment Web
ip address 10.0.0.1/24
tenant Green
logical-router
interface segment QA
ip address 10.0.2.1/24
@pichuang
pichuang / 10-input-karaf-jmx.conf
Last active Jun 25, 2016
jmx + karaf + logstash
View 10-input-karaf-jmx.conf
input {
jmx {
path => "/etc/logstash/jmx.conf"
polling_frequency => 15
type => "jmx"
nb_thread => 4
}
}
@pichuang
pichuang / org.ops4j.pax.logging.cfg
Created Jun 25, 2016
outpur-log4j-karaf setting
View org.ops4j.pax.logging.cfg
################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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
You can’t perform that action at this time.