- 
                Notifications
    You must be signed in to change notification settings 
- Fork 60
[4/n] [omicron-package] add and use target presets #7288
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
          
     Merged
      
      
            sunshowers
  merged 10 commits into
  main
from
sunshowers/spr/3n-draft-omicron-package-add-and-use-target-presets
  
      
      
   
  Jan 7, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      0396908
              
                [spr] changes to main this commit is based on
              
              
                sunshowers b942521
              
                [spr] initial version
              
              
                sunshowers ff9ddfa
              
                [spr] changes introduced through rebase
              
              
                sunshowers 863e18c
              
                rebase
              
              
                sunshowers 670fc82
              
                fix up CI and rebase
              
              
                sunshowers 7873469
              
                [spr] changes introduced through rebase
              
              
                sunshowers 4a472ea
              
                fix releng
              
              
                sunshowers 13193f1
              
                [spr] changes introduced through rebase
              
              
                sunshowers ec6f367
              
                rebase
              
              
                sunshowers fe4b1d4
              
                rebase on main
              
              
                sunshowers 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
    
  
  
    
              
  
    
      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
    
  
  
    
              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 | 
|---|---|---|
|  | @@ -797,7 +797,7 @@ output.intermediate_only = true | |
|  | ||
| # To package and install the asic variant of the switch, do: | ||
| # | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -i standard -m gimlet -s asic | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -p dev -m gimlet -s asic | ||
| # $ cargo run --release --bin omicron-package -- package | ||
| # $ pfexec ./target/release/omicron-package install | ||
| [package.switch-asic] | ||
|  | @@ -825,7 +825,7 @@ output.type = "zone" | |
|  | ||
| # To package and install the stub variant of the switch, do the following: | ||
| # | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -i standard -m <gimlet|gimlet-standalone|non-gimlet> -s stub | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -p dev -m <gimlet|gimlet-standalone|non-gimlet> -s stub | ||
| # $ cargo run --release --bin omicron-package -- package | ||
| # $ pfexec ./target/release/omicron-package install | ||
| [package.switch-stub] | ||
|  | @@ -851,7 +851,7 @@ output.type = "zone" | |
|  | ||
| # To package and install the softnpu variant of the switch, do the following: | ||
| # | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -i standard -m <gimlet|gimlet-standalone|non-gimlet> -s softnpu | ||
| # $ cargo run --release --bin omicron-package -- -t default target create -p dev -m <gimlet|gimlet-standalone|non-gimlet> | ||
| # $ cargo run --release --bin omicron-package -- package | ||
| # $ pfexec ./target/release/omicron-package install | ||
| [package.switch-softnpu] | ||
|  | @@ -934,4 +934,38 @@ source.type = "local" | |
| source.rust.binary_names = ["clickana"] | ||
| source.rust.release = true | ||
| output.type = "zone" | ||
| output.intermediate_only = true | ||
| output.intermediate_only = true | ||
|  | ||
| # Target configuration | ||
| # -------------------- | ||
| # | ||
| # This section defines "targets" built by Omicron. A target is a map of keys and | ||
| # values that are used to filter out packages (via `only_for_targets`) and for | ||
| # other purposes. | ||
| # | ||
| # For what the individual keys mean, see the definition for `TargetCommand` in | ||
| # `package/src/lib.rs`. | ||
|  | ||
| # A preset for the host image built during release. | ||
| [target.preset.host] | ||
| image = "standard" | ||
| machine = "gimlet" | ||
| switch = "asic" | ||
| rack-topology = "multi-sled" | ||
| clickhouse-topology = "single-node" | ||
|  | ||
| # A preset for the recovery image built during release. | ||
| [target.preset.recovery] | ||
| image = "trampoline" | ||
| # The trampoline image doesn't execute sled-agent and doesn't contain the switch | ||
| # zone, so neither "machine" nor "switch" are defined. | ||
| rack-topology = "single-sled" | ||
| clickhouse-topology = "single-node" | ||
|  | ||
| # A preset for development. | ||
| [target.preset.dev] | ||
| image = "standard" | ||
| machine = "non-gimlet" | ||
| switch = "softnpu" | ||
| rack-topology = "single-sled" | ||
| clickhouse-topology = "single-node" | ||
| 
      Comment on lines
    
      +938
     to 
      +971
    
   There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the presets are defined here. | ||
  
    
      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
    
  
  
    
              
      
      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.
This is great, I think it's very straightforward to see these defined here!