Created
December 29, 2016 09:20
-
-
Save ahlifei/c7be5c406b874e6a46b6cb2bf9f9bcc2 to your computer and use it in GitHub Desktop.
shell
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="Encoding"> | |
<file url="PROJECT" charset="UTF-8" /> | |
</component> | |
</project> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectDictionaryState"> | |
<dictionary name="qimi" /> | |
</component> | |
<component name="ProjectInspectionProfilesVisibleTreeState"> | |
<entry key="Project Default"> | |
<profile-state> | |
<expanded-state> | |
<State> | |
<id /> | |
</State> | |
</expanded-state> | |
<selected-state> | |
<State> | |
<id>Buildout</id> | |
</State> | |
</selected-state> | |
</profile-state> | |
</entry> | |
</component> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.3 (/usr/bin/python3.4)" project-jdk-type="Python SDK" /> | |
<component name="masterDetails"> | |
<states> | |
<state key="ScopeChooserConfigurable.UI"> | |
<settings> | |
<splitter-proportions> | |
<option name="proportions"> | |
<list> | |
<option value="0.2" /> | |
</list> | |
</option> | |
</splitter-proportions> | |
</settings> | |
</state> | |
</states> | |
</component> | |
</project> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/.idea/workspace.iml" filepath="$PROJECT_DIR$/.idea/workspace.iml" /> | |
</modules> | |
</component> | |
</project> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ChangeListManager"> | |
<option name="TRACKING_ENABLED" value="true" /> | |
<option name="SHOW_DIALOG" value="false" /> | |
<option name="HIGHLIGHT_CONFLICTS" value="true" /> | |
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | |
<option name="LAST_RESOLUTION" value="IGNORE" /> | |
</component> | |
<component name="CreatePatchCommitExecutor"> | |
<option name="PATCH_PATH" value="" /> | |
</component> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="PropertiesComponent"> | |
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.Python" /> | |
<property name="settings.editor.splitter.proportion" value="0.2" /> | |
</component> | |
<component name="ShelveChangesManager" show_recycled="false"> | |
<option name="remove_strategy" value="false" /> | |
</component> | |
<component name="TaskManager"> | |
<task active="true" id="Default" summary="Default task"> | |
<created>1483002831512</created> | |
<option name="number" value="Default" /> | |
<option name="presentableId" value="Default" /> | |
<updated>1483002831512</updated> | |
</task> | |
<servers /> | |
</component> | |
<component name="VcsContentAnnotationSettings"> | |
<option name="myLimit" value="2678400000" /> | |
</component> | |
<component name="XDebuggerManager"> | |
<breakpoint-manager /> | |
<watches-manager /> | |
</component> | |
</project> |
This file contains 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
#brood-int1 static-lufaxcdn-com 172.19.80.23 1app-unfixed | |
#brood-int2 static-lufaxcdn-com 172.16.10.25 1app-unfixed | |
#brood-int3 static-lufaxcdn-com 172.16.166.1 1app-unfixed | |
#brood-int4 static-lufaxcdn-com 172.16.166.11 1app-unfixed | |
#brood-int5 static-lufaxcdn-com 172.16.166.21 1app-unfixed | |
brood-jijin1 static-lufaxcdn-com 172.16.184.49 | |
brood-jijin2 static-lufaxcdn-com 172.16.184.61 | |
brood-mobile1 static-lufaxcdn-com 172.16.166.140 | |
brood-mobile2 static-lufaxcdn-com 172.16.166.152 | |
brood-mobile3 static-lufaxcdn-com 172.16.166.164 | |
brood-qa10 static-lufaxcdn-com 172.16.166.112 | |
#brood-qa11 static-lufaxcdn-com 172.16.166.100 fixed | |
brood-qa12 static-lufaxcdn-com 172.16.166.236 | |
brood-qa13 static-lufaxcdn-com 172.16.166.240 | |
brood-qa14 static-lufaxcdn-com 172.19.10.2 | |
brood-qa15 static-lufaxcdn-com 172.16.166.188 | |
brood-qa16 static-lufaxcdn-com 172.16.166.200 | |
brood-qa17 static-lufaxcdn-com 172.16.166.212 | |
brood-qa18 static-lufaxcdn-com 172.16.166.224 | |
brood-qa19 static-lufaxcdn-com 172.16.184.25 | |
#brood-qa1 static-lufaxcdn-com 172.19.80.21 fixed | |
brood-qa20 static-lufaxcdn-com 172.16.184.37 | |
#brood-qa21 static-lufaxcdn-com 172.16.184.73 | |
#brood-qa2 static-lufaxcdn-com 172.19.80.22 fixed | |
#brood-qa3 static-lufaxcdn-com 172.19.39.4 need_rebuild | |
#brood-qa4 static-lufaxcdn-com 172.19.80.24 fixed | |
#brood-qa5 static-lufaxcdn-com 172.19.80.25 fixed | |
brood-qa6 static-lufaxcdn-com 172.16.166.10 | |
brood-qa7 static-lufaxcdn-com 172.16.166.41 | |
brood-qa8 static-lufaxcdn-com 172.16.166.62 | |
brood-qa9 static-lufaxcdn-com 172.16.166.92 | |
brood-react1 static-lufaxcdn-com 172.16.184.1 | |
#brood-stg1 static-lufaxcdn-com 172.19.64.21 1app-unfixed | |
#brood-stg2 static-lufaxcdn-com 172.19.64.31 1app-unfixed | |
brood-stg3 static-lufaxcdn-com 172.19.64.13 | |
brood-vue1 static-lufaxcdn-com 172.16.184.13 |
This file contains 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
brood-qa2 static-lufaxcdn-com 172.19.80.22 | |
brood-qa4 static-lufaxcdn-com 172.19.80.24 | |
brood-int1 static-lufaxcdn-com 172.19.80.23 | |
brood-qa1 static-lufaxcdn-com 172.19.80.21 | |
brood-stg2 static-lufaxcdn-com 172.19.64.31 | |
brood-stg1 static-lufaxcdn-com 172.19.64.21 | |
brood-int5 static-lufaxcdn-com 172.16.166.21 | |
brood-int2 static-lufaxcdn-com 172.16.10.25 | |
brood-qa7 static-lufaxcdn-com 172.16.166.41 | |
brood-qa6 static-lufaxcdn-com 172.16.166.10 | |
brood-qa5 static-lufaxcdn-com 172.19.80.25 | |
brood-stg3 static-lufaxcdn-com 172.19.64.13 | |
brood-qa3 static-lufaxcdn-com 172.19.39.4 | |
brood-qa9 static-lufaxcdn-com 172.16.166.92 | |
brood-qa8 static-lufaxcdn-com 172.16.166.62 | |
brood-qa10 static-lufaxcdn-com 172.16.166.112 | |
brood-qa14 static-lufaxcdn-com 172.19.10.2 | |
brood-int3 static-lufaxcdn-com 172.16.166.1 | |
brood-int4 static-lufaxcdn-com 172.16.166.11 | |
brood-mobile1 static-lufaxcdn-com 172.16.166.140 | |
brood-mobile2 static-lufaxcdn-com 172.16.166.152 | |
brood-mobile3 static-lufaxcdn-com 172.16.166.164 | |
brood-qa15 static-lufaxcdn-com 172.16.166.188 | |
brood-qa16 static-lufaxcdn-com 172.16.166.200 | |
brood-qa17 static-lufaxcdn-com 172.16.166.212 | |
brood-qa18 static-lufaxcdn-com 172.16.166.224 | |
brood-qa11 static-lufaxcdn-com 172.16.166.100 | |
brood-vue1 static-lufaxcdn-com 172.16.184.13 | |
brood-qa12 static-lufaxcdn-com 172.16.166.236 | |
brood-react1 static-lufaxcdn-com 172.16.184.1 | |
brood-qa13 static-lufaxcdn-com 172.16.166.240 | |
brood-qa19 static-lufaxcdn-com 172.16.184.25 | |
brood-qa20 static-lufaxcdn-com 172.16.184.37 | |
brood-jijin1 static-lufaxcdn-com 172.16.184.49 | |
brood-jijin2 static-lufaxcdn-com 172.16.184.61 | |
brood-qa21 static-lufaxcdn-com 172.16.184.73 |
This file contains 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 | |
n=`docker ps |grep brood-agent|awk '{print $1}'` | |
mkdir /root/bak | |
docker cp $n:/nfsc/ /root/bak/ | |
This file contains 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 | |
main() | |
{ | |
#for ip in "172.16.166.188 172.16.166.189 172.16.166.190 172.16.166.191" | |
#for ip in "172.16.166.200" "172.16.166.201" "172.16.166.202" "172.16.166.203" | |
#for ip in "172.16.166.212" "172.16.166.213" "172.16.166.214" "172.16.166.215" | |
#for ip in "172.16.166.224" "172.16.166.225" "172.16.166.226" "172.16.166.227" | |
#for ip in "172.16.184.1" "172.16.184.2" "172.16.184.3" "172.16.184.4" | |
#for ip in "172.16.184.13" "172.16.184.14" "172.16.184.15" "172.16.184.16" | |
#for ip in "172.16.166.236" "172.16.166.237" "172.16.166.238" "172.16.166.239" | |
#for ip in "172.16.166.240" "172.16.166.241" "172.16.166.242" "172.16.166.243" | |
#for ip in "172.16.184.25" "172.16.184.26" "172.16.184.27" "172.16.184.28" | |
#for ip in "172.16.184.49" "172.16.184.50" "172.16.184.51" "172.16.184.52" | |
for ip in $(awk '/^[^#]/{print $3}' app.txt) | |
do | |
scp /home/lf/workspace/app01_backup/app01_backup.sh root@$ip:/root/ | |
done | |
} | |
main |
This file contains 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 | |
function test_trust() | |
{ | |
for ip in $(awk '/^[^#]/{print $3}' app.txt) | |
do | |
# ssh -o BatchMode=yes -o StrictHostKeyChecking=no root@$ip "true" | |
ssh root@$ip "true" | |
# return $? | |
if [ $? -ne 0 ]; then | |
echo "$ip failed" | |
else | |
echo "$ip ok" | |
fi | |
done | |
} | |
main() | |
{ | |
test_trust | |
} | |
main |
This file contains 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 | |
CURRENT_TIME=`date +20%y%m%d` | |
lastname='' | |
lasttag='' | |
lastline='' | |
function main() | |
{ | |
df -h|grep "/dev/sdb1" | |
docker images|grep "<none>" | |
if [ $? -eq 0 ]; then | |
docker images|grep "<none>"|awk '{print $3}'|xargs docker rmi | |
fi | |
mkdir ./$CURRENT_TIME -p | |
touch_txt | |
make_txt | |
remake_txt | |
#del_images | |
df -h|grep "/dev/sdb1" | |
} | |
function touch_txt() | |
{ | |
docker images|awk '{print $1,$2,$3}'|sort -d -k 1,2|grep -v "brood.com/app tag"|grep -v "REPOSITORY TAG IMAGE"|egrep -v "nginx|util|nfsc|rancher" >./$CURRENT_TIME/$CURRENT_TIME.txt | |
} | |
function make_txt() | |
{ | |
while read line | |
do | |
currentline="$line" | |
currentname=`echo $line|awk '{print $1}'` | |
currenttag=`echo $line|awk -F "[ _]" '{print $2}'` | |
if [ "$lastname" = "$currentname" ];then | |
if [ "$lasttag" = "$currenttag" ];then | |
echo $lastline>>./$CURRENT_TIME/old_$CURRENT_TIME.txt | |
else | |
echo $lastline>>./$CURRENT_TIME/lasted_$CURRENT_TIME.txt | |
fi | |
else | |
echo $lastline>>./$CURRENT_TIME/lasted_$CURRENT_TIME.txt | |
fi | |
lastname=$currentname | |
lasttag=$currenttag | |
lastline=$currentline | |
done<./$CURRENT_TIME/$CURRENT_TIME.txt | |
} | |
function remake_txt() | |
{ | |
while read line | |
do | |
currentline="$line" | |
currentname=`echo $line|awk '{print $1}'` | |
currenttag=`echo $line|awk -F "[ _]" '{print $2}'` | |
if [ "$lastname" = "$currentname" ];then | |
if [ "$lasttag" = "$currenttag" ];then | |
echo $lastline>>./$CURRENT_TIME/older_$CURRENT_TIME.txt | |
else | |
echo $lastline>>./$CURRENT_TIME/lasted_$CURRENT_TIME.txt | |
fi | |
else | |
echo $lastline>>./$CURRENT_TIME/lasted_$CURRENT_TIME.txt | |
fi | |
lastname=$currentname | |
lasttag=$currenttag | |
lastline=$currentline | |
done<./$CURRENT_TIME/old_$CURRENT_TIME.txt | |
} | |
function del_images() | |
{ | |
if [ -s ./$CURRENT_TIME/older_$CURRENT_TIME.txt ]; then | |
awk '{print $3}' ./$CURRENT_TIME/older_$CURRENT_TIME.txt | xargs docker rmi | |
fi | |
} | |
main |
This file contains 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
#INT3 | |
172.16.166.9 ES | |
172.16.166.6 REDIS | |
172.16.166.5 KAFKA | |
172.16.166.8 ZOOKEEPER | |
172.16.166.7 SFTP | |
#INT5 | |
172.16.166.29 ES | |
172.16.166.26 REDIS | |
172.16.166.25 KAFKA | |
172.16.166.28 ZOOKEEPER | |
172.16.166.27 SFTP | |
#INT4 | |
172.16.166.19 ES | |
172.16.166.16 REDIS | |
172.16.166.15 KAFKA | |
172.16.166.18 ZOOKEEPER | |
172.16.166.17 SFTP | |
#mobile1 | |
172.16.166.145 ES | |
172.16.166.146 REDIS | |
172.16.166.147 KAFKA | |
172.16.166.148 ZOOKEEPER | |
172.16.166.151 SFTP | |
#mobile2 | |
172.16.166.157 ES | |
172.16.166.158 REDIS | |
172.16.166.159 KAFKA | |
172.16.166.160 ZOOKEEPER | |
172.16.166.163 SFTP | |
#mobile3 | |
172.16.166.169 ES | |
172.16.166.170 REDIS | |
172.16.166.171 KAFKA | |
172.16.166.172 ZOOKEEPER | |
172.16.166.175 SFTP | |
#stgm1 | |
172.16.166.181 ES | |
172.16.166.182 REDIS | |
172.16.166.183 KAFKA | |
172.16.166.184 ZOOKEEPER | |
172.16.166.187 SFTP | |
#qa15 | |
172.16.166.193 ES | |
172.16.166.194 REDIS | |
172.16.166.195 KAFKA | |
172.16.166.196 ZOOKEEPER | |
172.16.166.199 SFTP | |
#qa16 | |
172.16.166.205 ES | |
172.16.166.206 REDIS | |
172.16.166.207 KAFKA | |
172.16.166.208 ZOOKEEPER | |
172.16.166.211 SFTP | |
#qa17 | |
172.16.166.217 ES | |
172.16.166.218 REDIS | |
172.16.166.219 KAFKA | |
172.16.166.220 ZOOKEEPER | |
172.16.166.223 SFTP | |
#qa18 | |
172.16.166.229 ES | |
172.16.166.230 REDIS | |
172.16.166.231 KAFKA | |
172.16.166.232 ZOOKEEPER | |
172.16.166.235 SFTP | |
This file contains 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
b0VIM 7.4 �#X� �$ lf lf-VirtualBox ~lf/workspace/brood_build/fenfa_gongyao.sh 3210 #"! U tp ad v � � � � � � } o A 7 � � � � � � � � done EOF expect eof; } "*password*" {send "Pa888888\r"} "*yes/no*" {send "yes\r";exp_continue} expect { spawn ssh-copy-id -i $dsa_pub_key "wls81@$ip" |