- 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
| View: Pods(<namespace>)[number of pods listed] | |
| NAME pod name | |
| READY number of pods in ready state / number of pods to be in ready state | |
| RESTARTS number of times the pod has been restarted so far | |
| STATUS state of the pod life cycle, such as Running | ... | Completed | |
| CPU current CPU usage, unit is milli-vCPU | |
| MEM current main memory usage, unit is MiB | |
| %CPU/R current CPU usage as a percentage of what has been requested by the pod | |
| %MEM/R current main memory usage as a percentage of what has been requested by the pod |
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
| if sysbench.cmdline.command == nil then | |
| error("Command is required. Supported commands: run") | |
| end | |
| sysbench.cmdline.options = { | |
| point_selects = {"Number of point SELECT queries to run", 5}, | |
| skip_trx = {"Do not use BEGIN/COMMIT; Use global auto_commit value", false} | |
| } | |
| local page_types = { "actor", "character", "movie" } |
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
| #!/bin/bash | |
| instanceID=$1 | |
| date=$(date +%Y%m%d) | |
| function downloadLog () { | |
| local log=$1 | |
| aws rds download-db-log-file-portion \ | |
| --output text \ |
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
| #!/bin/bash | |
| # | |
| # What is that | |
| # ============ | |
| # | |
| # This script will help you setting up your digital ocean | |
| # infrastructure with Ansible | |
| # | |
| # Usually, when working with DO, one is supposed to use digital_ocean.py | |
| # inventory file, and spin up instances in a playbook. |
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
| # temporary hack to address bug with vagrant-vbguest installation | |
| # https://github.com/mitchellh/vagrant/issues/4962 | |
| if awk "BEGIN {exit `vagrant -v` == "1.7.1" ? 0 : 1 }" | |
| then | |
| sudo sed -i .original 's/\*\*opts/opts/g' /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb | |
| fi |