Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/concepts/railpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ services:

| Provider | Railpack Support |
|----------------|:----------------:|
| Playground | |
| Playground | |
| AWS | ✅ |
| DigitalOcean | ❌ |
| GCP | ✅ |
42 changes: 38 additions & 4 deletions docs/tutorials/deploy-to-aws.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ This tutorial will show you how to deploy your services to your own AWS account
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)

## Step 1 - Navigate to your project directory
:::warning["MCP Pre-requisite"]
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.
:::

## CLI

### Step 1 - Navigate to your project directory
Head to the folder where your project is located.
```bash
$ cd path/to/your/project
```

## Step 2 - Authenticate Defang to use your AWS Account
### Step 2 - Authenticate Defang to use your AWS Account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this "Authenticate Defang " terminology - should it be something like "Allow Defang to use your AWS Account"? (similar for other cloud providers)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the word “Authenticate” was already there before, so I thought I’d just leave it. But in this case, we’re not really authenticating with Defang—we’re authenticating into AWS so that Defang can use your credentials.

I think this wording works better: “Allow Defang to use your AWS Account.” It’s simpler and easier to understand for readers at all levels.


There are many ways to authenticate your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing a 'with' - "There are many ways to authenticate with your..."

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:
Expand All @@ -31,7 +37,7 @@ Once you've done that, Defang will look for your AWS credentials in your shell e
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.
:::

## Step 3 - Deploy
### Step 3 - Deploy

Invoke the `defang compose up` CLI command with the `--provider=aws` flag or set the `DEFANG_PROVIDER=aws` environment variable.

Expand All @@ -41,10 +47,38 @@ For example:
$ defang compose up --provider=aws
```

## Step 4 - Inspect your deployment
### Step 4 - Inspect your deployment

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

---

## MCP

### Step 1 - Navigate to your project directory with your IDE
Navigate to your project directory and open it in an IDE that has the [Defang MCP Server](../concepts/mcp.md) installed.

:::tip
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
![VS Code](/img/prompts/start-server.png)
:::

### Step 2 - Setting your provider
In your chat window, type `/mcp.defang.AWS_Setup` or select the corresponding prompt from your IDE’s options.

![Trigger Prompt](/img/prompts/aws-prompt.png)

The [MCP prompt](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) accepts two types of credentials:
* the AWS Profile arguement (skip the rest of the prompts after entering the AWS Profile)
* or, the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION arguments

### Step 3 - Deploy
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should replace "LLM" in this sentence with "IDE".


### Step 4 - Inspect your deployment
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 AWS Dashboard.


***

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).
43 changes: 39 additions & 4 deletions docs/tutorials/deploy-to-gcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ This tutorial will show you how to deploy your services to your own GCP project
* [gcloud CLI](https://cloud.google.com/sdk/docs/install)
* [GCP Account Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)

## Step 1 - Navigate to your project directory
:::warning["MCP Pre-requisite"]
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.
:::

## CLI

### Step 1 - Navigate to your project directory
Head to the folder where your project is located.
```bash
$ cd path/to/your/project
```

## Step 2 - Authenticate Defang to use your GCP Account
### Step 2 - Authenticate Defang to use your GCP Account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this "Authenticate Defang " terminology - should it be something like "Allow Defang to use your GCP Account"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above:


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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a link to instructions on how to sign in to the GCP account (similar to how we have that for AWS)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well not really because we have a list of pre recs and they have to have all that to be able to use this feature. Unless you think we should point that out specifically here.
https://github.com/DefangLabs/defang-docs/pull/281/files#diff-1eba8d9c0631215162beb78c17860fd9be34a65ec489fa858da41f2bfd21c7e2R10-R16


## Step 3 - Deploy
### Step 3 - Deploy

Invoke the `defang compose up` CLI command with the `--provider=gcp` flag or set the `DEFANG_PROVIDER=gcp` environment variable.

Expand All @@ -35,10 +41,39 @@ For example:
$ defang compose up --provider=gcp
```

## Step 4 - Inspect your deployment
### Step 4 - Inspect your deployment

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/).

---

## MCP

### Step 1 - Navigate to your project directory with your IDE
Navigate to your project directory and open it in an IDE that has the [Defang MCP Server](../concepts/mcp.md) installed.

:::tip
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
![VS Code](/img/prompts/start-server.png)
:::

### Step 2 - Authenticate Defang to use your GCP Account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 2 step 2's.
Also, this step is missing in the AWS/MCP section above - shouldn't either both have it or neither?


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.

### Step 2 - Setting your provider
In your chat window, type `/mcp.defang.GCP_Setup` or select the corresponding prompt from your IDE’s options.

![Trigger Prompt](/img/prompts/gcp-prompt.png)

The [MCP prompt](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) will require your GCP project ID you created in [Step 2](#step-2---authenticate-defang-to-use-your-gcp-account-1).

### Step 3 - Deploy
Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.

### Step 4 - Inspect your deployment
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.

***

For a deeper discussion of the Defang GCP Architecture, see our [GCP docs](/docs/providers/gcp).
56 changes: 50 additions & 6 deletions docs/tutorials/deploy-to-playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@ description: Deploy to the free Defang Playground.
This tutorial will show you how to deploy your project to the free [Defang Playground](/docs/concepts/defang-playground).

## Pre-requisites
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
* [A Defang Account](/docs/concepts/authentication)
* [The Defang CLI](/docs/getting-started#install-the-defang-cli)

## Step 1 - Navigate to your project directory
- [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
- [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/)
- [A Defang Account](/docs/concepts/authentication)
- [The Defang CLI](/docs/getting-started#install-the-defang-cli)

:::warning["MCP Pre-requisite"]
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.
:::

## CLI

### Step 1 - Navigate to your project directory

Head to the folder where your project is located.

```bash
$ cd path/to/your/project
```

## Step 2 - Deploy
### Step 2 - Deploy

```
$ defang compose up
Expand Down Expand Up @@ -53,6 +62,41 @@ When you do this, you should see something similar to the output below:
* Done.
```

You can also check on your deployment on the on the [Defang portal](#defang-portal) as well.

---

## MCP

### Step 1 - Navigate to your project directory with your IDE

Navigate to your project directory and open it in an IDE that has the [Defang MCP Server](../concepts/mcp.md) installed.

:::tip
If the Defang MCP server doesn’t start automatically, try starting or restarting it from your IDE settings.
![VS Code](/img/prompts/start-server.png)
:::

### Step 2 - Setting your provider

In your chat window, type `/mcp.defang.Playground_Setup` or select the corresponding prompt from your IDE’s options.

![Trigger Prompt](/img/prompts/playground-prompt.png)

There are no arguements to this prompt.

### Step 3 - Deploy

Once the prompt completes without errors, your chat input will be automatically populated with the deployment command for the LLM to execute.

### Step 4 - Inspect your deployment

You can check the status of your depolyment by using the [Defang Services tool](../concepts/mcp#services) or you can inspect the the project on the [Defang portal](#defang-portal).

---

## Defang Portal

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.

![screenshot of the defang portal](/img/getting-started-portal.png)
Binary file added static/img/prompts/aws-prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/prompts/gcp-prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/prompts/playground-prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/prompts/start-server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.