Skip to main content

Getting started with XM Cloud Introduction repository - Step by step

Hi Folks,

We have heard so much about XM Cloud and its capabilities and whole composable approach towards DxP

I so wanted to get my hands on to something as soon as it is out, and i was constantly following the news and articles to get some info out of it, There were so many good webinars and sugcon sessions on it giving very insightful info, But as a technologist, until and unless you do not get touch and feel, you are not satisfied.

So it all started with the end point which i got in my research (of course now it will out, but i think the documentation and all power shell commands etc are still behind the credentials on this link 

I already have a blog post in draft mode, about different terminologies to understand the bigger picture, Because when you start exploring XM Cloud and researching, there are so many different things which have been shifted to a new engine and lot have been modified and clubbed etc so understanding the terminologies like XP, XM, Symphony, Experience Edge, Headless is very important before you start your journey to explore further, i soon will be publishing that blog.

Sitecore's "Techno Marketing" team has code-base with series of sites built against the per-release of XM Cloud and the full repository can be found on below link.

https://github.com/Sitecore/XM-Cloud-Introduction

Let's get started

Step-1

As usual, Make sure you have the prerequisites installed, it demands 

Step-2

From the repository URL (Given above), once you get the repo in your local, you can follow the steps mentioned in the documentation so that means first you will need valid license, so for me i already copied repo to my folder and i have kept latest license file at my preferred location now , It's time to run the command to set up the repository in local mode, using following power shell. (Make sure you are in the same folder where you repo is before you run this command)

.\init.ps1 -InitEnv -LicenseXmlPath "C:\Daivagna\2022\license.xml" -AdminPassword "<<your password>>>"

It will initialize things for you and set host names and licenses etc like following screen, all knows drills which you might have one before for other Sitecore docker instance previously.


Step-3

Once things are fine on Step-2 and no exceptions or anything, next step will be to bring up all the containers required to run in local mode by running "Up.ps1"

in the powershell next script you will run will be .\up.ps1, once executed it will take some time to bring up all the containers 

I think before you do this, it always good to check if you docker is running in windows container or linux container, otherwise you will end up getting below exception and build will fail, so it is better to change your docker to windows container mode before executing the "up.ps1"

I got below exception 


Which says

"------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:c827903a303cb7a76214adb4376e462a241b3cd763cb88655cd901c5a0e867a0: not found
ERROR: Service 'solution' failed to build : Build failed" 

Also in one of the logs it was saying "image operating system "windows" cannot be used on this platform", It clearly means that its build on windows platform and if docker is running on linux, this is not going work.

I switched my docker to windows container and again run the script, But this time it came with a different error (Before that i also restarted my terminal, just because one of the script above is saying that you might need to restart your terminal, so i just did it just to avoid any issues) 

Got below error

"a Windows version 10.0.20348-based image is incompatible with a 10.0.19044 host" 


 
Frankly, i did not much about this, but what i knew is that what it is saying is, the image is built on the latest OS version and because i am running it in my local, and my local is windows 10, so i needed to find some way to make it compatible.

Basically, its the Microsoft nano server which are compatible with build version of the docker image, It clearly says in step 5/14 of above image that what version it is using, somehow i will need to change that to a compatible version to run it my local windows OS.

So, like old school, i tried searching this text in the repository i download from GITHUB, and script is reading these settings from the ".env.template" file


I needed compatible entries here, and frankly i had no idea what should go here, so more research was put in to find the right compatible entries for local windows OS. Read my BLOG here

https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2022%2Cwindows-10-21H1  this article explain things very nicely

Well, i saw that in this file there are other entries too of SOLUTION_BUILD_IMAGE and SOLUTION_BASE_IMAGE

i just tried to use same entries for NETCORE_BUILD and NETCORE_RELEASE and only difference was instead of latest 2022 it should be compatible which is 1809, so i tried those entries, but still it was giving me same error

now there was no reference of 2022 but it was still showing me same error, and because it was stupid of me instead of changing .env file i was changing the template file itself in the visual studio :) 

Now this time i went to a folder structure and made these changes to .env file from which docker-compose read the values......and it worked !!! 

 but issues now i had was, it was now giving some other error like following

"solr-init and the container is unhealthy" and i tried to look for the specific logs for that particular container and i found something like following 

"unavailableexception: error processing request. corecontainer is either not initialized or shutting down docker"   

The same error is mentioned here too CoreContainer is either not initialized or shutting down · Issue #29 · Sitecore/MVP-Site · GitHub

I did not have much clue to this, what i was understanding is it is not able to get the core, well solution was just to delete configsets , filestore, userfiles, zoo_data folders from following folder.

"/docker/data/solr" 

and once done, just run the .\down.ps1 and .\up.ps1

Thank you Jatin Prajapati for suggesting me to try above, deletion and start over, i had no clue from the error that it needs a fresh start.

it all started working without any issues this time , and i was able to see the following authentication screen 


and After confirmation, you will get a success message 


After few steps and execution, if all goes well, you will be able to see console is asking for your user name and password to login


You will need to create a new account as it will be created on Sitecore cloud, once you create an account, it will send an email to your email to verify the account and once account is verified and all looks ok, we will be able to see the launchpad 


I was pretty excited to see this, just like i was excited to see SC09, SC10 first time, new way of working, freshness and the weightlessness, and excitement of getting deeper into its understanding.

 


 


 

Comments

Popular posts from this blog

Why SitecoreAI - Getting into the shoes of the customer how to select right CMS

Hi Team, Lately, I have been talking to lot of our customers / potential customers and having pre-sales demos where one question always comes is "Why Sitecore" ?  Now this question can be for any product which is out for sell. And as a technician I always get into product technical features, but at the same time as a pre-sales guy, it also makes me think, surely all competitive products have same features, so definitely answer to this is not in the technicalities.  If you step back and think, we are also a customer in our daily life and buy lot of things, what is that process we go through? When we buy, how can your customer decide if this is a right fit for you or not, why we select A over B? Is it price? is it service? Is it a brand? Is it about features? Is it about brand loyalty?  When it is a technical product, I am sure it cannot start with the technicalities of the product or selecting product itself, 100% not, I feel decision is always business strategy first and ...

Hell of sitecore aliases pipeline breaking the site with 500 error

Hello Friends, I belive this blog post is very important for everyone because, It has some very serious effect on working of your headless website, i will share my experience what we faced and how we resolved it Issue we started facing Our site started giving "Key cannot be null or empty" with YSOD like following  Side affect Because of this 500 error, Our site pages were showing 500 custom error page intermittently and our MAU (Monthly Active User) drop rate increased. Sitecore KB There is already Sitecore KB article talking about this error but the patch which is provided on this link is confusing as well as very huge and it could bring other issues along with it as that upgrade patch also has lot of other things too which i did not want to introduce in our stable CMS. Known Issues - Retrieving the child items of resource items is not thread-safe Observation Though the surfaced exception was looking similar and giving same error and behavior given on this article, We looked...

Zero to Hero - A real life RCA of exact issue in Sitecore Managed Cloud environment

Hello All, The purpose of today's post is to share a real life burning and escalated scenario which was new to me and how did I approach it and how big the escalations were and what was the outcome Sitecore's goodwill was at stack not because Sitecore is not capable of handling it but just because our environment was Sitecore Managed Cloud, and any issue that comes if its infra, back end code, front end code will be first pointed as Sitecore issue and that is where our consultancy and experience will play a role to prove that it is not Sitecore issue.  Issue we faced Out of the blue our site started giving "504 Gateway Time-out", and it was reported that almost everyone is getting this error, but when we used to browse the site, everything looked good and never 504. 504 Gateway Time-out error tells that, That the request went to Content Delivery servers of Sitecore from gateway, but gateway did not get response in time from those CDs and hence it gave time out error. ...