Skip to content

Instantly share code, notes, and snippets.

View Wicaeed's full-sized avatar

Craig Gill Wicaeed

View GitHub Profile
@Wicaeed
Wicaeed / journalctl -u consul-template
Created April 29, 2021 20:39
consul-template debug output
Apr 29 13:37:03 haproxy-web-centos-7.vagrantup.com consul-template[11588]: [INFO] consul-template v0.25.2 (c8372a0a)
Apr 29 13:37:03 haproxy-web-centos-7.vagrantup.com consul-template[11588]: [INFO] (runner) creating new runner (dry: false, once: false)
Apr 29 13:37:03 haproxy-web-centos-7.vagrantup.com consul-template[11588]: [DEBUG] (runner) final config: {"Consul":{"Address":"127.0.0.1:8500","Namespace":"","Auth":{"Enabled":false,"Username":"","Password":""},"Retry":{"Attempts":12,"Backoff":250000000,"MaxBackoff":60000000000,"Enabled":true},"SSL":{"CaCert":"","CaPath":"","Cert":"","Enabled":false,"Key":"","ServerName":"","Verify":true},"Token":"","Transport":{"DialKeepAlive":30000000000,"DialTimeout":30000000000,"DisableKeepAlives":false,"IdleConnTimeout":90000000000,"MaxIdleConns":100,"MaxIdleConnsPerHost":2,"TLSHandshakeTimeout":10000000000}},"Dedup":{"Enabled":false,"MaxStale":2000000000,"Prefix":"consul-template/dedup/","TTL":15000000000,"BlockQueryWaitTime":60000000000},"DefaultDelims":{"Left":null,"R
● ephemeral-data.mount - Mount ephemeral data partition
Loaded: loaded (/etc/systemd/system/ephemeral-data.mount; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2019-08-09 15:44:29 PDT; 4s ago
Where: /ephemeral/data
What: /mnt/resources
Process: 32857 ExecUnmount=/bin/umount /ephemeral/data (code=exited, status=32)
Process: 32697 ExecMount=/bin/mount /mnt/resources /ephemeral/data -t ${MOUNT_FSTYPE} -o ${MOUNT_OPTIONS} (code=exited, status=0/SUCCESS)
Aug 09 15:41:17 localhost.localdomain systemd[1]: Mounting Mount ephemeral data partition...
Aug 09 15:41:17 localhost.localdomain systemd[1]: Mounted Mount ephemeral data partition.
- name: get free disk capacity for mountpoint
assert:
that:
- not {{ item.mount == '/usr/local' and ( item.size_available < (free_disk_capacity_limit|int * 1024) ) }}
- not {{ item.mount == '/' and ( item.size_available < free_disk_capacity_limit|int ) }}
quiet: true
with_items: "{{ ansible_mounts }}"
DevOps Engineer / Senior Sytems Engineer
San Leandro, CA
Fulltime Position
Job Description:
alias calicoctl="\
docker run -i --rm \
--pid host \
--net host \
-e constraint:ostype==linux \
-e ETCD_ENDPOINTS=127.0.0.1:12378 \
-e ETCD_KEY_FILE=/ucp-node-certs/key.pem \
-e ETCD_CA_CERT_FILE=/ucp-node-certs/ca.pem \
-e ETCD_CERT_FILE=/ucp-node-certs/cert.pem \
-v /var/run/calico:/var/run/calico \
---
- hosts: core-server
become: yes
roles:
- role: pax-server
tags: stop-app-core-service
- hosts: mongodb
become: yes
@Wicaeed
Wicaeed / iRule_NotWorking.irule
Created October 18, 2018 18:09
iRule Comparision
if { [matchclass $clientIP equals External_IP] }
{
if { ([string tolower [HTTP::uri]] starts_with "/website/account/login") } {
set qnode [string tolower [URI::query [HTTP::uri] "_node"]]
set setcookie true
} else {
set qnode ""
set setcookie false
}
ltm virtual PROD-gitlab.corp.local-HTTP-redir {
destination 10.23.216.10:http
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
_sys_https_redirect
@Wicaeed
Wicaeed / gist:10bd1f76aa84941484f282b530c20360
Created April 6, 2018 20:59
Compare own NodeID vs RemoteManagers NoteID and filter out own result
{
"NodeID": "phlc5hx7g2hyhj4f3m1s70il6",
"RemoteManagers": [
{
"NodeID": "40jskir4t55o7fz8axpbhll9q",
"Addr": "10.23.217.200:2377"
},
{
"NodeID": "phlc5hx7g2hyhj4f3m1s70il6",
"Addr": "10.23.217.201:2377"
root@host:/# gitlab-ctl status
run: gitaly: (pid 434) 243s; run: log: (pid 433) 243s
run: gitlab-monitor: (pid 441) 243s; run: log: (pid 422) 243s
run: gitlab-workhorse: (pid 444) 243s; run: log: (pid 437) 243s
run: logrotate: (pid 418) 243s; run: log: (pid 412) 243s
run: nginx: (pid 429) 243s; run: log: (pid 428) 243s
run: node-exporter: (pid 421) 243s; run: log: (pid 416) 243s
run: postgres-exporter: (pid 432) 243s; run: log: (pid 430) 243s
run: postgresql: (pid 415) 243s; run: log: (pid 411) 243s
run: prometheus: (pid 414) 243s; run: log: (pid 413) 243s