-
Notifications
You must be signed in to change notification settings - Fork 9
vlab scripts #1361
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
Draft
daniel-noland
wants to merge
4
commits into
main
Choose a base branch
from
pr/daniel-noland/vlab-scripts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
vlab scripts #1361
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ result*/** | |
| /bin | ||
| sysroot | ||
| devroot | ||
| creds.json | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| sha256-a8CsTdz/c1F0tsc45u6cNXmYwjxVRlC+hhNdI3IN3Yw= |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Install a prebuilt zot binary from upstream GitHub releases. The project | ||
| # ships statically-linked linux/amd64 binaries per release; we fetch the asset | ||
| # directly rather than rebuild it from source. | ||
| # | ||
| # Versioning: the tag name (e.g. "v2.1.15") comes from the npins `zot` pin, | ||
| # so a plain `npins update` (i.e. `just bump pins`) bumps the version. | ||
| # The release asset is a raw ELF binary (no archive), which npins' tarball | ||
| # pin type rejects, so the binary's content hash is carried in ./binary.sri | ||
| # and is refreshed by scripts/bump.sh on every `just bump pins`. | ||
| { | ||
| stdenvNoCC, | ||
| fetchurl, | ||
| autoPatchelfHook, | ||
| lib, | ||
| src, | ||
| }: | ||
| stdenvNoCC.mkDerivation { | ||
| pname = "zot"; | ||
| # src.version carries the tag (e.g. "v2.1.15"); strip the leading "v" so | ||
| # the derivation name reads as a plain version. | ||
| version = lib.removePrefix "v" src.version; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://github.com/project-zot/zot/releases/download/${src.version}/zot-linux-amd64"; | ||
| hash = lib.removeSuffix "\n" (builtins.readFile ./binary.sri); | ||
| }; | ||
|
|
||
| dontUnpack = true; | ||
| dontStrip = true; | ||
| dontConfigure = true; | ||
| dontBuild = true; | ||
|
|
||
| # zot ships a statically-linked Go binary, so autoPatchelfHook has nothing | ||
| # to patch; it's kept as a safety net in case upstream ever switches to a | ||
| # dynamically-linked build. | ||
| nativeBuildInputs = [ autoPatchelfHook ]; | ||
|
|
||
| installPhase = '' | ||
| runHook preInstall | ||
| install -Dm755 $src $out/bin/zot | ||
| runHook postInstall | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "OCI-native container image registry"; | ||
| homepage = "https://zotregistry.dev"; | ||
| license = lib.licenses.asl20; | ||
| mainProgram = "zot"; | ||
| platforms = [ "x86_64-linux" ]; | ||
| }; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # Copyright Open Network Fabric Authors | ||
|
|
||
|
daniel-noland marked this conversation as resolved.
|
||
| set -euo pipefail | ||
|
|
||
| if [ -z "$*" ]; then | ||
| declare -r cmd="k9s --namespace fab --command pod" | ||
| else | ||
| declare -r cmd="$(printf '%q ' "$@")" | ||
| fi | ||
|
|
||
| docker exec -it vlab \ | ||
| ssh \ | ||
| -o StrictHostKeyChecking=no \ | ||
| -o UserKnownHostsFile=/dev/null \ | ||
| -t \ | ||
| -p 22000 \ | ||
| -i /vlab/vlab/sshkey \ | ||
| core@localhost "export PATH=\"/usr/bin:/bin:/opt/bin\"; $cmd" | ||
|
daniel-noland marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean it'll not be always using latest master? If that's the case, it's quite bad - in dev you should use either last release or actual latest master, no pinning for some intermidiate commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand this logic, but I can make it use the latest master easily.
It is actually easier that way. It's just that we pin literally every other thing. All of it. Including the api and everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also very easily make it use latest release, which makes more sense to me (but might cause DX problems)