5 ways to improve your DevOps strategy

5 ways to improve your DevOps strategy

Rachel Maton on

Share with

LinkedIn
Twitter

Teams are increasingly prioritizing DevOps practices as they build plans for Salesforce. With a DevOps-focused strategy, teams can ship improvements faster and incorporate stakeholder feedback more easily. If you want to make a success of Salesforce, there are 5 fundamental areas that you and your team should be aware of. Whatever stage you’re at, this post should give you some inspiration for planning your next steps.

1. Nail your deployments

First things first: don’t overlook your deployments. Whether you’re deploying org to org or using version control, you need to build your DevOps strategy from the ground up, and deployments are the foundation. If your deployments are a bottleneck, you won’t be able to adopt more complex DevOps processes like version control or CI/CD, particularly as your orgs grow in size and complexity.

Great deployments are fast. They work first time, avoid deployment errors and don’t require manual tracking of changes. They are also robust - they don’t ship bugs, are easy to roll back and easy to keep track of.

If that doesn’t sound like your deployments, now’s the time to reassess how your team deploys Salesforce metadata. Ask yourself:

  • Can our team see exactly what we’re deploying? Is it easy to compare the differences between the source and the target?
  • Are we alerted to common errors like missing dependencies in our deployment package, to help make sure the deployment succeeds?
  • Is static code analysis built into our tooling, so we can identify poorly written code before we deploy?
  • Can we revert unwanted changes with full or partial rollback?
  • Can we build, clone, validate and share deployment packages to cut out manual deployment steps?
  • Can we see a full deployment history for team-wide visibility and an audit trail?

Updating your tooling can make deployments a lot easier and faster. For example, real estate company Zillow shaved 8 hours off their deployment process after switching from change sets to Gearset.

Once you’re confident in your deployments, you can focus on implementing more advanced DevOps processes.

2. Make full use of version control

In 2022, version control will be used by the vast majority of Salesforce teams. A solid version control strategy improves collaboration and leads to faster releases with fewer bugs.

Teams working in the same sandbox constantly block each other’s releases. With version control, everyone makes changes on separate branches without blocking other improvements. Every member of the team works safely in their own branch and deals with any merge conflicts well ahead of the release.

When version control is first adopted, teams often still treat the production org as the ‘source of truth’, and may use Git just to back up metadata, or commit Apex and certain metadata types to their repository. These methods can be really helpful for teams who are getting used to version control, but once you’re comfortable with Git, you should aim to make version control central to your release pipeline so that you can benefit from a faster, more efficient process.

For version control to really work, you need to make sure your main branch is the new ‘source of truth’ for the latest metadata - not the production org. This will help you to keep your environments in sync and manage multiple workstreams flowing through your pipeline.

When it comes to Git-branching strategies, we recommend a simple feature branching model to start with, where features are developed in branches then merged into the main branch. Make sure your team members are all using version control correctly and consistently. It’s ok for some to use the CLI while others use tools like Gearset, so long as the approach to Git is the same. Check out the free courses about Git branching strategies and version control fundamentals on DevOps Launchpad. You can also watch our previous summit session to get an overview of Git:

Getting set up with version control doesn’t have to be difficult. With a good release model and user-friendly tools, you can create a process that works for all experience levels.

3. Start automating

Automation is getting more and more popular among Salesforce teams, and it’s not hard to see why. Automation can improve your Salesforce ROI because it allows you to tighten feedback loops, easily run multiple projects at the same time and ultimately deliver value to end users faster. And when you automate parts of your workflow, you free up people to focus on delivering more improvements and innovations.

Repetitive manual tasks are prime candidates for automation. CI/CD is a way of automating deployments to promote work along your release pipeline to production.

CI/CD can be a real game-changer, but it only really works if your team is deploying reliably. Your environments must be in sync and you should be shipping small and often. You want to avoid larger deployment packages, because they’re more likely to contain something that causes the deployment to fail. Whether you’re new to CI/CD or have already set up CI jobs, releasing small and often will help you avoid lost time spent troubleshooting broken CI jobs. To learn more about CI/CD and how to make it work for you, check out the free DevOps Launchpad course, CI/CD for Salesforce.

4. Prepare for disaster

The Salesforce ecosystem is swiftly realizing that data loss happens all the time and that having a disaster recovery plan in place is crucial for both compliance and business continuity. It’s well worth focusing on this often overlooked aspect of DevOps.

Don’t make the mistake of thinking that your data is secure because it’s ‘in the cloud’ - you need a backup solution. Salesforce’s new Backup & Restore shows that they are invested in offering a more robust backup solution than they have done in the past. However third-party solutions like Gearset offer a further layer of protection against incidents affecting the platform itself, such as a Salesforce outage. You’ll also want to make sure you have a solution for backing up metadata as well as data, as it’s difficult to recover data if the metadata that describes it has been lost or corrupted.

You’ll need to create a restore plan so that your team knows exactly what to do in a crisis. And if there’s one bit of advice you take away from this post, let it be to test your restore process! It’s good practice to:

  • Test your restore process in a sandbox environment
  • Set up a regular testing cadence for your restore process (at least once a year)
  • Make sure everyone is familiar with the restore process, particularly if your Salesforce team grows or changes

Finally, think about backup as part of DevOps. With Gearset, your backup and release processes are tightly integrated, and all controlled from the same familiar UI. This familiarity will speed up your recovery time. You can also run backups on demand within the UI before a risky release, so that the latest data is secure if anything goes wrong. For a more in-depth guide to backing up your Salesforce org, download our free backup ebook.

5. Improve security and compliance

You’ll no doubt have some measure of security and compliance in place to protect your business against security risks. But if you plan on tightening things up, there are a few steps you can take to make sure your company’s data is secure and practices compliant.

As already mentioned, having a solid backup and restore plan in place is crucial for maintaining the security of your org. Likewise, version control and automated testing brings security benefits of reducing the likelihood that any damaging or dangerous changes are released into Production.

Testing with realistic data is invaluable, as it lets you see how your new feature will handle realistic quirks and edge cases. But testing with live Production data has obvious security and compliance issues - risking exposure of sensitive data or personally identifiable information (PII). Make sure you mask Production data when you load it into your testing environment, so you have the benefit of safety as well as robust testing.

You also get an added layer of security with Gearset monitoring tools, which give you visibility of what changes have been made to your org. Monitoring lets you account for everything in an audit trail and remove problematic changes quickly. You can also set up smart alerts in your Gearset backup job to notify you of large data changes - such as a large deletion of data sets - so you can stay on top of potential security incidents.

Achieve DevOps success with Gearset

Whether you’re making changes across the board or zeroing in on one problem area, Gearset can help. No matter where you are on your DevOps journey, you can use our end-to-end DevOps tooling and begin to deploy, monitor, automate and back up with confidence.

If you want to find out more about how to improve your DevOps strategy, book a consultation with one of our experts.

Ready to get started with Gearset?