Created
September 26, 2021 20:40
-
-
Save vfarcic/2e0f5945ca61b56b46b003869100d416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://gist.github.com/2e0f5945ca61b56b46b003869100d416 | |
################################################### | |
# Fly # | |
# NoOps Application Management All Over The World # | |
# https://youtu.be/tuPmhciyfIA # | |
################################################### | |
# Referenced videos: | |
# - Shipa - A Kubernetes platform from developer's perspective: https://youtu.be/aCwlI3AhNOY | |
# - Google Cloud Run (GCR) vs Azure Container Instances (ACI) vs AWS ECS with Fargate: https://youtu.be/Jq8MY1ZGjno | |
# - Amazon Lightsail Containers - AWS Service That Favors Simplicity: https://youtu.be/CWXrW2rgego | |
######### | |
# Setup # | |
######### | |
git clone https://github.com/vfarcic/fly-demo | |
cd fly-demo | |
rm fly.tom | |
# Install `fluctl` from https://fly.io/docs/getting-started/installing-flyctl/ | |
###################### | |
# Launching Fly apps # | |
###################### | |
# Run only if this is the first time using `flyctl` | |
flyctl auth signup | |
flyctl auth login | |
flyctl launch | |
# Cancel by pressing `ctrl+c` | |
flyctl info | |
flyctl status | |
######################## | |
# Redeploying Fly apps # | |
######################## | |
cat fly.toml | |
# Change the `internal_port` to `80` | |
flyctl deploy | |
flyctl status | |
###################### | |
# Accessing Fly apps # | |
###################### | |
flyctl open | |
# Replace `[...]` with the address without `https://` | |
export APP_ADDR=[...] | |
flyctl logs | |
# Cancel with `ctrl+c` | |
#################### | |
# Managing regions # | |
#################### | |
flyctl regions list | |
flyctl regions add sea hkg | |
flyctl status | |
######################### | |
# Load testing Fly apps # | |
######################### | |
flyctl scale show | |
flyctl platform vm-sizes | |
docker container run -t --rm \ | |
yokogawa/siege \ | |
--concurrent 1000 --time 300S $APP_ADDR \ | |
&& flyctl status | |
#################### | |
# Scaling Fly apps # | |
#################### | |
flyctl autoscale show | |
flyctl autoscale balanced min=1 max=100 | |
flyctl status | |
docker container run -t --rm \ | |
yokogawa/siege \ | |
--concurrent 1000 --time 300S $APP_ADDR | |
flyctl status | |
# Wait for a while | |
flyctl status | |
###################### | |
# Persisting changes # | |
###################### | |
cat fly.toml | |
############## | |
# Fly Web UI # | |
############## | |
# Open https://fly.io/apps | |
########### | |
# Destroy # | |
########### | |
# Delete the app from the Web UI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment