From 482df273528d1cd888710b5c1ad3e98a8243f32a Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Sat, 10 Jul 2021 17:03:25 +0200 Subject: [PATCH] docs: 100% manual verification of doc + update with last plan change Signed-off-by: Guillaume de Rouville --- docs/learn/101-use.md | 2 +- docs/learn/102-dev.md | 2 +- docs/learn/106-cloudrun.md | 2 +- docs/learn/107-kubernetes.md | 18 +++++++++++++----- docs/learn/108-cloudformation.md | 12 +++++++++--- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/learn/101-use.md b/docs/learn/101-use.md index c25af7c0..ec8b052e 100644 --- a/docs/learn/101-use.md +++ b/docs/learn/101-use.md @@ -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: ```shell -ls -l .dagger/env/s3/plan/ +ls -l ./s3 ``` Any code change to the plan will be applied during the next `dagger up`. diff --git a/docs/learn/102-dev.md b/docs/learn/102-dev.md index 7f3bc66e..516e11d1 100644 --- a/docs/learn/102-dev.md +++ b/docs/learn/102-dev.md @@ -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: ```shell -dagger new 'multibucket' -m multibucket +dagger new 'multibucket' -p ./multibucket ``` ### Configure user inputs diff --git a/docs/learn/106-cloudrun.md b/docs/learn/106-cloudrun.md index fa5f9fa4..12b41bdb 100644 --- a/docs/learn/106-cloudrun.md +++ b/docs/learn/106-cloudrun.md @@ -92,7 +92,7 @@ deploy: cloudrun.#Service & { Now that your Cue package is ready, let's create an environment to run it: ```shell -dagger new 'gcpcloudrun' -m gcpcloudrun +dagger new 'gcpcloudrun' -p ./gcpcloudrun ``` ### Configure user inputs diff --git a/docs/learn/107-kubernetes.md b/docs/learn/107-kubernetes.md index 97190db7..da03a834 100644 --- a/docs/learn/107-kubernetes.md +++ b/docs/learn/107-kubernetes.md @@ -279,7 +279,7 @@ eksConfig: eks.#KubeConfig & { Now that your Cue package is ready, let's create an environment to run it: ```shell -dagger new 'kube' -m kube +dagger new 'kube' -p kube ``` ### Configure the environment @@ -625,7 +625,7 @@ todoApp: { // Value created for generic reference of `kubeconfig` in `todoapp.cue` kubeSrc: kubernetes.#Resources & { - kubeconfig: kubeconfig + "kubeconfig": kubeconfig source: kustomization } } @@ -736,7 +736,7 @@ todoApp: { // Value created for generic reference of `kubeconfig` in `todoapp.cue` kubeSrc: kubernetes.#Resources & { - kubeconfig: kubeconfig + "kubeconfig": kubeconfig source: kustomization } } @@ -1058,11 +1058,15 @@ todoApp: { remoteImage: docker.#Push & { target: "\(registry):\(tag)" source: image + auth: { + username: gcrCreds.username + secret: gcrCreds.secret + } } // Generate deployment manifest deployment: #AppManifest & { - name: "todoApp" + name: "todoapp" image: remoteImage.ref } @@ -1105,11 +1109,15 @@ todoApp: { remoteImage: docker.#Push & { target: "\(registry):\(tag)" source: image + auth: { + username: ecrCreds.username + secret: ecrCreds.secret + } } // Generate deployment manifest deployment: #AppManifest & { - name: "todoApp" + name: "todoapp" image: remoteImage.ref } diff --git a/docs/learn/108-cloudformation.md b/docs/learn/108-cloudformation.md index 01839522..6540f21f 100644 --- a/docs/learn/108-cloudformation.md +++ b/docs/learn/108-cloudformation.md @@ -186,7 +186,7 @@ This defines: Now that the Cue package is ready, let's create an environment to run it: ```shell -dagger new 'cloudformation' -m cloudformation +dagger new 'cloudformation' -p ./cloudformation ``` ##### 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 ```shell -rm cloudformation/source.cue +mv cloudformation/source.cue ~/tmp/ ``` ### 2. Retrieve the Unmarshalled JSON @@ -531,7 +531,7 @@ package cloudformation deletionPolicy: *"Retain" | "Delete" // 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` template: { @@ -637,6 +637,12 @@ dagger query template -f text -e cloudformation # "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: ```shell