 Hello Hi everybody. Oh, this is good The mic is good Yep, so I think it's time. It's time five. We need to start So I'm here talking about automating Drupal migration So let's get started So this presentation was actually created by few of my colleagues and I am also on top of them So this was actually need to be presented by Noopu, but she's not there right now with me And also Nishat. He's also there in India. So I'm representing both of them and I am Nikhil here Senior Drupal architect working in 5G solutions I'm having more than 16 17 year experience in IT and for last eight and a half years. I'm working in Drupal So Let's talk about the topics today So there will be some facts and dates which we need to talk about What the solution how to do migration? Why not we do migration from D6 to D8? why not migration versus automated migration and a script which we have created for it Example use cases the sneak peek for the script and then we'll talk about the question and answers use So let's talk about some facts and dates before we start and drill into migration strategy so Drupal 8 released on November 19, 2015 happy baby Then February 24th 2016 Drupal 6 reached end of life and no longer supported sad baby So I think how many people will be still working in D6 few of the people from this room if you're working in D6 Wow It's good to know that so you can see the links here in the down D8 release date when it happened and D6 EOL we have referred from there so What happens how it implies to my side if it ends the D6 is ending So you will not have any new products or module for this You will not have bug fixing the existing sites. No updates in the documents. No core commits will be there No support or Security advices so it was written in the last last day slide that there will be some security updates Maybe possible, but I'm still confused how it will happen and in the future updates status may stop working or so These are the some facts for D6 Why we should migrate to any other version than D6 because already end of life now So this has been taken yesterday So this is the link in which you can see how many products are using Drupal and you can see the D6 there So D6 as highlighted in yellow. There are 117 307 site still using D6 till yesterday The screenshot is taken yesterday from the live Drupal dot org site So we still have lots of lots of people who are using D6 And think about the people who are using D7 It's maybe double of that And think about the people who have started using D8 Lots of lots of numbers that started using D8 67,000. It's a good number 48 so So what the solution Solution is migration from D6 to D7. Yeah, we can argue why we can't do D7 D6 to D8 But let's talk about why we have to migrate to D6 to D7 first So why not D6 to D8? Well, there are a few things more which need to be done in D8 like no types They're still not available for from D6 to D8 fields are missing on the edit form on the view page Files and images how we need to migrate for D6 to D8 URL aliases There is no standard module for migration from for views Which is available in D6 my listening D6 site to D8 directly There is no module right now available for menu UI for migrating from D6 to D8 directly And there are a few other modules like contributed modules that you already know We are still porting in D8 So D6 have still a lot of bunch of modules which are available and they're still not there in D8 for us So let's talk about migration versus automated migration. So What happens in migration? So lots of people actually talk about when we actually get a project from any client They say I have a D6 site. Can you make it in D7? And I want the same look and feel I want everything exactly the same as D6 The only thing what you require is that you need to have in D7 Now When we talk about migration, we always think about content migration people will keep on talking to me about Migrate module how your data from one particular data basically migrated to D7 or da Whatever, but there are other manual steps, which we need to take when we do migration. It's not only data You have to lot of other things also when we have to do migration from one base version of D6 or D7 for example, we need to take backups Those are very very small things, but we need to do it We have to upgrade to D6 latest version. We have to set up a new D7 site We have to compare the list of all the modules available in one D6 site And those contributed modules are available in D7 or not And this need to be done by us so that we can have exactly the same functionality which is required for D7 from D6 so What what automated migration will do what we are trying to achieve here is that we will have a script which actually Automate the maximum possible scenarios for migration So we are not saying that I'm going to migrate your entire site in a poof And I will just run the script and voila you have a D7 site ready and working perfectly What I'm saying is is that the manual steps what generally people have to take for migration That need to be automated and that can be automated. So those kind of steps We are actually trying to automate and make it more streamlined For example, the most common manual step need to be followed for D6 type sites can be automated for D7 So let's talk about automated migration here This is what involves So if you see here, we have to start a migration We have to take a backup of the database of Drupal Then we have to check the module On model status for D7 for because we are starting from D6 Then we have to upgrade the existing site if D6 is your D6 is not available not be updated to the latest D6 We have to update that Then we have to take the site offline Then change the theme to garland disable all non-core modules Delete all the other files and folders except sites Remove default settings dot php remove unwanted modules check all optional modules check boxes Download and extract D7 Reapply changes of ht-axis and robots dot txt make settings file writable run update dot php Enable the modules download the new module on site on modules remove all modules Backup your database run update dot php on D7 upload D7 Compatible theme check status report Set upgrade fees access equal to false. You know that already why we do it remove migrate maintenance mode end of migration Now this is not i'm talking about content migration These are the steps which are required when you actually have to do migration from a D6 site to a D7 site So my content migration is one aspect and you have an existing D6 site You have to migrate to another D7 site or D7 site how you will do it. These are the steps involved for it So for example use case let's take up Scenario here we have a content based site your site has events programs Display informations Okay, all content are based on location and your user come and visit the site for content Anonymous user site is there's no authenticated users in top of it So the what does what the solution will be the script which we have developed will actually do all these steps And will actually handle your migration accordingly because this is a very very small site has only anonymous content No other complexity is involved our script will actually take up the entire D6 latest D6 Take all the steps which I have just showed you in the previous slide and do the migration accordingly or Put that to have a D7 site working accordingly Multilingual multi-international site So I have a content whereas it's coming from different languages or multilingual your site users come from visit the site and You can select the preferred language if you want to view the site in that scenario also we can use this script So this script will actually take your D6 site Upgrade it to the latest version to D7 and then you can use it so Uh to be very honest as I told you already the script is not like a magic It actually does the manual step what is required for D6 to D7 And once it is done if any kind of issues are available in your D7 site You still have to resolve but the manual step what is required to do the entire process is actually being automated here So let's talk. Let's see the demo how it works Sorry, so sorry. This is the screen. That's why I'm actually giving you a video how it is being done So this is our script D6 to D7 copy.sh We are actually asking that what is your current environment? What is your which particular D7 site you want to do and what will be the alias for it? so This particular script is using combination of drush commands as well as shell script So it's actually doing a lot of things in the background. It's actually running a shell script which will actually Do the part of what kind of contributed modules are available in D6 What kind of customers are available in D6 putting in a txt file? And then it is actually manipulating from there So first thing what it did is actually If you see it it actually first updated And check what is the latest version right now? So there is no updated version required for drupal currently that the time the script was executed So it actually found that there is no drupal core update required for it So it actually worked and just say no code updates right now. So this is what What is being written that is already up to date So drupal no code is updated for now. It's already working Then the cache is clear and then drush command is executed with actually asking for whether you want to update it from D6 to d7 And then the entire process will start Now this particular line for custom.txt This is a particular thing which you are actually doing it for in the shell script Where we actually find that whether your d6 site is really having any custom models To find is a very simple way if you have a standard d6 site There will be a custom folder within the modules folder We'll try to find out and see whether any custom modules are available there We created ext file on top of it so that when we are migrating to d7 We'll get all those custom Files custom modules and we will run coder upgrade on top of it There is a module in drupal known as coder upgrade which actually runs Your d6 d6 module to d7 try to convert it to a particular extent And that's what we will try once we have the site done So this is a standard drush command which is actually asking for various things Like what what your site exists with the destination and we have to just Keep on doing that It will gather the information for your core and contributed modules So it's all the part of your Drush command itself which actually doing right now So let me skip to a bit so that you can actually because this is just a drush command which is updating the site So here you go. It actually run the site and gave you the links the update The command also ran here and you can see that it's up. Keep on updating all the nodes and everything Sorry guys. This is huge Yeah So once it is done, it will finish all the updates And then it will actually Ask for the there's 15 steps. You can see to start replacing the normal core modules and all And there also we will actually do that and then we will do run update dot phv on d7 So once it does the drush command, it actually has few more steps. I just wanted to show you that So here what happens once the command is executed It actually also look at the modules which are available in your contributed list So what happens is here in your there will be two three files will be created actually One is for custom and one is for contra and one is for you know for the themes So if in the contra dot txt, whatever we have created from the shell script If there is a list of modules which need to be there for d7 It is our script will automatically start downloading those So here what happens is that for example in our txt file, there was a module for cck generally not required for d7 But if it is there, it will start downloading it and enable it by default in your d7 side And then once it is enabled Then it will start, you know, uh, implementing that It will check for database update. It will check for any kind of uh further fields or something is required on the side If it is there, then it will update those So here what happens the automatically then a d7 folder is created, which is actually your site It will be available in your uh in your folder itself It will actually create a destination folder for d7 And here you see it as not all the files and everything. So this folder was not there previously because of the script It's got created And then if I go I will see in settings dot php And I will see that all the files are there and this is my d7 site, which is being just created from the script And if I go to administration I can see that in the reports It is being given from the latest Drupal 7 site So it is now updated to Drupal 7 site, which is latest And it has all the code and everything as available in d6 Based on the contributed module, which are already available there So this what the script does So it has the latest version of Drupal 7 And it is being created from the script using the script from d6 to d7 Also, it has also migrated the theme. So one particular theme which is there in d6 It is being migrated to d7 And if you enable the theme it also works the way it should be So This is what happens when you run the script And it will actually take up you and give you all the things required for d7 site So it is actually We can see that How we can add the functionality and all. So he is actually trying to Click all the links and see everything is working fine in d7 perspective So once it is done it will be done So this is the site which actually does via the script So how it helps us with respect to d6 to d7 The way it helps us is that Whenever a client will ask for a d6 to d7 migration Along with the migrate module which can be generally used for the content migration The manual steps which are required for the migration Can be automated in such a way. So the estimated time which is required for the migration from d6 to d7 reduces Because there are a lot of manual efforts which are required to do that migration reduces So you can actually use this kind of script which actually does the combination of shell command as well as the Drupal drush commands and based on that the script isn't created in such a manner So that at least 20 to 30 percent of your estimation reduces because of the manual things what we need to do in the background The content migration anyway, we know that we have a very good migration model available in In d8 now, which we can use or we can use the d6 to d7 module The question can be asked that what we will do about the custom modules So the the answer is is that custom modules can be auto migrated using coder upgrade was little at extent But you can't do it very much full 100 for the custom migration for the custom modules You can actually do a bit a bit and then you can actually do manual entries if you require to do for the functionality So this is what the script does and this is what the script is is all about For d6 to d7 migration We are also working on the similar grounds for the script for d7 to d8 or d6 to d8 But the only thing is based on the migrate module currently available We'll actually add all these manual entries there and then we'll start working in that direction. So, yeah This is it. This is what automated migration is all about Any questions? Not right now, but yeah, it can be it can be available. So because Our thinking was that we are actually getting a lot of requests that we have a d6 site Please migrate to d7 or d8 When we start about d8, they said that d8 is still unstable I mean the con the country module is still in the porting So can we have a d7 first and then we can go for a d8 one So because of all the requests, we actually started creating a script like this So when we get a request we run this script and then we can do the migration So, yeah, it will be available Any other question? Which one? Yeah Yeah, so we need to do some a bit of housekeeping in that left once it is done I think in weeks in few weeks it will be available So that can be done. That's not a problem But yeah, we are also working on d8 script so that we can actually do the migration from d6 to d8 Clearly rather than only go for d7 So that's our main objective Any other question?