tomeshnet / ipfs-live-streaming

Like HTTP live streaming, but with IPFS which is maybe better?
GNU General Public License v3.0
449 stars 74 forks source link

Setup script #61

Closed darkdrgn2k closed 5 years ago

darkdrgn2k commented 5 years ago

Script to configure the transform using prompts

Work In progress thoughts?

echo "--------Domain Name--------"
read -p "What is your domain name: " -r
echo -n $REPLY > .keys/domain_name

echo Make sure you point your domain dns servers to
echo ns1.digitalocean.com
echo ns2.digitalocean.com
echo ns3.digitalocean.com

echo "--------Digital Oceans API Token--------"
read -p "What is your API Token form Digital Ocean: "  -r
echo -n $REPLY > .keys/do_token

echo "--------Digital Oceans RSA--------"
echo "Press enter of password request"
ssh-keygen -t rsa -f .keys/id_rsa
echo Add the SSH key to your Digital Ocean account under Settings > Security
echo "------------------"
cat  .keys/id_rsa.pub
echo "------------------"
fingerprint=$(ssh-keygen -l -E md5 -f .keys/id_rsa.pub | awk '{print $2}' | sed 's/MD5://')
echo -n $fingerprint> .keys/ssh_fingerprint
echo Once added the finger print will be $fingerprint

echo "--------Lets Encrypt--------"
read -p "What is your e-mail (for lets encrypt): "  -r
echo -n $REPLY > .keys/email_address

echo "----Installing terraform-----"

wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
unzip terraform_0.11.7_linux_amd64.zip
sudo mv terraform /usr/bin

terraform init
# terraform apply
morelazers commented 5 years ago

Haven't tested it but I love the idea

darkdrgn2k commented 5 years ago

Thanks to @ASoTNetworks we now generate the fingerprint from the rsa pub key! No need to copy/paste it from digital ocean

darkdrgn2k commented 5 years ago

Just used this when i was testing, adjusted pub instead of private key cat but other then that worked pritty well.