-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Laurent Demailly edited this page Nov 13, 2024
·
21 revisions
Deployment setup
OS Ubuntu
sudo apt update
sudo apt upgrade -y
sudo apt install -y atop inetutils-ping vim git net-tools
# reboot: sudo shutdown -r now
# install go - eg for x86
curl -L https://go.dev/dl/go1.23.3.linux-amd64.tar.gz | (cd /usr/local; sudo tar xvfz -)
# or arm
curl -L https://go.dev/dl/go1.23.3.linux-arm64.tar.gz | (cd /usr/local; sudo tar xvfz -)
echo 'PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' >> ~/.profile
. ~/.profile
go version # to check
git clone https://github.com/fortio/demo-deployment.git
cd demo-deployment
# may copy/share certs
sudo cp fortio.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable fortio
./update.sh
# also reboot to check it sticks/restarts
# check debug locally:
curl -v -H Host:debug.fortio.org localhost
# for oracle cloud - ports are blocked on ipv4
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save
# tailscale
curl -fsSL https://tailscale.com/install.sh | sh
# enable ssh
sudo tailscale up --ssh
# reboot to check it all sticks
sudo shutdown -r now
sudo systemctl status fortio
For when there is a golang bump (change 1.21.8 by whichever)
for h in fortio-aws fortio-o-a1 fortio-l1; do ssh -t ubuntu@$h '
uname -a
sudo apt update
sudo apt upgrade -y
eval $(apt-config shell ARCH APT::Architecture); echo $ARCH
cd /usr/local
sudo rm -rf go
sudo rm -rf ~/go/pkg # free up disk/start fresh when go version changes
curl -L https://go.dev/dl/go1.23.3.linux-$ARCH.tar.gz | sudo tar xfz -
PATH=/usr/local/go/bin:$HOME/go/bin:$PATH
go version
cd
cd demo-deployment
./update.sh
'
done
Just update the fortio and proxy versions (no change in go version):
for h in fortio-aws fortio-o-a1 fortio-l1; do ssh ubuntu@$h '
cd demo-deployment;PATH=/usr/local/go/bin:$HOME/go/bin:$PATH; ./update.sh'; done
To check:
multicurl -4 https://debug.fortio.org/
(I both cases, ^c when happy with logs)
Staggered reboot
for h in fortio-aws fortio-o-a1 fortio-l1; do ssh -t ubuntu@$h '
uname -a
sleep 10
sudo shutdown -r now
'
done