-
Notifications
You must be signed in to change notification settings - Fork 6
Document BYOC #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document BYOC #119
Changes from 6 commits
a15e76e
c7abd51
96083f4
f405164
8aead43
d1eacb6
02f2395
5c37f43
765bc78
cca6b71
b876ec2
26f6c93
e401be2
4a44e8d
379c7e3
de382d9
a76c421
1ab2232
98f39d0
534cad3
9bed739
776d5c7
3f16324
9a41dab
119acc8
8185c3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"label": "Concepts", | ||
"position": 300, | ||
"position": 500, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Some concepts to help explain how the Defang system is organized and tooling that will help you manage your applications." | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Defang Deployment Modes | ||
description: Defang provides three deployment modes which allow you to balance cost and resiliency. | ||
sidebar_position: 501 | ||
--- | ||
|
||
# Defang Deployment Modes | ||
|
||
Defang provides three deployment modes: development, staging, and production. These modes allow you to balance cost and resiliency according to your needs. | ||
|
||
* **Development**: This mode is used for development and testing purposes. It typically involves less stringent resource allocations and may include debugging tools and verbose logging to aid in development. | ||
* **Staging**: This mode serves as a pre-production environment where applications are tested in conditions that closely mimic production. It helps in identifying issues that might not be apparent in the development environment. | ||
* **Production**: This mode is used for live deployments. It involves optimized configurations for performance, security, and reliability. Resource allocations are typically higher, and debugging tools are minimized to ensure stability. | ||
|
||
## Deployment Mode Comparison | ||
|
||
| Feature | Development | Staging | Production | | ||
|-|-|-|-| | ||
| Build Resources | Builds will be run with 2x vCPUs | Builds will be run with 2x vCPUs | Builds will be run with 4x vCPUs | | ||
| Databases | Defang will provision resources optimized for burstable memory | | Defang will provision resources optimized for production | | ||
| Static Resources | | | Defang will provision a CDN | | ||
| Object Storage | S3 contents will be lost when deprovisioned. | | S3 contents will be retained if the bucket is deprovisioned. | | ||
jordanstephens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jordanstephens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Deployment | Previous deployments will be spun down before new deployments are spun up. | | Rolling updates will be used to deploy new versions. | | ||
jordanstephens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Logging | Logs retained for 1 day to save costs. | | Logs retained for 30 days for compliance. | | ||
| Networking | Defang will provision a bastion box. | | Defang will provision a NAT gateway. | | ||
|
||
| DNS | Defang will provision shorter TTLs | | Defang will provision longer TTLs | |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ description: Frequently asked questions about Defang. | |
|
||
### Can I bring my own AWS or other cloud account? | ||
|
||
- Yes! Please check out the [Defang BYOC](./concepts/defang-byoc.md) documentation for more information. | ||
- Yes! Defang makes it easy to deploy your application to your own cloud account. Please check out the [Defang BYOC](./concepts/defang-byoc.md) documentation for more information. | ||
|
||
### On AWS, can I deploy to services such as EC2, EKS, or Lambda? | ||
|
||
|
@@ -23,13 +23,37 @@ description: Frequently asked questions about Defang. | |
|
||
- Yes, you can access whatever other resources exist in the cloud account you are using as a [Defang BYOC](./concepts/defang-byoc.md) Provider. | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### Do you plan to support other clouds? | ||
### Can I run production apps with Defang? | ||
|
||
- While we currently support AWS as a [Defang BYOC](./concepts/defang-byoc.md) Provider, we plan to support other clouds in future releases, such as [Azure](./providers/azure.md) and [GCP](./providers/gcp.md). | ||
- Yes! Defang makes it easy to deploy your app on production-ready infrastructure in your own cloud account. For example, you can deploy your app to AWS with `defang up --provider=aws --mode=production`. Check out your preferred cloud provider on [Defang BYOC](./concepts/defang-byoc.md). | ||
|
||
### Can I run production apps with Defang? | ||
### Does Defang support blue/green deployments? | ||
|
||
- Defang does not currently support Blue/Green deploys, but it does support rolling updates with the `production` deployment mode. `defang up --mode=production`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See previous comment about explaining rolling updates in more detail. |
||
|
||
### Does Defang support rolling deployments? | ||
|
||
- Yes! Defang supports rolling updates with the `production` deployment mode. `defang up --mode=production`. | ||
|
||
### Can I cancel a deployment once it has started? | ||
|
||
- No. Once a deployment has started, it cannot be canceled. However, you can always deploy a new version of your app which will replace the current deployment. | ||
|
||
### Will deploying a new version of my app cause downtime? | ||
|
||
- If you have deployed your application with the `--mode=production` flag, Defang will use the _production_ deployment mode. This mode will provision your app with multiple replicas and will perform a rolling update to ensure zero downtime. If you use another deployment mode, you may experience downtime during the deployment, as defang will not provision multiple replicas to save cost. | ||
|
||
### Can I deploy multiple services at once? | ||
|
||
- Yes! You can deploy multiple services at once by defining them in a single compose.yaml file. When you run `defang compose up`, Defang will deploy all the services defined in the file at once. | ||
|
||
### Can I deploy a service that depends on another service? | ||
|
||
- Defang does not currently support service dependencies. All services will be deployed simultaneously. Defang will however run multiple healthchecks before marking a service as healthy and spinning down any previously deployed services when using the `production` deployment mode. | ||
|
||
### Do you plan to support other clouds? | ||
|
||
- The [Defang Playground](./concepts/defang-playground.md) is meant for testing and trial purposes only. Deployment of productions apps with [Defang BYOC](./concepts/defang-byoc.md) is not yet supported and disallowed by the [Terms of Service](https://defang.io/terms-service.html). If you are interested in running production apps, please [contact us](https://defang.io/#Contact-us). | ||
- While we currently support [AWS](./concepts/defang-byoc#aws) and [Digital Ocean](./concepts/defang-byoc#digitalocean), we plan to support other clouds in future releases, such [GCP](./providers/gcp.md) and [Azure](./providers/azure.md). | ||
|
||
|
||
### I'm having trouble running the binary on my Mac. What should I do? | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"label": "Providers", | ||
"position": 350, | ||
"position": 400, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Defang allows you to use your own cloud accounts to deploy your applications. Click on a link below to read documentation about specific providers." | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"label": "Tutorials", | ||
"position": 400, | ||
"position": 300, | ||
"link": { | ||
"type": "generated-index", | ||
"description": "Check out these tutorials to learn more about the Defang platform." | ||
jordanstephens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Deploy to AWS | ||
description: Defang allows you deploy to your own Amazon Web Services (AWS) account. | ||
sidebar_position: 10 | ||
--- | ||
|
||
# Deploying to Amazon Web Services (AWS) with Defang | ||
|
||
This tutorial will show you how to deploy your services to your own AWS account using Defang. | ||
|
||
## 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/getting-started/authenticating) | ||
* [The Defang CLI](/docs/getting-started/installing) | ||
* [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) | ||
|
||
## Deploy your project to AWS | ||
|
||
1. Navigate to the directory where your project is located: | ||
```bash | ||
$ cd path/to/your/project | ||
``` | ||
|
||
2. Authenticate Defang to use your AWS Account | ||
|
||
Defang will look for your AWS credentials in your shell environment. | ||
|
||
Defang will expect to find one of the following credential sets: | ||
* the `AWS_PROFILE` environment variable | ||
* or, the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables | ||
|
||
3. Deploy | ||
|
||
Invoke the `defang up` CLI command with the `--provider=aws` flag or set the `DEFANG_PROVIDER=aws` environment variable. | ||
|
||
For example: | ||
|
||
```bash | ||
$ defang up --provider=aws | ||
``` | ||
|
||
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. | ||
|
||
*** | ||
|
||
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). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Deploy to Digital Ocean | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
description: Defang allows you deploy to your own Digital Ocean account. | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
sidebar_position: 10 | ||
--- | ||
|
||
# Deploying to Digital Ocean with Defang | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
This tutorial will show you how to deploy your services to your own Digital Ocean account using Defang. | ||
|
||
## 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/getting-started/authenticating) | ||
* [The Defang CLI](/docs/getting-started/installing) | ||
* [Digital Ocean Account Credentials](/docs/providers/digitalocean#getting-started) | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* [Digital Ocean Spaces Access Keys](/docs/providers/digitalocean#getting-started) | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Deploy your project to Digital Ocean | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. Navigate to the directory where your project is located: | ||
```bash | ||
$ cd path/to/your/project | ||
``` | ||
|
||
2. Authenticate Defang to use your Digital Ocean Account | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Defang will look for your Digital Ocean credentials in your shell environment. | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Defang will expect to find the following credentials: | ||
* the `DIGITALOCEAN_TOKEN` environment variable | ||
* and, the `SPACES_ACCESS_KEY_ID` and `SPACES_SECRET_ACCESS_KEY` environment variables | ||
|
||
3. Deploy | ||
|
||
Invoke the `defang up` CLI command with the `--provider=do` flag or set the `DEFANG_PROVIDER=do` environment variable. | ||
|
||
For example: | ||
|
||
```bash | ||
$ defang up --provider=do | ||
``` | ||
|
||
4. Inspect your deployment | ||
|
||
Defang will provision resources in your Digital Ocean account and deploy your services. You can inspect the resources created in your Digital Ocean dashboard. | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
*** | ||
|
||
For a deeper discussion of the Defang Digital Ocean Architecture, see our [Digital Ocean Provider docs](/docs/providers/digitalocean). | ||
commit111 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Deploy to GCP | ||
description: Defang allows you deploy to your own Google Cloud Platform (GCP) account. | ||
sidebar_position: 10 | ||
--- | ||
|
||
# Deploying to Google Cloud Platform (GCP) with Defang | ||
|
||
Coming soon! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Deploy to your cloud | ||
description: Defang allows you deploy to your own cloud account. | ||
sidebar_position: 10 | ||
--- | ||
|
||
# Deploying to your cloud with Defang | ||
|
||
This tutorial will show you how to deploy your services to your own cloud account using Defang. | ||
|
||
::: tip | ||
::: Defang makes it easier to deploy to any cloud—in your *own* cloud accounts. We refer to this as bring-your-own-cloud (BYOC). | ||
::: | ||
::: If you aren't ready to deploy to your own cloud account, you can use the Defang Playground to get a feel for how Defang works for free. | ||
|
||
## Choose your cloud | ||
|
||
The first step is to choose which cloud provider you want to deploy to. Defang supports the following cloud providers: | ||
|
||
* [AWS](/docs/tutorials/deploy-to-aws) | ||
* [DigitalOcean](/docs/tutorials/deploy-to-digitalocean) | ||
* [GCP](/docs/tutorials/deploy-to-gcp) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
{ | ||
"label": "Use Cases", | ||
"position": 275, | ||
"position": 500, | ||
"link": { | ||
"type": "doc", | ||
"id": "use-cases" | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 100 | ||
sidebar_position: 400 | ||
title: Use Cases | ||
description: Use cases for Defang. | ||
--- | ||
|
@@ -34,4 +34,4 @@ Some applications are designed to run in stateful environments. For example, a C | |
|
||
## Data Stores | ||
|
||
Defang is not a good fit for data stores like databases, caches, and message queues. These types of services are designed to be long-lived and to store data. Defang is primarily designed for stateless workloads, and it's not a good fit for stateful workloads: if a container is replaced, all the data in it is lost. You could probably coerce a data store to work in a stateless environment with certain replication strategies, but it's not a good fit. | ||
Defang is not a good fit for data stores like databases, caches, and message queues. These types of services are designed to be long-lived and to store data. Defang is primarily designed for stateless workloads, and it's not a good fit for stateful workloads: if a container is replaced, all the data in it is lost. You could probably coerce a data store to work in a stateless environment with certain replication strategies, but it's not a good fit. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say something about behavior on 'compose down'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think we should create a
Databases
concept topic where we can discuss the subtlety more carefully 👍