This presentation takes a look at our approach on how we have set up a build and deployment system for a JSS Solution in Azure DevOps. It will go into technical details, learnings and considerations which we have gathered during the setup.
5. Goals
Extensible and accessible
Template for further projects
Reduce complexity in Tooling and CI/CD process
Single build approach for On-Prem and Azure artifacts
8. Azure Pipelines
Automatically build, test and deploy
Set of defined steps running in agents
Jobs can be parallelized
Definable in both, .yaml and GUI
Large ecosystem
Out of the box tasks
Marketplace
Custom tasks
15. Available Pipelines
Split into concerns
Frontend (JSS)
Backend (Sitecore)
Testing
Infrastructure
Build Pipelines for Developer Feedback
Build Pipelines for Artifact generation
16. JSS Build
npm ci / npm build
Verifies linting
Runs unit tests
Publishes test and coverage result
Generates artifacts for Integrated and
Headless mode
17. Sitecore Build
Builds .NET Solution
Generates base artifact contains
solution output
Binaries
Config files
Run unit tests
Publishes test and coverage result
18. Full Build
Runs JSS and Sitecore Build in parallel
Invokes a magic blackbox
Generates web deploy packages for CM, CD,
REP and PRC
19. Sitecore Azure Toolkit
Official Sitecore Product
Tool for deploying ARM templates to Azure
Can create web deploy packages
Solution
Sitecore Modules
https://bit.ly/2T5CLpR
20. Web deploy package generation
Solution Output
Cargo PayloadsTopology Configuration
Azure Toolkit
Web Deploy Packages
- CM
- CD
- REP
- PRC
Vanilla Webroot
21. Cargo Payloads
Proprietary definition of transformations
.sccpl
Supports several ways of modifying web deploy packages
CopyToWebsite
CopyToRoot
Xdts
IOAction
Out of the box payloads (ApplicationInsights, Redis session store, etc.)
https://bit.ly/32fEsoO
25. Removing DB operations from .scwdps
.dacpac generation during build
Remove ConnectionStrings.config from the input package before invoking SAT
https://schwindelig.io/sitecore/azure/2019/08/21/skip-dacpac-generation-sitecore-azure-toolkit.html
.scwdps contain SQL scripts like CreateUser.Core.sql
Undocumented cmdlet: Remove-SCDatabaseOperations
https://schwindelig.io/sitecore/azure/2019/08/24/remove-db-operations-from-scwp.html
26. Preparing Sitecore Modules
Used to have items, binaries and configs within the solution
Split into individual deployable components (JSS, SPE, SPS)
Convert to .scwdp using SAT
ConvertTo-SCModuleWebDeployPackage
2 variations: On-Prem and Azure
Use DisableDacPacOptions to create tables or users when you are deploying. You must disable
SqlDatabaseOptions for the module WDP package if you want to deploy them to an on-premise
instance. If you do not disable SqlDatabaseOptions, msDeploy will try to convert the contained
database into an uncontained database and the attempts to apply these options while deploying
the module package produces the wrong result.
https://bit.ly/39ZsceC
27. Ready for deployment
JSS Distribution
JSS Headless Proxy
Solution Web Deploy packages Module Web Deploy packages
38. Staging Slots
Live Apps with their own host names
App content and configs can be swapped
Validate changes before swapping
Swap with preview
User
production.customer.comdeployment.customer.com
Swap
Automated tests &
Health checks
42. Azure DevOps
Great documentation. Read it
Seamless integration to Azure, Github, etc.
Team is transparent. Short sprints
Hit or miss
.NET Code Coverage reports
Parallelism
Consider using multi stage instead of classic pipelines
Check Teams integration
Stay within the box
43. Azure
RTM
Apply ASE strategy early
Don’t rely on single blog posts
Deployments (Infrastructure + Software) take time
App Services for Linux are weird
44. Organisational
Don’t be afraid to delegate responsibility
Include developers early
Monolithic repos bring awareness
Dev and Ops need to stay in close contact
Have a proper backlog
POC and ship early