Linode.com
These instructions can also be adapted to work on GCE or other cloud infrastructure.
The following video shows the process: https://www.youtube-nocookie.com/embed/e4Vp3quzlhM
Stackscripts¶
You can use public Stackscripts to quickly setup your DRP endpoint and attach nodes. They perform the same basic tasks as the code below.
- Create an endpoint using zehicle/drp and supply your version and password.
- Verify that the DRP Endpoint is available at the https://[endpoint_ip]:8092
- Use zehicle/drp-node to attach nodes to the endpoint. You'll need to know the endpoint_ip.
- profit.
Install DRP in Linode¶
You can use the Centos-8 Linux image. While more is recommended, make sure
that you have at least 1 GB of RAM. You should open ports 8090/tcp
,
8091/tcp
, and 8092/tcp
to access the DRP server.
Example
#!/bin/bash
DRP_VERSION=stable
DRP_PASSWORD=r0cketsk8ts
DRP_PUBLIC_ADDRESS=<DRP public address>
### Now open the right firewall ports for DRP
firewall-cmd --permanent --add-port=8090/tcp
firewall-cmd --permanent --add-port=8091/tcp
firewall-cmd --permanent --add-port=8092/tcp
firewall-cmd --reload
### Install DRP
curl -fsSL get.rebar.digital/tip | bash -s -- install --universal --version=$DRP_VERSION --drp-password=$DRP_PASSWORD --ipaddr=$DRP_PUBLIC_ADDRESS
Warning
Remember to fill in the public IP address of the system
Once the system is online, you can access DRP using https://\<DRP public address>:8092.
Join a machine to a DRP Endpoint in Linode¶
Once you have a DRP endpoint installed in Linode, you can create additional linode instances and join them to the DRP endpoint.
Bash script to run on linode instance
#!/bin/bash
DRP_IP=[Public IP of DRP Endpoint]
DRP_PORT=8091 # The fileserver port of the DRP endpoint
OPEN_PORTS="22" # ports to allow in
for PORT in ${OPEN_PORTS}; do
firewall-cmd --permanent --add-port=${PORT}/tcp
done
firewall-cmd --reload
timeout 300 bash -c 'while [[ "$(curl -fsSL -o /dev/null -w %{http_code} ${DRP_IP}:${DRP_PORT}/machines/join-up.sh)" != "200" ]]; do sleep 5; done' || false
curl -fsSL http://${DRP_IP}:${DRP_PORT}/machines/join-up.sh | sudo bash --
Warning
Remember to fill in the public IP address of the system