- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Service Registration:
- Centralized locking can be based on this K/V store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend ft_ipa | |
mode http | |
bind 0.0.0.0:80 | |
bind 0.0.0.0:443 ssl crt /etc/haproxy/ssl/ipa.example.org.pem | |
redirect scheme https if !{ ssl_fc } | |
use_backend bk_ipa | |
backend bk_ipa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#place the file in your ansible playbook director under filter_plugins | |
#/home/user/my_playbook.yml | |
#/home/user/filter_plugins/my_filters.py | |
#!/usr/bin/python | |
class FilterModule(object): | |
def filters(self): | |
return { | |
'a_filter': self.a_filter, | |
'another_filter': self.b_filter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |
Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time
Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.
Also, keep in mind that the terms Chrosh
, Chrosh Window
, and Secure Shell
all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /lib/systemd/system/ngrok.service.d/env.conf | |
[Service] | |
#which tunnel, or all? | |
Environment="TUNNEL=--all" | |
#log format | |
Environment="LOG_FORMAT=logfmt" | |
#log level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
daemon | |
defaults | |
mode http | |
log global | |
option httplog | |
option http-server-close | |
option dontlognull | |
option redispatch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run the following: | |
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT | |
iptables -A FORWARD -m pkttype --pkt-type multicast -j ACCEPT | |
iptables -A OUTPUT -m pkttype --pkt-type multicast -j ACCEPT | |
Or: | |
iptables -A INPUT -s 224.0.0.0/4 -j ACCEPT | |
iptables -A FORWARD -s 224.0.0.0/4 -d 224.0.0.0/4 -j ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[** | |
* | |
* -=( Python Code Generator )=- | |
* | |
* This script will generate one file per packages. | |
* It also support following things: | |
* - classes/interfaces (as classes)/enumerations | |
* - inheritance/interface realization (as inheritance) | |
* - attributes/associations | |
* + cardinility {x...*} -> generated as list |