Open agatan opened 6 years ago
wget https://gist.githubusercontent.com/0gajun/fb7151f36d120130ab3db8698ec2f0aa/raw/dd2124ed5287d2c612096098d3e89d182a04e780/rotate.sh
wget https://gist.githubusercontent.com/0gajun/6ce50e0295f9e21534eee817800fc91d/raw/e961db272679e981e8a0ce7a791a5a99b8fc1da0/rotate_slowlog.sh
wget https://gist.githubusercontent.com/0gajun/60ec393edc0c89f729976f9da71ee4c8/raw/2f6d253fa90efdac887915e50e0873d42dc9350f/rotate_alplog.sh
wget https://gist.githubusercontent.com/0gajun/4f137ef43aad3a62f191c3421f740af4/raw/f898769f6ffdfbe47045b89b441a430cea4e6e8d/link_etc.sh
GOOS=linux go build -o app .....
HOSTS="isu1 isu2 isu3"
for target in ${HOSTS[@]}
do
ssh $target sudo systemctl stop isu
scp ./app isucon@$target:/home/isucon/...
ssh $target sudo systemctl start isu
done
link_etc.sh
rotate.sh
rotate_alplog.sh
rotate_slowlog.sh