diff --git a/Docs/index.html b/Docs/index.html index b66adba..624be17 100644 --- a/Docs/index.html +++ b/Docs/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +
+// Do ensure that the docker command does not need sudo to run sudo chmod 666 /var/run/docker.sock@@ -273,7 +279,7 @@ To set up the internal dependencies and build the entire go code into a single binary -+make
+.\install.bat
.bashrc+export P2PRC=/<PATH>/p2p-rendering-computation export PATH=/<PATH>/p2p-rendering-computation:${PATH}@@ -304,14 +310,14 @@ export PATH=/<PATH>/p2p-rendering-computation:${PATH}3.2.5. Test if binary works
-+p2prc --help
- Output:
-+NAME: p2p-rendering-computation - p2p cli application to create and access VMs in other servers @@ -373,7 +379,7 @@ GLOBAL OPTIONS:@@ -413,7 +419,7 @@ p2prc --rm=<server ip address> --id=<docker container id>4.0.1. Start as a server
-@@ -381,7 +387,7 @@ p2prc -s+p2prc -s@@ -405,7 +411,7 @@ p2prc --touch=<server ip address> -p <number of ports> --gpu The docker id is present in the output where you create a container -4.0.2. View server Specification
-@@ -393,7 +399,7 @@ p2prc --specs=<ip address> use the+p2prc --specs=<ip address>--gpuif you know the other machine has a gpu. -+p2prc --touch=<server ip address> -p <number of ports> --gpu+p2prc --rm=<server ip address> --id=<docker container id>4.0.5. Adding servers to ip table
-@@ -421,7 +427,7 @@ p2prc --as=<server ip address you want to add>+p2prc --as=<server ip address you want to add>4.0.6. Update ip table
-@@ -429,7 +435,7 @@ p2prc --us+p2prc --us4.0.7. List Servers
-@@ -437,7 +443,7 @@ p2prc --ls+p2prc --ls4.0.8. View Network interfaces
-@@ -445,7 +451,7 @@ p2prc --ni+p2prc --ni4.0.9. Viewing Containers created Client side
-@@ -453,7 +459,7 @@ p2prc --tc+p2prc --tc4.0.10. Running plugin
-@@ -461,7 +467,7 @@ p2prc --plugin <plugin name> --id <container id or group id>+p2prc --plugin <plugin name> --id <container id or group id>4.0.11. Create group
-@@ -469,7 +475,7 @@ p2prc --cgroup+p2prc --cgroup4.0.12. Add container to group
-@@ -477,7 +483,7 @@ p2prc --group <group id> --id <container id>+p2prc --group <group id> --id <container id>4.0.13. View groups
-@@ -485,7 +491,7 @@ p2prc --groups+p2prc --groups4.0.14. View specific group
-@@ -493,7 +499,7 @@ p2prc --group <group id>+p2prc --group <group id>4.0.15. Delete container from group
-@@ -501,7 +507,7 @@ p2prc --rmcgroup --group <group id> --id <container id>+p2prc --rmcgroup --group <group id> --id <container id>4.0.16. Delete entire group
-@@ -509,7 +515,7 @@ p2prc --rmgroup <group id>+p2prc --rmgroup <group id>4.0.17. Pulling plugin from a remote repo
-@@ -517,7 +523,7 @@ p2prc --pp <repo link>+p2prc --pp <repo link>4.0.18. Deleting plugin from the plugin directory
-@@ -525,28 +531,28 @@ p2prc --rp <plugin name>+p2prc --rp <plugin name>-4.0.19. Added custom metadata about the current node
-+p2prc --amd "custom metadata"-4.0.20. MapPort and link to domain name
++4.0.20. MapPort and link to domain name
Allows to expose remote ports from a machine in the P2P network.
-+p2prc --mp <port no to map> --dn <domain name to link Mapped port against>-
- MapPort in remote machine
+- MapPort in remote machine
-This is to ensure ports on remote machines on the P2PRC can be easily opened.
-+p2prc --mp <port no to map> --dn <domain name to link Mapped port against> --ra <remote server address>@@ -555,15 +561,15 @@ p2prc --mp <port no to map> --dn <domain name to link Mapped port again-4.0.21. Add root node
++4.0.21. Add root node
@@ -674,7 +680,7 @@ from the TURN server. The flow below describes the workflow.Adds a root node to P2RRC and overwrites all other nodes in the ip table. To be only added before the network is started and with the intention of a fresh instance.
-+p2prc --arn --ip <root node ip address> -p <root node port no>- Call
-/FRPPort+http://<turn server ip>:<server port no>/FRPport@@ -763,7 +769,7 @@ p2prc.h p2prc.so Below are a sample set of commands to open the bindings implementation. -+# run cd Bindings/ # list files @@ -851,7 +857,7 @@ that convert a go object to JSON string initially and converts it to- A Pseudo code to refer to the common function implementation shape could be represented as:
-+func <Function name> (output *C.char) { <response>,<error> := <P2PRC function name>(<parameters if needed>) if <error> != nil { @@ -869,8 +875,8 @@ func <Function name> (output *C.char) {6.3. Current languages supported
--6.3.1. Python
++-6.3.1. Python
@@ -907,8 +913,8 @@ called from other programming languages.
-6.3.2. Haskell
++-6.3.2. Haskell
P2PRC officially supports Haskell bindings and will further support @@ -943,18 +949,28 @@ configuration file was generated using JSON format.
{ - "MachineName": "pc-74-120.customer.ask4.lan", + "MachineName": "Akilans-MacBook-Pro.local-975261X", "IPTable": "/Users/akilan/Documents/p2p-rendering-computation/p2p/iptable/ip_table.json", "DockerContainers": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/", "DefaultDockerFile": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/docker-ubuntu-sshd/", + "DockerRunLogs": "/tmp/", "SpeedTestFile": "/Users/akilan/Documents/p2p-rendering-computation/p2p/50.bin", "IPV6Address": "", "PluginPath": "/Users/akilan/Documents/p2p-rendering-computation/plugin/deploy", "TrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/trackcontainers.json", "ServerPort": "8088", + "ProxyPort": "", "GroupTrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/grouptrackcontainers.json", - "FRPServerPort": "True", - "BehindNAT": "True", + "FRPServerPort": true, + "BehindNAT": true, + "IPTableKey": "QH3yQrGRe2X4", + "PublicKeyFile": "/Users/akilan/Documents/p2p-rendering-computation/p2prc.publicKey", + "PrivateKeyFile": "/Users/akilan/Documents/p2p-rendering-computation/p2prc.privateKey", + "PemFile": "/Users/akilan/Documents/p2p-rendering-computation/cert.pem", + "KeyFile": "/Users/akilan/Documents/p2p-rendering-computation/key.pem", + "BareMetal": false, + "UnsafeMode": false, + "Test": false, "CustomConfig": null }@@ -1020,7 +1036,7 @@ from the TURN server. The flow below describes the workflow.- Call
-/FRPPort+http://<turn server ip>:<server port no>/FRPport@@ -1051,14 +1067,73 @@ func main() {-11. Blog posts
++11. Simulation
+-+The simulation library is a really simple library to locally +run serveral instances of P2PRC to test the functionality +of sending information through the network and particularly +the Node discovery mechanism. There are current 5 commands +which can be used as shown below: +
-+11.1. Self host within 5 minutes any program
+++11.1. Command
++
+- P2PRC instances "number of instances" : Starts p2prc processes +based on the number of number instances provided. This includes +creating temporary folders with independent IPTables.
+- Start all instances "number of instances": Starts the P2PRC instances +created. This function enters into the instance directory and runs +```p2prc -s &``` with a delay for approximately 3 seconds. This allows +each independent created node to learn about each other.
+- IP Tables after Started number of instances": Prints the IPTable of +each independant node.
+- Remove all test files: Removes all test files created which needed for +testing the generated P2PRC instances.
+- Kill all instances: Kills all the background P2PRC instances created.
+++11.2. Sample bash instructions
+++++# Unset default P2PRC env path +unset P2PRC + +# Run with 2 nodes +P2PRC_instances 3 + +# Start instances +Start_all_instances 3 + +# List ip tables of nodes started +IP_Tables_after_Started 3 + +# Remove test files created +Remove_all_test_files + +# Kill all instances +Kill_all_instances +++Source code: https://github.com/Akilan1999/p2p-rendering-computation/blob/master/Simulation/simulation.sh +
++12. Blog posts
++++12.1. Self host within 5 minutes any program
++@@ -1068,7 +1143,7 @@ func main() {
- Author: Akilan Selvacoumar
- Date: 28-01-2025
- Video tutorial:
-+ @@ -1078,9 +1153,9 @@ This is a fun expirement for anyone to try to quickly run a server and quickly do a map port and domain name mapping in a single command.--11.1.1. 1. Find a program you want to run
-++-12.1.1. 1. Find a program you want to run
+Let's try to setup a really easy program (Let's do with Linkwarden with docker compose :) ). This is under the assumption you have docker @@ -1088,8 +1163,8 @@ compose installed on your local machine.
-
- Let's run Linkwarden using docker compose and P2PRC
-+- Let's run Linkwarden using docker compose and P2PRC
+@@ -1177,17 +1252,17 @@ ex: https://linkwarden.akilan.io-12. Ideas for future potencial features
-++13. Ideas for future potencial features
+-Consists of personal loideas for the future of P2PRC. At moment only has main contributors writiing to this.
-12.1. To support hetrogenous set of Nodes that cannot run P2PRC
-++13.1. To support hetrogenous set of Nodes that cannot run P2PRC
+-This stems from a personal issue I have when doing research on CheriBSD kernel. For my research I am using the ARM morello @@ -1202,9 +1277,9 @@ and would introduce a new layer fault tolerance within a local network nodes.
-12.1.1. Assumptions:
-++-13.1.1. Assumptions:
+
- I have a Morello board that cannot run P2PRC
- The Morello has a local IP address (ex: 192.168.0.10)
@@ -1216,9 +1291,9 @@ as well look into custom tasks into the hetrogenous hardware.-12.1.2. Set of interesting possible:
-++-13.1.2. Set of interesting possible:
+We build a cool set possibilities before and use this to build up the implementation plan. @@ -1234,9 +1309,9 @@ weight hypervisors.
-12.1.3. Implementation
-++13.1.3. Implementation
+-
- To use implementations similar to socat to ensure we can bind address of local nodes to a node running P2PRC and the node running P2PRC can do a local map port.
@@ -1249,7 +1324,7 @@ other nodes can access the Morello board who have permission access.+diff --git a/Docs/index.org b/Docs/index.org index 265680e..98e79c5 100644 --- a/Docs/index.org +++ b/Docs/index.org @@ -690,18 +690,28 @@ configuration file was generated using JSON format. #+begin_src json { - "MachineName": "pc-74-120.customer.ask4.lan", + "MachineName": "Akilans-MacBook-Pro.local-975261X", "IPTable": "/Users/akilan/Documents/p2p-rendering-computation/p2p/iptable/ip_table.json", "DockerContainers": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/", "DefaultDockerFile": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/docker-ubuntu-sshd/", + "DockerRunLogs": "/tmp/", "SpeedTestFile": "/Users/akilan/Documents/p2p-rendering-computation/p2p/50.bin", "IPV6Address": "", "PluginPath": "/Users/akilan/Documents/p2p-rendering-computation/plugin/deploy", "TrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/trackcontainers.json", "ServerPort": "8088", + "ProxyPort": "", "GroupTrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/grouptrackcontainers.json", - "FRPServerPort": "True", - "BehindNAT": "True", + "FRPServerPort": true, + "BehindNAT": true, + "IPTableKey": "QH3yQrGRe2X4", + "PublicKeyFile": "/Users/akilan/Documents/p2p-rendering-computation/p2prc.publicKey", + "PrivateKeyFile": "/Users/akilan/Documents/p2p-rendering-computation/p2prc.privateKey", + "PemFile": "/Users/akilan/Documents/p2p-rendering-computation/cert.pem", + "KeyFile": "/Users/akilan/Documents/p2p-rendering-computation/key.pem", + "BareMetal": false, + "UnsafeMode": false, + "Test": false, "CustomConfig": null } #+end_src @@ -783,10 +793,48 @@ func main() { } } #+end_src +* Simulation +The simulation library is a really simple library to locally +run serveral instances of P2PRC to test the functionality +of sending information through the network and particularly +the Node discovery mechanism. There are current 5 commands +which can be used as shown below: +** Command +- ***P2PRC instances "number of instances"*** : Starts p2prc processes + based on the number of number instances provided. This includes + creating temporary folders with independent IPTables. +- ***Start all instances "number of instances"***: Starts the P2PRC instances + created. This function enters into the instance directory and runs + ```p2prc -s &``` with a delay for approximately 3 seconds. This allows + each independent created node to learn about each other. +- ***IP Tables after Started number of instances"***: Prints the IPTable of + each independant node. +- ***Remove all test files***: Removes all test files created which needed for + testing the generated P2PRC instances. +- ***Kill all instances***: Kills all the background P2PRC instances created. +** Sample bash instructions +#+begin_src bash +# Unset default P2PRC env path +unset P2PRC +# Run with 2 nodes +P2PRC_instances 3 +# Start instances +Start_all_instances 3 + +# List ip tables of nodes started +IP_Tables_after_Started 3 + +# Remove test files created +Remove_all_test_files + +# Kill all instances +Kill_all_instances +#+end_src +Source code: https://github.com/Akilan1999/p2p-rendering-computation/blob/master/Simulation/simulation.sh * Blog posts ** Self host within 5 minutes any program
![]()
Figure 1: Implementation idea (To be improved upon)
@@ -1261,7 +1336,7 @@ other nodes can access the Morello board who have permission access.