Open Vad1mo opened 1 month ago
I really appreciate the overall direction of this idea.
I have a few thoughts and questions regarding the structure and assignment:
In this structure, a satellite will contain:
Are we only supporting image assignment at the group level?
What if we need to assign images to individual satellites?
Overall, I assume that aside from the image assignment changes, the rest of the processes such as satellite registration, state artifact creation etc., will remain unchanged.
@Mehul-Kumar-27, can you please paste here an excerpt from the state file, so that @tpoxa can take a look on what is wrong there!
This is how the state json looks currently
{
"registry": "Satellite",
"artifacts": [
{
"repository": "satellite-test-group-state/alpine",
"tag": [
"latest"
],
"labels": null,
"type": "IMAGE",
"digest": "sha256:9cee2b382fe2412cd77d5d437d15a93da8de373813621f2e4d406e3df0cf0e7c",
"deleted": false
},
{
"repository": "satellite-test-group-state/alpine",
"tag": [
"edge"
],
"labels": null,
"type": "IMAGE",
"digest": "sha256:4b27406f6c4ea07b596d7a0ee25e4f9c7b2152ab7ffbbb1817e036d727eabba1",
"deleted": false
},
{
"repository": "satellite-test-group-state/postgres",
"tag": [
"latest"
],
"labels": null,
"type": "IMAGE",
"digest": "sha256:dde924f70bc972261013327c480adf402ea71487b5750e40569a0b74fa90c74a",
"deleted": false
}
]
}
The issue lies in the repository
field.
For satellite to fetch the busybox image it would require the repository path as library/busybox
but in the current implementation of the state json it's path would appear as satellite-test-group-state/busybox
where satellite-test-group-state
is the name of the group which we add while creating the replication rule as namespace.
Cc. @Vad1mo , @tpoxa , @bupd
Based on the discussion last week, I want to summarize the responsibilities of different software components, and what effect it has on the users' interaction with those systems.
User Story
Software Components
Implementation Harbor Side
The user manages the artifacts in Harbor and decides which artifacts should be present on the edge. The goal is to reuse all the existing Harbor capabilities, and Harbor is extended with a new Registry Provider. The user will be using existing replication rules to select which artifacts should be present in which group. Instead of pushing artifacts down to the edge, the new registry provider will make a list and send this list to ground control.
Given that list, the edge device (satellite) will be pulling the images to its side.
Essentially, the registry provider that instead of actively moving images creates a list of those images and pushes that list to the ground control which then pushed it edge, which then downloads the images
Replication and Grouping
Currently, replication is a 1:1 relationship with one source and one destination registry. However, in the satellite use case we are not replication to each edge device (via ground control) but to each group of devices.
So there is the requirement to be able to address multiple edge devices. This can be done in two ways, at the endpoint or namespace level.
1) Every Group in Ground Control is a Registry Endpoint in Harbor 2) Every Group in Ground Control is a destination namespace inside the Replication Rule
Further Steps
TODO
Sample Edge State File
Next Steps and Use Cases
Once ground control has the state for the edge group, it will create an OCI state artifact and push it to Harbor. The satellite edge groups are periodically polling Harbor for new OCI state artifacts, and once they find any change will pull that artifact, verifies and extract it and download the artifacts listed in the edge state file.
Alternative Additional Considerations
Our goal is to transfer and package the state as an OCI artifact. Given that ground control should create such an OCI state artifact and push it back to the registry, this process can also be created by the registry provider itself, which is located on the harbor side.