docs: 100% manual verification of doc + update with last plan change

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville 2021-07-10 17:03:25 +02:00
parent 8942b775d7
commit 482df27352
5 changed files with 25 additions and 11 deletions

View File

@ -96,7 +96,7 @@ Each environment can have a different kind of deployment code. For example, a `d
The plan is the deployment code that includes the logic to deploy the local application to an AWS S3 bucket. From the `todoapp` directory, you can list the code of the plan: The plan is the deployment code that includes the logic to deploy the local application to an AWS S3 bucket. From the `todoapp` directory, you can list the code of the plan:
```shell ```shell
ls -l .dagger/env/s3/plan/ ls -l ./s3
``` ```
Any code change to the plan will be applied during the next `dagger up`. Any code change to the plan will be applied during the next `dagger up`.

View File

@ -216,7 +216,7 @@ You can also browse the [Dagger Universe](../reference/universe/README.md) refer
Now that your Cue package is ready, let's create an environment to run it: Now that your Cue package is ready, let's create an environment to run it:
```shell ```shell
dagger new 'multibucket' -m multibucket dagger new 'multibucket' -p ./multibucket
``` ```
### Configure user inputs ### Configure user inputs

View File

@ -92,7 +92,7 @@ deploy: cloudrun.#Service & {
Now that your Cue package is ready, let's create an environment to run it: Now that your Cue package is ready, let's create an environment to run it:
```shell ```shell
dagger new 'gcpcloudrun' -m gcpcloudrun dagger new 'gcpcloudrun' -p ./gcpcloudrun
``` ```
### Configure user inputs ### Configure user inputs

View File

@ -279,7 +279,7 @@ eksConfig: eks.#KubeConfig & {
Now that your Cue package is ready, let's create an environment to run it: Now that your Cue package is ready, let's create an environment to run it:
```shell ```shell
dagger new 'kube' -m kube dagger new 'kube' -p kube
``` ```
### Configure the environment ### Configure the environment
@ -625,7 +625,7 @@ todoApp: {
// Value created for generic reference of `kubeconfig` in `todoapp.cue` // Value created for generic reference of `kubeconfig` in `todoapp.cue`
kubeSrc: kubernetes.#Resources & { kubeSrc: kubernetes.#Resources & {
kubeconfig: kubeconfig "kubeconfig": kubeconfig
source: kustomization source: kustomization
} }
} }
@ -736,7 +736,7 @@ todoApp: {
// Value created for generic reference of `kubeconfig` in `todoapp.cue` // Value created for generic reference of `kubeconfig` in `todoapp.cue`
kubeSrc: kubernetes.#Resources & { kubeSrc: kubernetes.#Resources & {
kubeconfig: kubeconfig "kubeconfig": kubeconfig
source: kustomization source: kustomization
} }
} }
@ -1058,11 +1058,15 @@ todoApp: {
remoteImage: docker.#Push & { remoteImage: docker.#Push & {
target: "\(registry):\(tag)" target: "\(registry):\(tag)"
source: image source: image
auth: {
username: gcrCreds.username
secret: gcrCreds.secret
}
} }
// Generate deployment manifest // Generate deployment manifest
deployment: #AppManifest & { deployment: #AppManifest & {
name: "todoApp" name: "todoapp"
image: remoteImage.ref image: remoteImage.ref
} }
@ -1105,11 +1109,15 @@ todoApp: {
remoteImage: docker.#Push & { remoteImage: docker.#Push & {
target: "\(registry):\(tag)" target: "\(registry):\(tag)"
source: image source: image
auth: {
username: ecrCreds.username
secret: ecrCreds.secret
}
} }
// Generate deployment manifest // Generate deployment manifest
deployment: #AppManifest & { deployment: #AppManifest & {
name: "todoApp" name: "todoapp"
image: remoteImage.ref image: remoteImage.ref
} }

View File

@ -186,7 +186,7 @@ This defines:
Now that the Cue package is ready, let's create an environment to run it: Now that the Cue package is ready, let's create an environment to run it:
```shell ```shell
dagger new 'cloudformation' -m cloudformation dagger new 'cloudformation' -p ./cloudformation
``` ```
##### 2. Check plan ##### 2. Check plan
@ -395,7 +395,7 @@ This defines:
You need to empty the plan and copy the `convert.cue` file to the plan for Dagger to reference it You need to empty the plan and copy the `convert.cue` file to the plan for Dagger to reference it
```shell ```shell
rm cloudformation/source.cue mv cloudformation/source.cue ~/tmp/
``` ```
### 2. Retrieve the Unmarshalled JSON ### 2. Retrieve the Unmarshalled JSON
@ -531,7 +531,7 @@ package cloudformation
deletionPolicy: *"Retain" | "Delete" deletionPolicy: *"Retain" | "Delete"
// Canned access control list (ACL) that grants predefined permissions to the bucket // Canned access control list (ACL) that grants predefined permissions to the bucket
accessControl: *"PublicRead" | "Private" | "PublicReadWrite" | "AuthenticatedRead" | "LogDeliveryWrite" | "BucketOwnerRead" | "BucketOwnerFullControl" | "AwsExecRead" accessControl: *"PublicRead" | "Private" | "PublicReadWrite" | "AuthenticatedRead" | "LogDeliveryWrite" | "BucketOwnerRead" | "BucketOwnerFullControl" | "AwsExecRead"
// Modified copy of s3 value in `todoapp/cloudformation/template.cue` // Modified copy of s3 value in `todoapp/cloudformation/template.cue`
template: { template: {
@ -637,6 +637,12 @@ dagger query template -f text -e cloudformation
# "Value": { # "Value": {
``` ```
You need to move back the `source.cue` for Dagger to instanciate a bucket:
```shell
mv ~/tmp/source.cue cloudformation/source.cue
```
And we can now deploy it: And we can now deploy it:
```shell ```shell