cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

UCSD - File Upload example (Fileupload)

4271
Views
1
Helpful
21
Comments
Task Name

File Upload

Description

1

Prerequisites
  1. Tested on 5.4 beta
  2. Tested on UCSD 6.0 (see side notes)
  3. Tested on 6.0.1.1 this does not work (bug is filed)
  4. This is part of UCSD 6.5 Alpha and I have tested it.
CategoryWorkflow
ComponentsvSphere 5.x
User Inputs
  1. userid to change to
OutputInstructions 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.

Please remember there is a security aspect to this posting!

Steps:

1      Extract the zip file and upload the jar to /opt/infra/inframgr

2       Edit run.sh and update the class path with the jar name ‘fileupload.jar’


[root@CUCSD_Primary inframgr]# cat run.sh

java -Xms4096m -Xmx4096m -XX:MaxPermSize=512m -Djava.security.manager -Djava.security.policy=security.policy -cp .:fileupload.jar:inframgr.jar:google-gson.jar:java-xmlbuilder-0.6.jar:vmguest.jar:vim25-wsdl.jar:vijava60compat.jar:vijava55b20130927.jar:ssoclient-wsdl.jar:srm.jar:pbm-wsdl.jar:jaxen-1.1-beta-6.jar:dom4j-1.6.1.jar:velocity-1.6.2.jar:velocity-1.6.2-dep.jar:jclouds-vcloud-1.0-beta-7.jar:jclouds-terremark-1.0-beta-7.jar:jclouds-scriptbuilder-1.0-SNAPSHOT.jar:jclouds-log4j-1.0-beta-7.jar:jclouds-jsch-1.0-beta-7.jar:jclouds-core-1.0-beta-7-jar-with-dependencies.jar:jclouds-compute-1.0-beta-7.jar:vcloud-java-sdk-1.5.0.jar:rest-api-schemas-1.5.0.jar:syslog4j-0.9.43-bin.jar:maverick-all.jar:slf4j-log4j12-1.7.6.jar:slf4j-api-1.7.6.jar:ss_css2.jar:pd4ml.jar:ojdbc14.jar:classes12.jar:manageontap.jar:mysql-connector-java-5.1.24-bin.jar:mongo-java-driver-2.11.3.jar:log4j-1.2.15.jar:jxl.jar:junit-4.9b2.jar:json-lib.jar:joda-time-1.6.jar:jfreechart-1.0.13.jar:jcommon-1.0.16.jar:smtp.jar:mailapi.jar:javassist.jar:jssc.jar:guava-15.0.jar:google-gson.jar:flexlm.jar:Vendor_info.jar:EccpressoAll.jar:ehcache-core-2.6.6.jar:aws-java-sdk-1.4.3.jar:jdo2-api-2.3-eb.jar:datanucleus-rdbms-3.0.0-release.jar:datanucleus-core-3.0.0-release.jar:datanucleus-cache-3.0.0-release.jar:datanucleus-api-jdo-3.0.0-release.jar:asm-3.1.jar:ucsd-rest-api-sdk-v2.jar:cuic-client.jar:bonecp-0.8.0.RELEASE.jar:servlet-api.jar:commons-validator-1.4.0.jar:commons-pool-1.6.jar:commons-pool-1.3.jar:commons-net-3.1.jar:commons-logging-1.1.jar:commons-lang-2.2.jar:commons-io-2.0.1.jar:commons-dbcp-1.4.jar:commons-configuration-1.3.jar:commons-compress-1.9.jar:commons-collections-3.2.jar:commons-logging-1.1.jar:httpmime-4.1.3.jar:httpcore-4.1.4.jar:httpclient-4.1.3.jar:commons-httpclient-3.1.jar:commons-codec-1.3.jar:commons-codec-1.7.jar:wsdl4j-1.5.1.jar:saaj.jar:jaxrpc.jar:commons-logging-1.0.4.jar:commons-discovery.jar:commons-discovery-0.2.jar:axis.jar:XmlSchema-1.4.3.jar:xalan.jar:commons-logging.jar:commons-httpclient-3.0.1.jar:commons-codec-1.3.jar:stax-api-1.0.jar:jaxb-api-2.0.jar:geronimo-jta_1.0.1B_spec-1.0.1.jar:geronimo-jms_1.1_spec-1.1.1.jar:geronimo-j2ee-management_1.0_spec-1.0.jar:commons-logging-1.1.jar:activemq-jaas-5.2.0.jar:activemq-core-5.2.0.jar:activation-1.1.jar:vision-api-2.5.3.0.jar:iControl.jar: com.cloupia.service.cIM.inframgr.InfraMgrMain $*


3       Restart UCSD

4       Execute the custom-workflow ‘RegisterFileUploadInputType’.

          It will register the new input type ‘file upload’. Use this type file uploading.    

5       Execute the workflow ‘execute file upload’.

Unknown.png

For UCSD 6.0 please place the fileupload.jad file into /opt/infra/inframgr/.

Then rename the file to:

          mv fileupload.jar patch-fileupload.jar

Restart UCSD application (shelladmin option 3 and 4)

Run the register workflow. (there is  now a check box to have the workflow execute on UCSD startup)

Note:

     all patch-<filename>.jar files are picked up automatically by inframgr.

Comments
Cisco Employee

In a mulit-node environment, does the .jar file need to be added to run.sh on the service nodes as well?

Cisco Employee

No just the primary engine since the GUI is on that and this is a GUI jar file.

Cisco Employee

I've followed the procedure explained above but i'm not getting the Browse button when i execute the fileuploadtask.

I'm using UCSD6.

I've placed the fileupload.jar in the correct path and tried to copy the file with root user which didn't work as well as changing ownership of the file to ucsdu ucsdg didn't help.


Cisco Employee

For UCSD 6.0 please place the fileupload.jad file into /opt/infra/inframgr/.

Then rename the file to:

          mv fileupload.jar patch-fileupload.jar

Restart UCSD application (shelladmin option 3 and 4)

Run the register workflow. (there is  now a check box to have the workflow execute on UCSD startup)

Cisco Employee

Thanks it worked!

BR,

Yakov Shtoots

Cisco Employee

A bug has been filed on this and should be resolved in the next patch.

Beginner

For UCSD 6.0.1.1 build 60440 I tried the fileupload.jar file into /opt/infra/inframgr/

I edited runprod.sh and update the class path with the jar name ‘fileupload.jar’.

Then rename the file to:

          mv fileupload.jar patch-fileupload.jar

Restart UCSD application (shelladmin option 3 and 4)

Run the register workflow. (there is  now a check box to have the workflow execute on UCSD startup 'Always execute during System initialization')

But then none of my workflows would start. I had to revert to the original version of runprod.sh and delete patch-fileupload.jar to get working again.

Cisco Employee

FYI..this should be all that is needed

For UCSD 6.0 please place the fileupload.jad file into /opt/infra/inframgr/.

Then rename the file to:

          mv fileupload.jar patch-fileupload.jar

Restart UCSD application (shelladmin option 3 and 4)

Run the register workflow. (there is  now a check box to have the workflow execute on UCSD startup)

Cisco Employee

I am about to patch to 6.0.1.1 and make sure I ftp my file as binary and re-check.

Community Member

We are having issues running the task "File Upload".

We are running UCS Director 5.5.0.1 build 55534.

We installed both FileUpload.wfdx and fileupload.jar according to the directions.

After "3. Restart UCSD" (We restarted the service and did not reboot the host), we do see the "RegisterFileUploadInputType" in the "Workflows" tab. However, we do not see the "execute file upload" in the "Workflows" tab or in the "Custom Workflow Inputs" tab or in the "Custom Workflow Tasks". I do see "FileUploadTask" in the "Workflows" tab and when I run this workflow I do not see a browse button.

This issue seems very similar to what "yshtoots" reported on Oct 3.

I'm wondering if I need to perform the same fix that was presented ... or if there is another way to resolve?

Cisco Employee

Dod you do step #2?

Edit run.sh and update the class path with the jar name ‘fileupload.jar’



Just as an FYI - UCSD 6.5 Beta is coming out either today or tomorrow and this is now standard in the product :-)


Community Member

Orf-

Thanks for the quick reply.

That's good news regarding this feature in 6.5!

Yes, I made the edit to run.sh for fileupload.jar.

I did not run "run.sh" after the edit ... I restarted the service : 3-stop + 4-start.

Should I have executed "run.sh" after editing?

Sincerely,

-Eric

Cisco Employee

stop and start is the right thing to do .

Cisco Employee

up to UCSD 6.0 the steps 1-5 worked.  In UCSD 6 the jar files get read in automatically from the directory.  In 6.0.0.1 and 6.0.1.0 the file up load was broken in the GUI.

Community Member

Orf-

Right now we are running UCS Director 5.5.0.1 build 55534.

Does this code work in 5.5?

Sincerely,

-Eric

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.