docs: feat: ✨ init Docusaurus
Signed-off-by: slumbering <slumbering.pierrot@gmail.com>
This commit is contained in:
committed by
Andrea Luzzardi
parent
c4162b1e98
commit
bc3f61b928
4
docs/guides/_category_.json
Normal file
4
docs/guides/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Guides",
|
||||
"position": 4
|
||||
}
|
@@ -1,3 +1,7 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Dagger Operator Manual
|
||||
|
||||
## Custom buildkit setup
|
@@ -1,9 +1,14 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
slug: /programming
|
||||
---
|
||||
|
||||
# Dagger Programming Guide
|
||||
|
||||
## Overview
|
||||
|
||||
1. A developer writes a *plan* specifying how to deliver their application. Plans are written in the [Cue](https://cuelang.org) data language.
|
||||
2. Dagger executes plans in isolated *environments*. Each environment has its own configuration and state.
|
||||
1. A developer writes a _plan_ specifying how to deliver their application. Plans are written in the [Cue](https://cuelang.org) data language.
|
||||
2. Dagger executes plans in isolated _environments_. Each environment has its own configuration and state.
|
||||
|
||||
## Programming in Cue
|
||||
|
||||
@@ -12,15 +17,15 @@ of GCL, the language used to configure all of Google's infrastructure.
|
||||
|
||||
Cue extends JSON with powerful features:
|
||||
|
||||
* Composition: layering, templating, references
|
||||
* Correctness: types, schemas
|
||||
* Developer experience: comments, packages, first-class tooling, builtin functions
|
||||
* And mucn more.
|
||||
- Composition: layering, templating, references
|
||||
- Correctness: types, schemas
|
||||
- Developer experience: comments, packages, first-class tooling, builtin functions
|
||||
- And mucn more.
|
||||
|
||||
To get started with Cue, we recommend the following resources:
|
||||
|
||||
* [Cuetorials](https://cuetorials.com)
|
||||
* [Cue playground](https://cuelang.org/play/)
|
||||
- [Cuetorials](https://cuetorials.com)
|
||||
- [Cue playground](https://cuelang.org/play/)
|
||||
|
||||
## Writing your first plan
|
||||
|
||||
@@ -34,7 +39,7 @@ To create a Dagger plan:
|
||||
|
||||
For example: `dagger new staging`.
|
||||
|
||||
3\. Create a new file with the *.cue* extension in `.dagger/env/staging/plan`, and open it with any text editor or IDE.
|
||||
3\. Create a new file with the _.cue_ extension in `.dagger/env/staging/plan`, and open it with any text editor or IDE.
|
||||
|
||||
For example: `.dagger/env/staging/plan/staging.cue`.
|
||||
|
||||
@@ -64,12 +69,12 @@ ctr: docker.#Build & {
|
||||
|
||||
For more inspiration, see these examples:
|
||||
|
||||
* [Deploy a static page to S3](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-static-page-to-s3)
|
||||
* [Deploy a simple React application](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-simple-react-application)
|
||||
* [Deploy a complete JAMstack app](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-complete-jamstack-app)
|
||||
* [Provision a Kubernetes cluster on AWS](https://github.com/dagger/dagger/blob/main/examples/README.md#provision-a-kubernetes-cluster-on-aws)
|
||||
* [Add HTTP monitoring to your application](https://github.com/dagger/dagger/blob/main/examples/README.md#add-http-monitoring-to-your-application)
|
||||
* [Deploy an application to your Kubernetes cluster](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-an-application-to-your-kubernetes-cluster)
|
||||
- [Deploy a static page to S3](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-static-page-to-s3)
|
||||
- [Deploy a simple React application](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-simple-react-application)
|
||||
- [Deploy a complete JAMstack app](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-a-complete-jamstack-app)
|
||||
- [Provision a Kubernetes cluster on AWS](https://github.com/dagger/dagger/blob/main/examples/README.md#provision-a-kubernetes-cluster-on-aws)
|
||||
- [Add HTTP monitoring to your application](https://github.com/dagger/dagger/blob/main/examples/README.md#add-http-monitoring-to-your-application)
|
||||
- [Deploy an application to your Kubernetes cluster](https://github.com/dagger/dagger/blob/main/examples/README.md#deploy-an-application-to-your-kubernetes-cluster)
|
||||
|
||||
5\. Extend your plan with relay definitions from [Dagger Universe](../stdlib), an encyclopedia of cue packages curated by the Dagger community.
|
||||
|
||||
@@ -108,26 +113,26 @@ american: #Greeting & {
|
||||
|
||||
### Plans
|
||||
|
||||
A *plan* specifies, in code, how to deliver a particular application in a particular way.
|
||||
A _plan_ specifies, in code, how to deliver a particular application in a particular way.
|
||||
|
||||
It lays out the application's supply chain as a graph of interconnected nodes:
|
||||
|
||||
* Development tools: source control, CI, build systems, testing systems
|
||||
* Hosting infrastructure: compute, storage, networking, databases, CDN..
|
||||
* Software dependencies: operating systems, languages, libraries, frameworks, etc.
|
||||
- Development tools: source control, CI, build systems, testing systems
|
||||
- Hosting infrastructure: compute, storage, networking, databases, CDN..
|
||||
- Software dependencies: operating systems, languages, libraries, frameworks, etc.
|
||||
|
||||
The graph models the flow of code and data through the supply chain:
|
||||
|
||||
* source code flows from a git repository to a build system;
|
||||
* system dependencies are combined in a docker image, then uploaded to a registry;
|
||||
* configuration files are generated then sent to a compute cluster or load balancer;
|
||||
* etc.
|
||||
- source code flows from a git repository to a build system;
|
||||
- system dependencies are combined in a docker image, then uploaded to a registry;
|
||||
- configuration files are generated then sent to a compute cluster or load balancer;
|
||||
- etc.
|
||||
|
||||
Dagger plans are written in [Cue](https://cuelang.org), a powerful declarative language by the creator of GQL, the language used to deploy all applications at Google.
|
||||
|
||||
### Environments
|
||||
|
||||
An *environment* is a live implementation of a *plan*, with its own user inputs and state.
|
||||
An _environment_ is a live implementation of a _plan_, with its own user inputs and state.
|
||||
The same plan can be executed in multiple environments, for example to differentiate production from staging.
|
||||
|
||||
An environment can be updated with `dagger up`. When updating an environment, Dagger determines which inputs have
|
||||
@@ -138,7 +143,7 @@ the frontend, it will build, test and deploy the new frontend, without changing
|
||||
|
||||
### Relays
|
||||
|
||||
*Relays* are the basic components of a *plan*. Each relay is a node in the graph defined by the plan,
|
||||
_Relays_ are the basic components of a _plan_. Each relay is a node in the graph defined by the plan,
|
||||
performing the task assigned to that node. For example one relay fetches source code; another runs a build;
|
||||
another uploads a container image; etc.
|
||||
|
||||
@@ -147,12 +152,12 @@ execute code in any language using the [Dagger pipeline API](FIXME).
|
||||
|
||||
A relay is made of 3 parts:
|
||||
|
||||
* Inputs: data received from the user, or upstream relays
|
||||
* A processing pipeline: code executed against each new input, using the [pipeline API](FIXME)
|
||||
* Outputs: data produced by the processing pipeline
|
||||
- Inputs: data received from the user, or upstream relays
|
||||
- A processing pipeline: code executed against each new input, using the [pipeline API](FIXME)
|
||||
- Outputs: data produced by the processing pipeline
|
||||
|
||||
Relays run in parallel, with their inputs and outputs interconnected into a special kind of graph,
|
||||
called a *DAG*. When a relay receives a new input, it runs it through the processing pipeline,
|
||||
called a _DAG_. When a relay receives a new input, it runs it through the processing pipeline,
|
||||
and produces new outputs, which are propagated to downstream relays as inputs, and so on.
|
||||
|
||||
### Using third-party relays
|
||||
@@ -202,8 +207,8 @@ Thanks to its native support of LLB, Dagger offers native compatibility with Doc
|
||||
|
||||
This makes it very easy to extend an existing Docker-based workflow, including:
|
||||
|
||||
* Reusing Dockerfiles and docker-compose files without modification
|
||||
* Wrapping other deployment tools in a Dagger relay by running them inside a container
|
||||
* Robust multi-arch and multi-OS support, including Arm and Windows.
|
||||
* Integration with existing Docker engines and registries
|
||||
* Integration with Docker for Mac and Docker for Windows on developer machines
|
||||
- Reusing Dockerfiles and docker-compose files without modification
|
||||
- Wrapping other deployment tools in a Dagger relay by running them inside a container
|
||||
- Robust multi-arch and multi-OS support, including Arm and Windows.
|
||||
- Integration with existing Docker engines and registries
|
||||
- Integration with Docker for Mac and Docker for Windows on developer machines
|
@@ -1,3 +1,10 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
slug: /
|
||||
sidebar_label: Introduction
|
||||
hide_table_of_contents: true
|
||||
---
|
||||
|
||||
# Dagger
|
||||
|
||||
Dagger is a programmable deployment system.
|
||||
|
@@ -1,3 +1,8 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
slug: /install
|
||||
---
|
||||
|
||||
# Install Dagger
|
||||
|
||||
## Option 1: Use Homebrew (Mac OS only)
|
||||
|
@@ -1,24 +0,0 @@
|
||||
# Sidebar navigation
|
||||
|
||||
- label: Introduction
|
||||
link: "/"
|
||||
|
||||
- label: "Install Dagger"
|
||||
link: "/install"
|
||||
|
||||
- label: "Dagger vs. Other software"
|
||||
link: "/vs"
|
||||
|
||||
- label: Guides
|
||||
items:
|
||||
- label: "Programming Guide"
|
||||
link: "/programming"
|
||||
- label: "Operator Manual"
|
||||
link: "/operator"
|
||||
|
||||
- label: Community
|
||||
items:
|
||||
- label: "GitHub"
|
||||
link: https://github.com/dagger/dagger
|
||||
- label: "Discord"
|
||||
link: https://discord.gg/Rmffpmc
|
@@ -1,3 +1,9 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
slug: /vs
|
||||
sidebar_label: Dagger vs. Other software
|
||||
---
|
||||
|
||||
# Dagger vs. Other Software
|
||||
|
||||
## Dagger vs. PaaS (Heroku, Firebase, etc.)
|
||||
|
Reference in New Issue
Block a user