container-registry / harbor-satellite

Harbor Satellite (WIP)
Apache License 2.0
13 stars 8 forks source link

Implement ZTR for satellites #41

Open bupd opened 3 months ago

bupd commented 3 months ago

Implement Zero Touch Registration

As mentioned in #36.

bupd commented 2 months ago

Summary

On GC:

On Satellite:

Process Overview

  1. Satellite Creation on Ground Control (GC):

    • Endpoint: POST: /satellite/register
    • Purpose: GC registers a satellite with specific parameters, including its group association.
    • Action: GC creates a robot account with specific permissions for the satellite, pushes the state artifact to the appropriate registry, and generates a single-use token.
  2. Satellite Deployment Command:

    • Command is Provided to Edge Server
    • Action: This command fetches the release binary or Docker image of the satellite and sets the provided token.
  3. Satellite Auto-Registration:

    • Process: On starting, the satellite contacts the ztr route on GC using the provided token to register itself and come online.
    • State Fetching: Satellite gets all relevant state information, including credentials for its robot account and the registry URL for the state artifact.
  4. Satellite Operation:

    • Execution: The satellite starts its operations based on the fetched state, including pulling necessary artifacts from the specified OCI-compliant registry.

Conclusion

This approach is safer as it directly injects the token during satellite deployment and seamlessly integrates into existing CI/CD pipelines, ensuring secure and efficient deployment.