The deployment scenario displayed in Figure 7.6, “Deployment Scenario for a Smart Proxy Use Case” is a typical use case for Smart Proxy. Component development is spread out across four distributed teams located in New York, London, Bangalore and San Jose. Each of the teams has a Nexus instance deployed in their local network to provide the best performance for each developer team and any locally running continuous integration server and other integrations
When the development team in New York does a commit to their component build, a continuous integration server deploys a new component snapshot version to the Nexus 1 instance.
With smart proxy enabled, this deployment is immediately followed by notifications, sent to the trusted smart proxy subscribers in Nexus 2, Nexus 3 and Nexus 4. These are collocated with the developers in London, Bangalore, and San Jose and can be configured to immediately fetch the new components available. At a minimum they will know about the availability of new component versions without the need to poll Nexus 1 repeatedly, therefore, keeping performance high for everyone.
When a user of Nexus 2, 3 or 4 build a component that depends on a snapshot version of the component from Nexus 1, smart proxy guarantees that the latest version published to Nexus 1 is used.
To configure smart proxy between these servers for the snapshots repository you have to
- add the public key of Nexus 1 as trusted certificate to Nexus 2, 3 and 4
- add the public keys of Nexus 2, 3 and 4 as trusted certificate to Server 2
- enable smart proxy publishing on the snapshot repository on Nexus 1
- set up new proxy repositories to proxy the Nexus 1 snapshot repository on Nexus 2, 3 and 4
- enable smart proxy subscription on the new proxy repositories
- optionally enable prefetching of components
- add the new proxy repositories to the public group on Nexus 2, 3 and 4
With this setup, any snapshot deployment from the New York team on Nexus 1 is immediately available to the development team in London, Bangalore, and San Jose.