vCD Extension for Rubrik
  • Introduction
  • Change Log
  • Getting Started
    • Quick Start - Introduction
    • Quick Start - Rubrik Plugin
    • Quick Start - CORS Configuration
    • Advanced Installation
      • Nginx Reverse Proxy
      • VMware Customize Portal
      • Manually Uploading the Rubrik Plugin
    • Troubleshooting
      • Installation Known Issues
      • Plugin Connectivity
      • Upgrade Notes - 1.1.0
  • User Guide
    • Introduction
    • Tenant Management
    • Rubrik Permissions and Organisations
    • Assign SLA to vApps
    • On-Demand Snapshots
    • vApp Instant Recovery
    • vApp Virtual Machine File Recovery
    • vApp Exports
    • Dashboard and Reporting
Powered by GitBook
On this page
  • Manually Installing the Rubrik Plugin with Python
  • Manually Installing the Rubrik Plugin with Bash
  • Uploading the plugin

Was this helpful?

  1. Getting Started
  2. Advanced Installation

Manually Uploading the Rubrik Plugin

This is an optional step if you are unable to use VMware Lifecycle Management Plugin

PreviousVMware Customize PortalNextTroubleshooting

Last updated 5 years ago

Was this helpful?

Manually Installing the Rubrik Plugin with Python

The Rubrik Plugin can be uploaded directly the the vCloud Director API using a Python script provided by VMware.

Download the latest version of the Rubrik plugin, this will be named rubrik_vcd_ext_v1.x.x.zip and be found in the release pages:

Extract the zip and edit the file ui_ext_api.ini and populate with the vCD connecting details:

[DEFAULT]
vcduri=https://myvcdcell.com
username=admin
organization=System
password=mypassword

Save the file.

Now we can use the python script ui_ext_api.py to upload the plugin:

> python ui_ext_api.py deploy

This should upload the plugin to the vCD cell configured in the ini file we previously set.

Manually Installing the Rubrik Plugin with Bash

The Rubrik Plugin can be uploaded directly the the vCloud Director API, below is a script to perform these steps:

You will need to replace the following values:

  • VCDHOST - this needs to be in the format VCDHOST="VCD-DNS-ADDRESS"

  • AUTH - this needs to be in the format AUTH="MyProviderUsername@System:MyPass"

This script is designed to check for previous versions of the Rubrik Plugin, remove it if it exists and then upload the new script which is contained in plugin.zip. This will still require you to share the plugin to tenants however as this will only be available to the Provider after upload.

RHEL/CentOS Script:

#!/usr/bin/env bash
VCDHOST="my-vcd-cell.rubrik.demo"
AUTH="USERNAME@System:PASSWORD"
curl -v -k -X POST -H 'Accept: application/*+xml;version=29.0;multisite=global' --basic -u $AUTH https://$VCDHOST/api/sessions > stdout_session.txt 2>&1
VCDSESSION=$(cat stdout_session.txt | grep -Fi 'x-vcloud-authorization' | cut -d ":" -f 2 | sed 's/[[:space:]]//g')
PLUGINID=$(curl -v -k -X GET -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" https://$VCDHOST/cloudapi/extensions/ui/ | jq -r '.[] | select(.pluginName=="Rubrik") | .id' )
if [ $PLUGINID == 'null' ]; then
  println "No Rubrik Plugins Found"
  PLUGIN=$(curl -v -k -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" --data '{"pluginName":"Rubrik","vendor":"Rubrik", "description":"Rubrik vCD Extensibility Plugin", "version":"1.1.0","license":"MIT", "link":"http://rubrik.com", "tenant_scoped":true,"provider_scoped":true, "enabled":true}' https://$VCDHOST/cloudapi/extensions/ui | jq -r '.id')  
else
  curl -v -k -X DELETE -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" https://$VCDHOST/cloudapi/extensions/ui/$PLUGINID/plugin
  curl -v -k -X DELETE -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" https://$VCDHOST/cloudapi/extensions/ui/$PLUGINID
  PLUGIN=$(curl -v -k -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" --data '{"pluginName":"Rubrik","vendor":"Rubrik", "description":"Rubrik vCD Extensibility Plugin", "version":"1.1.0","license":"MIT", "link":"http://rubrik.com", "tenant_scoped":true,"provider_scoped":true, "enabled":true}' https://$VCDHOST/cloudapi/extensions/ui | jq -r '.id')  
fi
PLUGINSIZE=$(stat --printf="%s" plugin.zip)
curl -v -k -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -H "x-vcloud-authorization: $VCDSESSION" --data '{"fileName":"plugin.zip", "size":'$PLUGINSIZE'}' https://$VCDHOST/cloudapi/extensions/ui/$PLUGIN/plugin > stdout_link.txt 2>&1  
TRANSFER=$(cat stdout_link.txt | grep -Fi 'link' | awk -F"<|>" '{print $3}')
curl -v -k -X PUT -H 'Content-Type: application/zip' -H "x-vcloud-authorization:$VCDSESSION" --data-binary @plugin.zip $TRANSFER

Downloading this package will contain the following files:

  • bundle.js

  • i18n.json

  • src/public/manifest.json

  • assets

  • plugin.zip

Uploading the plugin

Extract the package of the package downloaded in the previous step, and edit the file so we can add the VCDHOST and AUTH value as mentioned earlier; this can be done by the following commands:

vi plugin_upload.sh

You will now be in the vi console, press i to enter --INSERT-- mode; Copy and Paste the above script and then navigate to the lines for VCDHOST and AUTH and update the values to be for your vCloud Director Cell.

Once updated, press esc to leave --INSERT-- mode and the press : followed by wq! and press return.

You should now have a saved copy of the script in the directory you are working in. We must then make this executable, do this by using the command below:

chmod u+x ./plugin_upload.sh

Finally, we run the script with ./plugin_upload.sh

https://github.com/rubrikinc/rubrik-extension-for-vcd/releases