In this repo is the files and test AgentIDs that tell Holochain how to run Holo-REA as a webservice.
-
Provision an AWS Ubuntu node.
As of 28th Jan 2019 the Holo-REA and NixOS shell contain a lot of of build files (routhly 4GB so it's safer to provision a machine that has at least 16GBs. -
Log into your machine with ssh.
-
Install NixOS
curl https://nixos.org/nix/install | shthen run. ~/.nix-profile/etc/profile.d/nix.shFurther instructions here if needed: https://developer.holochain.org/docs/install/ You can check if NixOS shell is running by runningnix-shell --version -
Clone the Holo-REA project from: https://github.com/holo-rea/holo-rea
git clone https://github.com/holo-rea/holo-rea.git -
Enter into the Holo-REA directory then run
nix-shellthis will take a while to run. -
Now you need to copy the 2 conductor files with their associated Agent keys into a folder that sits beside the holo-REA project folder. The fastest way to do this is to enter into the same directory as the Holo-REA folder and then run
git clone https://github.com/BeefLedger/holochain-cloud-config.git
This allows us to create 2 instances of Holo-REA with 2 different agents on the same machine. If you would like to create another idenity you can use the hc helper tool. hc keygen for further reference you can run hc --help.
- Now it's time to run the 2 instances in different windows. When you cloned the holochain-cloud-config repo in step 6 you there was a package.json file with the following node scripts.
"dht:conductor1": "holochain -c ../holochain-cloud-config/conductor-config-Agent1-httpinterface-4101.toml", "dht:conductor2": "holochain -c ../holochain-cloud-config/conductor-config-Agent2-httpinterface-4201.toml",
-
Now start the frist instance with the first Agent ID with "npm run dht:conductor1"
IMPORTANT: Make sure you start the nix-shell from the holo-rea folder before trying to run these node scripts or it won't workAnd you will see Agent 1 Holo-REA instance 1 running 'http_interface' to port: 4101' -
Now startt the second instance with the second Agent ID with "npm run dht:conductor2" And you should see Agent 2 Holo-REA instance 2 running 'http_interface' to port: 4201'
Well done you now have 2 holo-rea instances running on AWS.