티스토리 뷰

root@tommypagy-VirtualBox:/home/reticulum# mix ecto.create
warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:6

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

==> statix
Compiling 3 files (.ex)
Generated statix app
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gen_stage
Compiling 10 files (.ex)
Generated gen_stage app
==> eternal
Compiling 5 files (.ex)
warning: Supervisor.Spec.supervise/2 is deprecated. Use the new child specifications outlined in the Supervisor module instead
  lib/eternal/supervisor.ex:60: Eternal.Supervisor.init/1

warning: Supervisor.Spec.worker/3 is deprecated. Use the new child specifications outlined in the Supervisor module instead
Invalid call found at 2 locations:
  lib/eternal/supervisor.ex:56: Eternal.Supervisor.init/1
  lib/eternal/supervisor.ex:57: Eternal.Supervisor.init/1

Generated eternal app
==> decimal
Compiling 4 files (.ex)
Generated decimal app

소개

모질라 허브에 대한 기술 지식

모질라 허브를 로컬로 설치

1.  mozilla dialog 설치

GitHub - mozilla/dialog: Mediasoup based WebRTC SFU

 

GitHub - mozilla/dialog: Mediasoup based WebRTC SFU

Mediasoup based WebRTC SFU. Contribute to mozilla/dialog development by creating an account on GitHub.

github.com

 

2. reticulum 설치 

 https://github.com/mozilla/reticulum

 

GitHub - mozilla/reticulum: Phoenix web server for hubs.mozilla.com

Phoenix web server for hubs.mozilla.com. Contribute to mozilla/reticulum development by creating an account on GitHub.

github.com

3.hubs 설치

https://github.com/mozilla/hubs

 

GitHub - mozilla/hubs: Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame. - GitHub - mozilla/hubs: Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.

github.com

4. spoke  설치

https://github.com/mozilla/Spoke

 

동영상 바로가기 : 유튜브 비디오

3. npm 또는 종속성에 문제가있는 경우 1 시간 정도 소요

 

VPS에서 모질라 허브 호스팅을 수행



 

요구:

하드웨어:

  • 최소 8GB의 RAM
  • 빠른 CPU를 사용하는 것이 좋습니다.

소프트웨어

  • Javascript
  • React js
  • Basic Webpack dev server
  • Basic Elixir and phoenix
  • Basic Web Socket
  • elang 
  • postgresql 
  • asdf
asdf  설치
root@tommypagy-VirtualBox:/home# apt-get install dirmngr gpg curl gawk
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
패키지 dirmngr는 이미 최신 버전입니다 (2.2.4-1ubuntu1.6).
dirmngr 패키지는 수동설치로 지정합니다.
패키지 gpg는 이미 최신 버전입니다 (2.2.4-1ubuntu1.6).
gpg 패키지는 수동설치로 지정합니다.
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-42-generic linux-hwe-5.4-headers-5.4.0-42
Use 'sudo apt autoremove' to remove them.
제안하는 패키지:
  gawk-doc
다음 새 패키지를 설치할 것입니다:
  curl gawk libcurl4 libsigsegv2
0개 업그레이드, 4개 새로 설치, 0개 제거 및 17개 업그레이드 안 함.
795 k바이트 아카이브를 받아야 합니다.
이 작업 후 2,649 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14.7 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 gawk amd64 1:4.1.4

 

sudo apt install software-properties-common apt-transport-https wget -y
PostgreSQL 저장소 가져오기
먼저 설치 패키지의 신뢰성을 확인하기 위해 PostgreSQL GPG 키를 가져와야 합니다.

sudo wget -O- https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /usr/share/keyrings/postgresql.gpg
다음으로 원하는 설치에 따라 안정 또는 테스트 리포지토리를 가져올 수 있습니다. 프로덕션 용도의 경우 PostgreSQL 리포지토리에서 직접 설치하기 때문에 자주 업데이트되는 안정적인 리포지토리를 사용합니다. 테스트는 테스트를 위한 것입니다. 때로는 뒤처지거나 앞설 수 있어 프로덕션에 적합하지 않습니다.

PostgreSQL 안정 가져오기(권장)
echo deb [arch=amd64,arm64,ppc64el signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main | sudo tee /etc/apt/sources.list.d/postgresql.list

sudo apt-get update
이제 다음과 같이 PostgresSQL 설치를 진행합니다.

sudo apt install postgresql-client postgresql -y
그런 다음 다음 명령을 사용하여 소프트웨어가 오류 없이 설치 및 활성화되었는지 상태를 확인합니다.

systemctl status postgresql

Erlang 설치
Erlang GPG 키를 가져온다.

sudo apt update
sudo apt install software-properties-common apt-transport-https
wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -
#Erlang 레포지토리를 우분투에 가져온다.

echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
#참고로 18.04 버전이라면 focal 대신 bionic으로 설정해야 한다. 아래와 같이 말이다.

echo "deb https://packages.erlang-solutions.com/ubuntu bionic contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
#그리고 Erlang을 설치한다.

sudo apt update
sudo apt install erlang
참고 자료
https://computingforgeeks.com/how-to-install-latest-erlang-on-ubuntu-linux/

-

root@tommypagy-VirtualBox:/home# sudo apt-get install elixir
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-42-generic linux-hwe-5.4-headers-5.4.0-42
Use 'sudo apt autoremove' to remove them.
다음 새 패키지를 설치할 것입니다:
  elixir
0개 업그레이드, 1개 새로 설치, 0개 제거 및 17개 업그레이드 안 함.
4,292 k바이트 아카이브를 받아야 합니다.
이 작업 후 7,062 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 https://packages.erlang-solutions.com/ubuntu bionic/contrib amd64 elixir                           all 1.13.4-1 [4,292 kB]
내려받기 4,292 k바이트, 소요시간 3초 (1,608 k바이트/초)
Selecting previously unselected package elixir.
(데이터베이스 읽는중 ...현재 206688개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../elixir_1.13.4-1_all.deb ...
Unpacking elixir (1.13.4-1) ...
elixir (1.13.4-1) 설정하는 중입니다 ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@tommypagy-VirtualBox:/home# elixir --version
Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit:ns]

Elixir 1.13.4 (compiled with Erlang/OTP 25)

- node JS 설치

root@tommypagy-VirtualBox:/home# cd reticulum/
root@tommypagy-VirtualBox:/home/reticulum# mix deps.get
warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:6

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

Could not find Hex, which is needed to build dependency :ecto_boot_migration
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] Y
* creating /root/.mix/archives/hex-1.0.1
* Getting the_end (https://github.com/mozillareality/the_end.git - origin/bug/phoenix-14)
remote: Enumerating objects: 124, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 124 (delta 0), reused 4 (delta 0), pack-reused 120
오브젝트를 받는 중: 100% (124/124), 17.82 KiB | 1.37 MiB/s, 완료.
델타를 알아내는 중: 100% (61/61), 완료.
* Getting download (https://github.com/gfodor/download.git - origin/reticulum/master)
remote: Enumerating objects: 91, done.
remote: Total 91 (delta 0), reused 0 (delta 0), pack-reused 91
* Getting reverse_proxy_plug (https://github.com/mozillareality/reverse_proxy_plug.git - origin/reticulum/master)
remote: Enumerating objects: 512, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 512 (delta 87), reused 81 (delta 81), pack-reused 415
오브젝트를 받는 중: 100% (512/512), 145.82 KiB | 4.86 MiB/s, 완료.
델타를 알아내는 중: 100% (244/244), 완료.
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  absinthe 1.4.16
  absinthe_phoenix 1.4.4
  absinthe_plug 1.4.7
  artificery 0.4.2
  bamboo 1.4.0
  bamboo_smtp 1.7.0
  bunt 0.2.0
  cachex 3.2.0
  canada 1.0.2
  canary 1.1.1
  certifi 2.5.3
  combine 0.10.0
  connection 1.0.4
  cors_plug 2.0.2
  cowboy 2.9.0
  cowlib 2.11.0
  credo 1.3.2
  crontab 1.1.10
  dataloader 1.0.7
  db_connection 2.2.1
  decimal 1.9.0
  deferred_config 0.1.1
  distillery 2.1.1
  dns 2.2.0
  ecto 3.3.4
  ecto_autoslug_field 2.0.1
  ecto_boot_migration 0.2.0
  ecto_enum 1.4.0
  ecto_sql 3.3.4
  eternal 1.2.1
  ex2ms 1.6.0
  ex_json_schema 0.7.4
  ex_rated 1.3.3
  file_system 0.2.8
  gen_smtp 0.14.0
  gen_stage 0.14.3
  gettext 0.17.4
  guardian 2.1.1
  guardian_phoenix 2.0.1
  hackney 1.17.0
  httpoison 1.6.2
  idna 6.1.1
  inet_cidr 1.0.4
  jason 1.1.2
  jose 1.10.1
  jumper 1.0.1
  metrics 1.0.1
  mime 1.4.0
  mimerl 1.2.0
  mix_test_watch 1.0.2
  mox 1.0.1
  oauther 1.1.1
  observer_cli 1.5.3
  open_graph 0.0.4
  parse_trans 3.3.1
  peerage 1.0.3
  phoenix 1.4.17
  phoenix_ecto 4.1.0
  phoenix_html 2.14.1
  phoenix_live_reload 1.2.1
  phoenix_pubsub 1.1.2
  plug 1.10.4
  plug_attack 0.4.2
  plug_cowboy 2.1.3
  plug_crypto 1.1.2
  poison 3.1.0
  postgrex 0.15.3
  quantum 2.2.7
  ranch 1.8.0
  recon 2.5.0
  retry 0.14.0
  scrivener 2.7.0
  scrivener_ecto 2.3.0
  secure_random 0.5.1
  sentry 6.4.2
  sleeplocks 1.1.1
  slugger 0.3.0
  socket 0.3.13
  ssl_verify_fun 1.1.6
  statix 1.4.0
  telemetry 0.4.2
  temp 0.4.7
  timex 3.6.1
  toml 0.6.1
  tzdata 1.0.3
  ua_parser 1.8.0
  unicode_util_compat 0.7.0
  unsafe 1.0.1
  web_push_encryption 0.2.1
  yamerl 0.7.0
* Getting ecto_boot_migration (Hex package)
* Getting phoenix (Hex package)
* Getting phoenix_pubsub (Hex package)
* Getting phoenix_ecto (Hex package)
* Getting plug (Hex package)
* Getting ecto (Hex package)
* Getting ecto_sql (Hex package)
* Getting absinthe (Hex package)
* Getting dataloader (Hex package)
* Getting absinthe_plug (Hex package)
* Getting absinthe_phoenix (Hex package)
* Getting postgrex (Hex package)
* Getting phoenix_html (Hex package)
* Getting phoenix_live_reload (Hex package)
* Getting gettext (Hex package)
* Getting cowboy (Hex package)
* Getting plug_cowboy (Hex package)
* Getting distillery (Hex package)
* Getting peerage (Hex package)
* Getting httpoison (Hex package)
* Getting poison (Hex package)
* Getting ecto_autoslug_field (Hex package)
* Getting cors_plug (Hex package)
* Getting statix (Hex package)
* Getting quantum (Hex package)
* Getting credo (Hex package)
* Getting mox (Hex package)
* Getting plug_attack (Hex package)
* Getting ecto_enum (Hex package)
* Getting cachex (Hex package)
* Getting retry (Hex package)
* Getting open_graph (Hex package)
* Getting secure_random (Hex package)
* Getting bamboo (Hex package)
* Getting bamboo_smtp (Hex package)
* Getting guardian (Hex package)
* Getting guardian_phoenix (Hex package)
* Getting canary (Hex package)
* Getting temp (Hex package)
* Getting timex (Hex package)
* Getting web_push_encryption (Hex package)
* Getting sentry (Hex package)
* Getting toml (Hex package)
* Getting scrivener_ecto (Hex package)
* Getting ua_parser (Hex package)
* Getting inet_cidr (Hex package)
* Getting dns (Hex package)
* Getting oauther (Hex package)
* Getting jason (Hex package)
* Getting ex_rated (Hex package)
* Getting mix_test_watch (Hex package)
* Getting ex_json_schema (Hex package)
* Getting observer_cli (Hex package)
* Getting recon (Hex package)
* Getting file_system (Hex package)
* Getting ex2ms (Hex package)
* Getting socket (Hex package)
* Getting yamerl (Hex package)
* Getting scrivener (Hex package)
* Getting hackney (Hex package)
* Getting certifi (Hex package)
* Getting idna (Hex package)
* Getting metrics (Hex package)
* Getting mimerl (Hex package)
* Getting parse_trans (Hex package)
* Getting ssl_verify_fun (Hex package)
* Getting unicode_util_compat (Hex package)
* Getting jose (Hex package)
* Getting combine (Hex package)
* Getting tzdata (Hex package)
* Getting canada (Hex package)
* Getting gen_smtp (Hex package)
* Getting eternal (Hex package)
* Getting jumper (Hex package)
* Getting sleeplocks (Hex package)
* Getting unsafe (Hex package)
* Getting bunt (Hex package)
* Getting crontab (Hex package)
* Getting gen_stage (Hex package)
* Getting slugger (Hex package)
* Getting deferred_config (Hex package)
* Getting artificery (Hex package)
* Getting cowlib (Hex package)
* Getting ranch (Hex package)
* Getting connection (Hex package)
* Getting db_connection (Hex package)
* Getting decimal (Hex package)
* Getting telemetry (Hex package)
* Getting mime (Hex package)
* Getting plug_crypto (Hex package)
You have added/upgraded packages you could sponsor, run `mix hex.sponsor` to learn more

 

오류 발생시!!

root@tommypagy-VirtualBox:/home/reticulum# mix deps.update --all
warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:6

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

* Updating the_end (https://github.com/mozillareality/the_end.git - origin/bug/phoenix-14)
* Updating download (https://github.com/gfodor/download.git - origin/reticulum/master)
* Updating reverse_proxy_plug (https://github.com/mozillareality/reverse_proxy_plug.git - origin/reticulum/master)
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  absinthe 1.4.16
  absinthe_phoenix 1.4.4
  absinthe_plug 1.4.7
  bamboo_smtp 1.7.0
  canada 1.0.2
  canary 1.1.1
  combine 0.10.0
  cowboy 2.9.0
  cowlib 2.1

개요

- figma 문서

 

Run Reticulum against a local Dialog instance

  1. Update the Janus host in dev.exs:
dev_janus_host = "hubs.local"

2. Update the Janus port in dev.exs:

config :ret, Ret.JanusLoadStatus, default_janus_host: dev_janus_host, janus_port: 4443

3. Add the Dialog meta endpoint to the CSP rules in add_csp.ex:

default_janus_csp_rule =
   if default_janus_host,
      do: "wss://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port}/meta",
      else: ""

 

4. Edit the Dialog configuration file turnserver.conf and update the PostgreSQL database connection string to use the coturn schema from the Reticulum database:

   psql-userdb="host=hubs.local dbname=ret_dev user=postgres password=postgres options='-c search_path=coturn' connect_timeout=30"
 
 
5. dialog  npm 설치 
 
cd /home/dialog

root@tommypagy-VirtualBox:/home/dialog# npm install
loadDep:sctp → get        ▄ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine mediasoup@3.10.6: wanted: {"node":">=12"} (current: {"node":"8.10.0","npm":"3.loadDep:np → 200          ▀ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine execa@2.0.4: wanted: {"node":"^8.12.0 || >=9.7.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine np@5.0.3: wanted: {"node":">=8","npm":">=6.8.0","git":">=2.11.0","yarn":">=1.7loadDep:update-notifier → ▄ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

 

 

커널 업데이트 


$apt-get install linux-image-5.4.0-1033-gke


패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-hwe-5.4-headers-5.4.0-42
Use 'sudo apt autoremove' to remove it.
다음의 추가 패키지가 설치될 것입니다 :
  linux-modules-5.4.0-1033-gke
제안하는 패키지:
  fdutils linux-gke-5.4-doc-5.4.0 | linux-gke-5.4-source-5.4.0 linux-gke-5.4-tools
  linux-headers-5.4.0-1033-gke
다음 새 패키지를 설치할 것입니다:
  linux-image-5.4.0-1033-gke linux-modules-5.4.0-1033-gke
0개 업그레이드, 2개 새로 설치, 0개 제거 및 4개 업그레이드 안 함.
23.1 M바이트 아카이브를 받아야 합니다.
이 작업 후 77.2 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-5.4.0-1033-gke amd64 5.4.0-1033.35~18.04.1 [14.1 MB]
0% [1 linux-modules-5.4.0-1033-gke 69.8 kB/14.1 MB 0%]


reboot
root@tommypagy-VirtualBox:/home/reticulum/lib/ret_web/plugs# apt install coturn
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-hwe-5.4-headers-5.4.0-42
Use 'sudo apt autoremove' to remove it.
다음의 추가 패키지가 설치될 것입니다 :
  libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6
제안하는 패키지:
  sip-router xmpp-server
다음 새 패키지를 설치할 것입니다:
  coturn libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads
0개 업그레이드, 8개 새로 설치, 0개 제거 및 4개 업그레이드 안 함.
1,240 k바이트 아카이브를 받아야 합니다.
이 작업 후 6,141 k바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-extra-2.1-6 amd64 2.
받기:3 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-openssl-2.1-6 amd64
받기:4 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-pthreads-2.1-6 amd64
받기:5 http://kr.archive.ubuntu.com/ubuntu bionic/universe amd64 libhiredis0.13 amd64 0.13
받기:6 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7
받기:7 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmysqlclient20 amd6
받기:8 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 coturn amd64 4.5.
내려받기 1,240 k바이트, 소요시간 8초 (149 k바이트/초)
Selecting previously unselected package libevent-core-2.1-6:amd64.
(데이터베이스 읽는중 ...현재 196410개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../0-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package libevent-extra-2.1-6:amd64.
Preparing to unpack .../1-libevent-extra-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-extra-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package libevent-openssl-2.1-6:amd64.
Preparing to unpack .../2-libevent-openssl-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-openssl-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package libevent-pthreads-2.1-6:amd64.
Preparing to unpack .../3-libevent-pthreads-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-pthreads-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package libhiredis0.13:amd64.
Preparing to unpack .../4-libhiredis0.13_0.13.3-2.2_amd64.deb ...
Unpacking libhiredis0.13:amd64 (0.13.3-2.2) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../5-mysql-common_5.8+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.4) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../6-libmysqlclient20_5.7.39-0ubuntu0.18.04.2_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.39-0ubuntu0.18.04.2) ...
Selecting previously unselected package coturn.
Preparing to unpack .../7-coturn_4.5.0.7-1ubuntu2.18.04.3_amd64.deb ...
Unpacking coturn (4.5.0.7-1ubuntu2.18.04.3) ...
libhiredis0.13:amd64 (0.13.3-2.2) 설정하는 중입니다 ...
libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) 설정하는 중입니다 ...
libevent-openssl-2.1-6:amd64 (2.1.8-stable-4build1) 설정하는 중입니다 ...
mysql-common (5.8+1.0.4) 설정하는 중입니다 ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf
libevent-pthreads-2.1-6:amd64 (2.1.8-stable-4build1) 설정하는 중입니다 ...
libmysqlclient20:amd64 (5.7.39-0ubuntu0.18.04.2) 설정하는 중입니다 ...
libevent-extra-2.1-6:amd64 (2.1.8-stable-4build1) 설정하는 중입니다 ...
coturn (4.5.0.7-1ubuntu2.18.04.3) 설정하는 중입니다 ...
그룹 `turnserver' (GID 131) 추가 ...
완료.
시스템 사용자 `turnserver' (126) 추가 ...
새로운 사용자 `turnserver' (126) 을(를) 그룹 `turnserver'(으)로 추가 ...
홈 디렉토리 '/' 을(를) 만들지 않습니다.
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
Processing triggers for systemd (237-3ubuntu10.56) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.2) ...
root@tommypagy-VirtualBox:/home/reticulum/lib/ret_web/plugs# 


vi /etc/turnserver.conf

psql-userdb="host=hubs.local dbname=ret_dev user=postgres password=postgres options='-c search_path=coturn' connect_timeout=30"
 
# coturn 설치 

root@tommypagy-VirtualBox:/home/reticulum/lib/ret_web/plugs# apt install coturn
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-hwe-5.4-headers-5.4.0-42
Use 'sudo apt autoremove' to remove it.
다음의 추가 패키지가 설치될 것입니다 :
  libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6 libhiredis0.13 libmysqlclient20 mysql-common
제안하는 패키지:
  sip-router xmpp-server
다음 새 패키지를 설치할 것입니다:
  coturn libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6 libhiredis0.13 libmysqlclient20 mysql-common
0개 업그레이드, 8개 새로 설치, 0개 제거 및 4개 업그레이드 안 함.
1,240 k바이트 아카이브를 받아야 합니다.
이 작업 후 6,141 k바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-extra-2.1-6 amd64 2.1.8-stable-4build1 [56.2 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-openssl-2.1-6 amd64 2.1.8-stable-4build1 [11.8 kB]
받기:4 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libevent-pthreads-2.1-6 amd64 2.1.8-stable-4build1 [5,228 B]
받기:5 http://kr.archive.ubuntu.com/ubuntu bionic/universe amd64 libhiredis0.13 amd64 0.13.3-2.2 [25.3 kB]
받기:6 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7,308 B]
받기:7 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmysqlclient20 amd64 5.7.39-0ubuntu0.18.04.2 [728 kB]
43% [7 libmysqlclient20 237 kB/728 kB 33%]

아키텍쳐 (Figma)

https://www.figma.com/file/h92Je1ac9AtgrR5OHVv9DZ/Overview-Mozilla-Hubs-Project?node-id=0%3A1 

 

Figma

Created with Figma

www.figma.com

요약

Reticulum이 주 호스트입니다. 그것은 위치, 회전, 객체의 상태를 동기화합니다.

http 요청 및 웹 소켓을 통해 클라이언트 브라우저와 조화를 이룹니다.

대화 상자는 비디오 및 오디오 사용자를 동기화합니다. websocket을 통해 클라이언트 브라우저와 통신합니다.

허브, 스포크는 정적 자산을 제공 한 다음 reticulum이이를 가져 와서 클라이언트 브라우저로 전달합니다.

postREST는 허브 관리자가 CRUD (읽기 업데이트 삭제 만들기)와 같은 기본 작업을 수행하는 데 도움이되는 서버입니다.

허브 관리자는 웹 소켓을 사용하여 인증(로그인)을 위해 postgREST로 커뮤니케이트합니다. CRUD 목적의 허브 관리자는 http 요청 (GET, POST 등)을 망상으로 보낸 다음 postgREST에 프록시 전달을 수행하는 망상체를 보냅니다.



주의!

주요 단계 복제 및 준비 -> 호스트 설정 -> HTTPS (SSL) 설정 -> 실행

1. Cloning and preparation

1.1 Reticulum

It's a backend server that uses elixir and phoenix.

먼저 home 디렉토리에 metalogosin 폴더를 생성합니다. 

 

1.1.1 clone 

 

apt install git


git clone https://github.com/mozilla/reticulum.git
cd reticulum

1.1.2 설치 요구 사항

Postgres Database

Install on linux ubuntu

Install on mac

With brew for installing CLI Postgres

Ubuntu 업데이트
먼저 다음 명령으로 시스템을 업데이트하여 충돌을 피하기 위해 모든 패키지가 최신 상태인지 확인하십시오.

sudo apt update && sudo apt upgrade -y

sudo apt-get install postgresql postgresql-contrib

 

 

참고사항 

https://cowhacker.tistory.com/91

 

우분투에서 PostgreSQL설치 및 사용법

==============================설치법============================== 우분투에 관계형 데이터베이스 중 PostgreSQL 설치하는 법이다. sudo apt-get install postgresql postgresql-contrib 위 명령어를 통해 Po..

cowhacker.tistory.com

간단하게 사용해보기 

사용자 생성 / 암호 변경

사용자: postgres

암호: postgres

그것을 바꾸십시오.

ALTER USER postgres WITH SUPERUSER

Elixir and Erlang (Elixir 1.12 및 erlang version 23)

이 자습서를 따라 설치할 수 있습니다. Elixir and Erlang의 버전에주의하십시오.

ASDF 설치 => 플러그인 설치 => Erlang/OTP 설치 => 엘릭서 설치 => 버전 설정 => 결론

root@tommypagy-VirtualBox:/home# sudo apt install curl git
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
패키지 git는 이미 최신 버전입니다 (1:2.17.1-1ubuntu0.12).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-42-generic linux-hwe-5.4-headers-5.4.0-42
  linux-image-5.4.0-42-generic linux-modules-5.4.0-42-generic
  linux-modules-extra-5.4.0-42-generic
Use 'sudo apt autoremove' to remove them.
다음 새 패키지를 설치할 것입니다:
  curl libcurl4
0개 업그레이드, 2개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
379 k바이트 아카이브를 받아야 합니다.
이 작업 후 1,053 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.19 [220 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.19 [159 kB]
내려받기 379 k바이트, 소요시간 3초 (150 k바이트/초)
Selecting previously unselected package libcurl4:amd64.
(데이터베이스 읽는중 ...현재 208163개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.19_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.19) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.19_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.19) ...
libcurl4:amd64 (7.58.0-2ubuntu3.19) 설정하는 중입니다 ...
curl (7.58.0-2ubuntu3.19) 설정하는 중입니다 ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
root@tommypagy-VirtualBox:/home# git clone https://github.com/asdf-vm/asdf.git ~/.asdf
'/root/.asdf'에 복제합니다...
remote: Enumerating objects: 7403, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 7403 (delta 63), reused 149 (delta 59), pack-reused 7238
오브젝트를 받는 중: 100% (7403/7403), 1.98 MiB | 3.36 MiB/s, 완료.
델타를 알아내는 중: 100% (4289/4289), 완료.
root@tommypagy-VirtualBox:/home# ll
합계 16
drwxr-xr-x  4 root      root      4096  9월  1 21:03 ./
drwxr-xr-x 24 root      root      4096  9월  1 20:42 ../
drwxr-xr-x  3 root      root      4096  9월  1 21:03 metalogosin/
drwxr-xr-x 14 tommypagy tommypagy 4096  9월  1 20:40 tommypagy/
root@tommypagy-VirtualBox:/home# . $HOME/.asdf/asdf.sh
root@tommypagy-VirtualBox:/home# ll
합계 16
drwxr-xr-x  4 root      root      4096  9월  1 21:03 ./
drwxr-xr-x 24 root      root      4096  9월  1 20:42 ../
drwxr-xr-x  3 root      root      4096  9월  1 21:03 metalogosin/
drwxr-xr-x 14 tommypagy tommypagy 4096  9월  1 20:40 tommypagy/
root@tommypagy-VirtualBox:/home# asdf plugin add erlang
initializing plugin repository...'/root/.asdf/repository'에 복제합니다...
remote: Enumerating objects: 4299, done.
remote: Counting objects: 100% (126/126), done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 4299 (delta 77), reused 112 (delta 65), pack-reused 4173
오브젝트를 받는 중: 100% (4299/4299), 981.89 KiB | 4.70 MiB/s, 완료.
델타를 알아내는 중: 100% (2258/2258), 완료.
root@tommypagy-VirtualBox:/home# asdf
version: v0.10.2-b8f6218


root@tommypagy-VirtualBox:/home# asdf list-all erlang
R13B03
R13B04
R14A
R14B
... 중략 
24.3.4.1
24.3.4.2
24.3.4.3
24.3.4.4
25.0-rc1
25.0-rc2
25.0-rc3
25.0
25.0.1
25.0.2
25.0.3
25.0.4
root@tommypagy-VirtualBox:/home# asdf install erlang 23.2.1
asdf_23.2.1 is not a kerl-managed Erlang/OTP installation
No build named asdf_23.2.1
Downloading 23.2.1 to /root/.asdf/downloads/erlang/23.2.1...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 94.6M  100 94.6M    0     0  1332k      0  0:01:12  0:01:12 --:--:--  712k
Extracting source code
Building Erlang/OTP 23.2.1 (asdf_23.2.1), please wait...
WARNING: It appears that a required development package 'libssl-dev' is not installed.
WARNING: It appears that a required development package 'make' is not installed.
WARNING: It appears that a required development package 'automake' is not installed.
WARNING: It appears that a required development package 'autoconf' is not installed.
WARNING: It appears that a required development package 'libncurses5-dev' is not installed.
WARNING: It appears that a required development package 'gcc' is not installed.
Build failed.
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/.asdf/plugins/erlang/kerl-home/builds/asdf_23.2.1/otp_src_23.2.1/erts':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
ERROR: /root/.asdf/plugins/erlang/kerl-home/builds/asdf_23.2.1/otp_src_23.2.1/erts/configure failed!
./configure: 353: kill: No such process

./otp_build: 1: ./otp_build: make: not found
./otp_build: 927: ./otp_build: make: not found

Please see /root/.asdf/plugins/erlang/kerl-home/builds/asdf_23.2.1/otp_build_23.2.1.log for full details.
root@tommypagy-VirtualBox:/home# asdf list-all elixir
0.12.4
0.12.5
0.13.0
0.13.1

... 중략
main-otp-25
master
master-otp-21
master-otp-22
master-otp-23
master-otp-24
root@tommypagy-VirtualBox:/home# asdf install elixir 1.11.2-otp-23
==> Checking whether specified Elixir release exists...
==> Downloading 1.11.2-otp-23 to /root/.asdf/downloads/elixir/1.11.2-otp-23/elixir-precompiled-1.11.2-otp-23.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5720k  100 5720k    0     0  9242k      0 --:--:-- --:--:-- --:--:-- 9242k
==> Copying release into place
root@tommypagy-VirtualBox:/home# asdf local erlang 23.2.1
version 23.2.1 is not installed for erlang
root@tommypagy-VirtualBox:/home# asdf local elixir 1.11.2-otp-23
tail: 읽기를 위해 '/home/.tool-versions'을(를) 열 수 없음: 그런 파일이나 디렉터리가 없습니다
root@tommypagy-VirtualBox:/home# 23^C
root@tommypagy-VirtualBox:/home# asdf global erlang 23.2.1
version 23.2.1 is not installed for erlang
root@tommypagy-VirtualBox:/home# asdf global elixir 1.11.2-otp-23

1.1.3 이 명령을 실행합니다.

sudo -i -u postgres

 

  1. mix deps.get
root@tommypagy-VirtualBox:/home/storage/dev# mix deps.get
/root/.asdf/installs/elixir/1.11.2-otp-23/bin/elixir: 230: exec: erl: not found
root@tommypagy-VirtualBox:/home/storage/dev# asdf install erlang 21.2.3
asdf_21.2.3 is not a kerl-managed Erlang/OTP installation
No build named asdf_21.2.3
Downloading 21.2.3 to /root/.asdf/downloads/erlang/21.2.3...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 32 84.4M   32 27.3M    0     0  6487k      0  0:00:13  0:00:04  0:00:09 7081k

오류 발생시 apt-get install gcc

 

  1. mix ecto.create
    • If step 2 fails, you may need to change the password for the postgres role to match the password configured dev.exs.
    • From within the psql shell, enter 
    •  
    • ALTER USER postgres WITH PASSWORD 'postgres';
    • create database ret_dev;
  2. From the project directory mkdir -p storage/dev
  1.  

1.1.4 로컬 대화 상자 인스턴스에 대해 Reticulum 실행

  1. Janus 호스트를 업데이트 :dev.exs
dev_janus_host = "localhost"
  1. 야누스 포트를 업데이트 :dev.exs
config :ret, Ret.JanusLoadStatus, default_janus_host: dev_janus_host, janus_port: 4443
  1. 대화 상자 메타 끝점을 CSP 규칙에 추가합니다.add_csp.ex
default_janus_csp_rule =
   if default_janus_host,
      do: "wss://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port}/meta",
      else: ""
  1. Find on google how to install coturn, and manage it

install coturn on ubuntu

  1. Edit the Dialog configuration file and update the PostgreSQL database connection string to use the coturn schema from the Reticulum database:turnserver.conf
psql-userdb="host=localhost dbname=ret_dev user=postgres password=postgres options='-c search_path=coturn' connect_timeout=30"

1.2 Dialog

Using mediasoup RTC will handle audio and video real-time communication. like camera stream, share screen.

1.2.1 Clone and get dependencies

git clone https://github.com/mozilla/dialog.git
cd dialog
npm install

1.2.2 Setting up secret key

thanks to this comment

 

What does "hubs secret repo" mean in the reticulum readme when trying to run reticulum locally? · Discussion #3323 · mozilla/h

Hi, I'm going through the steps in "https://github.com/mozilla/reticulum" and trying to set it up. But I'm not sure "hubs secret repo" means, so I can't go ahead. Ca...

github.com

Generate RSA (Public and Private key) with generator online

 

Online RSA Key Generator

Text to encrypt: This is a test!   Encrypt / Decrypt Encrypted:

travistidwell.com

make empty file and fill it with RSA Public keyperms.pub.pem

-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgH/HtmnCrkJNRaN2jiHj7zorHG6nZ2QWnY0gEu7KtPD0s0HoQKwZ
qBEr8JwgHENQR0JGlVDbNyG5cFfCXzyf9uC3PllvB1qeqGTSZ9XlUwJowpUK1m07
C5acSQHLl27PmkTdwsOaN1d8ASyfd4yfcpvlOsvXtGODKNS2N6f2yVfDAgMBAAEC
gYAzGUp5QMEvAne2xtJP+zbPrC3Skl9mRyT6KrlnhOiW80Q8NwSlzhzHwSqXRMAI
qzHT7yYHD6MceWvTrIcpV08CN37U6bwGcMCD4TrJ/UjMHR7laxXadudWcT2drlHP
bdwMBFFb/0u9PB5ZC/jKNTo8hd6j36HL+E/ZFhGVoXtGAQJBAPGtqXaMsW9sgL6R
VZKEsJawsB2NUetik/FYmMVwah0PGevpcA/f7zytsKryPC1E18oDRviLXwf2hqhF
iVwTFssCQQCHWi2K6XesMk/mNvpOPxFfPzFpHKqouhJeeXxJhIArFgLub6wmPc9S
H7PONlQPXHqmXE7QGeaIDZBDSsblkKvpAkB2iUbk7nzYuc8rqPzfsFUsk9zNodLc
MK1/YoUL0ec5+X4tR4G/R4Z/rHFKZyU8ztdILfNRVIp3zWKehfypPHOhAkADxW1z
a2HcOGKlhW6f833ma3pS9WuD2/tbCoN+AOUZTjmyrwXa4un93chCvJzG+MqqC/Re
M/qKW+ZjGZhFGSzRAkEA4ecpESXV6QDiYfoFSPFD6xghelI+c3iz+3+wJg75dChE
otsSII0X+U7PdbZFOnO6/EjJ9Dm6DTDrPF0mDokfsA==
-----END RSA PRIVATE KEY-----



=============================


-----BEGIN PUBLIC KEY-----
MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgH/HtmnCrkJNRaN2jiHj7zorHG6n
Z2QWnY0gEu7KtPD0s0HoQKwZqBEr8JwgHENQR0JGlVDbNyG5cFfCXzyf9uC3Pllv
B1qeqGTSZ9XlUwJowpUK1m07C5acSQHLl27PmkTdwsOaN1d8ASyfd4yfcpvlOsvX
tGODKNS2N6f2yVfDAgMBAAE=
-----END PUBLIC KEY-----

 

Goto reticulum directory on change PermsToken with the RSA private key that you generate before.reticulum/config/dev.exs

config :ret, Ret.PermsToken, perms_key: "-----BEGIN RSA PRIVATE KEY----- paste here copyed key but add every line \n before END RSA PRIVATE KEY-----"

1.3 스포크

여기에서는 장면 / 건물을 무엇이든 만들거나 편집 할 수 있습니다.

1.3.1 복제

git clone https://github.com/mozilla/Spoke.git
cd Spoke
yarn install

 

 

1.3.2 기본 경로 설정

슬래시에서 기본 URL을 사용하여 기본을 알고 있기를 바랍니다. react-router-dom/localhost:9090

그러나 결국, 우리는 스포크에 액세스 할 것입니다. localhost:4000/spoke

따라서 기본 URL을 다음과 같이 설정해야합니다. /spoke

에 대한 명령에 매개 변수를 추가하십시오. ROUTER_BASE_PATH=/spokestartpackage.json

cross-env NODE_ENV=development ROUTER_BASE_PATH=/spoke BASE_ASSETS_PATH=https://localhost:9090/ webpack-dev-server --mode development --https --cert certs/cert.pem --key certs/key.pem

1.4 허브

 리포지토리에는 허브 클라이언트 및 허브 관리자(허브/관리자)가 포함되어 있습니다.

종속성 복제 및 설치

git clone https://github.com/mozilla/hubs.git
cd hubs
npm ci

 

1.5 허브 관리자

허브 리포지토리에서 이동한 다음 실행할 수 있습니다hubs/admin

npm install

2. 호스트 설정

우리는 도메인을 사용하지 않습니다. 우리는 사용한다. hubs.locallocalhost

따라서 reticulum, 대화 상자, 허브, 허브 관리자, spoke의 모든 호스트 구성을 변경하십시오.

3. HTTPS(SSL) 설정

모든 서버는 HTTPS와 함께 제공되어야 합니다. 인증서와 키 파일을 생성해야 합니다

3.1 인증서 생성 및 신뢰 만들기

레티큘럼 디렉토리에서 터미널 열기

실행 명령

mix phx.gen.cert

폴더에 키와 인증서가 생성됩니다.selfsigned_key.pemselfsigned.pempriv/cert

이름 바꾸기 selfsigned_key.pemkey.pem

이름 바꾸기 selfsigned.pemcert.pem

이제 우리는 가지고 있고 파일링합니다.key.pemcert.pem

Mac OS에서는 Windows 나 Linux에서 알지 못합니다. 직접 찾아주세요.

탭 시스템에서 해당 인증서를 찾은 다음 두 번 클릭하고 항상 신뢰하도록 변경하십시오.cert.pem

를 선택하고 복사합니다. 다음 단계에서는 이 두 파일을 허브, 허브 관리자, 스포크, 대화 상자 및 망상으로 배포합니다.cert.pemkey.pem

Oke는 망상체에 처음 설치되었습니다.

3.2 망상체에 대한 https 설정

에서 우리는 인증서 및 키 파일의 경로를 설정해야합니다.config/dev.exs

3.3 허브에 대한 HTTPS 설정

해당 파일을 붙여 넣기 hubs/certs

우리는 허브를 운영합니까? 그래서 추가 매개 변수를 추가하십시오. npm run localpackage.json

--https --cert certs/cert.pem --key certs/key.pem

이 그림처럼

3.4 Setting HTTPS for hubs admin

Paste that file into hubs/admin/certs

We run hubs with right? so add additional params on npm run localpackage.json

--https --cert certs/cert.pem --key certs/key.pem

Like this picture

3.5 Setting HTTPS for spoke

Paste that file into spoke/certs

We run spoke with right? So change the commandyarn startstart

With this

cross-env NODE_ENV=development ROUTER_BASE_PATH=/spoke BASE_ASSETS_PATH=https://localhost:9090/ webpack-dev-server --mode development --https --cert certs/cert.pem --key certs/key.pem

Short description:

BASE_ASSETS_PATH = basicaly we run the spoke on localhost:9090

3.6 Setting https for dialog

Paste that file into dialog/certs

rename to cert.pemfullchain.pem

rename to key.pemprivkey.pem

4. Running

Open five terminals. for each reticulum, dialog, spoke, hubs, hubs admin.

4.1 Run reticulum

with command

iex -S mix phx.server

4.2 Run dialog

Edit the command on the package.json withstart

MEDIASOUP_LISTEN_IP=127.0.0.1 MEDIASOUP_ANNOUNCED_IP=127.0.0.1 DEBUG=${DEBUG:='*mediasoup* *INFO* *WARN* *ERROR*'} INTERACTIVE=${INTERACTIVE:='true'} node index.js

For giving params and MEDIASOUP_LISTEN_IPMEDIASOUP_ANNOUNCED_IP

명령으로 대화 상자 서버를 시작하십시오.

npm run start

127.0.0.1 Mac / Linux에서 localhost의 기본 IP입니다.이 명령으로 IP를 볼 수 있습니다.

sudo nano /etc/hosts

4.3 스포크 실행

명령으로

yarn start

4.4 허브 및 허브 관리자 실행

각각 명령이 있습니다.

npm run local

4.5 postgREST 서버 실행

이것에 대한 자세한 내용은 다음과 같습니다.

다운로드 postREST

sudo apt install libpq-dev
wget https://github.com/PostgREST/postgrest/releases/download/v9.0.0/postgrest-v9.0.0-linux-static-x64.tar.xz
tar -xf postgrest-v9.0.0-linux-static-x64.tar.xz

망상 iex에

이것을 붙여 넣는다.

jwk = Application.get_env(:ret, Ret.PermsToken)[:perms_key] |> JOSE.JWK.from_pem(); JOSE.JWK.to_file("reticulum-jwk.json", jwk)

그러면 Reticulum 디렉토리에 생성됩니다.reticulum-jwk.json

파일 만들기reticulum.conf

nano reticulum.conf

붙여 넣기

# reticulum.conf
db-uri = "postgres://postgres:postgres@localhost:5432/ret_dev"
db-schema = "ret0_admin"
db-anon-role = "postgres_anonymous"
jwt-secret = "@/absolute_path_to_your_file/reticulum-jwk.json"
jwt-aud = "ret_perms"
role-claim-key = ".postgrest_role"

그러면 폴더는 다음과 같이 보입니다(두 개의 파일 포함).

/
   postgrest
   reticulum.conf

그런 다음 postREST를 다음과 같이 실행하십시오.

postgrest reticulum.conf



Urraaaa, 이제 액세스 할 수 있습니다.

잠금 기호 사용(SSL 보안)

허브

https://localhost:4000

허브 관리자

https://localhost:4000/admin

https://localhost:4000/spoke

댓글