Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian install script instead of terraform #80

Open
7 tasks done
darkdrgn2k opened this issue Mar 29, 2019 · 1 comment
Open
7 tasks done

Debian install script instead of terraform #80

darkdrgn2k opened this issue Mar 29, 2019 · 1 comment

Comments

@darkdrgn2k
Copy link
Contributor

darkdrgn2k commented Mar 29, 2019

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

  • copy rtmp-server to /tmp/rtmp-server
  • copy shared/video-player to /tmp/video-player
  • 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",
  • run "/tmp/rtmp-server/bootstrap.sh DOMAIN_NAME E-MAIL noop M3U8 address
  • Deal with dns entries
  • Deal with bootstrap-post-dns.sh
  • Deal with predictive naming of interfaces debian9
@darkdrgn2k
Copy link
Contributor Author

darkdrgn2k commented Sep 15, 2019

# 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] ""

@benhylau benhylau added this to the Beyond Our Networks milestone Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants