Skip to content

Commit

Permalink
Add new documentation files for building, deploying, monitoring, and …
Browse files Browse the repository at this point in the history
…updating services
raphaeltm committed Feb 7, 2024
1 parent 0884794 commit 78c474e
Showing 8 changed files with 85 additions and 20 deletions.
7 changes: 6 additions & 1 deletion docs/concepts/defang-byoc.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,12 @@ sidebar_position: 50

Defang aims to to make it easier to deploy your services to the cloud. Specifically, Defang's goal is to make it easier to deploy your workloads to your *own* cloud accounts. We refer to this as bring-your-own-cloud (BYOC). We also provide Defang Hosted, but it is only intended for non-production workloads so you can get a feel for how Defang works.

To the extent possible, Defang will use resources that are native to the cloud provider you are using. The following lists the existing and planned support for cloud providers.
Defang provisions and configures the necessary native managed services from your cloud provider to get your services up and running. For example, on AWS, Defang will configure an [ALB](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/), setup [ECR](https://aws.amazon.com/ecr/), configure [CloudWatch](https://aws.amazon.com/cloudwatch/?nc2=type_a), and run your service on [ECS](https://aws.amazon.com/ecs/?nc2=type_a) and more. The following lists the existing and planned support for cloud providers.

:::info
Defang does not install or run any Defang or third party services at runtime.
Defang does run the Defang build service to build your container images, which terminates after every build.
:::

## AWS

12 changes: 6 additions & 6 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -7,26 +7,26 @@ description: Frequently asked questions about Defang.

# FAQ

### **Which cloud/region is the app being deployed to?**
### Which cloud/region is the app being deployed to?

- Currently we are deploying to AWS us-west-2.

### **Can I bring my own AWS or other cloud account?**
### Can I bring my own AWS or other cloud account?

- With the current release, which is designed for customers to try out the Defang model with non-production apps, your apps are deployed to Defang’s AWS account. We are working on bring-your-own-account for an upcoming release.

### **On AWS, can I deploy to services such as EC2, EKS, or Lambda?**
### On AWS, can I deploy to services such as EC2, EKS, or Lambda?

- The current release includes support for containers only, deployed to ECS. Future releases shall include support for Lambda, EC2 etc. Using our Pulumi provider, it is possible to combine Defang services with other native AWS resources.

### **Can I access AWS storage services such as S3 or database services such as RDS ? How?**
### Can I access AWS storage services such as S3 or database services such as RDS ? How?

- Yes, you can access any storage service from the underlying cloud platform (AWS) or from a remote database service. To secure access from your Defang services, you should use our published public IPs in your AWS security group or IP allow list.

### **Do you plan to support other clouds?**
### Do you plan to support other clouds?

- While we currently deploy to AWS, the Defang model is designed to be inherently portable. We plan to support other clouds in future releases.

### **Can I run production apps on DOP?**
### Can I run production apps on DOP?

- The current release of DOP is meant for testing and trial purposes only. Deployment of productions apps is not supported and explicitly disallowed by the [Terms and Conditions](https://defang.io/terms-conditions.html).
16 changes: 16 additions & 0 deletions docs/getting-started/build-and-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sidebar_position: 300
title: Build & Deploy Services
description: Build and deploy services with Defang.
---


# Build and Deploy Services

Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail:

1. [Create an outline using AI](../tutorials/generate-new-code-using-ai.mdx)
2. [Build and deploy your code](../tutorials/deploy-code-compose.mdx)
3. [Deploy an existing container](../tutorials/deploy-container-using-the-cli.mdx)
4. [Deploy using Pulumi](../tutorials/deploy-using-pulumi.mdx)

18 changes: 11 additions & 7 deletions docs/getting-started/getting-started.md
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ description: Get started with Defang.
# Getting Started


### **Install the CLI**
### Install the CLI

First, you'll need to install the Defang CLI. The CLI is the primary way to interact with Defang. It allows you to create, deploy, and manage your services. You can find the [different installation methods here](./getting-started/installing-the-cli).

### **Authenticate with Defang**
### Authenticate with Defang

To do pretty much anything with Defang, you'll need to authenticate with the platform. You can do this by running the following command:

@@ -24,17 +24,17 @@ defang login
To learn more about how authentication works in defang, check out the [authenticating page](./authenticating.md).
:::

### Build and Deploy a Service
### Build and Deploy Services

Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail:

1. [Create an outline using AI](../tutorials/generate-new-code-using-ai.mdx)
2. [Build and deploy your code](../tutorials/deploy-code-compose.mdx)
3. [Deploy an existing container](../tutorials/deploy-container-using-the-cli.mdx)
3. [Deploy existing containers](../tutorials/deploy-container-using-the-cli.mdx)
4. [Deploy using Pulumi](../tutorials/deploy-using-pulumi.mdx)


### Monitor a Service
### Monitor Services

By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service.

@@ -55,7 +55,11 @@ By default, all the output (stdout and stderr) from your app is logged. You can
:::


### Upgrade a Service
### Update Services

To upgrade your app (for example, updating the base image of your container) you can run the `defang compose up` command and it will build and deploy the latest version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.
To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.

:::info
If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state.
:::

Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
sidebar_position: 100
title: Installing the CLI
description: How to install the Defang CLI.
title: Installing
description: How to install Defang.
---

# Installing the Defang CLI
# Installing

Defang doesn't require installing anything in your cloud, but you will need to install the Defang command line interface (CLI) to interact with your Defang resources and account.

We offer a few different ways to install the Defang CLI. You can use Homebrew, a bash script, or download the binary directly.

25 changes: 25 additions & 0 deletions docs/getting-started/monitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 400
title: Monitor Services
description: Monitor services with Defang.
---

# Monitor a Service

By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service.

- From the CLI:

```tsx
defang tail --name service1
```

- From the Defang Portal:

[https://portal.defang.dev/](https://portal.defang.dev/)


:::info
* To learn more about observability in Defang, check out the [observability page](../concepts/observability.md).
* Note that the Defang Portal only displays services deployed to Defang Hosted.
:::
13 changes: 13 additions & 0 deletions docs/getting-started/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_position: 500
title: Update Services
description: Update services with Defang.
---

# Update Services

To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped.

:::info
If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state.
:::
6 changes: 3 additions & 3 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@ description: Overview of Defang, a radically simpler way to build, deploy, and o

# Overview

### **What is the Defang Opinionated Platform (DOP)?**
### What is the Defang?

The Defang Opinionated Platform (DOP) is a radically simpler way to build, deploy, and optimize production-ready cloud apps. The DOP is a serverless platform that lets you quickly build your application in the language of your choice and deploy it to the cloud with a single command. The DOP CLI includes an AI-driven assistant that translates natural language prompts to a starting point for your project that you can then refine. Once you publish your code, the DOP automatically builds your project and deploys it to a pre-provisioned environment in the cloud, taking care of all the heavy lifting such as configuring networking, security, observability and all the other details that usually slow down the average cloud developer.
Defang is a radically simpler way to build, deploy, and optimize production-ready cloud apps. Defang is a serverless platform that lets you quickly build your application in the language of your choice and deploy it to the cloud with a single command. The [Defang CLI](./getting-started/installing.md) includes an AI-driven assistant that translates natural language prompts to a starting point for your project that you can then refine. Once you publish your code, Defang automatically builds your project and deploys it to a pre-provisioned environment in the cloud, taking care of all the heavy lifting such as configuring networking, security, observability and all the other details that usually slow down the average cloud developer.

### **Details**
### Details

The DOP provides a unified experience to develop, deploy, run, observe, and optimize your cloud applications. The DOP includes the following:

0 comments on commit 78c474e

Please sign in to comment.