UCSD - Export Workflows with a scheduled workflow

Version 6
    Task NameExport workflows with a workflow which can be scheduled



    Minimum UCSD version: 5.4

    CategoryCustom task
    User Inputs
    User OutputOutputString

    Instructions for Regular Workflow Use:

    Instructions for Regular Workflow Use:

    1. Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
    2. Unzip the file on your computer. Should end up with a .WFD file.
    3. Log in to UCS Director as a user that has "system-admin" privileges.
    4. Navigate to "Policies-->Orchestration" and click on "Import".
    5. Click "Browse" and navigate to the location on your computer where the .WFD file resides. Choose the .WFD file and click "Open".
    6. Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
    7. Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
    8. Click "Submit".
    9. A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment.


    Thank you goes out to: Girisha Puttaswamy



    The workflow and custom task import:

    Screen Shot 2016-01-11 at 7.19.23 AM.png


    The workflow:


    Screen Shot 2016-01-11 at 7.20.08 AM.png


    The place the workflow zip file will be by default:


    Screen Shot 2016-01-11 at 7.20.47 AM.png


    Example run:


    Screen Shot 2016-01-11 at 7.22.20 AM.png



    Workflows or custom task with a "/" in the name could be an issue and the task/workflow may have to be re-named:


    Screen Shot 2016-01-12 at 9.36.36 AM.png


    The directory of the zip file on the UCSD appliance:


    Screen Shot 2016-01-12 at 10.18.41 AM.png

    A cron job could get this off to a FTP server or a file share on UCSD could work as well or set up a ssh task after this task and send the file off to an FTP server (or scp).



    Example when the workflow execution finishes:


    Screen Shot 2016-01-12 at 10.20.40 AM.png


    Scheduling the workflow:


    Screen Shot 2016-01-12 at 10.20.52 AM.png


    The schedule I set up in my lab:


    Screen Shot 2016-01-12 at 10.21.15 AM.png


    The resulting schedule:


    Screen Shot 2016-01-12 at 10.21.29 AM.png



    Update to the original workflow with FTP option example:


    Screen Shot 2016-01-12 at 1.38.59 PM.png


    The SSH content:



    Screen Shot 2016-01-12 at 1.39.11 PM.png


    The variable of the output file variable:


    Screen Shot 2016-01-12 at 1.05.10 PM.png


    FTP script on the UCSD server:




    # server login password localfile remote-dir


          echo "verbose"

          echo "open $1"

          sleep 2

          echo "user $2 $3"

          sleep 3

          shift 3

          echo "bin"

          echo $*

          sleep 10

          echo quit




            upload_script $1 $2 $3 put $4 $5 | /usr/bin/ftp -i -n -p




    if [ ! -f $BKFILE ]


      echo "Backup failed. "

      return 1


    export NEWFILE="workflow_backup_`date '+%m-%d-%Y-%H-%M-%S'`.zip"

    export FTPSERVER=

    export FTPLOGIN=cisco

    export FTPPASS=cisco




    exit 0