How to Use the Delphix Plugin for Jenkins
As I wrote about recently in Starting Over Might Be Better Than You Think, it is natural for most projects to reach a point where the best path forward is to completely start over. When I accepted the task to create a Jenkins plugin for my company Delphix, I didn’t realize there was an already published plugin. That had not been updated in over 2 years. After digging into the history of the existing plugin with Eric Schrock, we decided that it would be best to start over and focus only on the Delphix core platform features that best tie into CI/CD automation: Self Service Containers and Self Service Bookmarks. So without further ado, here is how to install, configure, and use the Delphix Plugin for Jenkins.
- Jenkins 1.651+
- Java 7+
- Delphix Engine 5.0.0+
- Delphix Self Service License
Go to the Jenkins Plugin Manager and search for “Delphix” under the Available tab. Check the install box and then click “Download now and install after restart.” Then select the box to “Restart Jenkins when installation is complete and no jobs are running.” Once Jenkins has restarted, the Delphix Plugin is installed and can be configured.
Once the plugin is installed, go to Manage Jenkins > Configure System. Scroll down to the Delphix section and click the Add Engine button.
Enter the network address, username and password for the Delphix engine you wish to connect. The Jenkins server will need to be able to communicate to the Delphix engine. Click Test Connect and if the response says Login Successful, the plugin is properly configured. Click Save or Apply to save your settings.
Once configured, Delphix — Self Service Bookmark and Delphix — Self Service Container are available as Build Step options for job configurations.
Self Service Container Build Step
Self Service Container Build Steps have four basic setting: Engine, Operation, Self Service Container, and Bookmark. Engine is a list of configured Delphix engines from the System Configuration. Operation is a list of available Self Service Container operations, described in more detail below. Self Service Container is the list of containers that are available for the selected Engine. Bookmark is a list of bookmarks for the selected Engine.
Available Operations: Refresh, Restore, Enable, Disable, Recover, Reset, Undo, Lock, and Unlock. Restore requires a Bookmark for the restore point. Undo will undo the last action that was successful for the selected container. Lock will lock the container to the user configured in the Jenkins System Configurations.
The progress from Delphix Engine jobs will output to the Jenkins Console.
Self Service Bookmark Build Step
Self Service Bookmark Build Steps have four basic setting: Engine, Operation, Bookmark and Self Service Container. Engine is a list of configured Delphix engines from the System Configuration. Operation is a list of available Bookmark operations, described in more detail below. Self Service Container is the list of containers that are available for the selected Engine. Bookmark is a list of bookmarks for the selected Engine.
Available Operations: Create, Delete, Share, and Unshare. Create will create a new Bookmark from the selected Self Service Container. Delete will delete the selected container. Share and Unshare will respectively share and un-share the selected bookmark with other Delphix users within the same Engine.
Both Self Service Container and Bookmark build steps have an Advanced section. The purpose of this section is to save the output from one build step and then load it into another build step. The Container build step can “Save Container to Properties” and “Load Bookmark from Properties”. The Bookmark build step can “Load Container from Properties” and “Save Bookmark to Properties”. An example of how to use the advanced options would be create a bookmark in one build step, select “Save Bookmark to Properties”. Then create a Container build step, select the Restore operation and then select the advanced option to “Load Bookmark from Properties”. The bookmark that was created in the first build step will be used to restore the container in the next build step. This can be useful when creating a bookmark from one container and then restoring that dataset to a different container.
When it came to updating a plugin that had not been updated in 2.5 years, it was definitely a good decision to start over. We were able to get past some of the problems and complaints the old plugin had while making strides forward with integrating Jenkins jobs with the Delphix Data Platform. Delphix customers that are looking to speed up their SDLC and automate Self Service Container operations will very likely find this plugin useful.