Skip to content

Commit

Permalink
Change pushgateway deployment method to modal deploy (#807)
Browse files Browse the repository at this point in the history
Modal deploy is better fitted here because these are long-lived services
which we want to have a consistent URL.
  • Loading branch information
pawalt authored Jul 9, 2024
1 parent 9033fc1 commit 915d000
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions 10_integrations/pushgateway.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---
# cmd: ["modal", "serve", "10_integrations/pushgateway.py"]
# cmd: ["modal", "deploy", "10_integrations/pushgateway.py"]
# ---
# # Publish custom metrics with Prometheus Pushgateway
#
Expand Down Expand Up @@ -131,7 +131,16 @@ def hello(self):
# Now, we can deploy the `client-example` app and see the metrics in the Pushgateway's web interface.

# ```shell
# modal serve pushgateway.py
# $ modal deploy pushgateway.py
# ✓ Created objects.
# ├── 🔨 Created mount /Users/example/projects/scratch/pushgateway/pushgateway.py
# ├── 🔨 Created web function run_pushgateway => https://modal-labs-example--client-example-run-pushgateway.modal.run
# ├── 🔨 Created function ExampleClientApplication.*.
# └── 🔨 Created web function ExampleClientApplication.hello =>
# https://modal-labs-example--client-example-exampleclientappli-4c6f64.modal.run (label truncated)
# ✓ App deployed! 🎉
#
# View Deployment: https://modal.com/modal-labs/example/apps/deployed/client-example
# ```
#
# Go to both the client application and Pushgateway URLs to see the metrics being pushed.
Expand Down

0 comments on commit 915d000

Please sign in to comment.