Minor fixes

Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
dubo-dubon-duponey 2021-06-15 18:39:47 -07:00
parent e29cf4f4ff
commit 9109cce926
No known key found for this signature in database
GPG Key ID: C3B96779C681DA56
3 changed files with 21 additions and 18 deletions

View File

@ -26,16 +26,16 @@ export DOCKER_HOST=tcp://my-remote-docker-host:2376
## OpenTracing Support
Both Dagger and buildkit support opentracing. To capture traces to
[Jaeger](https://github.com/jaegertracing/jaeger), ), set the `JAEGER_TRACE` environment variable to the collection address.
[Jaeger](https://github.com/jaegertracing/jaeger), set the `JAEGER_TRACE` environment variable to the collection address.
A `docker-compose` file is available to help bootstrap the tracing environment:
```shell
docker-compose -f ./tracing.compose.yaml up -d
docker-compose -f ./dagger-main/tracing.compose.yaml up -d
export JAEGER_TRACE=localhost:6831
export BUILDKIT_HOST=docker-container://dagger-buildkitd-jaeger
dagger compute ...
dagger up
```
You can then go to [http://localhost:16686/](http://localhost:16686/) in your browser to see the traces.

View File

@ -7,8 +7,8 @@ slug: /learn/101-basics
In this guide, you will learn the basics of Dagger by interacting with a pre-configured environment.
Then you will move on to creating your own environment from scratch.
Our pre-configured environment deploys a simple [React](https://en.wikipedia.org/wiki/React_(JavaScript_library))
application to a special hosting environment created and managed by us, the Dagger team for the purpose of this tutorial.
Our pre-configured environment deploys a simple [React](https://reactjs.org/)
application to a special hosting environment created and managed by us, the Dagger team, for the purpose of this tutorial.
This will allow you to deploy something "real" right away, without having to configure your own infrastructure first.
In later guides, you will learn how to configure Dagger to deploy to your own infrastructure. And, for advanced users,
@ -28,7 +28,7 @@ git clone https://github.com/dagger/examples.git
**Step 2**: Go the todoapp directory
`todoapp` is a simple Todo-list application written in Javascript using [React](https://reactjs.org/).
`todoapp` is a simple Todo-list application written in Javascript using React.
Go to the app directory:
@ -41,7 +41,8 @@ cd ./examples/todoapp
The example app contains encrypted secrets and other pre-configured inputs, here is how to decrypt them:
```sh
dagger input list || curl -sfL https://releases.dagger.io/examples/key.txt >> ~/.config/dagger/keys.txt
curl -sfL https://releases.dagger.io/examples/key.txt >> ~/.config/dagger/keys.txt
dagger input list
```
**Step 4**: Deploy!
@ -108,4 +109,4 @@ dagger output list
## What's next?
At this point, you have deployed your first application using dagger and learned some dagger commands. You are now ready to [learn more about how to program dagger](/programming).
At this point, you have deployed your first application using dagger and learned some dagger commands. You are now ready to [learn more about how to program dagger](/learn/102-dev).

View File

@ -13,7 +13,7 @@ a dedicated [Amazon S3](https://wikipedia.org/wiki/Amazon_S3) bucket, and a
### Anatomy of a Dagger environment
A Dagger environment contains all the code and data necessary to delivery a particular application in a particular way.
A Dagger environment contains all the code and data necessary to deliver a particular application in a particular way.
For example the same application might be delivered to a production and staging environment, each with their own
configuration.
@ -41,19 +41,18 @@ of interconnected nodes.
Each node in the graph represents a component of the supply chain, for example:
* Development tools: source control, CI, build systems, testing systems
* Hosting infrastructure: compute, storage, networking, databases, CDN..
* Hosting infrastructure: compute, storage, networking, databases, CDNs
* Software dependencies: operating systems, languages, libraries, frameworks, etc.
Each link in the graph represents a flow of data between nodes. For example:
* 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
### Introduction to Cue development
Dagger delivery plans are developed in [Cue](https://cuelang.org).
Dagger delivery plans are developed in Cue.
Cue is a powerful declarative language by the creator of GQL, the language used to deploy all applications at Google. It is a superset of JSON, with additional features to make declarative, data-driven programming as pleasant and productive as regular imperative programming.
If you are new to Cue development, don't worry: this tutorial will walk you through the basic
@ -90,7 +89,7 @@ cd examples/voteapp
### Initialize a Cue module
Developing for Dagger takes place in a [https://cuelang.org/docs/concepts/packages/#modules](Cue module).
Developing for Dagger takes place in a [Cue module](https://cuelang.org/docs/concepts/packages/#modules).
If you are familiar with Go, Cue modules are directly inspired by Go modules.
Otherwise, don't worry: a Cue module is simply a directory with one or more Cue packages in it. A Cue module has a `cue.mod` directory at its root.
@ -116,7 +115,7 @@ But you can call your packages anything you want.
Let's layout the structure of our package by creating all the files in advance:
```bash
pkg=multibucket; touch $pkg-source.cue $pkg-yarn.cue $pkg-netlify.cue
touch multibucket-source.cue multibucket-yarn.cue multibucket-netlify.cue
```
### Component 1: app source code
@ -231,7 +230,10 @@ Now let's configure the new environment to use our package as its plan:
cp multibucket-*.cue .dagger/env/multibucket/plan/
```
Note: you need to copy the files from your package into the environment's plan directory, as shown above. This means that, if you make more changes to your package, you will need to copy the new version into the plan directory, or it will not be used. If you prefer, you can also edit the cue files directly in the plan directory, but we don't recommend it. In the future, we will probably add the ability to reference your package to make the manual copy unnecessary.
Note: you need to copy the files from your package into the environment's plan directory, as shown above.
This means that, if you make more changes to your package, you will need to copy the new version into the plan directory, or it will not be used.
If you prefer, you can also edit the cue files directly in the plan directory, but we don't recommend it.
In the future, we will probably add the ability to reference your package to make the manual copy unnecessary.
### Configure user inputs