Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create setup instruction #2

Open
karszawa opened this issue Sep 6, 2019 · 4 comments

Comments

@karszawa
Copy link
Owner

commented Sep 6, 2019

  • ssh できるようにする
  • git で管理できるようにする
  • netdata の仕込み

@karszawa karszawa changed the title Create setup script Create setup instruction Sep 6, 2019

@karszawa

This comment has been minimized.

Copy link
Owner Author

commented Sep 6, 2019

netdata の仕込み

bash <(curl -Ss https://my-netdata.io/kickstart.sh)
sudo firewall-cmd --zone=public --add-port=19999/tcp --permanent
sudo firewall-cmd --reload
@karszawa

This comment has been minimized.

Copy link
Owner Author

commented Sep 6, 2019

git で管理できるようにする

  • サーバーに isucon ユーザーでログインする
  • isu9qisu9q.pub~/.ssh/ に配置する
  • chmod 600 ~/.ssh/isu9q
  • .ssh/config 書く

~/.ssh/config

Host github.com
  User git
  IdentityFile ~/.ssh/isu9q
  • ~/.gitconfig 書く

~/.gitconfig

[user]
	email = karszawa@mercari.com
	name = Hiroaki KARASAWA
[push]
	default = simple

ここは master server のみ

  • デフォルトの実装を退避させる cp -rf $SERVICE_NAME $SERVICE_NAME-default
  • git clone git@github.com:karszawa/isucon9-qualify.git tmp
  • cp -aT tmp $SERVICE_NAME
  • $SERVICE_NAME ディレクトリで必要なものを commit & push する
    • isucon8-qualify の場合はgo以外の実装とgoのバイナリ・vendorディレクトリを削除して他をすべて commit & push した

ここは slave server のみ

  • rm -rf $SERVICE_NAME
  • git clone git@github.com:karszawa/isucon9-qualify.git $SERVICE_NAME
@karszawa

This comment has been minimized.

Copy link
Owner Author

commented Sep 7, 2019

ssh できるようにする

  • 鍵は共有で使う → ~/.ssh/isu9q
  • ~/.ssh/config を編集してメンバー全員が同じ解決名でサーバーにログインできるようにする
Host isu9q-01
  HostName TODO
  User isucon
  Port 22
  IdentityFile ~/.ssh/isu9q

Host isu9q-02
  HostName TODO
  User isucon
  Port 22
  IdentityFile ~/.ssh/isu9q

Host isu9q-03
  HostName TODO
  User isucon
  Port 22
  IdentityFile ~/.ssh/isu9q
@KeisukeYamashita

This comment has been minimized.

Copy link
Collaborator

commented Sep 7, 2019

netstatの準備

1. netstatのデプロイ

sshできたあとはnetdataをデプロイする。

echo -n "isu9q-01 isu9q-02 isu9q-03" | ./bin/init/netdata

ポート転送

echo -n "isu9q-01 isu9q-02 isu9q-03" | ./bin/init/netdata-port-forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.