Back to Articles
article cover
author avatar
Rimon Hanna
4 years ago
Writing

Salesforce DevOps

What Is DevOps?

DevOps enables organisations to develop and enhance their products more rapidly compared to other software development methodologies. Continuous Integration (CI) is a best practice within DevOps software development, which encompasses the build and unit testing phases of the software release process. Each committed revision initiates an automatic build and test, allowing for early identification and resolution of issues before releasing updates to customers.

What Is Salesforce DevOps?

Salesforce DevOps is the same as actual DevOps while focusing on Salesforce at scale. This helps development teams detect problems, identify bugs, and fix them before releasing changes to their customers. DevOps = automated, more regular releases.

There are a number of tools currently in Salesforce for deployment of these applications, including change sets, Workbench, SalesforceDX, DevOps Center, the Force.com migration tool, CI/CD Pipeline and 3rd part AppExchange tools. Learn about Salesforce Development and Deployment Process.

Benefit of DevOps tools

Here are some benefit of DevOps tool.

  • Shorter Development Cycles, Faster Innovation
  • Reduced Deployment Failures, Rollbacks, and Time to Recover
  • Improved Communication and Collaboration
  • Increased Efficiencies

Pillars of a Successful Salesforce DevOps

DevOps is a journey which starts with small steps. Make sure the whole team is onboard and up to speed. Layer on complexity when your team and process is ready. There are pillars of a successful DevOps process.

1. Version Control

Version control is the new single source of truth. Version Control Systems (VCS) help you trace back any changes and creates high-quality gates of security for your precious code and metadata.

2. CI/CD Pipeline

CI/CD is Not just for deploying changes. It more than that, It allows you to validate the build, run automation testing and helped you in code backup. CI/CD ensures reliable and smoother deployments and a lower code coverage failure rate.

3. Automation Testing

A good DevOps tool always performs automation testing for you on every pull request and before every release to ensure that you're never merging or releasing uncovered or buggy changes.

4. Backup

Protect yourself from malicious attacks, Salesforce bugs, accidental deletions, etc. Having the peace of mind that you can always roll back.

5. Code Scanning

Code scanning tools help automate parts of the manual process of code review in Salesforce. You can use Static Code Analyser tools to achieve the same results.

Learn more about DevOps 5 pillars.

Salesforce Dev Ops Tools

Let’s Understand The CI/CD

Let’s understand the difference term of CI/CD

1. Continuous Integration

Using continuous integration, a product is made to incorporate and integrate each code modification on each commit (continuously), by any and all developers. an automated build then verifies each check-in, letting teams detect issues early.

2. Continuous Delivery

Continuous delivery ensures that code will be speedily and safely deployed to production by manually pushing each change to a production-like environment. Since each modification is automatically delivered to a staging environment, you’ll be able to deploy the application to production with a push of a button once the time is correct.

3. Continuous Deployment

Continuous deployment is the next step of continuous delivery. using Continuous deployment, each modification that passes the automated tests is deployed to production automatically. Most firms that aren’t bound by regulatory or other constraints should have a goal of continuous deployment

Salesforce Dev Ops Ci CD

Salesforce DevOps Tools

There are different DevOps Tools are available. Which can be divided into the below category.

1. Custom Build

You can build your own tool using different CI/CD platforms. Like below:

  1. Jenkins: Jenkins is an open-source continuous integration software. It is written using the Java programming language. It facilitates real-time testing and reporting on isolated changes in a more massive codebase.
  2. CumulusCI: CumulusCI makes it easy for developers, admins, and testers to do their work and collaborate in version control.
  3. Azure DevOps: Azure DevOps is a fully integrated set of services that provide you with all the tools necessary for building and maintaining a backlog, hosting your source code repositories, implementing continuous integration, along with delivery and testing workflows for your products before releasing them
  4. GitHub Actions: GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub.
  5. Gitlab pipelines: Similar to GitHub Actions, if you prefer GitLab over GitHub. It’s a no-brainer that you’ll be more comfortable with the platform’s interface and familiar with its features and workflows.

2. Automated Platforms

Those DevOps Tools which well integrated with Salesforce.

  1. Serpent: Quality-Driven, Low-Code DevOps and Automated Testing Platform; a complete end-to-end DevOps platform that is highly scalable, reliable and fully integrated with the Salesforce platform. Contact us to get started today for FREE
  2. Gearset: is a significant improvement from using Salesforce change sets. Due to the many limitations with deploying specific metadata types between sandbox testing environments and production, prices start at 300$ per developer.
  3. Copado: A solid deployment tool. The query option for deployments is very helpful when moving Salesforce Data, prices start at 250$ per developer.

Based on your company's needs and budget, and considering all above tools, you can decide if you need build a DevOps process or buy.

Salesforce DevOps Best Practices

So far we understand what is DevOps and which all are important part of Successful DevOps. Let see some DevOps Best practices.

1. Environment Planning:

  • Developer Sandboxes and Scratch Orgs:
    • Each developer uses a Developer or Developer Pro sandbox for long-term projects.
    • Developers also use scratch orgs for short-term, feature-specific development and testing.
  • Integration Sandbox:
    • A shared sandbox (Partial Copy) for integrating individual contributions from developers.
  • UAT (User Acceptance Testing) Sandbox:
    • A Full Copy sandbox for business users to test new features before they are moved to production.
  • Staging Sandbox:
    • Another Full Copy sandbox that mimics the production environment for final pre-production testing.
  • Production Environment:
    • The live environment where end-users interact with the application.

2. Environment Management:

  • Sandbox and Scratch Org Management:
    • Regularly refresh Developer and Integration sandboxes to reflect the latest production data and configurations.
    • Use Salesforce DX for creating and managing scratch orgs. Set up scripts to automate the creation and teardown of scratch orgs.
    • Schedule UAT and Staging sandbox refreshes around major releases to align with testing cycles.
  • Backup Strategy:
    • Implement automated backups for sandboxes and production data to avoid data loss.

3. Version Control:

  • Commit Strategy:
    • Commit changes frequently with clear, descriptive messages.
    • Use pull requests for code reviews before merging to main branches.
  • Change Tracking:
    • Track metadata changes and keep configurations in sync across environments using tools like Gearset or Copado.

4. Environment Configuration:

  • Org-Specific Configurations:
    • Use Salesforce DX scratch orgs for configuration and development.
    • Use Salesforce CLI and sfdx commands to manage and deploy changes.
  • Environment Variables:
    • Securely manage sensitive information using Salesforce Shield or encrypted custom settings.

5. Automated Deployment:

  • Version Control:
    • Use Git as the source of truth for all metadata and code.
    • Implement branching strategies (e.g., feature branches, develop branch, master branch) to manage changes.
  • CI/CD Pipeline:
    • Use Salesforce DX, Jenkins, and GitHub Actions to automate deployment processes.
    • CI/CD pipeline stages include:
      1. Build: Retrieve code from version control.
      2. Test: Run automated tests using Apex Test Execution.
      3. Deploy: Deploy changes to Integration sandbox, followed by UAT, Staging, and Production.
      4. Scratch Org Validation: Create scratch orgs in the CI/CD pipeline to validate changes in an isolated environment.

6. Data Management:

  • Test Data:
    • Use anonymised or synthetic data in Developer and Integration sandboxes to comply with data protection regulations.
  • Data Migration:
    • Use tools like Salesforce Data Loader or Talend for data migration between environments.
  • Scratch Org Data:
    • Use Salesforce DX to seed scratch orgs with relevant data for development and testing purposes.

7. Monitoring and Logging:

  • Logging:
    • Implement logging using Salesforce Debug Logs and set up alerts for critical errors.
  • Monitoring:
    • Use AppExchange tools like New Relic or Datadog for performance monitoring and health checks.

8. Compliance and Security:

  • Security Reviews:
    • Regularly perform security reviews and penetration testing in Staging and Production environments.
  • Access Controls:
    • Implement role-based access controls (RBAC) to limit access to sensitive environments and data.

FAQ’s

What is Salesforce DevOps?
Salesforce DevOps is the same as actual DevOps and it focused on leveraging Salesforce at scale. This helps development teams detect problems, identify bugs, and fix them before releasing changes to their customers
Is Salesforce DevOps a good career?
Yes, DevOps engineers have good career option. As now days every project is using Salesforce DevOps.
What does a Salesforce DevOps engineer do?
DevOps Engineer are responsible for implementing continuous delivery, optimisation, monitoring, release management. They also support the end to end release process.

Summary

Salesforce DevOps is a culture and a set of process that bring development and operations teams together to complete software development. I hope after looking into all DevOps Tools you can decide your deployment strategy and process.