First Steps to Salesforce Release Management & DevOps [Salesforce User Group, Wellington, New Zealand - Nov, 2022].pdf
Nov. 9, 2022•0 likes•672 views
Download to read offline
Report
Technology
Slide deck shared by Adam Best, presenter. First Steps to Salesforce Release Management & DevOps Salesforce User Group, Wellington, New Zealand - Nov, 2022
First Steps to Salesforce Release Management & DevOps [Salesforce User Group, Wellington, New Zealand - Nov, 2022].pdf
1. First Steps to Salesforce
Release Management &
DevOps
Salesforce User Group, Wellington, New
Zealand, 9th Nov 2022
Adam Best, Senior Program Architect
2. Forward Looking Statements
This presentation contains forward-looking statements about, among other things, trend analyses and future events, future financial performance, anticipated growth, industry prospects, environmental,
social and governance goals, and the anticipated benefits of acquired companies. The achievement or success of the matters covered by such forward-looking statements involves risks, uncertainties and
assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, Salesforce’s results could differ materially from the results expressed or implied by these
forward-looking statements. The risks and uncertainties referred to above include those factors discussed in Salesforce’s reports filed from time to time with the Securities and Exchange Commission,
including, but not limited to: impact of, and actions we may take in response to, the COVID-19 pandemic, related public health measures and resulting economic downturn and market volatility; our
ability to maintain security levels and service performance meeting the expectations of our customers, and the resources and costs required to avoid unanticipated downtime and prevent, detect and
remediate performance degradation and security breaches; the expenses associated with our data centers and third-party infrastructure providers; our ability to secure additional data center capacity; our
reliance on third-party hardware, software and platform providers; the effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet,
those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls; current and potential litigation involving us or our industry,
including litigation involving acquired entities such as Tableau Software, Inc. and Slack Technologies, Inc., and the resolution or settlement thereof; regulatory developments and regulatory investigations
involving us or affecting our industry; our ability to successfully introduce new services and product features, including any efforts to expand our services; the success of our strategy of acquiring or
making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; our ability to complete, on a timely basis or at all, announced transactions; our
ability to realize the benefits from acquisitions, strategic partnerships, joint ventures and investments, including our July 2021 acquisition of Slack Technologies, Inc., and successfully integrate acquired
businesses and technologies; our ability to compete in the markets in which we participate; the success of our business strategy and our plan to build our business, including our strategy to be a leading
provider of enterprise cloud computing applications and platforms; our ability to execute our business plans; our ability to continue to grow unearned revenue and remaining performance obligation; the
pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; our ability to limit customer attrition and costs related to those efforts; the success of our
international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our customer base and operations, including as a result of acquisitions; our ability
to preserve our workplace culture, including as a result of our decisions regarding our current and future office environments or work-from-home policies; our dependency on the development and
maintenance of the infrastructure of the Internet; our real estate and office facilities strategy and related costs and uncertainties; fluctuations in, and our ability to predict, our operating results and cash
flows; the variability in our results arising from the accounting for term license revenue products; the performance and fair value of our investments in complementary businesses through our strategic
investment portfolio; the impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies
within our strategic investment portfolio; our ability to protect our intellectual property rights; our ability to develop our brands; the impact of foreign currency exchange rate and interest rate fluctuations
on our results; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in the future; the impact of new accounting
pronouncements and tax laws; uncertainties affecting our ability to estimate our tax rate; uncertainties regarding our tax obligations in connection with potential jurisdictional transfers of intellectual
property, including the tax rate, the timing of the transfer and the value of such transferred intellectual property; uncertainties regarding the effect of general economic and market conditions; the impact
of geopolitical events; uncertainties regarding the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; the ability to execute our Share Repurchase
Program; our ability to comply with our debt covenants and lease obligations; the impact of climate change, natural disasters and actual or threatened public health emergencies; and our ability to
achieve our aspirations, goals and projections related to our environmental, social and governance initiatives.
Updated: September 28, 2022
3. First, some logistics
Questions, answers and staying in touch.
How do you ask a question?
You can post your question in the Chat Panel on your webinar
window. We’ll have plenty of time for Q&A at the end of this session.
Will this be available as a recording after today?
Yes, we will be sharing this recording after today
Where can you get the presentation?
Yes, we will also be sharing the presentation slide decks with you
after this session on the same chatter group.
4. Adam Best
Senior Program Architect @ Salesforce
Salesforce Professional Services, Customer Success Group (CSG)
Passion: Helping customers & trailblazers be
successful with Salesforce and get the most out of
their Salesforce investment.
Tech: 20+ years, 13+ years of Salesforce
experience in delivering small and large-scale
Salesforce transformations in Telco, Gov, Financial
Services, Higher Ed & Utilities across Australia
Famous for: The local #DevOps SME & thought
leader.
5. What deployment
tools have you used?
Please choose 1 or more
❏ Salesforce Native (Change Set / DevOps Center)
❏ 3rd Party Solution (Copado / Gearset / Autorabit etc)
❏ Enterprise CICD (Azure DevOps / Jenkins / Buildkite etc)
❏ I have not migrated/deployed Salesforce components
6. Agenda
02
PLAN
What do your Consultants & Developers need to
start building?
03 Getting Started with Deployments
Best Practices
04 Learn MOAR
Trailhead, Certifications and more!
01 Common Challenges
with deployments and how we solve them
05 Q&A
Live Q&A
8. Common Challenges...
Common Challenges with Deployments
And how we solve them
Too many
Manual Steps
Environment
Misalignment
Developer
Sandbox
Is Out of Date
Deployments
Takes to long
Testing
Takes to long
Poor
Code Quality
Code
Merging
Takes Hours
Lack of
Tools
11. What it does...
Additional Capabilities
BUILD INTEGRATE OPERATE
TEST RELEASE DEPLOY
CODE
Agile Development
Continuous Integration
Continuous Delivery
Continuous Deployment
DevOps
+
GOVERNANCE
SECURITY
COLLABORATION
KPIs
…and more
TRAINING
BUSINESS
REQUIREMENT
S
DevOps PROCESSES & PIPELINE
BUSINESS
CAPABILITIES
AUTOMATION
IN OUT
OPERATE
MONITOR
LEARN
How it does it...
Increase Soware Delivery Performance with DevOps
A visual representation
12. DevOps PROCESSES & PIPELINE
People, process, & technology all working together
◆ DevOps is the combination of cultural philosophies, practices, and tools that increases an
organization’s ability to deliver applications and services at high velocity
What is DevOps?
People & Process
80%
Tools &
Technology
20%
◆ CICD (Continuous Integration
Continuous Delivery) is a tooling
technology that can be used as
part of a well-functioning
DevOps capability.
◆ DX (Developer Experience) is a
specific set of Salesforce
development & deployment
technologies that can be used
as part of a well-functioning
DevOps capability.
13. DevOps is a Journey
Common team journeys
CRAWL
Establish DevOps Processes and
build foundations of collaboration
to integrate and test code early, often
& fast
Level 1
• Establish DevOps Processes
• Single “source of truth” for storing,
versioning and tracking code
• Integrate code early and often (i.e.
hourly, etc.)
• (Automated) workflows to code
reviews to identify and fix issues
early
• Build test automation in code
Laser focus on quality, test
automation and automated
test/deploy - reduce and eliminate
manual steps!
WALK
Level 2
• Automate build, test, deploy (e.g. code
merge triggers code integrate/tests, etc.)
• Start “test driven development”
approach in small, select areas by writing
tests before code
• Start “selective tests” approach in small,
select areas
• 80%+ automated test coverage in code
with limited reliance on “human
intervention” (e.g. functional,
performance, security)
Towards CD with one-click
automated releases to customers
RUN
Level 3
• Implement “one-click”
automated releases to
customers - 5 to 60 mins
• Automatic provisioning of
production-like environments
• Adoption of “test driven
development”
Multiple releases in a day
FLY
Level 4
• Multiple releases daily - in
minutes. with flexibility to
target user segments
• Self-service access to
pre-configured environments
14. Why? Business Value
Return on investment, reduce cost of ownership, increase quality, agility & speed
Business
Decrease in feature
requests’ time-to-market
Increase of feature release
frequency
Flexible responses
allowing minor
experimentation
IT
Decrease in deployment
and system down time
Improved efficiency for
process & resource
Improve in business
request turn-around
time and realized value
Finance
Increase return on
investment
Decrease cost of
ownership
Improved dev efficiency
& subsequent savings on
recruitment headcount
Risk
Decrease in deployment
error and potential loss
to business caused
Decrease in production
incidents caused by
change due to lack of
regression testing
15. What do your Consultants & Developers
need to start building?
02 Plan
16. Documentation & Tools
Deployment
Strategy
How, where & when
you’ll need to deploy the
project code for testing
Sprint Plan
Dates you’re building,
deploying, testing and
releasing to production
Project Documents
This will contain solution
design, release runsheet,
developer guide etc.
Release Runsheet
The first manual step
you document will
need to go on this!
What do your Consultants & Developers need to start building?
Environment &
Test Strategy
Sandboxes you’ll use
to build and deploy to
for testing
Tools
Story tracking,
documentation,
deployments etc.
17. Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8
Build: Sprint 1
PHASE
1
Build: Sprint 2
Testing
Deployment to
TEST
Deployment to
TEST
Deployment to
TEST
Deployment to
PROD
Plan
Defect Fixes
Deployment to
TEST
Sprint Plan
Key dates for planning, building, deploying, testing and releasing to production
Requirements:
● We have 2 build sprints.
● Testing should start at the end of Sprint 1.
● There should be a progression of code & config (eg. a deployment) at the end of each week.
18. Project Documents
Project Specific
● Sprint Plan
● Use Cases
● Solution Architecture
● Environment & Test Strategy
● Release Runsheet
● BAU Support Document
ORG Specific
● Developer Guide
BAU = Business As Usual AKA the Customer’s Operation Team
Create the following documents for any project on
your Sharepoint or Confluence
19. Release Runsheet
A step by step recipe to successfully deploy your project to another
sandbox/production
➔ Project Name/s & Date/s
➔ Pre-deployment manual steps
➔ Deployment via change set or CICD
➔ Post deployment manual steps
➔ Smoke testing or Post Verification Testing
20. Environment, Test & Deployment Strategy
Requirements
Teams 1 x Team
● 2 x Functional
Consultants
● 2 x Developers
● 1 x Tech Lead
Sprints 2 x 2 week sprints
Integration No
Deploy Tool Change Sets
Other teams BAU - 1 x Admin
Other
Requirements
None
Solution
ST
DEV
● Developers builds in DEV
● Tech Lead uses Change Set to deploy to ST at the end of each
Sprint (2 x deployments)
● Developers will smoke test their feature in ST
● Testers will test in ST
● Business will perform User Acceptance Testing in ST
● Tech Lead uses Change Set to deploy to Production (1 x
deployments)
● Testers will PVT in Production
● ST: System Test
3 Deployments
[Simplified] 2 x 2 week sprints
21. TIP: Change Register for Change Sets
Record your changes on a spreadsheet, this will help you create Change Sets
ID WHO Date JIRA ID Label Type API Name Object Action
1 US 27-Jul JIRA-449 Support Custom App Support_App Custom App
Modified
Existing
2 AB 27-Jul JIRA-449 Support Lightning Page Support_Standard Case New
3 AB 27-Jul JIRA-449 Support Compact Layout Support_Standard Case New
4 AB 27-Jul JIRA-449 Support Classic Page Layout Support_Standard Case New
5 NS 27-Jul JIRA-449 Support Record Type Support Case New
12 NS 28-Jul JIRA-331 Case Custom Object Case Case
Modified
Existing
22. Environment, Test & Deployment Strategy
Requirements
Teams 1 x Team
● 2 x Functional
Consultants
● 2 x Developers
● 1 x Tech Lead
Sprints 8 x 2 week sprints
Integration Yes
Deploy Tool Change Sets
Other teams BAU - 1 x Admin
Other
Requirements
● SIT & UAT are used
for testing cycles with
other platforms
● Weekly deployments
to SIT
Solution
ST
DEV
● Developers builds in DEV
● Tech Lead or Developer uses Change Set to deploy to ST daily (80 x deployments)
● Developers will smoke test their feature in ST
● Tech Lead uses Change Set to deploy to SIT at the end of each week (16 x
deployments)
● Testers will test in SIT
● Tech Lead uses Change Set to deploy to UAT at the end of the last sprint (1 x
deployments)
● Business will perform User Acceptance Testing in UAT
● Tech Lead uses Change Set to deploy to Production (1 x deployments)
● Testers will PVT in Production
SIT UAT
● ST: System Test
● SIT: System Integration Testing
● UAT: User Acceptance Testing
Integrated
Full
Integrated
Partial
[with SIT & UAT] 8 x 2 week sprints
98 Deployments
23. Environment Strategy [Multi Stream]
Integrated Integrated
PxST
PxDEV SIT UAT
BUILD TEST PRODUCTION
Full
Partial
PROD
Phase #x Build Team
HFDEV
Hotfix
PxST
PxDEV
Monthly Release (business backlog)
Highlights
➔ Single release train for main project
➔ A development team will have a
DEV & ST sandbox to build a feature
➔ A development team will join a
release when they’re ready to ship
their feature
➔ A release can have 1 or many teams
join the release
➔ 1 x build team initially proposed. If
more teams are required, then each
team can have their own Dev/ST
sandbox
➔ Source Control is used for
collaboration on code
Sandbox Types
➔ PxDEV: Developer Sandbox (200mb)
➔ PxST: Developer Sandbox (200mb)
➔ HFDEV: Developer Sandbox (200mb)
➔ SIT: Partial Sandbox (5 GIG)
➔ UAT: FULL Sandbox (like prod)
➔ PRODUCTION: Production
POC Sandboxes
➔ POC1: Developer Sandbox (200mb)
➔ POC2: Developer Sandbox (200mb)
POC2
POC1
POC Sandboxs (Not used for build or release)
24. Development
Source
Control
Code Review
Code
Quality
Continuous
Integration
Deployment, Test & Operate Tools
Tools For Salesforce
The tools Salesforce developers and consultants use to build, test and release
Developer & Admin/Consultant Tools
PLAN DESIGN BUILD DEPLOY TEST RELEASE OPERATE
Document collaboration
with Confluence
★ Documentation
★ Developer Guide
★ Release
Runsheets
With Jira
★ Epics
★ Stories
★ Tasks
★ Bugs
Peer review
by
developers
Integration of
feature &
release
branches and
triggering of
deployment
Static code
analyse and
report code
quality using
Salesforce
Code Analyzer
or Checkmarx
or CodeScan
Deployments
to all
Salesforce
Environments
Developer
builds features,
runs unit tests
using Sandbox
Source Code
Management
Release to
Production
Salesforce
Environment
Automated
regression testing
to validate release
using Accelq or
Provar or Tosca
or Copado
Version Control
PC / MAC
Software using
Visual Studio
Code or
SourceTree
Development of
Integrations using
Stubs/Mocks with
Postman
Code written
and committed
locally in Visual
Studio Code
Monitoring users,
security events &
performance
using Salesforce
Event Monitoring
and Splunk or
FairWarning or
New Relic
Backup and
restore data
Mask / Anonymise
Full Sandbox Data
Sandbox Data
Seeding
Chat / team
collaboration with
Slack
DevOps Center Change Set
DevOps Center
Change Set
DevOps Center
Please Note: DevOps Center is in Open Beta (Jun, 2022)
Data Mask
26. Manual Steps should be recorded
on your Release Runsheet!
➔ Clicking buttons on environments without it being
recorded as a manual step is the #1 cause of
environment misalignment and bugs.
➔ Do not click buttons in TEST/ST/SIT/UAT or PROD
unless this is document on your release runsheet.
➔ Only 1 person in your team should perform
manual steps. Call this person a Tech lead or
Deployment Lead
➔ Only the Tech Lead or Deployment Lead should
have Full System Administrator access to SIT/UAT
or PROD. The rest of the development team should
not!
28. Test Level: All Local Tests
Production Validation Times Forecast
Example
29. with Specified Apex Unit Testing Deployment Strategy
How Can You Reduce Deployment Times?
ALL LOCAL TESTS SELECTIVE TESTS
5 mins
4+ hours ★ 1 line of code change
★ Requires 75%+ code
coverage per Apex class
★ Does not allow developers
to deploy an Apex class with
less than 75% code
coverage on that apex class
★ Avg per 1,000 unit tests
★ 1 line of code change
★ Requires 75%+ Org wide
code coverage
★ Allows for developers to
deploy an Apex class with
0% code coverage
With the adoption
and rollout of
Specified Testing
Deployment Strategy
we have the ability
release changes to
production faster,
and more often
93%
“
“
decrease in
production
validation times
30. To make it easy for you to choose the
tests to run when using Specified Tests
Add ways of working to
your developer guide
● When you create a class (MyClassA.cls), create a
sibling test class (MyClassA_Test.cls
● Write unit tests in your sibling test class to cover
your class >75%.
When you’re deploying, you’ll know what tests classes
you should run to meet the code coverage
requirement on each class.
31. Run All Tests on your ST, SIT or UAT at least once a week and fix failed tests
Should I still run all tests sometimes? Yes!
ST SIT UAT
DEV
BUILD PHASE PROGRESSION TESTING REGRESSION TESTING PRODUCTION
QUALITY
CHECKS
For each deployment
★ Package Compile
★ Selective Apex Unit Test Passing (>75%)
★ Static Code Analysis
★ Auto Regression Testing Pass
Deployment cadence
★ Automated deployments on git push
★ Automated deployments hourly
★ Adhoc (manually) by developers as required
For each deployment
★ Package Compile
★ Selective Apex Unit Test Passing (>75%)
★ Static Code Analysis
★ Auto Regression Testing Pass
Nightly
★ All Local Tests (Apex Test Passing >75%)
Deployment cadence
★ Automated daily deployments at night
(2am)
★ Adhoc (manually) by developers as
required
For each deployment
★ Package Compile
★ Selective Apex Unit Test Passing (>75%)
★ Static Code Analysis
★ Auto Regression Testing Pass
Nightly
★ All Local Tests (Apex Test Passing >75%)
Deployment cadence
★ A release is deployed once only (also known
as Staged)
For each
deployment
★ Package Compile
★ Selective Apex Unit
Test Passing (>75%)
Please note running Apex
Unit Tests in production is
mandatory
★ Package Compile
★ Apex Unit Test Passing (>75%)
★ Static Code Analysis
★ Auto Regression Testing Pass
33. Salesforce Certified Development
Lifecycle and Deployment Architect
● Head over to Trailhead and do the
Architect Journey: Development
Lifecycle and Deployment Trailmix.
● The Exam Guide has the information
you need to help you study and
prepare for your exam.
Certification
34. Where Can You Go Next To Learn MOAR?
Trailhead, Trailblazer Communities, Salesforce+, Help Portal and more!
Trailhead: Online learning guides that teach customers how to
use Salesforce products and services.
● Architect Journey: Development Lifecycle and Deployment Trailmix
● Get Started With Salesforce Development
● Application Lifecycle and Development Models
● Change Set Development Model
● Org Development Model
● Package Development Model
● Quick Start: Visual Studio Code for Salesforce Development
● Develop an App with Salesforce CLI and Source Control
● Continuous Integration Using Salesforce DX
● Salesforce Release Strategies
Trailblazer Communities: Groups made up of our Salesforce
Ohana, where Salesforce employees, partners, and customers
provide help and guidance to each other.
● Release Readiness
● Salesforce Service Delivery
● Test Automation Trailblazer Community Group
Salesforce+ & Salesforce Live: Videos
● How to Scale Up and Multi-Stream with DevOps for the Enterprise
● Increase Agility and Accelerate ROI with DevOps
● Release Management & Environment Management
● Backup & Restore Best Practices for Large Data Volumes
● Create And Manage A Salesforce Backup & Disaster Recovery Plan
Help Portal: On-demand help accessible via the Help & Training Portal,
which provides technical support and Salesforce content.
● Metadata Coverage
● Monitor Setup Changes
● Salesforce DX Developer Guide & Salesforce CLI Command Reference
● Sandbox Basics
Other Links:
● AppExchange. Search “Deployment”
● Optimizing Unpackaged Deployments Using a Delta Generation Tool
● Architect’s Guide to Migrating Changes
● Release Management Resources (architect.salesforce.com)
35. Where Can You Go Next To Learn MOAR
Check out the following videos
36. Google Slides does not
have an image
placeholder option.
Please place an image of
speaker over this circle
manually. Place Logo in
circle below.
Adam Best
Senior Program Architect
Professional Services
Customer Success Group
Q&A