Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Support airgapped environment #1619

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Conversation

smartkiwi
Copy link
Contributor

go_repository git commit doesn't support http_load caching mechanism thus prevents rules_docker to be used in air gapped environment.

Replacing it with alternative urls address makes go_repository to use http_load and utilize caching mechanism if needed.
An additional piece of information will be needed in future for updating dependencies' versions - sha256.
The way to get sha256 on mac - to download the file from https://api.github.com/repos/<org>/<repo>/tarball/<commit> and running shasum -a 256 <file>

`go_repository` git `commit` doesn't support `http_load` caching mechanism thus prevents `rules_docker` to be used in air gapped environment.

Replacing it with alternative `urls` address makes go_repository to use `http_load` and utilize [caching mechanism](https://docs.bazel.build/versions/master/guide.html#running-bazel-in-an-airgapped-environment) if needed.
An additional piece of information will be needed in future for updating dependencies' versions - sha256.
The way to get sha256 on mac - to download the file from `https://api.github.com/repos/<org>/<repo>/tarball/<commit>` and running `shasum -a 256 <file>`
@smartkiwi
Copy link
Contributor Author

/assign @smukherj1

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smartkiwi, smukherj1

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@smukherj1
Copy link
Collaborator

/gcbrun

@smukherj1 smukherj1 merged commit 8395c49 into bazelbuild:master Sep 11, 2020
cgdolan pushed a commit to cgdolan/rules_docker that referenced this pull request Sep 13, 2020
`go_repository` git `commit` doesn't support `http_load` caching mechanism thus prevents `rules_docker` to be used in air gapped environment.

Replacing it with alternative `urls` address makes go_repository to use `http_load` and utilize [caching mechanism](https://docs.bazel.build/versions/master/guide.html#running-bazel-in-an-airgapped-environment) if needed.
An additional piece of information will be needed in future for updating dependencies' versions - sha256.
The way to get sha256 on mac - to download the file from `https://api.github.com/repos/<org>/<repo>/tarball/<commit>` and running `shasum -a 256 <file>`
jamiees2 pushed a commit to jamiees2/rules_docker that referenced this pull request Sep 23, 2020
`go_repository` git `commit` doesn't support `http_load` caching mechanism thus prevents `rules_docker` to be used in air gapped environment.

Replacing it with alternative `urls` address makes go_repository to use `http_load` and utilize [caching mechanism](https://docs.bazel.build/versions/master/guide.html#running-bazel-in-an-airgapped-environment) if needed.
An additional piece of information will be needed in future for updating dependencies' versions - sha256.
The way to get sha256 on mac - to download the file from `https://api.github.com/repos/<org>/<repo>/tarball/<commit>` and running `shasum -a 256 <file>`
@gravypod
Copy link
Collaborator

@smartkiwi, is this something that could be accomplished using a Remote Asset API? I haven't ever worked in an airgapped environment so I don't really know much about the difficulties encountered here.

This change is probably ok to make anyway. Something else to look forward to for your use case is the External Dep Overhaul.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants