Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Push docker image to registry#7

Merged
gregcusack merged 4 commits intoanza-xyz:mainfrom
gregcusack:push-docker-to-registry
Apr 17, 2024
Merged

Push docker image to registry#7
gregcusack merged 4 commits intoanza-xyz:mainfrom
gregcusack:push-docker-to-registry

Conversation

@gregcusack
Copy link
Copy Markdown
Contributor

@gregcusack gregcusack commented Mar 29, 2024

Summary of Changes

  1. Push Docker Image to registry
  2. Change up DockerConfig struct and add in DockerImage struct
  3. Fix some nits from Jon and replace fetch.spl script with same functionality in rust.

7th PR in a series of PRs that will build out the mongon testing framework for deploying validator clusters on Kubernetes
Previous PRs:

  1. PR: add PROGRESS.md and connect to k8s endpoint to check namespace exists #1
  2. PR: Add in ability to build solana binary from local repo on host #2
  3. PR: Add pull specific solana-release version #3
  4. PR: Create genesis struct. and generate bootstrap and faucet accounts #4
  5. PR: Build genesis and add genesis cli flags #5
  6. PR: Build docker bootstrap image #6

@gregcusack gregcusack force-pushed the push-docker-to-registry branch from 9d1e086 to c9c94a3 Compare April 1, 2024 19:09
@gregcusack gregcusack force-pushed the push-docker-to-registry branch 2 times, most recently from 1721ca3 to e5097ad Compare April 8, 2024 21:09
@gregcusack gregcusack force-pushed the push-docker-to-registry branch from e5097ad to ef82a2c Compare April 10, 2024 17:13
@gregcusack gregcusack requested review from joncinque and yihau April 10, 2024 17:53
@gregcusack gregcusack force-pushed the push-docker-to-registry branch from 69e7e75 to d1e0aaa Compare April 17, 2024 00:04
@gregcusack gregcusack force-pushed the push-docker-to-registry branch from d1e0aaa to ef5146a Compare April 17, 2024 00:11
Copy link
Copy Markdown
Member

@yihau yihau left a comment

Choose a reason for hiding this comment

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

sorry for the super late reviewing 😞

@gregcusack gregcusack merged commit e366862 into anza-xyz:main Apr 17, 2024
@gregcusack
Copy link
Copy Markdown
Contributor Author

sorry for the super late reviewing 😞

no worries! lots of other stuff going on rn. thank you!

@gregcusack gregcusack deleted the push-docker-to-registry branch April 18, 2024 17:55
Copy link
Copy Markdown

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looking great! Just a few things, and thanks for addressing the previous points

Comment thread src/docker.rs
Comment on lines +210 to +221
let output = match Command::new("sh")
.arg("-c")
.arg(&command)
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
.expect("Failed to execute command")
.wait_with_output()
{
Ok(res) => Ok(res),
Err(err) => Err(Box::new(err) as Box<dyn Error>),
}?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: you should be able to simplify this to something like:

        let output = match Command::new("sh")
            .arg("-c")
            .arg(&command)
            .stdout(Stdio::null())
            .stderr(Stdio::null())
            .spawn()
            .expect("Failed to execute command")
            .wait_with_output()
            .map_err(Box::new)?;

with maybe some trickery on the Box::new bit

Comment thread src/lib.rs
Comment on lines +168 to +187
let programs = vec![
(
"token",
"3.5.0",
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"BPFLoader2111111111111111111111111111111111",
),
(
"token-2022",
"0.9.0",
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
UPGRADEABLE_LOADER,
),
(
"associated-token-account",
"1.1.2",
"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"BPFLoader2111111111111111111111111111111111",
),
];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These seem to be missing memo v1, memo v3, and feature-proposal: https://github.com/anza-xyz/agave/blob/deec1f450d1f2eae40158f481a37f1e8be79ca03/fetch-spl.sh#L49

Was that intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ahhhh shoot. i had some url issues with these. and took them out but forgot to put them back in once i figured out the issue. smh. will fix

Comment thread src/lib.rs
),
];

for (name, version, address, loader) in programs {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: past two fields, it's typically clearer to create a new struct, like

struct GenesisProgram {
    name: &str,
    version: &str,
    address: &str,
    loader: &str,
}

Comment thread src/main.rs
.long("slots-per-epoch")
.takes_value(true)
.help("override the number of slots in an epoch"),
.help("override the number of slots in an epoch. Default for cluster_type: development -> 8192.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Or crap, I didn't realize it was still 8192 for dev clusters. Might be worth revisiting in separate work

Comment thread src/main.rs
.long("target-lamports-per-signature")
.takes_value(true)
.help("Genesis config. target lamports per signature"),
.help("Genesis config. target lamports per signature. Default: 10000"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gosh, I'm learning a lot through these PRs. I can't believe this concept still exists!

gregcusack added a commit to gregcusack/validator-lab that referenced this pull request Apr 21, 2024
gregcusack added a commit that referenced this pull request Apr 23, 2024
* add bootstrap validator selector

* address chido: hard code startup scripts

* add library and validator structs

* upgrade rustls

* address Jon comments from PR #7

* Jon nit from PR #8. rm build_path

* chido. change up secret handling to be more flexible
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants