26 November 2018

Setup latest Habitat Sitecore 9.0.2 on Fresh Azure VM

How to install latest Habitat using Sitecore 9.0.2 Update has been well blogged already by many of good friends like Siva , in Community.

Here i try to blog it additional steps or Gotchas, which will save you hours if you wish to setup single instance in fresh Azure VMs, this might save time somebody who is new to Sitecore & want to have quick demo running in Single VM, rather going through full Sitecore PaaS. by Single Instance here I mean one VM have everything ex., Solr, Database, Sitecore XP0 configurations etc., The Azure VM I used is Windows Server 2016 with Container. Good thing it doesn't require installing Visual Studio. My next 

I will list steps assuming you have nothing in VM, except RDP Login & Administrative Access to it.

Setup Java

  • To start on new VM get Google Chrome to get away with annoying IE Dialog Boxes. 
  • Solr required Java to present. So we will try to install Java Standard Edition JDK. Recently Java had launched SE 11.0.1(LTS) which is current & long term support release while sun setting Java SE 8 series.  Don't install SE 11.0 thinking latest is best as it is not compatible with Solr version we required. 
  • We still need to download Java SE(8u191) release from here. Install the Java JDK & setup Path variable & JAVA_HOME variable. It should look like following 
Figure 1.1

  • For Sitecore 9.0.2 (Update-2), We required to setup Solr 6.6.2. To setup same Jeremy Davis written an excellent PowerShell script which will do the required setup including Solr with SSL. Follow his post for information. Download & Unblock the PowerShell script while changing following values to suit
Figure 1.2
  • But before you execute that script you need to run following command to Import Dependency
       Import-Module BitsTransfer      
  • Once done you should be able to verify right installation as following:
Figure 1.3

Install IIS & its dependencies.

Before we start with actual installation of Sitecore & Habitat, we need couple of more things in place:
  • Install Windows Features for IIS & other required Apps. 
    • Choose Role-based or feature-based installation
    • Select local server
    • Select all checkboxes as suggested below.
Figure 1.4
  • If not present Install Web Platform Installer now come as Extension to IIS. After Installing it use it to install other required Server dependencies as show below, Few things might be already installed:
Figure 1.5

Figure 1.6
  • Install other Framework dependencies, as listed following:
Figure 1.7
  • Last is database dependencies, as listed following:
Figure 1.8

Install SQL Server Express

  • I used latest available SQL Express 2017, Installed the name Instance with mixed authentication enabled always.
  • After that install SSMS(SQL Server Management Studio). It's optional if you wish to remote Administer SQL server instance.

Install Mongo DB Community Server

  • For development & demo purposed we can use Mongo DB Community edition & download it from here, be mindful of downloading correct release which for this Sitecore version which is 3.6.9
  • In order to work with Mongo DB in GUI mode, I recommend to use RoboMongo which is now 3T. Again good for development & demo purpose.

Install NodeJS

  • Install latest Node JS version available from here & direct media from here
  • Install gulp as Global by using following command
npm install --global gulp-cli

Install MS-Build

  • Download Visual Studio Build Tools Bootstrapper from here. It will automatically select you Build Tools 2017. If you miss some features you re-run same exe but select Build Tools rather complete IDE versions like Enterprise, Professional or Community.
  • Once download, double click & install it, with following components:
Figure 1.9

Figure 1.10
  • You can also install it through completely no GUI mode.
Install Sitecore Habitat
         Install-Module -Name Invoke-MsBuild
  • Before running MSBuild run following command to quickly restore the Nuget packages & other dependencies, run this command from directory where you have .SLN file.
               dotnet restore --runtime win
          This will restore pacakges for Window x-86 as Runtime
  • Once done fire up below command to run MS-Build
               Invoke-MsBuild -Path "C:\Habitat\Habitat.sln" -ShowBuildOutputInCurrentWindow
  • Next you run following command from directory where you have .SLN file.
               npm install
  • Last you need to run Gulp Task, by running following command
               gulp
          This will run default task. Incase due to some issue if you are gulp task is interrupted, you can run always again either full or if you know the specific task than run same for example.,
               gulp Sync-Unicorn

End result should be same as what Siva had displayed.

Figure 1.11

14 October 2018

Sitecore Symposium 2018

Sitecore last week concluded just another wonderful Symposium. This Symposium was mix bag for me, just because Sitecore had promise lot last year while yet to deliver on few. While this had been echoed by many MVPs & customer alike.

So here I summarize key highlights, which are as follows:

Figure- 1.1
  1. Sitecore acquire StyleLabs : As per Sitecore, this will resolve the content crisis which is faced by their customers who had to depend upon other third parties for DAM, MRM, PIM etc., Notably SkyLabs is 100% SaaS solution build natively for Azure. Sitecore offered for their customer through this Acquisition. 

  2. Sitecore JSS will be available with Sitecore 9.1: Sitecore is scheduled to release Sitecore 9.1, with this release they will also release most awaited Headless Solution from last two years & after 4 Tech previews. Following are related notes with this subject:
    1. Sitecore Differentiate & make its case heard: In one of the keynotes "Headless CMS and the great uncoupling" by Deane Barker, Deane made following opinions, where few are right while few debatable.
    2. Figure 1.2
      1.  Most of Modern Headless CMS are Database at core with modern UI & API to serve. Headless CMS because they don't have burden of legacy they are good with this core principle of serving Content. No disagreement. 
      2. But performing any logic before serving content or adding value to that content by means of optimizations like adding context is left to solution developers. Deane is right here. But my only point here is, now atleast solution designer has choice what to choose & not everybody requires Logic or other suggested tiers. So overall headless is good.
        Figure 1.3
      3. This is true that over period of time due to urge of fulfilling Edge Cases, Capture Adjacent Markets or simply adding features most of CMS may end up with bloated feature library & implied cost, which make them look fatter in future from what they are now. Deane is right here. But my Hope is running in SaaS mode & committed to subscription based low pricing comes with inherited duty that Headless CMS vendor can't wander too far, they may have different offerings for different edge cases or markets. Anyway time will only tell who is right or wrong.
        Figure 1.4
        Figure 1.5
        Enabling customer, "Pay what they use is Mantra for every product vendor" or somebody else will come & disrupt market.
      4. Summary as per Dean is if Solution developer/Customer intend to use Contextual Content marketing then Customers should stick to Solution which provide that all. Which I agree but Sitecore need to be better, faster & cheaper.
    3. Sitecore JS Web Tracker : This tracker is rest API build on top of existing Web Tracker which provide Analytics Capabilities & offer personalized content(Not Sure here). This is different from Universal Tracker & yet not documented in current JSS documentation. 

  3. Other Sitecore 9.1 Updates: Sitecore made 9.1 kind of major release without disrupting versioning & saving next major version for Horizon & Zenith. Following are key updates:
    1. Performance Updates & Upgrades:
      Figure 1.6
       I am glad that Sitecore is on right path. Sitecore is improving performance of its Experience Management(Xm)  by 50% & reducing technical debt. They have promised to improve this further & take similar improvement to Xp also. They have also upgrade regular third parties they consume & made promise to do it earlier than usual.
    2. Figure 1.7
        1. Universal Tracker: It is Rest API to be consumed by any device or channel, extremely fast & scale-able. This will be tracker which will eventually replace current Web Tracker & intermittent JS Web Tracker. It has been built on using Sitecore Host. As of now in 9.1 it doesn't offer Content Personalization but will offer in future. 
        2. Figure 1.8
          1. Sitecore Identity Service: Finally Sitecore embraced modern Identity Management & shrugged of decades old Microsoft Membership Database. From 9.1 this is default login provider. This enabled Single Sign-On integration with third party provider more standardized solutions. This was on road for sometime as Commerce already had this.  
          2. Core DB is optional for CD: This nice & useful update will enable upcoming cloud adopters & current hosting solution provider lifer much easy.
          3. Sitecore Host:
            Figure 1.9
            This is pattern/technology which will enable most of new & upcoming/migrating services to enable services based world. Sitecore is re-architect-ing it's own solution to make it service oriented, which is easy to scale & host & technologically make it candidate to run as SaaS in future. 
          4. Sitecore Offers GrapQL Endpoint: This is another big announcement as this enable developers to write very precise queries to fetch Sitecore Data over wire. As of now this service only offers Content & Templates. But i hope that in future this offers more than content like layout service etc., 
          5. Sitecore Cortex:
            Figure 1.10
            To me this is like those bells & whistle which may make difference to Customer. Anyway, anything offered out of box is to delight if configured correctly. This uses Microsoft Cognitive Services & have capability to use custom Models. The only glitch I see here is how many enterprise today wan't to ship their consumer's personal & behavioral data to MS Cloud for getting insights, lot of such enterprise customers are either building their own serious ML gigs or already have it. This is interesting area to me & community. While checkout this article by Amitabh documenting Core concepts & collating articles on Cortex so far. 
          6. Sitecore Horizon:
            Figure 1.11
            Sitecore will be releasing Horizon as Technical Preview in Sitecore 9.1 while publicly admitting that it was harder than thought earlier to implement. Well this was expected. Anyway as community we are happy that Sitecore is pursuing this goal with not be just nice face-lift but as earlier indicated doing engine overhaul of Sitecore bit by bit so that next major release. The only question left is will be Next Sitecore Symposium 2019 will be that moment or will it be 2020 Symposium to get fully re-designed & re-invented. Last there was not enough mention of Zenith Project expect one time in MVP summit i heard which is it is still in development(it could be that I missed it). 

        3. Sitecore .NET Core: The effort which started 2 years back & exposed to us in 2016 MVP summit is yet not completed but it is on right path. I predict here it will take next 2 years to be fully based on .Net Core & become service oriented. This opens up many possibilities like hosting it on Linux Platform, Containarize it fully, run large complex robust & scalable Sitecore Solutions etc., Possibilities are endless. Sitecore is not to blame for slow progress but i admit it is overall technology improvement which is dependent on Microsoft & Open Source Community, at end Product Vendors are always later in queue to implement any new technologies. 
        Being developer I understand project delays, which are even sometime not in control of development team, so I have full belief on Sitecore that next Symposium will be best.
        Is this Sitecore Release is worth to upgrade from last stable release of Sitecore 8.2 ?
        • I would say wait till JFM of 2019 to finally commit to production, just because the sharp edges of 9.1 release are finished usually by an update.
        • But that doesn't mean, customers should wait for it, they must start early to test the risks(Through means of POC) & secure needed resources.
        Is JSS worth looking ?
        • Yes Headless is the way forward, if you wan't your development cost low & scale it better while making blazing fast Web Experience. 
        What are ways to implement JSS ?
        • Honestly there could be many possible ways out.
        • I will experiment with Sitecore(GraphQL Endpoint) + React + Gatsby + JS Web Tracker/Universal Tracker + Netlify + Cloudinary
        • Above Experiment, just depend upon stars to be in right position.
        Note: All images are content & property of Sitecore, they have been taken from Sitecore Symposium 2018 for purpose of summarizing the event. 

        27 November 2017

        Easy UnInstall Sitecore 9

        As being Sitecore developer, I do Sitecore Installations often. Earlier when we used to Install, it was relatively easy(1, 2, 3) to un-install Sitecore. Though it was never too easy, but still we can remove website by taking care of IIS node & couple of databases in local machine to get rid of old or corrupted Sitecore Instalations.

        Recently Sitecore launched new Instalation experience, called it SIF(Sitecore Instalation Framework), many(Kam, Toby) of our MVP colleagues has already blogged about it on how to quickly learn & do it yourself. But with this new way, it introduces many moving pieces. So now it contains SSL Certificates, Solr Cores, Windows Services, multiple IIS websites and these can be less or more depend upon the type of Instalation(Topologies) you choose.

        During my own learning, I failed with Sitecore 9 Instalations & end up having these zombies pieces like Certs, DB, Solr Core etc., I see this problem is not only with me, Kam did take a shot to it.

        Well, I am trying to bring my own solution for same problem. Following is to summarise my solution in quick points:

        • Create Uniform PowerShell Script(Cmdlet) for Instalation.
          • I take this script straight from Sitecore Instalation Manual & made little modifications.
        • As part of this instalation script generate 'AntiInstance' file in JSON format.
          • As part of this modification I write code to generate this JSON file.
        • With help of 'AntiInstance' file & another Powershell script Un-Install the Sitecore Instance.
          • This should be run & forget as a forceful removal.
        Key here are two PowerShell files which are still in WIP, you can find source code here, which I plan to complete over in nex few weekends.

        Following are quick steps to Install & then Un-Install Sitecore, Here deliberately i will fail the Installation to mock incomplete Installations. 
        • Dump all files in one folder(as shown in Figure 1.1), for required topology, in this example I used xp0.
          • This folder should includes license file & two Powershell files. Powershell files you should get from GitHub.
        Figure 1.1
        • Make sure that you use SitecoreInstall-Better.ps1 file for Instalation while updating all parameters stated at start of file(as shown in Figure 1.2).
          • Offcourse here, I assumed that you already have all pre-requisite(for example Solr on SSL) to Install Sitecore(Otherwise follow blogs stated earlier).
        Figure 1.2
        • Install Sitecore while firing up above file after due changes. 
        Figure 1.3
        • This should  result in In-Complete Installation.
        Figure 1.4
        • Now let's Un-Install this Sitecore Instalation, while using Un-InstallSitecore.ps1 file. It will confirm before deleting Website root folders, to be quick pass A for 'Accept All'.
        Figure 1.5
        • It should clear all mess which earlier Instalation script it left, for example certificate installed earlier deleted through this script as shown in Figure 1.6 & 1.7
        Figure 1.6

        Figure 1.7

        Again this is not yet production ready & take it at your own risk. I will try to complete it for xp0 topology and will seek feedback to take it further, if this is right way to uninstall for actual adoption.

        Let me know what you think about this, especially Kam.