Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for multi repo pipelines #1142

Merged
merged 8 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions _docs-sources/pipelines/multi-account/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# Deploying Multi-Account Pipelines
# Multiple Infrastructure Repos
ellisonc marked this conversation as resolved.
Show resolved Hide resolved

<!-- Placeholder for future content for Pipelines v2 -->
We recommend using a single `infrastructure-live` repository for managing your organization's infrastructure.
Sometimes, this isn't possible due to team structure, security requirements, or other limitations.
In order to accommodate multiple infrastructure repositories, Gruntwork Pipelines is configurable.

## Create Additional Repos

New `infrrastructure-live` repositories can be created using the same process described in the
[Hello World](../hello-world#setting-up-the-repositories) documentation.
ellisonc marked this conversation as resolved.
Show resolved Hide resolved

:::info
Once the repo is created, you'll need to set up machine user access using either the existing machine user and `PIPELINES_DISPATCH` PAT token,
or one created specifically for this purpose. See [Machine Users](../using-pipelines/machine-users) for more information.
:::

No special configuration is required for the new `infrastructure-live` repository,
the Pipelines Dispatch job will identify the source repository and pass that information
to the shared `infrastructure-pipelines` repository.

## Enable Additional Repos

To ensure no unauthorized access is granted to your `infrastructure-pipelines` repository,
an allowlist of `infrastructure-live` repositories exists at the root directory.
To allow resources to be deployed by your new repository,
add the repository to `repo-allowlist.txt` on a new line.
ellisonc marked this conversation as resolved.
Show resolved Hide resolved

The new resource should match the name of your repository **exactly** in the format
`github-org/infrastructure-live-repo-name` with a single repository per line. See the example file below:

```txt title=infrastructure-pipelines/repo-allowlist.txt
acme/team-1-infrastructure-live
acme/team-2-infrastructure-live
```

:::info
The `INFRA_LIVE_ACCESS_TOKEN` available to the `infrastructure-pipelines` repository must have content read & write access to all repositories in the allowlist.
:::
41 changes: 38 additions & 3 deletions docs/pipelines/multi-account/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
# Deploying Multi-Account Pipelines
# Multiple Infrastructure Repos

<!-- Placeholder for future content for Pipelines v2 -->
We recommend using a single `infrastructure-live` repository for managing your organization's infrastructure.
Sometimes, this isn't possible due to team structure, security requirements, or other limitations.
In order to accommodate multiple infrastructure repositories, Gruntwork Pipelines is configurable.
ellisonc marked this conversation as resolved.
Show resolved Hide resolved

## Create Additional Repos

New `infrrastructure-live` repositories can be created using the same process described in the
[Hello World](../hello-world#setting-up-the-repositories) documentation.

:::info
Once the repo is created, you'll need to set up machine user access using either the existing machine user and `PIPELINES_DISPATCH` PAT token,
or one created specifically for this purpose. See [Machine Users](../using-pipelines/machine-users) for more information.
:::

No special configuration is required for the new `infrastructure-live` repository,
the Pipelines Dispatch job will identify the source repository and pass that information
to the shared `infrastructure-pipelines` repository.

## Enable Additional Repos

To ensure no unauthorized access is granted to your `infrastructure-pipelines` repository,
an allowlist of `infrastructure-live` repositories exists at the root directory.
To allow resources to be deployed by your new repository,
add the repository to `repo-allowlist.txt` on a new line.
ellisonc marked this conversation as resolved.
Show resolved Hide resolved

The new resource should match the name of your repository **exactly** in the format
`github-org/infrastructure-live-repo-name` with a single repository per line. See the example file below:

```txt title=infrastructure-pipelines/repo-allowlist.txt
acme/team-1-infrastructure-live
acme/team-2-infrastructure-live
```

:::info
The `INFRA_LIVE_ACCESS_TOKEN` available to the `infrastructure-pipelines` repository must have content read & write access to all repositories in the allowlist.
:::


<!-- ##DOCS-SOURCER-START
{
"sourcePlugin": "local-copier",
"hash": "8d7846e6a816598bb7ec29635bad7d41"
"hash": "fabe61448cd4431369f8c1c508dae64b"
}
##DOCS-SOURCER-END -->
5 changes: 5 additions & 0 deletions sidebars/pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ const sidebar = [
type: "doc",
id: "pipelines/using-pipelines/index",
},
{
label: "Multiple Infrastructure Repos",
ellisonc marked this conversation as resolved.
Show resolved Hide resolved
type: "doc",
id: "pipelines/multi-account/index",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it goes beyond the scope of "getting started." Should we introduce a new section called "Configuration" and put it in there? Perhaps we could also move the following content to that section:

  • The GitHub Enterprise Users section of the "Using Pipelines" page (that could go under its own page called "GitHub Enterprise")
  • Usage data
  • Repository access (maybe?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved some stuff around mostly into security, let me know if you like this layout better

],
},
{
Expand Down