サーバレス練習帳

着眼大局着手小局

Hubs Cloud

なんだ、日本語化もできるんじゃん。

mitomemel.hatenablog.com

これって、3D部分のコアになっているのはA-Frameみたいですね。
aframe.io

やってみるか。

以降、hubs cloud personalのver1.1.1であれば大丈夫みたい。
1.1.2では、上手く動かなかった。

手順1
www.youtube.com

まずは、Route53で.comと.linkの2つのドメインを作成。
2021-10-02 10:16に登録したけど、完成まで時間かかりそう・・・
(結局、20分くらいかかった)

ここからは東京リージョンを選択します。
ドメイン完成を待たずに、次にSSHのキーペアを作ります。
このお姉さんの英語を聞き取るところの、
「私はLinuxマシンだから.pemを作るけど、
Windowsを使っている人は.ppkを選んでね」と言っているように聞こえる。
ので、.ppkで作ってみよう。
f:id:urbanplanner:20211002102601j:plain

.ppkをダウンロードして保存した。

さて、Route53で作った二つのドメインが完了した模様。
.linkだけはメールverificationが必要みたい。
どちらも移管ロックが無効状態(×印)になっていることも確認。

手順2
[www.youtube.com>

f:id:urbanplanner:20211002105330j:plain
hubs価格
<]

PersonalとEnterpriseの違いを説明している。
まずは、Personalで良いか。
東京リージョンで作ってみよう。

サーバーサイズは、
Vendor Recommendedのt3.mediumを選ぶと、$0.056/hrみたいです。
f:id:urbanplanner:20211002105330j:plain

多めに見積もって、1時間10円と考えておけば良いか?
それなら1週間で7,200円くらいだね。これでいくか。

さぁ、Launch CloudFormationだ。
ここで・・・もう、このお姉さんの解説している通りに必要事項を記入します。
2021-10-02 11:11にデプロイ開始して・・・約45分、待ってみます。
いや、3分後には完成の連絡がgmailに来た。速かった。

さぁ、アクセスするぞ。
多分、ここでcheck back shortlyと出たら、サーバー立ち上げ中なので、2分くらい待ってねという感じだと思います。

f:id:urbanplanner:20211002112611p:plain
hubsファーストサインイン

画面からメールアドレスを入力して、メールボックスに飛んできたメールでverifyしましょう!

さぁ、管理画面に入れたぞ!
f:id:urbanplanner:20211002113304j:plain

手順3
www.youtube.com


sesの送信上限を突破させて、
アバターとシーンを読み込んで・・・できました!

さて、ここで問題が・・・hubsで部屋が作成できないのだ。
f:id:urbanplanner:20211002121957p:plain

英語にすると、こんなメッセージになっている模様。

Unable to connect to this room, please try again later. You can try connecting via TCP

このissueが参考になるかな・・・このissueはrobinさんも見ている模様。
github.com

東京リージョンで「Use zone c and d」を選択したら成功した事例がある模様。
framesynthesis.jp

私の環境は、c and dはダメで、初期値のa and bでないとデプロイできなかったみたい。

・・・というか、初心に戻って北部バージニア環境でデプロイしてみるべきなんだよな。そうしよう。
北部バージニアでもダメだった。

で、結局はバージョンだった・・・
1週間くらい前にリリースされた1.1.2で作っていたのだけど、
1年前の1.1.1に戻したら動くようになりました。良かった。
f:id:urbanplanner:20211002224938j:plain

戻し方は、次のアップグレード手順と同じ。
hubs.mozilla.com

🔎 Determine whether your stack is Hubs Cloud Personal, Enterprise single server, or Enterprise multi-server
Cloudformation > Stacks > Select your stack > Parameters tab
Does your stack have # of App Servers or # of Streaming Servers listed?
If yes, you have Enterprise multi-server
If no, you have Personal or Enterprise single server
💤 Update your stack to Offline Mode see ⬆️ Updating the stack
⌛ Wait for the Offline Mode update to complete
📎 Next, get the latest Template URL from the AWS Marketplace flow (DO NOT CREATE A NEW STACK)
Open new tab and go to hubs.mozilla.com/cloud
Select Personal or Enterprise (depending on step 1) then go through the AWS Marketplace flow, but do not create the stack
Go to "Create stack" page: Step 1 Specify template page
Copy "Amazon S3 URL" from Specify template section
📝 Replace the current template of your live stack
Cloudformation > Stacks > Select your stack
Click Update
Select "Replace current template"
Paste previously copied "Amazon S3 URL" from step 4 in Amazon S3 URL section
Click Next
✅ Do all filled in values look correct? If they do NOT look correct, then you may have copied the wrong Personal/Enterprise template! Go back to replace template step. Then copy and paste the correct template from step 4 again.
⌛ Finish the stack update with the new template stay in Offline Mode
🌅 After the update is complete, ⬆️ update the stack to Online Mode (out of Offline Mode)
🎉 Finished! Congrats! 🎉

以下は参考情報。
hubs改造している人もいるなぁ。
https://qiita.com/wirsind55/items/f917aa9fb8b6080ff5cd

色々調べている人もいるね。
https://note.com/gugenkamikami/n/n38856721da09

そして、今、日本で最も詳しい日本語解説資料です。
https://vr.gree.net/wp-content/uploads/2020/07/Hubs-Shirai-20200715.pdf

hubsの研究論文
https://msl.dhw.ac.jp/wp-content/uploads/2020/11/DHUJOURNAL2020_P045.pdf

hubs事例まとめ
note.com