Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
pddg committed Sep 15, 2018
0 parents commit 3db2be8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store

.ssh/*
!.ssh/*.pub
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# isucon-docker

Docker container for ISUCON.

# Development Environment

## Tools

- bash
- neovim
- netdata

# Authorized keys

公開鍵を作って`public_keys`以下に入れる.`.pub`拡張子にしておくこと.

```bash
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
```

手元に置く秘密鍵は`isucon`として`$HOME/.ssh`以下に置く
34 changes: 34 additions & 0 deletions backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -eu

# Set remote host information

EXIT_STATUS=0

if [ -z ${ISUCON_USER+UNDEF} ]; then
echo "ISUCON_USER is not set"
EXIT_STATUS=1
fi

if [ -z ${ISUCON_PASSWORD+UNDEF} ]; then
echo "ISUCON_PASSWORD is not set"
EXIT_STATUS=1
fi

if [ -z ${ISUCON_HOST+UNDEF} ]; then
echo "ISUCON_HOST is not set"
EXIT_STATUS=1
fi

if [ $EXIT_STATUS -eq 1 ]; then
echo "Exit 1."
exit 1
fi

echo "Start to backup remote files."

scp -i ${HOME}/.ssh/isucon -r ${ISUCON_USER}@${ISUCON_HOST}:/home/isucon ${HOME}/Documents/ISUCON/

echo "Done"

1 change: 1 addition & 0 deletions public_keys/pudding.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHtgmxJ+ghXbhoXkYLZgzCLx5PDnIwGfaS+SlA9cV7a6Pbd6tMjP1A4xJoy1LRzgs82LAvY5BjJORsF7NvZl+HyXPZMwvEuBD5DdNCVDelWAHsoogVsFTQyOZLEzQy+kuNUZKBIvXsjCDxVmCus/wA+tWO2vhEU0FgRWlEyU6138ZsrxpFg0qASL4lgBLpfmahR4q9jeSW81bbJnZyEXBPulBh1NiLl/UTcayilsPbEWpjc5TbN170kdhJxLADDTvGvta+kZ3C1mGi55TI/V1MWCcyuhIH0SGL43N4tO9G6oXAd6lk0jt4mh5zZngnkbpAC6Q6aW3RiuMrKSBbyJUW5eewpHydEl7kTVq+PfzpAR11FHtm7UXPyd9lIqo+mJqtqfOG2nlf+r4AZ808Ah9ow+M4JVGpg9Q/E4d1lFK2wOoKgHkkNgtnbjSlmw0VgwGLEkY0utqdPRHLjhra9VPxm2f03EGsGIsaC7Z5f/+6HR525/k2uAysq9cpS6Fs6KRii/3nAXrgWmPDlnWoMDVj//UI49vucJNA3w09T5F/SOad79XHU3owSIn7aBwsog0xA7Cx3g4F5Xkc3OPK9x94iZtq4+fZR2L5YMl3HG/8WFbtpclrH6Wl0j2FNFbDMovj7FB660/jn+Pwf01wiJdAHn6ko3xP1aZGJ/hR1NSX+w== [email protected]

0 comments on commit 3db2be8

Please sign in to comment.