LoginSignup
16
16

More than 5 years have passed since last update.

さくらのVPSを借りてchefファイルで設定を行う

Posted at

下記のchefファイルを使います。
https://github.com/YusukeHigaki/sakura_chef.git

  1. chefファイルをダウンロード
    git clone https://github.com/YusukeHigaki/sakura_chef.git

  2. data_bag_keyをコピー
    ローカルに保存してあるdata_bag_keyをトップディレクトリ以下にコピー

  3. nodeとワークステーションをひもづける
    knife solo prepare root@153.121.58.179
    これ結構時間かかります。
    もし
    ERROR: Net::SSH::HostKeyMismatch: fingerprint xxxxxx
    などと出てくる場合は~/.ssh/known_hostsに接続しようとしているサーバーのIPが残っているので削除

  4. jsonファイルを編集
    vim nodes/153.121.58.179.json
    sshのport番号を任意のものに変更してください

  5. 実行
    knife solo cook root@153.121.58.179

  6. 確認
    http://153.121.58.179/ にアクセスして、
    「chefによりサーバーのセットアップが完了しました!」
    と出ていれば成功。

16
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
16