Skip to content

Commit

Permalink
change email
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyzhang committed Sep 4, 2017
1 parent 2a12d0c commit 3823a97
Show file tree
Hide file tree
Showing 133 changed files with 270 additions and 266 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ Travis CI Status: [![Build Status](https://travis-ci.org/DennyZhang/devops_publi

This repo host common DevOps scripts, which are public and available for everyone.

Please contact denny@dennyzhang.com, if you have any feedback or suggestions.
Please contact contact@dennyzhang.com, if you have any feedback or suggestions.

- Github Repo: https://github.com/DennyZhang/devops_public
- Learn more: https://www.dennyzhang.com/tag/devops
- Learn more: https://www.dennyzhang.com/tag/devops

Discuss with Denny in [LinkedIn](https://www.linkedin.com/in/dennyzhang001) or [Blog](https://www.dennyzhang.com).
4 changes: 2 additions & 2 deletions bash/S3Sync/s3sync.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash -e
##-------------------------------------------------------------------
## File : s3sync.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-05-12>
## Updated: Time-stamp: <2016-08-15 16:51:24>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
# action: backup or restore
. /etc/profile
Expand Down
4 changes: 2 additions & 2 deletions bash/backup_dir/backup_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : backup_dir.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description : Backup directory and tar it with timestamp
## --
## Created : <2015-04-21>
## Updated: Time-stamp: <2016-06-24 15:52:59>
## Updated: Time-stamp: <2017-09-04 18:54:44>
##-------------------------------------------------------------------

## Trap exit and dump status
Expand Down
4 changes: 2 additions & 2 deletions bash/create_loop_device.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : create_loop_device.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2016-06-24 15:52:59>
## Updated: Time-stamp: <2017-09-04 18:54:44>
##-------------------------------------------------------------------
file_count=${1?}

Expand Down
4 changes: 2 additions & 2 deletions bash/disable_oom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : disable_oom.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2017-02-28 17:59:33>
## Updated: Time-stamp: <2017-09-04 18:54:44>
##-------------------------------------------------------------------
pid_file=${1?}

Expand Down
4 changes: 2 additions & 2 deletions bash/docker_facility/docker_destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : docker_destroy.sh
## Author : DennyZhang.com <denny@dennyzhang.com>
## Author : DennyZhang.com <contact@dennyzhang.com>
## Description :
## --
## Created : <2016-01-02>
## Updated: Time-stamp: <2016-06-24 15:52:59>
## Updated: Time-stamp: <2017-09-04 18:54:44>
##-------------------------------------------------------------------
if ! which docker 1>/dev/null 2>&1; then
echo "Skip, since docker is not installed"
Expand Down
2 changes: 1 addition & 1 deletion bash/dump_db_summary/dump_db_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : dump_db_summary.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## /opt/devops/dump_db_summary/cfg_dir/couchbase.cfg -> dump_couchbase_summary
Expand Down
4 changes: 2 additions & 2 deletions bash/enable_ufw/enable_ufw.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash -e
##-------------------------------------------------------------------
## File : enable_ufw.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-05-12>
## Updated: Time-stamp: <2016-08-15 17:09:39>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
# Check OS version
function log() {
Expand Down
4 changes: 2 additions & 2 deletions bash/enforce_all_nagios_check/enforce_all_nagios_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : enforce_all_nagios_check.sh
## Author : Denny <denny@dennyzhang.com>, Syrett <[email protected]>
## Author : Denny <contact@dennyzhang.com>, Syrett <[email protected]>
## Description :
## ./enforce_all_nagios_check.sh help
## ./enforce_all_nagios_check.sh -s "check_.*_log|check_memory|check_tomcat_cpu"
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2016-07-06 20:35:12>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------

function check_one_server(){
Expand Down
4 changes: 2 additions & 2 deletions bash/free_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : free_cache.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2016-06-24 15:52:58>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
# http://unix.stackexchange.com/questions/17936/setting-proc-sys-vm-drop-caches-to-clear-cache
echo "Free cached memory, so that OS can have more free memory"
Expand Down
4 changes: 2 additions & 2 deletions bash/git_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : git_update.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2016-04-15>
## Updated: Time-stamp: <2016-10-27 16:45:29>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
working_dir=${1?}
git_repo_url=${2?}
Expand Down
2 changes: 1 addition & 1 deletion bash/inject_ssh_key/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ How To Use
==========
```
user_home_list='mac:/Users/mac,root:/root'
ssh_email='denny@dennyzhang.com'
ssh_email='contact@dennyzhang.com'
ssh_key='AAAAB3NzaC1yc2EAAAADAQABAAABAQDAwp69ZIA8Usz5EgSh5gBXKGFZBUawP8nDSgZVW6Vl...'
wget -O inject_ssh_key.sh https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v6/bash/inject_ssh_key/inject_ssh_key.sh
sudo bash ./inject_ssh_key.sh $user_home_list $ssh_email $ssh_key
Expand Down
4 changes: 2 additions & 2 deletions bash/inject_ssh_key/inject_ssh_key.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : inject_ssh_key.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-05-13>
## Updated: Time-stamp: <2016-06-24 15:52:58>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
user_home_list=${1?"To who the ssh key shall be injected. Users are separated by comma"}
ssh_email=${2?"email associated to this ssh key"}
Expand Down
4 changes: 2 additions & 2 deletions bash/list_os_packages/list_os_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : list_os_packages.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## list_os_packages.sh basic
## list_os_packages.sh all
## list_os_packages.sh python
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2017-06-28 20:24:01>
## Updated: Time-stamp: <2017-09-04 18:54:43>
################################################################################################
. /etc/profile
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down
4 changes: 2 additions & 2 deletions bash/manage_all_services/manage_all_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : manage_all_services.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
# Sample:
# manage_all_services.sh start couchbase-server,elasticsearch
# manage_all_services.sh stop elasticsearch
# manage_all_services.sh status couchbase-server
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2016-06-24 15:52:58>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
. /etc/profile

Expand Down
4 changes: 2 additions & 2 deletions bash/pre_check/pre_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : pre_check.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## --
## Created : <2016-06-12>
## Updated: Time-stamp: <2017-06-28 20:24:03>
## Updated: Time-stamp: <2017-09-04 18:54:43>
################################################################################################
. /etc/profile
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down
4 changes: 2 additions & 2 deletions bash/ubuntu1404_inject_163_apt_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : ubuntu1404_inject_163_apt_source.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2016-04-18>
## Updated: Time-stamp: <2016-06-24 15:52:58>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
cat > /etc/apt/sources.list.d/163.list <<EOF
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted
Expand Down
4 changes: 2 additions & 2 deletions bash/ufw/ufw_add_node_to_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/master/LICENSE
##
## File : ufw_add_node_to_cluster.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## bash ./ufw_add_node_to_cluster.sh "192.168.1.2,192.168.1.3"
## --
## Created : <2016-12-26>
## Updated: Time-stamp: <2016-12-27 12:23:10>
## Updated: Time-stamp: <2017-09-04 18:54:43>
##-------------------------------------------------------------------
function install_packages() {
if ! which ufw 1>/dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion bash/ufw/ufw_add_or_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/master/LICENSE
##
## File : ufw_add_or_remove.py
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Here we assume firewall should allow all traffic within the Intranet.
## Running a cluster of nodes in certain public cloud,
Expand Down
4 changes: 2 additions & 2 deletions bash/update_sshd_security/update_sshd_security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : update_sshd_security.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-05-13>
## Updated: Time-stamp: <2017-06-09 14:38:00>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
ssh_port=${1:-"2702"}
root_pwd=${2:-""}
Expand Down
4 changes: 2 additions & 2 deletions bash/wait_for/wait_for.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : wait_for.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## Sample:
## wait_for "service apache2 status" 3
## wait_for "lsof -i tcp:8080" 10
## wait_for "nc -z -v -w 5 172.17.0.3 8443"
## --
## Created : <2016-06-04>
## Updated: Time-stamp: <2017-08-14 14:59:41>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
. /etc/profile

Expand Down
4 changes: 2 additions & 2 deletions chef/chef_kitchen_provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : chef_kitchen_provision.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-11-30>
## Updated: Time-stamp: <2017-07-31 11:42:09>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
# pre-cache Chef Omnibus installation
mkdir -p /tmp/install.sh.14
Expand Down
4 changes: 2 additions & 2 deletions chef/chinese_chef_kitchen_provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : chinese_chef_kitchen_provision.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-11-30>
## Updated: Time-stamp: <2017-06-20 22:17:32>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
# pre-cache Chef Omnibus installation
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down
4 changes: 2 additions & 2 deletions chef/devops_provision_os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : devops_provision_os.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
# curl -o /root/devops_provision_os.sh https://raw.githubusercontent.com/.../.../chef/devops_provision_os.sh
# bash -e /root/devops_provision_os.sh
## --
## Created : <2016-04-20>
## Updated: Time-stamp: <2017-08-11 13:25:16>
## Updated: Time-stamp: <2017-09-04 18:54:42>
################################################################################################
. /etc/profile
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down
4 changes: 2 additions & 2 deletions chef/kitchen_hook_hack_hosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : kitchen_hook_hack_hosts.sh
## Author : DennyZhang.com <denny@dennyzhang.com>
## Author : DennyZhang.com <contact@dennyzhang.com>
## Description : Note the OS user running the script may be root or kitchen!
## --
## Created : <2015-07-03>
## Updated: Time-stamp: <2017-06-29 17:23:48>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
set +e

Expand Down
4 changes: 2 additions & 2 deletions chef/kitchen_hook_list_ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : kitchen_hook_list_ip.sh
## Author : DennyZhang.com <denny@dennyzhang.com>
## Author : DennyZhang.com <contact@dennyzhang.com>
## Description : Note the OS user running the script may be root or kitchen!
## --
## Created : <2015-07-03>
## Updated: Time-stamp: <2017-06-29 17:24:46>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
set +e

Expand Down
4 changes: 2 additions & 2 deletions chef/linux_apply_cookbook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : linux_apply_cookbook.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2016-04-20>
## Updated: Time-stamp: <2017-06-28 20:24:06>
## Updated: Time-stamp: <2017-09-04 18:54:42>
################################################################################################
. /etc/profile
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down
4 changes: 2 additions & 2 deletions chef/preinstall_kitchen_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE
##
## File : preinstall_kitchen_verify.sh
## Author : Denny <denny@dennyzhang.com>
## Author : Denny <contact@dennyzhang.com>
## Description :
## --
## Created : <2015-11-30>
## Updated: Time-stamp: <2016-06-24 15:52:57>
## Updated: Time-stamp: <2017-09-04 18:54:42>
##-------------------------------------------------------------------
LOG_FILE="/var/log/preinstall_kitchen_verify.log"
function log() {
Expand Down
Loading

0 comments on commit 3823a97

Please sign in to comment.