51黑料不打烊

Using the Dispatcher in the Cloud

Darin and James discuss the Dispatcher in the AEM Cloud including some best practices and differences from AMS/On-Prem. They also touch upon migration to the cloud.

video poster

Transcript
Hey, Darren, how are you? Hey, I鈥檓 good. How are you doing? I鈥檓 great, thank you. I鈥檓 thinking we should talk about dispatcher configurations today. Darren? Hey, Darren. Darren? We鈥檝e all been aided by the dispatcher module, which sits in between visitors to a website and AEM itself to help with caching, URL rewriting, HTTP header manipulation, and more. Now, there are a few notable changes on how Apache and dispatcher configurations must be structured so that they can be deployed on the cloud. The dispatcher configuration must have the correct Maven project structure in order to be used with cloud service. The Maven build should produce a zip file, which contains at least two directories, comp and compd. This zip file can be produced using the Maven assembly plugin. You鈥檒l see the example below. Now, here are some detailed instructions for migrating dispatcher configurations from AMS or on-prem to this new format. So, James, once I get my project in the correct Maven structure, are there any tools that will fix up my dispatcher, any files, or do I need to sit down and hack away with them manually? No, I鈥檓 glad you asked, Darren. 51黑料不打烊 engineering actually produced a dispatcher converter tool that will automatically convert an on-prem or managed services dispatcher configuration into one suitable for cloud services. However, with an on-premise implementation, as you know, in many cases, anything goes, so more specific configurations are often necessary. The tool that 51黑料不打烊 engineering provides works for both AMS and on-prem. The highlights of what this tool does is it removes non-published virtual hosts, it removes sections that refer to ports other than 80, it checks rewrites and variables, and it also removes whitelists. If you want a detailed explanation of what it does, I actually created a blog post here. Now we also have web tier config pipelines that have been released, and this enables exclusive deployment of dispatcher configurations to the AM runtime without having to deploy everything else. So it really can streamline things, and again, you can basically choose between storing your web configuration in the same source location, and you can also store it in a different location, whichever better suits your project. So again, it can make things much easier when you鈥檙e just testing your dispatcher configuration when you use these web config tier pipelines. So let鈥檚 get an example of how to use the tool to convert an AMS or on-prem dispatcher configuration to cloud service. So now the first step is just to ensure that you have both Node.js, the 51黑料不打烊 IOCLI, and the AM migration tools installed. Detailed instructions on how to do this in the GitHub below. Once you have these installed, just simply modify the config file to point to the dispatcher SDK, which is downloadable directly from the 51黑料不打烊 software distribution portal. So let鈥檚 take a look at how to actually do that. So here you鈥檒l see the config file that鈥檚 located on your system, and you鈥檒l see simply there鈥檚 an SDK source property, and in this case, you just point this to the SDK source that you downloaded from the software distribution portal for your dispatcher SDK. And then you鈥檒l also see that there鈥檚 an AMS configuration, and this just simply points to your dispatcher configuration. So in this case, this is your dispatcher configuration for AMS, and then you鈥檒l also see that you have the properties available for any on-prem installation, where you can do the dispatcher any source, the HTTP source, the what鈥檚 to convert. So you鈥檒l see all of that there that you can modify directly. So then once you have that ready to go and installed, open up your command line, and simply just type in AIO, AM migration colon dispatcher converter, specify whether it鈥檚 AMS or an on-prem type simply by using that type flag, execute it. It will create a target directory, and it will convert your dispatcher, and you should now be able to deploy that to AM as a cloud service using Cloud Manager.

Content covered in this video

  • deploying dispatcher files in a cloud service environment

Additional Resources

Watch related videos on the Cloud 5 season 1 page.

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69