Skip to content

Instantly share code, notes, and snippets.

View tonytan4ever's full-sized avatar

Tony Tan tonytan4ever

View GitHub Profile
@tonytan4ever
tonytan4ever / Dictation 2018.10.25
Last active March 19, 2021 13:03
Why Stoicism Matters | The School of Life
Stoicism is a philosophical school that began in ancient Greece, and was later dominant in ancient Rome, and which continues
to have hugely urgent and importan things to teach us about calm, resilience, and emotional stability. Its ideas should be at
the heart of any attempt to remain serene, in face of a turbulant, unpredictable, often mean minded world.
Arguably, the greatest and certainly the most prolific stoic philosopher was the Roman author and statesment Seneca, who was
born in 4 B.C in Spain and died in 65 A.D in Rome. A lot of Senaca's thought is known to us from the letter he wrote to his
friends, giving them counsel at times of trouble.
Seneca had a friend called Lucilius, a civil servant working in Sicily. One day Lucilius learned of a lawsuit against him, wh-
ich threanted end his career and disgraces his good name. He wrote to Seneca in a panic: "You may expect that I'm going to
@tonytan4ever
tonytan4ever / log_multi_test.sh
Last active July 10, 2018 15:27
Get logs from multiple pods
#!/usr/bin/env bash
NAMEPSACE=$1
DEPLOYMENT=$2
for p in $(kubectl get pods --namespace ${NAMEPSACE} | grep ^${DEPLOYMENT}- | cut -f 1 -d ' '); do
echo ---------------------------
echo $p
echo ---------------------------
kubectl logs $p --name ${NAMEPSACE}
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/tonytan4ever/.minikube/ca.crt
server: https://192.168.99.100:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
@tonytan4ever
tonytan4ever / ansible_debug_test.yml
Created March 22, 2018 18:47
ansible_debug_test
- name: show exp evaluation
hosts: host
strategy: debug
gather_facts: no
tasks:
- name: wrong variable
debug:
msg: "{{ inventory_hostname in groups['host'] }}"
@tonytan4ever
tonytan4ever / extra_steps.md
Created December 4, 2017 20:52
Extra steps of setting up RPC

$ cp -R openstack-ansible/etc/openstack_deploy /etc/openstack_deploy

$ mv /etc/openstack_deploy/user_secrets.yml /etc/openstack_deploy/user_osa_secrets.yml

@tonytan4ever
tonytan4ever / os-neutron-ovs-setup.yml
Created November 7, 2017 06:17
Install ovs ml2 driver in AIO
#Setup OVS bridge in AIO neutron
- name: Setup OVS bridges
hosts: neutron_openvswitch_agent
user: root
pre_tasks:
- name: Make sure openvswitch is installed
apt:
name: openvswitch-switch
@tonytan4ever
tonytan4ever / l3_agent.ini
Created September 1, 2017 06:57
dev_stack L3 agent config
[DEFAULT]
agent_mode = dvr_snat
interface_driver = openvswitch
ovs_use_veth = False
debug = True
#
# From neutron.base.agent
#
@tonytan4ever
tonytan4ever / openstack_notes.txt
Created August 24, 2017 03:53
Useful OpenStack Notes
1. About network bridges
https://fosskb.in/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface/
check-uuid --fix --package neutron.tests.tempest.api
2017-03-28 12:28:44.550 1231 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/admin/test_external_network_extension.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_qos_negative.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_address_scopes.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_allowed_address_pair.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_extensions.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/admin/test_agent_management.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_service_type_management.py fixed
/Users/tonytan4ever/projects/Rackspace/neutron/neutron/tests/tempest/api/test_subnetpools.py fixed
2017-03-06 16:20:37.327 DEBUG neutron.agent.linux.dibbler [-] Enable IPv6 PD for router b59fb44c-b301-47bb-bc8e-e78e
30eb097e subnet 39acb4b5-4d5a-4d62-a295-b7c289d0a751 ri_ifname qr-0d51bc23-f6 from (pid=32154) enable /media/sf_Rack
space/neutron/neutron/agent/linux/dibbler.py:123
2017-03-06 16:20:37.327 DEBUG neutron.agent.linux.utils [-] Unable to access /opt/stack/data/neutron/pd/b59fb44c-b30
1-47bb-bc8e-e78e30eb097e:39acb4b5-4d5a-4d62-a295-b7c289d0a751:qr-0d51bc23-f6/client.pid from (pid=32154) get_value_f
rom_file /media/sf_Rackspace/neutron/neutron/agent/linux/utils.py:274
2017-03-06 16:20:37.329 DEBUG neutron.agent.linux.utils [-] Unable to access /opt/stack/data/neutron/pd/b59fb44c-b30
1-47bb-bc8e-e78e30eb097e:39acb4b5-4d5a-4d62-a295-b7c289d0a751:qr-0d51bc23-f6/client.pid from (pid=32154) get_value_f
rom_file /media/sf_Rackspace/neutron/neutron/agent/linux/utils.py:274
2017-03-06 16:20:37.330 DEBUG neutron.agent.linux.utils [-] Running command (rootwrap daemon): ['ip', 'netns', 'exec