Konabos

Fast-Track Your Kentico Development: Running Xperience by Kentico on Docker

Konabos Inc. - Konabos

13 Feb 2025

Note: The following is the transcription of the video produced by an automated transcription system.


Hi everyone. Welcome to today's webinar. It's going to be with Lukasz, our newly minted Kentico MVP, going over how you can use Docker and set up your Xperience by Kentico to speed things up. And again, I'm sure Lukasz, will go through all of this, but all of the different use cases and how it can be useful to others. Thank you. Actually, hello everyone. So today's presentation will be about how to fast track your Kentico development writing Xperience by Kentico on Docker. It will says a lot, but let's go to the details of it, just Yeah, and move to the agenda. So yeah, a short agenda before we dive into the details. So we'll start with discussion about why do we even bother about it? We'll also review details of Xperience by Kentico and Docker. So the repository that we share with the community, we'll discuss some of the use cases that we see, and now also do a short demo presenting two of the use cases, probably and not yet, I hope to answer some of the questions. Yeah, let's see how it goes. So at the beginning, also, just to be sure that you know who is presenting, right? So my name is Lukasz Skowronski Solution Architect at Konabos. So far, I got a gather 17 years of experience in CMS and dxp space, and still counting, this year, I was lucky to be awarded Kentico MVP and for the ninth time, also side. Yeah.

 So why do we even bother so, I mean, in our case, it started with some challenges. We started working with Xperience by Kentico for one of the customers, and then we noticed that we are staying behind, because the one thing is working on the Customer project, the other thing is follow the latest releases of Xperience by Kentico and Kentico releases, or does releases quite often. So we wanted to be up to date with all of the changes, and we're looking for a solution to vet those things tested, or just to see how those things are working right. So challenges, the other challenges that we that pushed us to actually work on that and to share that with you are related, for instance, to be multiple projects on a simple device. So if you imagine situation that you're working on multiple projects they have, or they may have different environments, different services being used, or the same services, but in different versions, then lack of isolation becomes a problem, right? Because you need to switch off some of the services to switch on others required by the application that you want to work at the moment. And that also comes with a challenge related to the licensing of experience by cantico, we are using for a majority of the time. The partner's license and partner license is limited to use just one domain, which is local host, right? So if we think about multiple instances of experience by Kent co being installed on single device, single laptop, it means that, again, you need to switch off something, to switch on another project that you are interested in, right? So that's a challenge that we've seen, because no one really wants to switch off multiple sites, rename the database and so on and so on, or change the SQL servers that are running at the moment because you need a different version, for instance. So that's a first batch of the challenges that we see the other challenges related to the releases right so on the right hand side, you see the screenshot showing list of the refreshes from Kentico for experience by chemical, and only in 2024 there were like 12 raises. Not sure if that that list actually includes also smaller fixes. I will assume it doesn't. So those changes are coming. Quite often, and to see what is being added to the to the product, we would need to reinstall the instance, or maybe have multiple versions, if we are interested in particle versions to compare how they are working and without Docker, without containers, that's again, manual work that no one really wants to do. This is also related to the knowledge update, right? Because if you want to learn about new features being added to Xperience by Kentico, then it's important to be able to quickly set up an environment and then just play with it, right? So that's another group of the challenges. 

Then the next one is related to the technical knowledge and the team composition. So if you work on the project with multiple teams like QA team or front end team, they very often use different operational systems, like back end devs usually use Windows right the QA teams, or frontend teams may use Macs, and then, you know, for us, on Windows, it might be fairly easy task To just install an Xperience by Kentico, but try to explain all the steps for QA team member or fronting team member who are not used to work with SQL Server and other similar tools that you are using. So we've, again, we with Containers and Docker. It's, it becomes quite easy, especially with the repository that we are sharing with you and we are gonna present later on. Yeah, the last challenge, maybe not challenge, but quite interesting use case is quick POC or demo. So if you are sales engineer, for instance, or you just simply working with one of your customers, and you want to quickly set up a demo or use the dancing Gold Project. For instance, you don't want to spend, like, 15 minutes or hour to disable other projects and then enable a new one or install basically a new one with the latest version. You just want to have that very quickly done and focus on real interesting tasks like discussion of the opportunities not done, the installation, which usually looks the same way every single time. So with Docker and containers, it becomes easy task again. So these are the challenges that pushed us. Pushed us to actually, yeah. Share button. Share with you. Yeah. We'll move on to the review of the XDK on Docker, and step by step, we'll discuss everything, or almost everything, what is included into the repository that I'm sharing with you right now. So on GitHub, you will find, under that URL, which is here, Konabos, xpk, Docker, you will find repository that you can clone on your local device and on the on the first page, you will see not only files, but also the readme, where you have everything what you actually need to do. Start with experience, biochemical Docker, so there is a list of prerequisites that there is some information about settings that you can apply, and a very simple in that case, five step, six step, six step process of installation. Yeah, so play with it, and if you are interested in contribution, please do so we have last week or this week we, one of the committee member, Milan, already pushed some changes, and thanks to his work, the xpk of Docker works right now Also on the Mac OS, which is great. Yeah. Let's move on then to the details. So I will just go back one step. So here you can focus on the folders right now, so you can see that the main directory we have Docker SOC folders, and right now we'll discuss the Docker directory as from the beginning, it contains more than the other directory. We have here stored search data, some tools that are basically PowerShell scripts and traffic configuration. There are also environment file that stores your. Configuration. We'll discuss that in on the on the next slide, and start and stop comments or scripts that are on the on the bottom of the list. All right, yeah. So the environment file contains some of the settings that you can change, and those settings will have influence on the installation process. So first, first variable allows you to change the name of the project.

 You can change it if you need to, but it doesn't change too much. It's just a naming the other or the variable from line four, which is Kentico project type, it actually decides or changes the project type which is installed, right So those types are taken from the Xperience by Kentico documentation, and it supports right now those three options that are added in three, and the default one is Kentico experience sample in VC, which is known also as DaSy project you can use also cantico experience invc, which is empty invc project that can be used for your development setup, for instance. And there is also Kentico experience admin sample that allows you to play a little bit more with customization of the administration panel of Kentico. There is admin password that, as the name says right sets the value of our value of the password of the administrator. There is application host by default set to local host. If you are using partners license, you probably shouldn't change that. If you use a different license, you can play with it a little bit more. And there is also search passwords. Is right now, not news, but we left it for now. And there are some setting for SQL server, server, like a host of IT user, which is administrator password for that user and the database where tables of the Kentico will be stored. There is also a name of the license file that stores the license and for the Windows users, the line 16, it defines the path to open a cell execution file that we use to generate certificates required by Kestrel. All right, yes, so certificates folder. So in that file, in that folder from the beginning, you will see files that are on the left hand side, so you see some configuration that can be changed by you if you want. It contains. There are two configuration files that are maybe a bit more interesting. One of them stores configuration for root certificate. The other one stores configuration for a standard certificate. We have those two certificates generated. One is used to sign another one. So that's we will not dive into details of it because it might be a bit complex, but if you don't need to change it, just don't touch it right, and it's gonna work as it should. And on the right side, you see how many files actually are generated as during the initialization process. So from five files, we have like around 10 at the end, certificates and keys and in different formats required by different services and operational systems, if we move forward, there is also the data storage or data folder, that data folder stores databases and the website itself. The database folder is attached to the SQL Server container. So all of the database that you create or will be created during the installation are going to be stored in that place. And the website folder is, is a folder that is attached to the Kestrel container any. If you decide to publish some changes from your Visual Studio, for instance, you have to publish those changes to that exact folder. And yeah, that's it when it comes to the data really. And yes, there is also src folder solution. I'll just go back for a second so you can see it right. So src folder is on the same level as Docker one, and in the src folder you will see a project, a solution which is added there during the installation. The one that you see on the screen is the dancing goat project. It is added, or we start there during the initialization, and then you can use it or open it with Visual Studio to apply the changes if you want. So yes, that would be it. When it comes to the folders and the scripts that you're seeing here, we have like three commands that you're gonna use, probably, so to start, you need to run start PS, one with init attribute, it's gonna start the initialization process do some magic, like creation of the creation of the certificates, installation of Kentico itself and so on. When you initialize the project, you don't need to run that again. 

You can just run start, and it's gonna start existing containers with device that were initialized previously. And whenever you finish your work, you can just run stop command to stop the containers and prune the data that is not needed at that point, all right. So the use cases of review, right? So here we will discuss some of our Yeah. We'll discuss some of the use cases. So the first one, which is Yeah, related to the to the quick demo, and probably the easiest one to play with at the beginning before you start, start changing something, it's right. Adjust to the to the, you know, installation of the Xperience by Kentico with the latest release and just playing with it, learning how experienced by Kentico works. So the project type from the environment value environment file has to be set into Kentico experience sample, and we see which is the default value, as we're discussing previously. And then you just need to start so you don't have to change it really, right? It is already there. So whenever you clone it, clone the environment, clone the repository, you can just run start PS each, and it's gonna start your environment in probably less than five minutes. And then you can already play with it, right? I will present that during the demo. The other use case will be the one from the title of this presentation, right? So it is more for the local development setup, so you can use that for a new project that you are starting working on already, or you can even try to apply that or integrate that with your existing projects, existing solutions. So if you initialize that, I mean to initialize that, you need to change the project type in the environment file into cantico experience invc, which is a empty MVC project from Kentico. Then again, start, run the start script with any flag or attribute, and then there will be some magic that I'm gonna present you later. Or maybe not magic, but additional step related to the publishing profile which you have to create. And there will be also option to use the.net itself to actually also watch or run the project from the product directory without the Docker but with usage of the Docker databases. So again, you will not be needed, or you will not be forced to install another SQL Server, because it's gonna use SQL server from the Docker container, which is cool. And at the end, as always, stop right, just to prune the. The containers. So those are two use cases, and I will try to present those during the demo time. So let's get into it all right. So I have already my directory where I cloned the environment, I mean the repository. What I did previously, I just put the license, the inc file, right so it has to be in the in the root directory. I don't have anything in the source. I don't have anything in the search and service I have on configuration, the data I have enough, right? So it's completely empty. And right now we'll start our first demo, right? So if we go to the environment, you will see that I'm using here the Connecticut experience sample Inc, which is nothing called Project, fine. So let's just open the Cloud Shell. We'll go to the Docker folder and start in so it starts with because it noticed that there are no certificates in the Docker service folder, it starts the generation process. So I will just confirm all of the values. Okay? I just press enter. I confirm that I want to sign the certificate. I confirm also that one. I do not set any password. It's going to be empty. All right. So the certificates were generated. So as you can see on the right, we have multiple files added.

 You can use the same certificates for multiple containers. So if you generated those certificates once, you can just copy all of those to the other directory, service directory that you have in parallel to the existing one that that it's going to help you to keep, to keep the list of certificates clean, because every time we run that command, or every time we generate those certificates, we also installed those to the to the to the operational system. So to avoid that, you can just copy those, and it's gonna be fine, as we are talking started, also the installation right you can see that on the list, we have the SQL Server with healthy right now we have traffic, which is proxy, and we have started container for Kentico, and we started also installation process of Kentico, right? So we want to restore everything, so we confirm that step, and we see that installation is in progress. So databases are being created. If we go to the Docker Data database, we'll see that we the database, database files were added, right? So it's good installation is still in progress, which means that data is being added to the databases as well. And let's see if we in the Data folder, if we see already some of the No, not yet. We don't have data here yet. See. All right, I Yes, now it's here, right? So it was installed, and that all of these files are available right now for guest row, what is, what is a custom thing added by us is selected to the configuration files quickly find that yes, yes, the development file was added by us, and I think that we should also have Another one of it. But maybe this is just a rule of demo, not everything works as expected. We'll see. All right. And what happened is the dancing goat project opened in my browser, so it was opened automatically, as you can see here on the in the in the console. It. It was opening it, and I've got it right, so it seems to be working fine, right? If I go to the admin, I can access it, and we have fully operational technical instance, right? We can also try to apply some changes to the environment to see if those will remain after we stop it. So let's just generate some GDPR data, which wasn't there. And right now, we should try to open the file. We're gonna see the additional div asking if you are accepting the tracking on the website that wasn't here before, so it was added by the generation process. Let's just stop it. Just run scope command. Right? If I refresh, it's not gonna be working, right? Good. It's not working because Docker is down and let's just start it again. It's going to start in a minute. Probably I'm okay, and we are back right? And as you can see, the data is still here, which means that it worked perfectly fine, right? Everything, what we added is still there. Wasn't lost, which is great, but let's say that you want to verify how the latest version of Xperience by Kentico actually works, right? So let's just need that once again, right? So we will try to bring out reinstall the data, which is there, hopefully. It's gonna work. Yes, we want to restore it so I can, as you can see here, it is deleting the existing data base right now. I okay let's just stop it. Made my mistake. I didn't stop it before, but yeah, let's see i Okay, yeah, now it works better, right? So, as you can see, the GDPR thing is missing. It's gone because database was replaced with a new one, which means that you are again ready to play with. It might be a really nice thing when you want to play with the latest Xperience by Kentico releases, right? 

Okay, so that was the other use case, and now we want to do or we want to do some other work. Let me just quickly check one thing, if I've got the latest changes here? Just a second. Yeah, I don't have it here, that's why I didn't find this missing. All right, let's just yeah. Yes, all right, cool. So what is, what we going to do right now is, let's, let's just try to replace the i. Environment type, and we want to have a clean size, right? So we don't want to have dozen goat we want to have an empty project, okay? So we'll also remove the date we should actually stop the containers. Okay, containers are stopped. Let's just remove all of the data. I of the databases, we'll go so to the source folder, and we'll remove everything, everything from here as well. Right? So, again, we have a clear structure, just files. What I left are the search because I don't want to generate them again. They are just fine to use. We don't need another set. So we changed the environment here, or environment setting, so it's going to be a different VC, pro, projects all right. So let's just start with indeed I'm so when, when it is working, I will just explain one thing that I had to pull from the latest version. So in the Docker compose file, in the Docker compose file, you may notice that we have in the in that one in Kent ecosystem container, we have a.net environments at the Docker and I will show you in a minute why. So when you work, I glass is fine. Let's see. Maybe it's gonna work. I yeah, I was saying about that the dotnet environment. So when you work locally with dotnet commands, you are working in the development environment, and just to have a separate configuration of the hosts for the SQL Server, we have additional environment, which is Docker environment, that helps us to have to separate configuration files. I will also show you in a minute, work, just fine, yeah, well, it's Inc okay, just let me quickly check something we are doing that much from Milan and Maybe my environment file is not up to date. I of course, should be okay, yeah. There we go. Not sure right now. I That's a mystery. Okay, let's just assume that it works with that without the license environments running anyway, right? But it shows that we don't have license, which is not great, but at least the environments up and, Yeah, maybe inject something. I Oh. Now, we'll just replace it for now. I'll run it again. All right, let's just stop it. I so here is the place also where, where the difference between the Docker environment and the development environment is clearly visible. So for the Docker connections inside the network that is created by traffic. We use an SQL as the host of the SQL Server when for the local development, when you were running it from the from your terminal with dotnet commands, it will use the local host, right? And it's gonna be able to connect to the database, which is inside the Docker. So that's, that's why we, we use those two environments so it is running. Let's just confirm that you Want to restore it You okay, yeah, as I was playing, Okay, nevermind. Let's just move forward. So critical is there? It complains because of the license, but yeah, let's just open Visual Studio and let's see what is what is there, right? So this is the src folder, so when we open it, you will see also those two configurations that we were discussing a second ago. It's just an empty project, right? So if you take a look at project, there is nothing there, really, and to actually publish it, right? You will need to create a publishing profile, so let's just quickly do that. So we want to publish to folder, not the Docker container. We want to publish the folder. Let's just quickly select the folder, so it has to go Docker, data and website, right? So that's the one we want to deploy our stuff, image calls, right? Let's just change that to debug, maybe review of the settings once, once again, director is correct. Let's just save it. 

Yeah, and right now we can publish it from here. The output view, you can see that the actual publishing process happened, right? So if you apply any changes, or you simply start building your own application. It's gonna be deployed there. I cannot, like, show that to you right now, really, because we don't have the license in here. But, yeah, it would be shown application still, still running. So it works. And if you decide the right I'm doing some changes on the code level, they won't be automatically refreshed by Docker, and you want to run it in a old way. So with the dotnet command, you can still do that. So if you go to the Inc, you can use the dotnet watch command, and that one will use the development environment. So let's just run it. I it, it should open another tab with different port number. So what it does, it actually starts locally another Castro instance, not the one which is already in your in your containers, yes, it says that it's not configured correctly because of the license, which is missing in the database. But if we try to access admin, we'll see exactly the same thing, right? If it worked just funny this time you found the license, nice, yeah, and you have it running right, so you can have or you can start it for your development from the dot from the command line with the.net watch command, and just keep working on it when the database is start in in the in the containers. And I will also show that you can connect To this within the SQL Server Management Studio. You so what I, what I, what I'm doing on the second window, because it was open a second window is the trying to connect to the SQL Server. I would just take the data from the environment file. So we use local host and press Connect. What it shows. It's actually the xpk database. We follow the tables from the Xperience by Kentico, right? So with that, you can basically mix approach and use a mix approach and work with the.net and with Docker. And whenever you decide that you don't want to really start or as a back end developer, it might be useful right to use the dotnet watch command if you want someone from the QA team or from the team to verify how things are behaving on their environments, they can just use Docker without a need of having that dotnet command in place, Right? So, yeah, additional one, additional thing to mention. So in the Docker desktop, you will see all of the applications that are actually running, or all of the containers that are running and the ports. And you have that thing mentioned in the i in the reading file. But there is also traffic dashboard available for you. So traffic is a proxy tool for proxy, and it will show you all of the configuration that was applied and how the connections are set, what is available, right, and through what part of routing is handled. Will not dive into the details of it right now, but you should remember that it is available for you as part of that solution, all right, and with that, I'm Gonna finalize the Timo part, and we can move to the presentation again, right? So that was the demo that they wanted to present you. And, yeah, do we have any questions, actually? Do we have any questions? We do. So yes, we do. First question is, how about a use case where I want to host a Dockerized site, like a classic website, under a domain name to share it with someone. Do you have any experience or recommendations? First of all, you shouldn't use what is in that repository, because it uses self signed certificates. 

So if you want, you can use that as a base, but you should have a proper certificates in place. Then the licensing thing, right? You should have a license to run Xperience by Kentico within the different domain or the domain that license was sold to and, yeah, what else, actually, yeah. I mean, it's you could use that with those certificates and license in place for demo group process. I believe I wouldn't use that for production, because there's still some carding that has to be applied for proxy configuration for all of the services or all of the containers that are used to build it, right? So it might be a good start, but it's not production, right? Cool. Another one. How about the scenario where I want to run a project from a git repository instead of a clean project from a template? Yeah. So partially we discussed that, so you need to start with the empty project and then just put your Git repository in place in the source folder, publish it with the publishing profile from Visual Studio, maybe run additionally the commands to run CI continuous integration from Xperience by Kentico to populate The templates or images, or whatever you you've got there and you're ready to go right? So it should work. Cool. That's all we have so far. So if you guys have any more questions, just post it on the on the presentation on LinkedIn. We'll be sure to answer those. Thank you so much. Lukasz for your time. And I hope that demo gods will be nice to you. Yeah, next time. All right, bye.

Sign up to our newsletter

Share on social media

Konabos Inc.

Yay to Konabosing in style! Content tagged with the Konabos handle is produced by two or more Konabos team members.


Subscribe to newsletter