forked from vircadia/vircadia-native-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vircadia#1734 from vircadia/feature/multi-server
Docker configurations for servers.
- Loading branch information
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Running multiple containers | ||
|
||
## _This is the instruction of how to establish seven containers to let them connect with each other using docker-compose command in a YAML file. (one domain server + six assignment clients)_ | ||
|
||
|
||
--- | ||
## _How to start the containers_ | ||
|
||
- clone the repo or single yaml file and jump into that directory. | ||
|
||
- modify the following commands in the yaml file. | ||
|
||
``` | ||
domain-server: | ||
image: <image_name> | ||
assignment-client: | ||
image: <image_name> | ||
``` | ||
|
||
- run the following command in your terminal. | ||
|
||
``` | ||
docker-compose up -d --scale assignment-client=6 | ||
``` | ||
|
||
- after running the above command, check all running and stopped containers by typing (or you can find the containers on docker desktop if you have). | ||
|
||
``` | ||
docker ps | ||
``` | ||
|
||
``` | ||
docker ps -a | ||
``` | ||
|
||
--- | ||
|
||
## _How to check the servers in the containers are operating properly_ | ||
|
||
- start vircadia and type localhost in explore app. | ||
|
||
- type "localhost:40100" in your web explorer. | ||
|
||
- you should see seven (or six) nodes by clicking Nodes on top. | ||
|
||
--- | ||
|
||
## _Note: the other five assigment client containers have to be started manually either through terminal or docker desktop_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# We need 7 containers in total, one domain server | ||
# + six assignment clients | ||
# -a 172.17.0.1 | ||
|
||
version: "3.8" | ||
services: | ||
domain-server: | ||
image: james422481/vircadia_server:1 | ||
ports: | ||
- "40100:40100/tcp" | ||
- "40102:40102/udp" | ||
command: /opt/vircadia/domain-server | ||
assignment-client: | ||
image: james422481/vircadia_server:1 | ||
ports: | ||
- "40200-40205:40200/udp" | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
command: /opt/vircadia/assignment-client -a host.docker.internal -p 40200 --server-port 40102 --disable-domain-port-auto-discovery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Building the server image | ||
|
||
## _This is the instruction of how to build the image that contains the domain-server and the assignment-clients (and the ice-server) using the Dockerfile_ | ||
|
||
--- | ||
## _How to build the image_ | ||
|
||
- clone the repo or the folder named "docker-image-generation" and jump into that directory. | ||
|
||
- copy the .deb file into this folder and modify the following command in Dockerfile. | ||
|
||
``` | ||
COPY <filename.deb> | ||
``` | ||
|
||
- run the following command in your terminal (Ubuntu 20.04). | ||
|
||
- make sure you assign a name to the image by replacing "image_name". | ||
|
||
``` | ||
docker build -t <image_name> . | ||
``` | ||
|
||
--- | ||
|
||
## _How to check the image is built successfully_ | ||
|
||
- run the following command (after starting docker desktop if you have). | ||
|
||
``` | ||
docker image ls | ||
``` | ||
|
||
- if the image is built properly, you should be able to find the image in the list. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ubuntu:20.04 | ||
COPY vircadia-server_2022.12.02-20221123-4ff3625-0ubuntu1-1_amd64.deb . | ||
RUN apt update | ||
RUN apt install libcap2-bin -y | ||
RUN apt install systemd -y | ||
RUN apt -y install ./vircadia-server_2022.12.02-20221123-4ff3625-0ubuntu1-1_amd64.deb |