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

Sitecore Technical Workshops - Top FAQs customers asked on XM Cloud

Hi Readers, I want to talk to you about interesting things which we have been doing which is "Technical Workshops" for our customers, so here goes the scenarios. So, we have been doing multiple types of technical workshops.  1) Training customer and their Sitecore technical team on latest and the greatest technologies like XM Cloud & Another composable stack and try enabling them for new Sitecore tech stack. 2) Customers / Potential Customers have their agenda of existing pain points, and we take a workshop on topics around them with best practices etc. little on new technologies, so they also know the future. Basically, we prepare custom targeted presentations & demos for individual workshops, and make sure it helps them answer their questions and they get insights of where Sitecore eco systems has to offer from their versatile toolset and try to keep them up to date with it. So, Purpose of this blog is, because in all these customer & their technical team's

An error occurred while receiving the HTTP response to This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

You have noticed many times that everything was working fine and suddenly the below error starts coming and you find no way to work it out An error occurred while receiving the HTTP response to This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. The reason for this is the receiving size of WCF service is smaller then the data which is coming from service It was working before because it was small,So you will have to try to increase the receiving setting in your end point,Possible settings can be following maxStringContentLength="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxArrayLength="2147483647" That would definately help you!!!

Set up leprechaun code generation with Sitecore XM Cloud Starterkit

Hi Sitecorians, It has been amazing learning year so far and with the change in technology and shift of the focus on frontend frameworks and composable products, it has been market demand to keep learning and exploring new things. Reasons behind this blog Today's topic is something that was in my draft from April-May, and I always thought that there is already a good documentation out there for  Leprechaun  and a blog post is not needed, Until I realized that there was so many of us facing same kind of issues and same kind of problems and spending same amount of time, That is where I thought, if I could write something which can reduce that repetitive troubleshooting time, That would really help the community. 1)  In a project environment, if we get into some configuration issues, we resolve them, we make sure we are not blocked and continue, but if you think same issue, same step and same scenario will come to other people, so if we can draft it online, it will help other people 2