Skip to content

Comments

Add support for Artifact Registry package mirrors#407

Merged
mfielding merged 3 commits intomasterfrom
os-package-mirror
Feb 18, 2026
Merged

Add support for Artifact Registry package mirrors#407
mfielding merged 3 commits intomasterfrom
os-package-mirror

Conversation

@mfielding
Copy link
Member

Currently, OS packages are downloaded directly from the OS vendor's mirrors, requiring outgoing Internet access for the database host. Although it works, it presents data exfiltration risks and is not in line with a secure-by-default configuration.

This changes adds a new, optional Terraform variable enable_os_package_mirror that, for Oracle Linux deployments,
configures an Artifact Registry remote repository (https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo) covering Base OS and Appstream repositories.

It requires IAM permissions to use the repository: artifactregistry.admin for the Terraform runner, and artifactregistry.reader for the database VM's service account. The VPC must have Private Google Access enabled.

Current support is limited to Google Cloud VMs running non-free editions, with Oracle Linux. For RHEL environments, which already use private repositories accessible via Private Google Access, this variable has no effect.

Sample output, in a VPC without Internet access: https://gist.github.com/mfielding/7b474a2142f1554481ec9ffab3e5c345

Currently, OS packages are downloaded directly from the OS vendor's
mirrors, requiring outgoing Internet access for the database host.
Although it works, it presents data exfiltration risks and is not inline
with a secure-by-default configuration.

This changes adds a new, optional Terraform variable
`enable_os_package_mirror` that, for Oracle Linux deployments,
configures an Artifact Registry remote repostiory
(https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo)
covering Base OS and Appstream repositories.

It requires IAM permissions to use the repository:
`artifactregistry.admin` for the Terraform runner, and
`artifactregistry.reader` for the database VM's service account.  The
VPC must have Private Google Access enabled.

Current support is limited to Google Cloud VMs running non-free
editions, with Oracle Linux.  For RHEL environments, which already use
private repositories accessible via Private Google Access, this variable
has no effect.

Sample output:
https://gist.github.com/mfielding/a731a5ae604b02f9c60519cb6acd7f52
* For clarity and consistency, removing "AR Mirror" references in favor
  or "AR Repo" or "AR Remote Repo"
* Added (and documented) a new parameter --ar-repo-url with the base URL
of the Artifact Registry remote repo
* Added a validation to error out if attempted with free edition
* I couldn't find a clean way to avoid the disabling of all repositories,
as we actually want to fix yum updates post-install too. So adding some
verbiage to the user guide.
* Keeping NTP as-is, as a RAC-only thing; NTP is deprecated in our current
supported OSes anyway.
* Updating data guard presubmit tests to use this AR configuration, and
  not to have Internet access.  (Free edition tests remain as-is.)

Sample output from an install run in a VPC without Internet access:
https://gist.github.com/mfielding/7b474a2142f1554481ec9ffab3e5c345
@mfielding
Copy link
Member Author

/retest

For the presubmit tests, I'd rather not grant firewall modification
permissions, so I'm removing the firewall creation knob.
Also updating Terraform docs to note the permissions required for
Artifact Registry.
@mfielding
Copy link
Member Author

/retest

4 similar comments
@mfielding
Copy link
Member Author

/retest

@mfielding
Copy link
Member Author

/retest

@mfielding
Copy link
Member Author

/retest

@mfielding
Copy link
Member Author

/retest

@mfielding mfielding requested a review from AlexBasinov February 6, 2026 18:56
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexBasinov, mfielding

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [AlexBasinov,mfielding]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfielding mfielding merged commit 49baf3d into master Feb 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants