Skip to content

Instantly share code, notes, and snippets.

@leetschau
Last active December 16, 2025 08:11
Show Gist options
  • Select an option

  • Save leetschau/7e058b3e37a1499e4d7489a9a42eafb0 to your computer and use it in GitHub Desktop.

Select an option

Save leetschau/7e058b3e37a1499e4d7489a9a42eafb0 to your computer and use it in GitHub Desktop.
digitalocean droplet provision script for flyte (AIOps framework)
#cloud-config
package_update: true
package_upgrade: true
packages:
- curl
- ca-certificates
- net-tools
runcmd:
- touch /tmp/provision-start
# ---- install k3s ----
- curl -sfL https://get.k3s.io | sh -
# ---- configure kubeconfig ----
- mkdir -p $HOME/.kube
- cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
- systemctl stop k3s
# ---- install flytectl (system-wide) ----
- curl -sL https://ctl.flyte.org/install | bash -s -- -b /usr/local/bin
- curl -LsSf https://astral.sh/uv/install.sh | sh
- $HOME/.local/bin/uv tool install flytekit
# ---- persist Flytectl config ----
- echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.bashrc
- echo 'export FLYTECTL_CONFIG=$HOME/.flyte/config-sandbox.yaml' >> $HOME/.bashrc
- echo 'export FLYTE_IMAGE_REGISTRY=localhost:30000' >> ~/.bashrc
# ---- add flytectl completion ----
- echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.bashrc
- echo 'export FLYTECTL_CONFIG=$HOME/.flyte/config-sandbox.yaml' >> $HOME/.bashrc
- echo 'export FLYTE_IMAGE_REGISTRY=localhost:30000' >> $HOME/.bashrc
# ---- create a demo workflow file ----
# - curl -o ~/hw.py https://raw.githubusercontent.com/flyteorg/flytesnacks/master/examples/basics/basics/hello_world.py
- touch /tmp/provision-over
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment