Skip to content

Commit 01264a2

Browse files
BYOC MCP Prompts (#281)
* update railpack supported providers * aws prompt * gcp prompt * playground prompt * more detail in BYOC prompts * discuss mcp deployment in its own tutorial * Added playground --------- Co-authored-by: Jordan Stephens <[email protected]>
1 parent 0dffb4a commit 01264a2

16 files changed

+158
-29
lines changed

docs/concepts/railpack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ services:
148148

149149
| Provider | Railpack Support |
150150
|----------------|:----------------:|
151-
| Playground | |
151+
| Playground | |
152152
| AWS | ✅ |
153153
| DigitalOcean | ❌ |
154154
| GCP | ✅ |

docs/tutorials/deploy-to-aws.mdx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,33 @@ description: Defang allows you deploy to your own Amazon Web Services (AWS) acco
77

88
This tutorial will show you how to deploy your services to your own AWS account using Defang.
99

10-
## Pre-requisites
11-
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
12-
* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
13-
* [A Defang Account](/docs/concepts/authentication)
14-
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
15-
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
10+
## Prerequisites
11+
12+
- [The Defang CLI](/docs/getting-started#install-the-defang-cli)
13+
- [A Defang Account](/docs/concepts/authentication)
14+
- [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
15+
- [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
16+
- [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) or use [Railpack](../concepts/railpack.md)
17+
18+
:::warning["MCP prerequisite"]
19+
If you would like to deploy using [MCP](https://modelcontextprotocol.io/), you like need to setup the [Defang MCP Server](../concepts/mcp.md) with the IDE of your choice.
20+
:::
1621

1722
## Step 1 - Navigate to your project directory
23+
1824
Head to the folder where your project is located.
25+
1926
```bash
2027
$ cd path/to/your/project
2128
```
2229

23-
## Step 2 - Authenticate Defang to use your AWS Account
30+
## Step 2 - Configure your AWS credentials
2431

25-
There are many ways to authenticate your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html).
32+
There are many ways to authenticate with your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html).
2633
Once you've done that, Defang will look for your AWS credentials in your shell environment and expect to find one of the following credential sets:
27-
* the `AWS_PROFILE` environment variable
28-
* or, the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION` environment variables
34+
35+
- the `AWS_PROFILE` environment variable, and optionally the `AWS_REGION` environment variable
36+
- or, the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION` environment variables
2937

3038
:::tip
3139
If you have the AWS CLI installed (which is not required in order to use the Defang CLI), you can verify that you've authenticated to AWS by running `aws sts get-caller-identity` and see your account ID.
@@ -41,10 +49,10 @@ For example:
4149
$ defang compose up --provider=aws
4250
```
4351

44-
## Step 4 - Inspect your deployment
52+
### Step 4 - Inspect your deployment
4553

4654
Defang will provision resources in your AWS account and deploy your services. You can inspect the resources created in your AWS Dashboard.
4755

48-
***
56+
---
4957

5058
For a deeper discussion of the Defang AWS Architecture, including a list of the resources we provision in your account, see our [AWS Provider docs](/docs/providers/aws).

docs/tutorials/deploy-to-gcp.mdx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,28 @@ description: Defang allows you deploy to your own Google Cloud Platform (GCP) ac
77

88
This tutorial will show you how to deploy your services to your own GCP project using Defang.
99

10-
## Pre-requisites
11-
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
12-
* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
13-
* [A Defang Account](/docs/concepts/authentication)
14-
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
15-
* [gcloud CLI](https://cloud.google.com/sdk/docs/install)
16-
* [GCP Account Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
10+
## Prerequisites
11+
12+
- [The Defang CLI](/docs/getting-started#install-the-defang-cli)
13+
- [A Defang Account](/docs/concepts/authentication)
14+
- [gcloud CLI](https://cloud.google.com/sdk/docs/install)
15+
- [GCP Application Default Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
16+
- [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
17+
- [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) or use [Railpack](../concepts/railpack.md)
18+
19+
:::warning["MCP prerequisite"]
20+
If you would like to deploy using [MCP](https://modelcontextprotocol.io/), you like need to setup the [Defang MCP Server](../concepts/mcp.md) with the IDE of your choice.
21+
:::
1722

1823
## Step 1 - Navigate to your project directory
24+
1925
Head to the folder where your project is located.
26+
2027
```bash
2128
$ cd path/to/your/project
2229
```
2330

24-
## Step 2 - Authenticate Defang to use your GCP Account
31+
## Step 2 - Configure your GCP credentials
2532

2633
After signing in to your GCP account, select an existing project or [create a new project](https://developers.google.com/workspace/guides/create-project). Make sure [billing is enabled](https://cloud.google.com/billing/docs/how-to/modify-project). Then, note down the project ID and set it as environment variable `GCP_PROJECT_ID`.
2734

@@ -39,6 +46,6 @@ $ defang compose up --provider=gcp
3946

4047
Defang will provision resources in your GCP account and deploy your services. You can inspect the resources created in your [GCP Dashboard](https://console.cloud.google.com/).
4148

42-
***
49+
---
4350

4451
For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).

docs/tutorials/deploy-to-playground.mdx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,24 @@ description: Deploy to the free Defang Playground.
77

88
This tutorial will show you how to deploy your project to the free [Defang Playground](/docs/concepts/defang-playground).
99

10-
## Pre-requisites
11-
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
12-
* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
13-
* [A Defang Account](/docs/concepts/authentication)
14-
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
10+
## Prerequisites
11+
12+
- [The Defang CLI](/docs/getting-started#install-the-defang-cli)
13+
- [A Defang Account](/docs/concepts/authentication)
14+
- [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
15+
- [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) or use [Railpack](../concepts/railpack.md)
16+
17+
## CLI
18+
19+
### Step 1 - Navigate to your project directory
1520

16-
## Step 1 - Navigate to your project directory
1721
Head to the folder where your project is located.
22+
1823
```bash
1924
$ cd path/to/your/project
2025
```
2126

22-
## Step 2 - Deploy
27+
### Step 2 - Deploy
2328

2429
```
2530
$ defang compose up
@@ -53,6 +58,12 @@ When you do this, you should see something similar to the output below:
5358
* Done.
5459
```
5560

61+
You can also check on your deployment on the on the [Defang portal](#defang-portal) as well.
62+
63+
---
64+
65+
## Defang Portal
66+
5667
Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the Defang portal.
5768

5869
![screenshot of the defang portal](/img/getting-started-portal.png)
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Deploying with the Defang MCP Server
2+
3+
This tutorial will show you how to deploy your services with the [Defang MCP Server](/docs/concepts/mcp.md).
4+
5+
## Prerequisites
6+
7+
- [The Defang MCP Server](/docs/concepts/mcp.md#installation)
8+
- [A Defang Account](/docs/concepts/authentication)
9+
- [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
10+
11+
Open your project with an IDE that has the [Defang MCP Server](/docs/concepts/mcp.md) installed.
12+
13+
:::tip
14+
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
15+
![VS Code](/img/prompts/start-server.png)
16+
:::
17+
18+
## AWS
19+
20+
### Step 1 - Collect your credentials
21+
22+
There are many ways to authenticate with your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html).
23+
24+
:::tip
25+
If you have the AWS CLI installed, you can verify that you've authenticated to AWS by running `aws sts get-caller-identity` and see your account ID. (The AWS CLI is not required in order to use Defang with AWS)
26+
:::
27+
28+
### Step 2 - Setup Defang for AWS
29+
30+
Open your chat window and type `/defang.AWS_Setup`, or select the corresponding prompt from your IDE’s options.
31+
32+
![Trigger Prompt](/img/prompts/aws-prompt.png)
33+
34+
The [MCP prompt](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) accepts two types of credentials:
35+
36+
1. Method 1 - Using an AWS Profile:
37+
The following prompt will have three arguments and only the first argument is required:
38+
39+
- AWS Credential - REQUIRED : The name of the AWS profile you want to use (e.g., "default" or "my-profile"). ![AWS Profile argument](/img/prompts/aws-profile-arg.png)
40+
- AWS_SECRET_ACCESS_KEY - IGNORE : Leave this argument blank and press Enter. ![Ignore AWS Secret Access Key argument](/img/prompts/aws-ignore_secret.png)
41+
- AWS_REGION - OPTIONAL : The AWS region where you want to deploy your services (e.g., "us-west-2"). ![AWS Region argument Optional](/img/prompts/aws-optional-region.png)
42+
43+
2. Method 2 - Using Access Keys:
44+
The following prompt will have three arguments and all three arguments are required:
45+
46+
- AWS Credential - REQUIRED : The AWS Access Key ID (e.g., "AKIAIOSFODNN7EXAMPLE"). ![AWS Access Key ID argument](/img/prompts/aws-access-key-arg.png)
47+
- AWS_SECRET_ACCESS_KEY - REQUIRED : The AWS Secret Access Key. (e.g., "wJalrXUtnFEMI/K7MDENG/bPExampleSecretKey").![AWS Secret Access Key argument](/img/prompts/aws-secret-key-arg.png)
48+
- AWS_REGION - REQUIRED : The AWS region where you want to deploy your services (e.g., "us-west-2"). ![AWS Region argument](/img/prompts/require-aws-region-arg.png)
49+
50+
### Step 3 - Deploy
51+
52+
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the IDE to execute.
53+
54+
### Step 4 - Inspect your deployment
55+
56+
You can check the status of your deployment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the resources created in your AWS Dashboard.
57+
58+
## GCP
59+
60+
### Prerequisites
61+
62+
- [gcloud CLI](https://cloud.google.com/sdk/docs/install)
63+
- [GCP Application Default Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
64+
65+
### Step 1 - Collect your credentials
66+
67+
After signing in to your GCP account, select an existing project or [create a new project](https://developers.google.com/workspace/guides/create-project). Make sure [billing is enabled](https://cloud.google.com/billing/docs/how-to/modify-project). Then, note down the project ID for the next step.
68+
69+
### Step 2 - Setup Defang for GCP
70+
71+
In your chat window, type `/defang.GCP_Setup` or select the corresponding prompt from your IDE’s options.
72+
73+
![Trigger Prompt](/img/prompts/gcp-prompt.png)
74+
75+
The [MCP argument](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) will require your GCP project ID you created in [Step 1](#step-1---collect-your-credentials-1).
76+
![GCP Project ID](/img/prompts/gcp-project-id.png)
77+
78+
### Step 3 - Deploy
79+
80+
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the IDE to execute.
81+
82+
### Step 4 - Inspect your deployment
83+
84+
You can check the status of your depolyment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the resources created in your GCP Dashboard.
85+
86+
## Playground
87+
88+
### Step 1 - Setting your provider
89+
90+
In your chat window, type `/defang.Playground_Setup` or select the corresponding prompt from your IDE’s options.
91+
92+
![Trigger Prompt](/img/prompts/playground-prompt.png)
93+
94+
There are no arguments to this prompt.
95+
96+
### Step 2 - Deploy
97+
98+
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.
99+
100+
### Step 3 - Inspect your deployment
101+
102+
You can check the status of your deployment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the the project on the [Defang portal](https://portal.defang.io/projects).
103+
![screenshot of the defang portal](/img/getting-started-portal.png)
37 KB
Loading
39.7 KB
Loading
36.4 KB
Loading
36.2 KB
Loading

static/img/prompts/aws-prompt.png

37.4 KB
Loading

0 commit comments

Comments
 (0)