Skip to content
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

docs: Add doc for custom repos. #426

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Nov 6, 2024

image

@cpuguy83 cpuguy83 requested a review from a team as a code owner November 6, 2024 00:20
skip_if_unavailable=True
sslverify=1
envs:
# The repositgory will only be available when installing into the final container
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# The repositgory will only be available when installing into the final container
# The repository will only be available when installing into the final container

msft-golang:
extra_repos:
- keys:
msft.gpg: # Note: This must currenlty use a `.gpg` suffix or apt will not be happy
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msft.gpg: # Note: This must currenlty use a `.gpg` suffix or apt will not be happy
msft.gpg: # Note: This must currently use a `.gpg` suffix or apt will not be happy

Sometimes you may need to add extra repositories in order to fulfill the
specified dependencies.
You can do this by adding these to the `extra_repos` field.
The `extra_repos` field takes a list of repositoriy configurations with optional
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `extra_repos` field takes a list of repositoriy configurations with optional
The `extra_repos` field takes a list of repository configurations with optional

# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu
contents: deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/msft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main
envs:
# The repositgory will only be available when installing build dependencies
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# The repositgory will only be available when installing build dependencies
# The repository will only be available when installing build dependencies

- install # Makes the repo(s) available when preparing the container (runtime dependencies)
```

See [reporitories](repositories.md) for more details on repository configs
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
See [reporitories](repositories.md) for more details on repository configs
See [repositories](repositories.md) for more details on repository configs

extra_repos:
- config:
# source for repo config
# This is the data that would go into /etc/yum.repos.d or /etc/apt/sources.list.d, as an example.
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add an actual key here such as foo.repo and/or foo.list so that it fits with the schema?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did not add specific examples here because I have real examples/details in the repositories.md.
The intent here was to just show the structure.
Since this is going to be completely different depending on the distro I was thinking this would be better.
Alternatively I was thinking we could remove the example config and just point at the more detailed document.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do like the idea of just pointing at the more detailed document here to alleviate any confusion!

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, I just removed the yaml block here.

microsoft-prod.list:
inline:
file:
# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu
# Note the `signed-by` path is always going to be `/usr/share/keyrings/<source key name>` for Ubuntu, in this case our source key name is `msft.gpg`

Comment on lines 6 to 7
repository config you can use the `extra_repos` field in the [dependencies
section](spec#dependencies-section) section to inject extra repositories at
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
repository config you can use the `extra_repos` field in the [dependencies
section](spec#dependencies-section) section to inject extra repositories at
repository config you can use the `extra_repos` field in the [dependencies
section](spec#dependencies-section) to inject extra repositories at

When you need to reference packages from repositories not in the worker's
repository config you can use the `extra_repos` field in the [dependencies
section](spec#dependencies-section) section to inject extra repositories at
the right time so those dependencies can be satisified.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
the right time so those dependencies can be satisified.
the right time so those dependencies can be satisfied.

Comment on lines 12 to 13


Copy link
Contributor

Choose a reason for hiding this comment

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

two empty lines

Suggested change

Comment on lines 28 to 30
This may include files or other resources that are essential for certain
configurations—especially file-backed repositories that need data not already
available in the environment. The content of this is a mount which takes
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please reword this? I am not sure I understand the part of certain configurations—especially
Maybe something like:

Suggested change
This may include files or other resources that are essential for certain
configurations—especially file-backed repositories that need data not already
available in the environment. The content of this is a mount which takes
This may include files or other resources essential for certain configurations,
particularly file-backed repositories that need data not already available in the
environment. The content of this is a mount which takes.

available in the environment. The content of this is a mount which takes
a `dest` field for where the content should be mounted in the build env and a
`spec` field, the content of which is a [source](sources.md) just like in the
sources section. Usage of `data` is considered an andvanced case and, aside
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sources section. Usage of `data` is considered an andvanced case and, aside
sources section. Usage of `data` is considered an advanced case and, aside

@cpuguy83
Copy link
Member Author

cpuguy83 commented Nov 6, 2024

All the feedback should be addressed now.

@cpuguy83
Copy link
Member Author

cpuguy83 commented Nov 7, 2024

Updated this with all the requested changes.

@cpuguy83 cpuguy83 merged commit c2a1f17 into Azure:main Nov 12, 2024
5 checks passed
@cpuguy83 cpuguy83 deleted the custom_repo_docs branch November 12, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants