 Hello, I would like to welcome everyone. My name is Teresa Gabriola. I'm working as site reliability engineer at Red Hat, living in the Czech Republic. In our agenda today, we have story behind the session, overview of the WordPress developer stack on 1.4, followed by demo. And last but not least, I will be happy to answer your questions. Links to the references and technical terms can be found at the footer of each slide. In my previous job, I got assigned a task to plant a migration of production website running on WordPress from single virtual machine to OpenShift. I was responsible for both website development and web server administration. This exposure helped me to understand the needs of both roles. Unfortunately, there wasn't a complete guide with the services I needed for my website, which would include OpenShift 4. The reason behind this session is to give to the community at least a starting point for migrating the WordPress website to OpenShift. I would like to also mention a few features of OpenShift, which makes my work easier, such as high availability, automating scaling, application management, or lightweight operating system. If you would be interested, there is a link for more information about OpenShift features available in the footer of this slide. You can see the visualization of services that I will be deploying in the demo section today. As a cloud provider, I will be using AWS. On top of that, I have installed reddit OpenShift 4 and top layer consists of applications and services, such as reddit code ready, cloud ID, OpenShift pipelines, cloud native CIC detecton, PHP MyAdmin and MariaDB, and GenX and PHP FPM. Now it's time for the demo. Let's see things in action. I'm going to switch to the OpenShift graphical interface now. This is the first screen, which you will see after logging into your cluster. Next thing which we'll do is go into the projects and create our project. I will name mine WordPress deploy, click on create. The first tool which we'll be installing is cloud ID reddit code ready. There's one prerequisite which is cluster admin role. So what we'll do is go into inside of operators, operator hub. One thing to make sure that you have selected the project which you have just created, we'll write in search code ready, click on code ready workspaces. Here you can see the description of operator, but I will go ahead and click install. On the install operator page, just one thing to make sure that you pick an existing namespace and be it the one which you have just created. Click on install, click on view operator. Under the provided APIs, click create instance. Keep all the settings default and click create. What we can do now is go back to the CLI and confirm installation of our operator was successful using OC get CSV. And we can see that our operator has face succeeded. Now we can go and verify that all pods are in running state and ready using OC get pods. It might take a little while. There's one thing which we can do in meantime is to make sure that we are in our project which we have created. If that wouldn't be the case, we always need to add dash n for namespace and name of namespace. Now what is happening behind is the actual code ready installation inside of code ready operator. We can track the installation progress by following the operator logs. So we do OC logs, copy the name of operator pod and dash f for follow. As you can see, there are many logs getting generated. Please note that the route for code ready will not be ready until logs from the operator show message similar to code ready workspaces is now available at http column slash slash xyz.org. It might take a few minutes. So we'll continue with the next step and come back to this one later. As next, we'll need to install the tecton CLI and open GIF pipelines. Tecton CLI can be installed from the GitHub repository and inside of the readme file, just select your operating system or distribution and follow the guide which is mentioned there. I have my tecton already installed so I will do tecton version. Your version of course might vary. Next we'll be installing OpenShift pipelines. So we'll go back to the graphical interface under the operators operator hub, right inside of search pipeline, select the redhead OpenShift pipelines operator. Again, here you have full description but we'll go and click install. We'll keep all the settings default and click install. While this is getting ready, we can again do also get CSV to see status of our operator grade. You can see that redhead OpenShift pipelines is soon to be succeeded. Done. In the meantime, I see that our code ready workspaces is now available to get the route for accessing code ready we can do also get route. Select the host where the name is code ready copy and paste it into the browser. I will allow the selected permissions for our key clock to store keys credentials. Next we'll be updating account information. So I'll add my username, my email address, click submit and we should be presented with getting started page. Under the select a sample, I will write PHP or select cake PHP in this case. Now our workspace is getting ready which might again take a while. So we'll come back to this step later. Next we'll be applying a custom template which creates application pods. The source code for my application is coming from the GitHub repository under the web directory where it's just a simple WordPress installation, nothing else. And under the deploy directory, you can find the OpenShift template, database backup files and Docker file. So we'll go and download our template using curl or just first create a directory. So I have everything on one place. Next, before creating application we should first list the required variables for the template using OC process dash dash parameters. I forgot before that we need to of course first upload the template to our namespace using OC create dash F for file OpenShift template. You can see the template was created and now we can see the parameters and variables used in the template. There are multiple variables, just two of them which are really required by the user to set, which is the namespace which you have created and the router canonical host name. Then if you want, you can change my skill user passwords which are by default generated. So I will go and process the template with my variables I have added as a name, namespace, canonical host name and my SQL passwords using OC process. As you can see, there are multiple resources getting created such as service, deployment config, persistent volume claims, C grids, as well as tecton related resources such as tasks, pipeline resources. Next we'll go and see our application pods. I can see that the WordPress pod is ready as well as database pod. So let's get our WordPress host. We'll select the one with the name WordPress copy paste into the browser, select your preferred language. Next we need to fill in the database informations, click submit, run the installation and next we can select the site title and our user informations, copy password, email and install WordPress. Click on login, add your username, password and you should be able to see the dashboard. You can go also check the home page by which we have confirmed that our WordPress installation was successful. In the meantime, let's go and see our code ready workspaces where we can confirm everything is ready for our development. So this step is done. We'll go back to the CLI and our last step will be, or not last, we have actually two more. One will be running tecton pipeline. So we'll go check our resources which have been created by the template. We can check the tecton resource list. Again, we have the app guide and app image. In the app guide it's the source code which I've shown earlier on GitHub. Next, we can check our tasks. There are two of them, but the source to image dash PHP is the most important one. In a nutshell, it just downloads the source code and run the PHP unit tests and at the end creates the image which builds and builds or triggers the new deployment in OpenShift and then it updates the website. Then we can list our pipeline. I can see that it was triggered three minutes ago and status was succeeded. We can check also pipeline logs using pipeline logs dash F for follow. If you would have more than one pipeline already run, you would have option to select which logs you wanna follow. But in our case, we have only one and I can see that my PHP unit tests all are in a status okay. And the build logs and I can see that the build in OpenShift was started which then triggers the update of reports and update of a website. Our last step will be importing the sample protection data using CLI. One thing to mention that why not PHP My Admin is that if you would use PHP My Admin, the import tool, you might get a 504 gateway timeout error due to limits of the import. But what might happen that when you have a very big production website, the file might get very large. So using the CLI is easier. We'll do OC Get Pots, OC RSH by which we'll get into our database pod. So just add the name and we will download our database backup using curl. And last step, we will upload it to our MySQL database WordPress and our file. Optionally, we can go inside of the PHP My Admin. Let's try the graphical interface inside of networking, routes, click on. Yeah, you have to make sure you have project selected. Click on PHP My Admin and your server name, username and password under the WordPress table or yeah, WordPress database, select the table WP-Otherscore options where in case you have migrated or changed your host name, you might need to update the site URL and home so your website won't be broken. This concludes the demo section. I will be here for the questions and answers. Thank you everyone for being here with me today and I hope you enjoy this session and see you next time. Goodbye.