Debian install script instead of terraform
Opened this issue · 1 comments
darkdrgn2k commented
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
noopM3U8 address
- Deal with dns entries
- Deal with bootstrap-post-dns.sh
- Deal with predictive naming of interfaces debian9
darkdrgn2k commented
# 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 domainadmin@mesh.world ""