Sitecore tips and tricks and community news !

Post Top Ad

Post Top Ad

Showing posts with label ase. Show all posts
Showing posts with label ase. Show all posts
1:55 PM

Sitecore + SXA + xCommerce - Azure ASE custom ARMs deployment

Hello fellows,

Today I would like to talk about custom deployment of Sitecore 9.0.2 + SXA  + xCommerce  on Azure PaaS - but here we have to add something more ASE support. I got a case from client to make it in isolated way and this approach was the most acceptable by them.

Because they have used Sitecore 9.0.2 we have to work with this version, which needs our custom work to achieve Azure ASE on Sitecore ARMs files.



But somebody will ask, bro, what is this Azure ASE?

From MS site (more Microsoft Docs - Azure ASE):

The Azure App Service Environment is an Azure App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale. This capability can host your:
  • Windows web apps
  • Linux web apps
  • Docker containers
  • Mobile apps
  • Functions
App Service environments (ASEs) are appropriate for application workloads that require:
  • Very high scale.
  • Isolation and secure network access.
  • High memory utilization.
Customers can create multiple ASEs within a single Azure region or across multiple Azure regions. This flexibility makes ASEs ideal for horizontally scaling stateless application tiers in support of high RPS workloads.
ASEs are isolated to running only a single customer's applications and are always deployed into a virtual network. Customers have fine-grained control over inbound and outbound application network traffic. Applications can establish high-speed secure connections over VPNs to on-premises corporate resources.
First of all I have to remind where we can find Sitecore ARM templates:



I was digging this topic and I what I got to know more is which ARMs attribute we have to use. The main one are:
  • server farm
  • hosting environment profile
Where we can find them? -> In infrastructure files of Sitecore

I will make here some out off topic, but I recommend to use ARM templates extension for VSCode, check this out:


Take a look on Sitecore ARM infrastructure.json file


But you have to be aware that there is more than 1 place to switch :)

What you can do more is for instance change default Azure App Service Plan usage. Of course not on a production stage, but if you are building only kind of PoC, you don't need all PaaS App Service Plans (which on ASE costs much). You can e.g. create only one for PoC purpose like I said.

What I would like to highlight is that this parameters values we can also pass from the top, what means parameters.json file. In that way we will keep all values in one place.


The same situation is with xCommerce ARMs template, which have similar structure to Sitecore ARMs templates


Because we knowe already, from where we can get default ARMs for Sitecore I will put here only infrastructure files for Sitecore 9.0.2 and xCommerce 9.0.3 to help understand how to use this paramas.
I would like to notice that my custom templatea are only for PoC purposes and I have changed number of App Service Plans. In the other hand, it will be also a good example for you.


Cheers!
7:17 PM

Sitecore & xCommerce: Azure and integrations FAQ

There are situations when your clients use more than only CMS system. Of course now they would like to use Sitecore but with xCommerca part. Is it all? No, they have also some other internal 3rd party systems like own PIM or ERP, CRM or all of them at once.


So now we can start to think how we should to integrate them? Let's check a few approaches which we can chose depends on client needs and our abilities. To make it we will go through a path, sort of journey of questions which you should answer during approaching to your enterprise app to the world.

Hosting

First of all we should think where we would like to keep our solution. Currently, I don't think I should touch things like:
  • internal hosting infrastructure or
  • external providers
Because right now we have cloud age and we will go in Azure! ;)

In Azure as a cloud we also have 2 directions:

          
Each of the path has own specific pros and cons, let's point some of them:

IaaS:
  • DevOps maintanance
  • Flexibility (issue)
  • Complicated solution 
PaaS
  • Simpler maintanance
  • Felxibility (pros)
  • Easy to scale
  • Fancy solution!
When we decide how we will host, then we should to ask ourselves about:

Deploy path

Here we have a two ways:
  • Marketplace
  • ARM templates
Marketplace is well known place to get our Sitecore App, but if we want to make something custom we should ARM templates to define our own rules.

We also should to remember that  ARMs templates:
  
They don’t deploy app code itself, but only define structure of resources

Since we know:
  • Where we will host app
  • How we gonna to deploy on it

We should asks ourselves what about security? This is the most important when you are working with enterprise clients and their solutions. But I'm pretty sure they will not let you forget about that :)

Integration 3rd Party Systems Security and Privacy

  • Azure Gateway

Microsoft describes that the gateway works as a bridge that provides quick data transfer and encryption between data sources on premises and your logic apps. You can use the same gateway installation with other cloud services, such as Power BI, Power Automate, Power Apps, and Azure Analysis Services.
  •  Logic Apps

Combining Azure Logic Apps and Azure OnPrem Gateway gives an ability to process and consume date gathered from on-prem services we have integrated with. You have simple way to
  • Hybrid Connection




To simplify we can get information from documentation which says that Hybrid Connections can be used to access application resources in other networks. It provides access from your app to an application endpoint. It does not enable an alternate capability to access your application. As used in App Service, each Hybrid Connection correlates to a single TCP host and port combination. This means that the Hybrid Connection endpoint can be on any operating system and any application, provided you are accessing a TCP listening port. The Hybrid Connections feature does not know or care what the application protocol is, or what you are accessing. It is simply providing network access.
  • ASE (App Service Environment)


The last one but not least is ASE which represents isolated environemnt inside the Azure Cloud. You can imagin that you have your own hardware resereved only for you in ASE. Basing on that you have wide scope of priviliges to set up you network. You can e.g. hide completly URL to you App services based on that infrastructure. It's really interesing to have so much powers in Azure to use.

Ok basing that let's assume we have choosed ASE, so how could look our infrastructure?

Infrastructure diagram based on Azure ASE approach

For purpose of our excercise let's assume that we would like to integrate with:
  • 2 kinds of ERPs
  • CRM
  • Some Data Warehouse
  • Product managemet system (PIM)

First of all, in this picture we can see that ASE contains WebApps, but not databases. It's because of ASE properties, which allow only to keep App services.

Integration part is delegatd to independent solution which can be maintanance separetly without issues with Sitecore team as well. Besides it provides abiliti to scale it separately as well. Although it also depends on you needs. Because e.g. PIM product synchronization could be an activity which will be invoke once per day (at night for instance), so this is something what we really can extract to independent layer.

However, we can also have a situation where ERP integration will be used 'on the fly' to get e.g. prices per specific customer. Does it mean it's also good to keep in a separate layer?
Well, not excatly. Maybe it's a good idea to this part of integration make in xCommerce area? Then you will can easly assign to xCommerce prices pipline or add and API to make it possible for Sitecore to ask for those data.

We also should mention about Azure Gateway (WAF) which allows to filter traffic to our ASE and set proper network rules. We also have divided here SOLR environment outside, which can be hosted on external VMs for example.

Everythings depens on you needs, but hopefully this diagram will help you to understand approach, constraints and ways how to make it.

Cheers !