forked from dagger/dagger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Remove refs for distributed caching (dagger#8867)
* docs: Remove refs to distributed caching Signed-off-by: Vikram Vaswani <[email protected]> * Removed image and text Signed-off-by: Vikram Vaswani <[email protected]> * Removed more content from FAQ Signed-off-by: Vikram Vaswani <[email protected]> * docs: Reword Dagger "distributed cache" to just "persistent cache" The valuable property is persistence (across runs). Distribution is an implementation detail (usually platform-specific). Signed-off-by: Gerhard Lazu <[email protected]> * docs: Remove S3 Gateway mention from Dagger Cloud This was only relevant in the context of Dagger Cloud Cache. Signed-off-by: Gerhard Lazu <[email protected]> * docs: Remove Shaed Cloud Cache from Kubernetes integration Mention persistent storage as a platform-specific optimization that is worth exploring, but don't add more detail since it's contextual. Signed-off-by: Gerhard Lazu <[email protected]> --------- Signed-off-by: Vikram Vaswani <[email protected]> Signed-off-by: Gerhard Lazu <[email protected]> Co-authored-by: Gerhard Lazu <[email protected]>
- Loading branch information
1 parent
f250ea8
commit 598860d
Showing
13 changed files
with
8 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,15 +84,10 @@ Once you have your token, you can use it to connect Dagger Cloud with your CI en | |
You must store the Dagger Cloud token as a secret (not plaintext) with your CI environment and reference it in your CI workflow. Using a secret is recommended to protect your Dagger Cloud account from being used by forks of your project. We provide links in the steps below for configuring secrets with popular CI tools. | ||
::: | ||
- Add the secret to your CI environment as a variable named `DAGGER_CLOUD_TOKEN`. | ||
- For **Team** plan subscribers with ephemeral CI runners only: Add a wait step (example below) for the Docker configuration to allow Dagger to push cache volumes to the experimental Dagger Cloud distributed cache. Subscribers on the **Individual** plan do not have access to the experimental distributed cache and do not need to add this step. | ||
- If you are using GitHub Actions, install the Dagger Cloud GitHub app for GitHub Checks. This app adds a GitHub check to your pull requests. Each check links to the corresponding pipeline visualization in Dagger Cloud. | ||
|
||
You can use Dagger Cloud whether you're hosting your own CI runners and infrastructure or using hosted/SaaS runners. | ||
|
||
:::danger | ||
When using self-hosted CI runners on AWS infrastructure, NAT Gateways are a common source of unexpected network charges. It's advisable to setup an Amazon S3 Gateway for these cases. Refer to the [AWS documentation](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html) for detailed information on how to do this. | ||
::: | ||
|
||
<Tabs groupId="ci"> | ||
<TabItem value="GitHub Actions"> | ||
|
||
|
@@ -113,15 +108,11 @@ When using self-hosted CI runners on AWS infrastructure, NAT Gateways are a comm | |
|
||
[See an example of a sample GitLab workflow file](../integrations/gitlab.mdx) | ||
|
||
1. For **Team** plan subscribers with ephemeral CI runners only: Update your GitLab CI workflow (example below) and adjust the `docker stop` timeout period so that Docker waits longer before killing the Dagger container, to give it more time to push data to the Dagger Cloud cache. Refer to the Docker documentation on the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/). | ||
|
||
</TabItem> | ||
<TabItem value="CircleCI"> | ||
|
||
1. Create a new environment variable in your CircleCI project named `DAGGER_CLOUD_TOKEN` and set it to the value of the token obtained in [Step 1](#step-1-sign-up-for-dagger-cloud). Refer to the CircleCI documentation on [creating environment variables for a project](https://circleci.com/docs/set-environment-variable/#set-an-environment-variable-in-a-project). | ||
|
||
1. For **Team** plan subscribers with ephemeral CI runners only: Update your CircleCI workflow (example below) and adjust the `docker stop` timeout period so that Docker waits longer before killing the Dagger container, to give it more time to push data to the Dagger Cloud cache. Refer to the Docker documentation on the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/). | ||
|
||
1. For GitHub, GitLab or Atlassian Bitbucket source code repositories only: Update your CircleCI workflow and add the following pipeline values to the CI environment. Refer to the CircleCI documentation on [using pipeline values](https://circleci.com/docs/variables/#pipeline-values). | ||
|
||
GitHub: | ||
|
@@ -191,10 +182,6 @@ The next step is to test the integration with Dagger Cloud. | |
1. In your terminal, call a Dagger Function. You will see a Dagger Cloud URL printed in the terminal. | ||
1. Click on the URL to view details of the run in Dagger Cloud. | ||
|
||
:::info | ||
Dagger 0.11.0 adds support for visualizing Dagger functions but does not yet print the Dagger Cloud URL for the pipeline run in the CLI output. We're adding this soon. | ||
::: | ||
|
||
```shell | ||
dagger -m github.com/shykes/daggerverse/[email protected] call hello | ||
``` | ||
|
@@ -235,29 +222,3 @@ In Dagger Cloud, users can have one of two roles: *Admin* or *Member*. The Admin | |
| Delete an existing member from an org | ✓ | | | ||
|
||
You cannot change a member's role at this time. Please contact Dagger via the support messenger in Dagger Cloud if you need assistance. | ||
|
||
## Cache volumes | ||
|
||
:::warning | ||
Dagger Cloud's distributed caching feature is currently experimental. | ||
::: | ||
|
||
Dagger Cloud automatically detects and creates cache volumes when they are declared in your Dagger pipeline or custom functions. | ||
|
||
Your cache volumes will appear in the UI within a few minutes after your Dagger function(s) have completed execution. If you don't see them in the UI, ensure you've referenced the volumes correctly in your code and that you've set up your CI or local development workflows to push the cache volumes to Dagger Cloud. | ||
|
||
To see your cache volumes, browse to the **Organization Settings** page of the Dagger Cloud dashboard (accessible by clicking your user profile icon in the Dagger Cloud interface) and navigate to the **Configuration** tab. You should see the newly-created volumes listed and enabled. | ||
|
||
 | ||
|
||
You can create as many volumes as needed and manage them from the **Configuration** tab of your Dagger Cloud organization page. | ||
|
||
The volumes cache is shared across pipelines and runs, within the same Dagger Cloud organization. This implies that users in the same organization share the same volumes cache. The cache key for the volumes cache is `bucket / organization-name / volume-name`, where the volume name is set by the user using the Dagger API. Manifests of the layers cache are sent to Dagger Cloud to support merging layers between runs (not supported by Buildkit). | ||
|
||
:::important | ||
No cache data is shared across organizations. For more information on security, visit the [Dagger Trust Center](https://trust.dagger.io/). | ||
::: | ||
|
||
:::tip | ||
If you've configured cache volumes for the first time in a local development environment, call your Dagger function via the Dagger CLI and then run the command `docker container stop -t 300 "$(docker container list --filter 'name=^dagger-engine-*' -q)"`. This step ensures your new cache volumes populate to Dagger Cloud during the engine shutdown phase. You only need to do this the first time you use Dagger Cloud locally with cache volumes or when you add new cache volumes in your Dagger pipeline. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,6 @@ jobs: | |
- run: | ||
name: Call Dagger Function | ||
command: dagger -m github.com/shykes/daggerverse/[email protected] call hello --greeting="bonjour" --name="monde" | ||
# for ephemeral runners only: override the default docker stop timeout and | ||
# give the Dagger Engine more time to push cache data to Dagger Cloud | ||
- run: | ||
name: Stop Dagger Engine | ||
command: docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q) | ||
when: always | ||
workflows: | ||
dagger: | ||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,6 @@ jobs: | |
- run: | ||
name: Test | ||
command: dagger -m github.com/kpenfound/dagger-modules/[email protected] call test --source=. | ||
# for ephemeral runners only: override the default docker stop timeout and | ||
# give the Dagger Engine more time to push cache data to Dagger Cloud | ||
- run: | ||
name: Stop Dagger Engine | ||
command: docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q) | ||
when: always | ||
build: | ||
docker: | ||
- image: cimg/base:2024.09 | ||
|
@@ -30,12 +24,6 @@ jobs: | |
- run: | ||
name: Build | ||
command: dagger -m github.com/kpenfound/dagger-modules/[email protected] call build-container --source=https://github.com/golang/example#master:hello --args=. publish --address=ttl.sh/my-app-$RANDOM | ||
# for ephemeral runners only: override the default docker stop timeout and | ||
# give the Dagger Engine more time to push cache data to Dagger Cloud | ||
- run: | ||
name: Stop Dagger Engine | ||
command: docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q) | ||
when: always | ||
workflows: | ||
dagger: | ||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,3 @@ hello: | |
extends: [.dagger] | ||
script: | ||
- dagger -m github.com/shykes/daggerverse/[email protected] call hello --greeting="bonjour" --name="monde" | ||
# for ephemeral runners only: override the default docker stop timeout and | ||
# give the Dagger Engine more time to push cache data to Dagger Cloud | ||
- docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q) |
Oops, something went wrong.