ipfs-live-streaming icon indicating copy to clipboard operation
ipfs-live-streaming copied to clipboard

Debian install script instead of terraform

Open darkdrgn2k opened this issue 6 years ago • 1 comments

shouldn't be to hard to get the base system installed on a debian system instead of terraform using terraform scripts

  • [x] copy rtmp-server to /tmp/rtmp-server
  • [x] copy shared/video-player to /tmp/video-player
  • [x] set permissions
      "chmod +x /tmp/rtmp-server/bootstrap.sh",
      "chmod +x /tmp/rtmp-server/bootstrap-post-dns.sh",
      "chmod +x /tmp/rtmp-server/process-stream.sh",
  • [x] run "/tmp/rtmp-server/bootstrap.sh DOMAIN_NAME E-MAIL noop M3U8 address
  • [x] Deal with dns entries
  • [x] Deal with bootstrap-post-dns.sh
  • [x] Deal with predictive naming of interfaces debian9

darkdrgn2k avatar Mar 29 '19 13:03 darkdrgn2k

# Run as root to emulate DO env
su
DOMAIN=live.mesh.world
# Create file that is expected in DO env
mkdir -p /var/lib/cloud/instance
touch /var/lib/cloud/instance/boot-finished

# DPKG does not work on debian10 for some reason without this
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Get some pacakges
cd ~
apt-get -y update 
apt-get -y install wget git python procps curl net-tools

# Clone repo
git clone https://github.com/tomeshnet/ipfs-live-streaming.git

# Put files in the right places that are similar to DO
cd ipfs-live-streaming
mv terraform/rtmp-server/ /tmp/rtmp-server
mv terraform/shared/video-player /tmp/video-player

# Mark executable
chmod +x /tmp/rtmp-server/bootstrap.sh
chmod +x /tmp/rtmp-server/bootstrap-post-dns.sh
chmod +x /tmp/rtmp-server/process-stream.sh


# Remove DO Agent installation
sed -i "/agent.digitalocean.com/d" /tmp/rtmp-server/bootstrap.sh

# Remove easy-rsa3 and replace it with 2 from git
apt-get remove easy-rsa
git clone https://github.com/OpenVPN/easy-rsa.git
cd easy-rsa
git checkout release/2.x
mkdir /usr/share/easy-rsa
cp  -r easy-rsa/2.0/* /usr/share/easy-rsa

# Run bootstrap
/tmp/rtmp-server/bootstrap.sh $DOMAIN domainadmin@$DOMAIN 127.0.0.1 ""

# Fix missing paramaters
sed -i "s/remote  1194/remote $DOMAIN 1194/" /root/client-keys/client.conf 
sed -i "s/remote  1194/remote $DOMAIN 1194/" /root/client-keys/client.ovpn
sed -i "s/Peers: \[\"tcp:\/\/:12345\"\]/Peers: \[\"tcp:\/\/$DOMAIN:12345\"\]/" /root/client-keys/yggdrasil.conf  

CONFIGURE DNS then run Minimum

  • live.mesh.world
  • ipfs-server.live.mesh.world
  • ipfs-gateway.live.mesh.world
/tmp/rtmp-server/bootstrap-post-dns.sh live.mesh.world [email protected] ""

darkdrgn2k avatar Sep 15 '19 01:09 darkdrgn2k