From 17bd9ebddea907a3eb1b2ad710fdd734512b2c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 4 Jul 2024 10:19:25 +0200 Subject: [PATCH] Break Fly steps in two --- .../teams/deployment_group_agent_component.ex | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex index e37db9cb2..916bb3213 100644 --- a/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex +++ b/lib/livebook_web/live/hub/teams/deployment_group_agent_component.ex @@ -107,13 +107,24 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do <:tab id="fly_io" label="Fly.io">

- Deploy an app server to Fly.io with a few commands. + Deploy an app server to Fly.io with a few commands. Let's first configure the application resources:

<.code_preview_with_title_and_copy title="CLI" - source_id="agent-fly-source" - source={@instructions.fly_instructions} + source_id="agent-fly-source-1" + source={@instructions.fly_instructions.step_one} + language="shell" + /> + +

+ Now let's set secrets and deploy it: +

+ + <.code_preview_with_title_and_copy + title="CLI" + source_id="agent-fly-source-2" + source={@instructions.fly_instructions.step_two} language="shell" />
@@ -218,18 +229,19 @@ defmodule LivebookWeb.Hub.Teams.DeploymentGroupAgentComponent do |> String.replace(~r/[^\w-]/, "") |> String.downcase() - """ - # Create a directory for your Fly app config - mkdir #{example_dir} - cd #{example_dir} + %{ + step_one: """ + mkdir #{example_dir} + cd #{example_dir} + fly launch --image #{image} --vm-memory 2048 --no-deploy + """, + step_two: """ + fly secrets set \\ + #{envs} - fly launch --image #{image} --vm-memory 2048 --no-deploy - - fly secrets set \\ - #{envs} - - fly deploy --ha=false - """ + fly deploy --ha=false + """ + } end defp k8s_instructions(image, env) do