Book Image

DevOps for Salesforce

By : Priyanka Dive, Nagraj Gornalli
Book Image

DevOps for Salesforce

By: Priyanka Dive, Nagraj Gornalli

Overview of this book

Salesforce is one of the top CRM tools used these days, and with its immense functionalities and features, it eases the functioning of an enterprise in various areas of sales, marketing, and finance, among others. Deploying Salesforce applications is a tricky event, and it can get quite taxing for admins and consultants. This book addresses all the problems that you might encounter while trying to deploy your applications and shows you how to resort to DevOps to take these challenges head on. Beginning with an overview of the development and delivery process of a Salesforce app, DevOps for Salesforce covers various types of sandboxing and helps you understand when to choose which type. You will then see how different it is to deploy with Salesforce as compared to deploying with another app. You will learn how to leverage a migration tool and automate deployment using the latest and most popular tools in the ecosystem. This book explores topics such as version control and DevOps techniques such as Continuous Integration, Continuous Delivery, and testing. Finally, the book will conclude by showing you how to track bugs in your application changes using monitoring tools and how to quantify your productivity and ROI. By the end of the book, you will have acquired skills to create, test, and effectively deploy your applications by leveraging the features of DevOps.
Table of Contents (14 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Traditional deployment


There are two ways to deploy code to test in a sandbox or production environment:

  • Change sets: A change set is used to move changes from a development sandbox to a production environment. Change sets do not contain data. Change sets are best for deploying the same components to multiple organizations. Change sets are good for small deployments, but not preferred for large deployments. The Force.com Migration Tool can be used for large deployments as deployment components can be easily managed.
  • Force.com Migration Tool: Using the Force.com Migration Tool requires some setup. It is scriptable, so it is used for a multistage release process, where we can easily have scripted retrieval and deployment of components. Repetitive deployments using the parameters can be done. We can retrieve all metadata in the organization, make changes using the editor, and deploy the same subset of components.

Issues with traditional deployment

No versioning is provided in a sandbox environment, so it becomes difficult when multiple developers are working on a project and are not in sync. Keeping track of all changes in project can look like finding a needle in a haystack. Deployment with a change set is not recommended for large projects and creating a change set is not scriptable. So it becomes a repetitive task.

The Force.com Migration Tool is good for large projects, but we do not have versioning, so we cannot revert code to its previous version. Also, we are not able to track changes done by developers. 

We have different environments, such as development, test, stage, and production, in almost all technical stacks. In Salesforce, we use a sandbox for development and test environments. Sandboxes come in different types as per our requirement, and we can choose which sandbox to use. Let's look at the different types of sandboxes.