51黑料不打烊

AEM Modernization Tools

Learn how AEM Modernization Tools are used to upgrade an existing AEM Sites content to be AEM as a Cloud Service compatible and align with best practices.

All-in-One Converter

video poster

Transcript
Hello everybody, my name is Brian Stauf, I鈥檓 a Senior Cloud Architect with 51黑料不打烊, and in this video I鈥檒l be going over the all-in-one conversion feature of the AM Modernization Tool Suite. The all-in-one conversion feature is designed to perform the other three features that are in the suite as a single operation on the indicated pages for a given job. So those operations are the structure conversion, the policy importer, and the component conversion tool. So with the structure conversion tool, in order to perform the operation you must have the editable template for the conversion tool to have as a target. So in this demo I鈥檓 going to be converting the geometric shapes to the home page. This page uses currently a side template, here鈥檚 the side template as you can see here, and here is the editable template that we will be converting the page structure to. Now one thing to note that in addition to performing the operations and the conversion operations for the pages, when policies are imported, this tool also will apply any policies to the editable template based on what was found on the individual pages. So what that means is in this case this title, small blue text is a design configuration that will be converted into a policy and then it will automatically apply that policy on the editable template. We can look at the editable template now and look at the title component reference here in this paragraph system, sorry in this responsive grid system. As you can see there is no policy currently applied. Let鈥檚 go ahead and look at the JCR for the content that we鈥檙e about to transform. If we go over here we can see that this is the editable template and these are the policies that exist in the policy mappings. There is no mapping for the home page title component. We go down to the policies and we look at the title policy list. Let鈥檚 see there is only one which is the experience fragment title. If we go down to the content of the page, you can see that it is still in the legacy format which is the paragraph system, header, news list, etc. All these things will be changing as we execute the all-in-one conversion tool. So let鈥檚 take a look at the tool now. So we go down here to modernize tools. This is available once you鈥檝e installed the modernization tool suite into your AEM instance. And then if we click on that, you can also then see that we鈥檙e going to click on the all-in-one conversion tool. This view is a list of all of the completed or scheduled jobs for the conversion. In version 2.0 of the modernization suite, the conversions are performed as slain jobs. So they are scheduled and then executed asynchronously. And this view will show you any jobs that already have been executed. There鈥檚 none now, but we鈥檙e going to go ahead and create one and I鈥檒l show you what this view looks like once we have a job that鈥檚 been completed. Click on create. Now as with all the tools, a job does require, the scheduling of a job does require job names. We鈥檙e going to put geometrics home page here for the job name. Because we are performing page structure conversions, we must also configure that particular feature of the tool suite. In that case, we need to specify how we want to handle pages, handle the pages. So there鈥檚 three options for handling a page. First is none. That is, simply convert the page in place as it sits in the repository today. In that case, what you see here. Now the next option is restore. As the all-in-one conversion tool executes or when the page structure conversion tool executes, it creates a version of the page as it processes each page. That version is then tracked on the page as a property so that way if we need to, we can restore back to the pre-conversion page and re-run conversions. This allows teams to change rules or update a rule based on additional information and then re-run already processed pages with the new rules. It will simply revert the page, identify the rules, apply the rules, and then you鈥檒l see the updates once the job is done. Last but not least is the other option is to copy the target. What this allows us to do is, it allows us to select a route path that we want to start all of our searching off of. And then we also get to select a target path that we want to copy the pages to. So when we do this and we select our target, what will happen is all pages must exist under this route and every page鈥檚 path portion that matches this will be replaced with this. So therefore, if we were to say, select the Geometrics English page on the next screen and then when we select that page, it will then be copied to Geometrics, sorry, content geodemo and then we鈥檒l access EN. Now because in this particular example, the EN page already exists, the conversion job would actually fail that particular entry because it will not overwrite an already existing page. We鈥檙e not going to do either of those options, we鈥檙e just going to leave the page in place for processing and we鈥檙e going to continue on to the next option list. The next option is the policy import because we are also going to import policies, we need to specify where in which conf we want to save those policies. In this case, we鈥檙e going to use the Geometrics demo new conf location which is used by this editable template as its policy storage. So we鈥檙e going to go down here. The next option is include supertypes. I go into more detail about this in the policy importer tool. Just be aware that the reason this is disabled and is not allowed to be changed from a selected option is because in order to find the design configurations for the page, we need to search the entire hierarchy for possible references in order to find them and then apply them once the page has been converted. Over on existing, again I go into more detail about this on the policy importer video, but basically you should be aware that this will allow you to reprocess already processed design configurations and it has new policies. Selecting this where a design configuration has already been imported may create duplicates in the repository. That is not going to be the case for us because we are in a clean slate so there is nothing to reimport. So now we鈥檙e going to go into the next screen. In this view you will select the pages that you want to process. So as we select the pages we鈥檙e going to select the Geometrics demo English homepage. That鈥檚 going to be the one we鈥檙e going to process. We select that. You can see now that it has found one structure rule, so one template to convert. One policy rule that applies to three different designs will match that policy rule so three policies will be created. There are seven component rules which match ten components on the page. So these are the operations that are going to be performed when we execute this job. It should be noted that the policy rules and the component rules are fuzzy matches. What that means is that it鈥檚 possible that more than one rule may match a given node but only one rule will be applied to a given node. That has to do with the fact that you may have prioritization of rules in the system. I鈥檒l go into more detail about how this functions in the nitty-gritty details video which you can find on the documentation site. So now the other thing about this, just like all the other tools, you can add more pages. You can select as many as you want by going into here, selecting another page, or you can choose to select a page and then include its children. When you try to select children you can choose to only include direct descendants or you can uncheck that to conclude the entire hierarchy underneath that node or that page. So I鈥檓 going to show you what that looks like now. So it鈥檚 going to go through and it鈥檚 going to read those pages and it鈥檚 going to look them up. It鈥檚 going to identify the policies and the components and rules and whatnot that may need to be applied or that will be applied for those pages. Once it鈥檚 found all the children, you鈥檒l see that it鈥檚 going to set its 31 conversions and it shows the list of all the different children here. Now I actually don鈥檛 want to schedule this job to have more than one. I鈥檓 just going to go ahead and unselect everything and bring us back to just the one page. You can choose to add more than as many pages as you want to a given job. If a job is more than 500 operations or 500 pages really, then it will be split into multiple jobs. Each job will have a maximum of 500 operations. A job is completed as a single atomic save. So as it goes through the process it converts the pages and components and templates. Once it鈥檚 done it saves them all in one fell swoop and then the next job is scheduled. Only one job can run at a time, but you can have as many you can add as many pages as you want. Once you are ready you can schedule a job here by clicking schedule job. It will confirm that you really want to convert this page. So yes I do. And then we鈥檒l move over to the job detail view. This job detail view shows you the paths that have been requested to be processed. And if you look on the left here you can see that there is a bucket list. If you have again you have more than 500 items in the desired list it will create a bucket for every 500 or portion thereof. And each bucket is its own job in the Sling Job Scheduler. We don鈥檛 have an example for that particular view at this moment, but just know that there will be multiple buckets here with the number of items in each bucket listed for the operation. Now right now the job has been scheduled but it鈥檚 an unknown state because it has not finished execution or at least to our mind it has not finished execution. Let me refresh the screen and we can see what it has done. And once I refresh the screen you can now see that the job has been completed. We have a success on the page and the bucket is overall successful. We can now return to the list of all the jobs and we can see that here is the job that we just executed. In a card view we also have a list view available which you can then see. This shows you when it was executed and whether or not it鈥檚 a multi-bucket. Multi-bucket basically means whether or not there was more than one job that you executed. If there was multi-bucket in the list view it will have a little check box right here. If it鈥檚 in the card view it will look like a stack of cards as opposed to a single card. Let鈥檚 go look at the page that just got converted. So here鈥檚 the page pre-conversion. Let鈥檚 refresh the screen and take a look at it in post-conversion. Well, and here we have it. So as you can see, it does look a little bit off and that has to do with the fact that I don鈥檛 have any of the proper CSS rules for the new editable template, but as you can see it has been fully converted. The lead component is here, the right teaser is here, the image, title, and text components are here. For this particular component, we鈥檙e going to have to go to the next section. So we鈥檙e going to go to the next section and we鈥檙e going to go to the next section. So here we have the editable template structure. For this particular conversion, what we decided to do was use the responsive grid. Instead of having column controls, each of these columns became a container in the parent responsive grid that you see here. Let鈥檚 take a look at the JCR. So if we come back to this page inside the JCR and we refresh this, we now see that it is a container, right container, and inside that is our lead container. You can see here is the left container and the right container that used to be the column controls. Now if we go up to the policies that were created, we can click on title here and refresh, and you鈥檒l see that there is a title that was created, or title policy. Just click on that. You can see that it was converted, so this is a new main container title policy with each three as a rule and three allowed types. If we go back to the editable template, we saw before that this component did not have a policy applied. I鈥檓 going to refresh the screen so it looks up the reference again. And once this page loads and we can click on that component and look at its policy, we can see that, here we go, the policy has been applied, main container title, properties are all set. So that allows us, the all-in-one tool allows us to apply policies as the pages are converted. It will apply the first policy of fines for a page conversion process for the associated editable template. That鈥檚 everything for this particular tool. Thank you for your time.

Page conversion

video poster

Transcript
Hello, everybody, welcome. My name is Brian Stauf. I鈥檓 a senior cloud architect with 51黑料不打烊. And in this video, I鈥檒l be reviewing the page structure conversion feature of the AM modernization tools. So this feature does it allows users to convert static pages that use a static template to the to reference an editable template does not create the editable template for you. Instead, it actually updates the structure of a given page to match the expected structure of the editable template so that it can be so the pages can reference the latest features of the AM product. So in this example, I have a page here, the geometrics homepage. And this is the page, the static template has the carousel, lead, columns, right column, paragraph system, etc. We鈥檙e going to convert this page into an editable template to use this editable template that I鈥檝e already created as a header carousel, lead, etc, etc. So now in order to, more for this tool to function, you must specify the conversion rule, conversion rules for this particular tool, use an OSGI service, then and basically, it鈥檚 a factory configuration. So you simply need to configure the factory. In this case, we have the geometrics homepage, rewrite rule here. So static template apps geometrics templates homepage, that鈥檚 the template we want to use, it must have this sling resource type. And then we want to convert that any pages matching those rules to this geodemo homepage. The container resource type is used for the containers as they鈥檙e created. And as they鈥檙e as the nodes are populated with the content. This is a proxy component to the core container component. As was as with the previous version of this tool, you can still specify the component order within the container. So this is going to have the header carousel container, and with a number, and then the lead component within the main container. This is the order that the components will be arranged from in the root that is created that is off the editable template. There鈥檚 a couple of components that are not necessary, because they were legacy from the editable template that are no longer referenced by the editable template. And our evaluation shows that we can delete the news list and the image component nodes from the root of the site. There鈥檚 a new feature in version 2.0, which is the ignore components. Out of the box, this this tool will now ignore the blueprint and live copy configuration nodes. This feature allows you to specify additional nodes that are desired to be left at the root of the JCR. So in that context, what we鈥檙e referring to is the any nodes that may exist here under JCR content that are wanting to be left alone and remain there. Now, if you do leave them alone, it should be noted that they will not be available for template editors or content authors to update. But maybe there鈥檚 a reason for that based on your evaluations. Finally, and at least we need to be able to rename the components as they鈥檙e being moved around. In this case, the par node needs to be renamed to container slash container. So if we look at the existing tree structure, this node is the par node, it contains all of our content, and it needs to move into the structure root container slash container component, which is this one here. Additionally, we want to rename the right par to this ID number here with container that was created when we when the editable when the template editor created the structure, we鈥檇 have to look at the structure to identify this node. So here鈥檚 the container with the digits. And we can see on the editable template that is this container over here. So if we look down, if we come down here to the page itself, we want the right par system to be converted and moved into that tree. That鈥檚 what this is for. So now that I鈥檝e gone over how we identify the configurations and how to prepare for the useful scope and use. So we鈥檙e going to go ahead down to the tools and then once a modernization tools are installed, they will show up here on the list a modernized tools, really use the page structure conversion tool, this one right here. So this, like all the tools shows a list of all jobs that have been run before I have a example here that was from a previous demonstration. This is the card view. This is this, you can also look at it in list view here. 10 minutes ago when I ran this and multi bucket, multi bucket is based off of how many items were in the job, a job that has more than 500 items will automatically be split into a buckets of 500 or portions thereof. So if this job had more than 500 items, there would be a checkmark here for multi bucket. If you鈥檙e in the card view, the card would look like a stack of cards as opposed to a single card. I don鈥檛 have any examples of that in this demo. But you should you鈥檒l notice it when you see it. Let鈥檚 go ahead and start this schedule as job so click on Create. As with all the tools in the suite, jobs need a job name for referencing later, as you saw on the cart on the view previously, to use geometrics homepage. Now, in version 2.0, there鈥檚 now additional options for converting pages. And those are how to handle the pages, the default is none. What that means is simply convert the page in place. The next option is restore. What this means is that you can restore a page to a state that was held previous to the last modernization run. Every time a modernization structure, job runs, or the all in one conversion, the page is versioned with an identifier. So it鈥檚 a simple normal page version. And this option allows you to revert back to that state prior to the last run before running again, I鈥檒l actually demonstrate that here in a minute. So the next is copy to target. What this is allows users to do is copy the page from the source location into the to a given destination location. So I鈥檒l go through this real fast. So copy target, if I were to select source path, and I go to geometric demo site, say I want to start here, select that, and target path, I want to copy that into this location, geo demo us, and then select. So what this will do is, every page I select in the next on the next screen, we鈥檒l have this portion of the path replaced with this portion. And I鈥檒l and by selecting the source path, it actually limits us in the next section to only paths that start with that portion. So if I click on that pages, you can see here I鈥檓 limited to geometrics. So I click on I can select English. If I were to select this, though, as we saw before, this page, he and already exists in the target location. If you select a page that already exists in our location, the job will continue, but that particular page will error out because it the system will not allow you to copy to the destination. If it already exists, it will prevent that from occurring. We should go back to no page handling for the purposes of this next demonstration. So we鈥檙e gonna go next, we鈥檙e going to add pages. So we come down here to geo demo site, English and select. As you can see here, one rule is found, we have one conversion, which is this page. As with all the tools, you can select more pages by simply clicking the Add Pages and add more to the list. Or you can select the so we can do that. So like this. Or you can what you can do is you can select a root page and include the children. That allows you to decide whether or not you want to click only or sorry, include only the direct descendants, or you can uncheck that and include all descendants of the pages selected. We鈥檙e gonna go ahead and do that and show you what it looks like. As you can see here, it loads all the pages and identifies whether or not there鈥檚 any rules. As you can see from this list, there actually aren鈥檛 any rules to process for these pages. So I鈥檓 actually going to remove all of these selections and go back to just a single page. So add pages, English, select, schedule the job. As for all the tools that confirm for that one schedules job, you must have permission to this page in order to schedule a job. In fact, the user interface won鈥檛 allow you to select any pages to which you do not have right permissions. So we鈥檙e gonna hit convert. And we鈥檙e going to run as with all the tools when you arrive after scheduling the job, you arrive at the job details page. This is where you can see the buckets on the left will be a bucket listed for any jobs that have over 500 items. So it鈥檒l be multiple buckets. Again, the first bucket will have 500 in each bucket after that we鈥檒l have the 500 or a portion thereof depending upon how many items you select. When you run this job, the the the paths are listed here on the right, what the process is, this job has been scheduled but not actually executed. In order to see the state, I can refresh the page, you can see the job has successfully been run. It should be noted that a given job is an all or one commit. So that way, when you run a scheduled job, if you have an error in the page, that is the prevents saving all the content, none of the content will be saved, pages will still be versioned, but they will not have any of the changes persistent. This is true of all the tools within the suite. Let鈥檚 go look at the JCR for this page. As you can see here, here鈥檚 the original content. So English JCR content, par control, etc. I鈥檓 going to refresh this page. We鈥檙e going to go in here and as you can see, it now uses the structure of the edible template. Now I want to demonstrate how to revert or reach running a restore job. Go back here, we鈥檙e gonna go return to the list. We鈥檙e gonna create a new job. This one鈥檚 going to be geometrics home page restore. Now if I were to do no page handling and click on Next, and add more pages, go to the same, select the same page, you can actually see that there are no rules to apply, because the structure is no longer valid. We can go back to this page. Actually, before I do that, I need to remove from the list. Go back to the previous page, and we can say restore. When you click on the restore option and select pages, it will actually check the original page version before to determine whether or not the rule any rules apply. So click on Select. As you can see, now there鈥檚 one rule that applies. Well, how does it know what rules apply? Let鈥檚 take a look at the site history. So we go to this page and look at the history. So timeline, we can actually see that there is a pre modernization version that was created two minutes ago. What happens is the user interface compares this version, which is before the structure was changed against the rules, any rules that were found, that will be what will happen. That will be what it runs against. So if I schedule this job, say yes, I want to convert this, it will revert the page to that previous state, then run the structure conversion rule, and then display the results. As you can see here, even though there鈥檚 not much to see on this view, because nothing really would have changed, the restore would have occurred and then it would have executed again, we should be able to see though in the timeline here, the fact that this page was restored. So you can pre modernization, page restored, page edited, all by the service configuration. That鈥檚 how to use the page structure conversion tool. Thank you for your time.

Component conversion

video poster

Policy import

video poster

Using AEM Modernization Tools

AEM Modernization Tools lifecycle

AEM Modernization tools automatically convert existing AEM Pages composed of legacy static templates, foundation components, and the parsys - to use modern approaches such as editable templates, AEM Core WCM Components, and Layout Containers.

Key activities

  • Clone AEM 6.x production to run AEM Modernization tools against

  • Download and install the on the AEM 6.x production clone via Package Manager

  • updates existing page content from static template to a mapped editable template using layout containers

    • Define conversion rules using OSGi configuration
    • Run Page Structure Converter against existing pages
  • updates existing page content from static template to a mapped editable template using layout containers

    • Define conversion rules via JCR node definitions/XML
    • Run the Component Converter tool against existing pages
  • creates policies from Design configuration

    • Define conversion rules using JCR node definitions/XML
    • Run Policy Importer against existing Design definitions
    • Apply imported policies to AEM components and containers

Hands-on exercise

Apply your knowledge by trying out what you learned with this hands-on exercise.

Prior to trying the hands-on exercise, make sure you鈥檝e watched and understand the video above, and following materials:

Also, make sure you have completed the previous hands-on exercise:

Hands-on with AEM modernization

Explore using AEM Modernization Tools to update a legacy WKND site to conform with AEM as a Cloud Service best practices.

Other resources

  1. Deploy the newly modernized wknd-legacy site on the local AEM SDK. AEM ASK available for download here:
    • .
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69