Skip to content

Commit b3272e9

Browse files
Merge pull request #10138 from circleci/feat/chunk-ip-ranges-docs
docs(chunk): add IP ranges setup section
2 parents 303482c + 327affc commit b3272e9

2 files changed

Lines changed: 85 additions & 2 deletions

File tree

31.9 KB
Loading

docs/guides/modules/toolkit/pages/chunk-setup-and-overview.adoc

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Once you meet the prerequisites, set up Chunk as follows:
9797
+
9898
.Set up Chunk for your organization
9999
image::guides:ROOT:chunk/set-up-chunk.png[Chunk setup modal]
100-
. You should see a checkmark to confirm the GitHub App is installed for your organization. If not, select **Install CircleCI GitHub App** to install it now.
100+
. A checkmark confirms the GitHub App is installed for your organization. If the checkmark is missing, select **Install CircleCI GitHub App** to install it now.
101101
. Select your AI model provider from the **Select your AI Model** dropdown. The available options are:
102102
* **CircleCI (Powered by Anthropic)**: No API key required. This is the default option.
103103
* **Anthropic**: Requires your own Anthropic API key.
@@ -477,6 +477,89 @@ Merge the `cci-agent-setup.yml` file to your default branch when the results are
477477

478478
To improve Chunk's ability to run tests and produce fixes aligned with your stylistic and architectural preferences, you can include instructions in a markdown file. Name the file `claude.md` or `agents.md` and place it in the root of your repository. Chunk picks this up automatically.
479479

480+
[#ip-ranges]
481+
== Enable IP ranges in Chunk tasks
482+
483+
By default, outbound traffic from Chunk tasks does not use a fixed set of IP addresses.
484+
If your infrastructure uses IP-based access controls, for example a GitHub IP allowlist, you can route Chunk task traffic through CircleCI's known static IP addresses.
485+
486+
NOTE: **Performance or Scale Plan required.** IP ranges are not available on the Free Plan.
487+
See the xref:guides:plans-pricing:plan-overview.adoc[CircleCI Plans Overview] page for more information.
488+
489+
[#how-ip-ranges-work-with-chunk]
490+
=== How IP ranges work with Chunk
491+
492+
Chunk tasks run in two stages:
493+
494+
. **Setup stage** -- CircleCI runs a pipeline that checks out your code, sets up artifacts and the environment, and runs `merge-and-continue`.
495+
. **Chunk task stage** -- CircleCI runs the merged config from `cci-agent-setup.yml` and the agent config.
496+
497+
When IP ranges are enabled, both stages route outbound traffic through CircleCI's known static IP addresses.
498+
For the full list of IP addresses and information on credit usage, see the xref:guides:security:ip-ranges.adoc[IP Ranges] page.
499+
500+
[#enable-ip-ranges-chunk-org-setting]
501+
=== 1. Enable the org-level setting
502+
503+
. In the CircleCI web app, select **Organization Settings** from the sidebar.
504+
. Select **Chunk** from the left menu.
505+
. Scroll to the bottom of the page and enable the **Enable IP Ranges in Chunk Tasks** toggle.
506+
+
507+
.Enable IP Ranges in Chunk Tasks toggle
508+
image::guides:ROOT:chunk/chunk-ip-ranges-toggle.png[Enable IP Ranges in Chunk Tasks toggle]
509+
510+
Once enabled, the setup stage (stage 1) will automatically route traffic through CircleCI's known IP addresses.
511+
512+
[#configure-cci-agent-setup-yml]
513+
=== 2. Configure the cci-agent-setup.yml file
514+
515+
To enable IP ranges for the Chunk task stage (stage 2), you must add a `.circleci/cci-agent-setup.yml` file to your repository's default branch.
516+
517+
The file must meet the following two requirements:
518+
519+
* Set `circleci_ip_ranges: true` at the job level.
520+
* Use a Docker executor. The default Chunk executor is `machine` (Ubuntu), which is not compatible with IP ranges.
521+
522+
The following is a minimal working example:
523+
524+
.`.circleci/cci-agent-setup.yml` with IP ranges enabled
525+
[source,yaml]
526+
----
527+
jobs:
528+
cci-agent-setup:
529+
circleci_ip_ranges: true # must be set at job level
530+
docker:
531+
- image: cimg/base:current # Docker executor is required for IP ranges
532+
steps:
533+
- checkout
534+
----
535+
536+
CAUTION: **Docker executor is required.** The default Chunk executor is `machine` (Ubuntu), which does not support IP ranges.
537+
You must use a Docker executor in your `cci-agent-setup.yml` file.
538+
539+
[#verify-ip-ranges-chunk]
540+
=== 3. Verify the setup
541+
542+
To confirm that IP ranges are active, add a step to your `cci-agent-setup.yml` that prints the public IP address of the job.
543+
The printed address must match one of the addresses in the xref:guides:security:ip-ranges.adoc#list-of-ip-address-ranges[List of IP Address Ranges].
544+
545+
.`.circleci/cci-agent-setup.yml` with IP verification step
546+
[source,yaml]
547+
----
548+
jobs:
549+
cci-agent-setup:
550+
circleci_ip_ranges: true
551+
docker:
552+
- image: cimg/base:current
553+
steps:
554+
- run:
555+
name: Verify IP ranges
556+
command: curl -s ifconfig.me && echo # prints the public IP of the job
557+
- checkout
558+
----
559+
560+
NOTE: **Startup time.** Enabling IP ranges may slightly increase job startup time.
561+
This is because traffic is routed through CircleCI's static IP infrastructure.
562+
480563
== Troubleshooting
481564

482565
=== I cannot see the Chunk option in the sidebar
@@ -516,7 +599,7 @@ Your AWS bearer token is invalid or has expired. Regenerate the token in AWS IAM
516599

517600
=== Amazon Bedrock access denied or 403 on model invocation
518601

519-
You have not requested access to the Anthropic Claude model in the Bedrock console, or access has not yet been granted. Navigate to the AWS Management Console, go to **Amazon Bedrock** > **Model access**, and confirm the model is enabled.
602+
You have not requested access to the Anthropic Claude model in the Bedrock console, or access is still pending. Navigate to the AWS Management Console, go to **Amazon Bedrock** > **Model access**, and confirm the model is enabled.
520603

521604
=== Amazon Bedrock model not found or 404
522605

0 commit comments

Comments
 (0)