These are the following steps that are required to manually enable the mirror,
- Install rpm package
- Install overlaybd
- Enable http auth
- Configure mirror
- Enable tcmu and overlaybd services
Binaries can be downloaded from: https://acrstreamingpackage.blob.core.windows.net/bin/latest/acr-mirror-mariner.rpm
Install the mirror and the overlaybd binaries,
sudo rpm -i ./acr-mirror-mariner.rpm
sudo /opt/acr/tools/overlaybd/install.shFor Overlaybd Auth, if you're going to be using a MSI based auth flow then you'll do the following,
sudo /opt/acr/tools/overlaybd/enable-http-auth.shOtherwise, follow the instructions to setup file-based authn found here: https://github.com/containerd/overlaybd#credential-config
If az cli is installed or if the current environment is aks then the mirror will use MSI or the azure sdk to handle auth.
Otherwise, you can use the /login api to authenticate.
Here is an example script,
https://gist.github.com/juliusl/d1649b5d9d180e20135ca1d47a2a9a0c
sudo systemctl start acr-mirrorYou can check that it started correctly with,
journalctl -u acr-mirrorNote: This should output the port the mirror is listening on, it should also indicate if the file access provider is being used.
or
curl http://localhost:8578/statusFinally configure the mirror,
curl -X PUT 'http://localhost:8578/config?ns=_default&enable_suffix=azurecr.io&stream_format=overlaybd&enable_containerd=true'or if you know the registry you want to enable the mirror for,
curl -X PUT 'http://localhost:8578/config?ns=<registry-name>.azurecr.io&stream_format=overlaybd&enable_containerd=true'This will enable the containerd client-side hosts config so it does not require a containerd restart.
Finally, enable overlaybd services,
sudo modprobe target_core_user
sudo /opt/acr/tools/overlaybd/enable.sh
NOTE This will restart containerd
To check the status of overlaybd there are several places to check,
- systemd --
sudo systemctl status overlaybd-tcmusudo systemctl status overlaybd-snapshotter
- logs - Check the overlaybd/accelerated-container-snapshotter repos for log directories