Skip to end of metadata
Go to start of metadata

Given below are the commonly used commands in the WUM tool. For a list of WUM exit codes, click here.

WUM gives verbose, user-friendly output for the commands, but there is also a template mode that gives script-friendly output. In the template mode, in addition to the standard output, you can also define your own.

The template mode is implemented using Go template and is available only for selected commands.

wum init

Before you install updates to your products, you download and initialize WUM. This creates the <user_home>/.wum3  directory in the following location:

  • On Linux/OS X: ~/.wum3
  • On Windows: C:\users\<username>\.wum3

This directory contains the following:

  • LocalUpdate Repository (<user_home>/.wum3/update): Stores all updates (for all products) that are done using WUM.

  • LocalProduct Repository (<user_home>/.wum3/product): Stores all WUM-updated product distributions and the ZIP files generated by the  wum diff command.

  • config.yaml file: Contains information about your WUM installation. It is not recommendedto edit this file.
wum init  
// The tool prompts for the email address and password.

wum init -u <email-address> -p <password>
// If your password has the $ sign, escape it using '\'. For example, if your password is 123$abc, you should enter 123\$abc. This is because the $ sign is used for variables in BASH.

wum init --username <email-address> --password <password>

wum search


// To search for latest products.
wum search
wum search --all

// To search for products with "am" in the name.
wum search am

wum add

// To download the latest product.
wum add wso2mb

// To download a given product name and version.
wum add wso2mb-3.2.0

// To add from the local machine.
wum add --file <file-path>

In the template mode, you can get a script-friendly output as follows. The template parameter of this command is Location.

// To display all the parameters that come in the template mode by default. In this case, it is the location that the product is added to.
wum add wso2mb --default-template -y
wum add --file <file-path> --default-template -y

// To display a selected parameter in the output.
wum add wso2mb --template {{.Location}} -y 

wum check update

// To check for updates for the default channel.
wum check-update wso2mb-3.2.0

// To check for updates for a given channel (e.g., 'full channel).
wum check-update wso2mb-3.2.0 full

In the template mode, you can get a script-friendly output as follows. The template parameters of this command are ChannelAllUpdatesSecurityUpdatesMessage, and ProductList.

// To display all the parameters that come in the template mode by default. 
wum check-update --default-template
wum check-update wso2sp-4.3.0 --default-template

// To display the product list that has updates.
wum check-update  --template {{.ProductList}}

// To display the channel of the product that has updates.
wum check-update wso2sp-4.3.0 --template {{.Channel}}


// To define your own output.
wum check-update wso2sp-4.3.0 --template '{{.Channel}} has {{.AllUpdates}} number of updates'

wum update

// To update the product via the default channel.
wum update wso2mb-3.2.0

// To update the product via the 'full' channel.
wum update wso2mb-3.2.0 full

// To update the product (via the default channel) with the updates available upto a given timestamp (epoch timestamp in milliseconds).
wum update wso2mb-3.2.0 -t 1543434669328 

// To update the product (via the 'full' channel) with the updates available upto a given timestamp (epoch timestamp in milliseconds).
wum update wso2mb-3.2.0 full -t 1543434669328

In the template mode, you can get a script-friendly output as follows. The template parameters of this command are ChannelAllUpdatesSecurityUpdatesMessage, and ProductList.

// To display all the parameters that come in the template mode by default. 
wum update --default-template
wum update wso2sp-4.3.0 --default-template

// To display the product list that has updates.
wum update  --template {{.ProductList}}

// To display the number of updates that was done to a given product.
wum update wso2sp-4.3.0 --template {{.AllUpdates}}


// To define your own output.
wum update wso2sp-4.3.0 --template '{{.Channel}} has {{.AllUpdates}} number of updates'

wum diff

// To get the updates between two packs.
wum diff <distribution-1.zip> <distribution-2.zip>

In the template mode, you can get a script-friendly output as follows. The template parameters of this command are Updates and Location.

// To display all the parameters that come in the template mode by default.
wum diff <distribution-1.zip> <distribution-2.zip> --default-template

// To display the location of the ZIP file with the difference of the two distributions.
wum diff <distribution-1.zip> <distribution-2.zip> --template {{.Location}}


// To define your own output.
wum diff <distribution-1.zip> <distribution-2.zip> --template '{{.Location}} and {{.Updates}}'

wum version

// To get the version of the wum-client
wum version

In the template mode, you can get a script-friendly output as follows. The template parameters of this command are WumVersionReleaseDateOSArchitecture, and GoVersion.

// To display all the parameters that come in the template mode by default.
wum version --default template

// To get the version of the wum-client.
wum version --template {{.WumVersion}}


// To define your own output.
wum version --template '{{.WumVersion}} is released on {{.ReleaseDate}}'

wum describe

// To describe all the products in wum-home.
wum describe  

// To describe wso2mb products in wum-home.
wum describe wso2mb

// To describe wso2mb-3.2.0 products in wum-home.
wum describe wso2mb-3.2.0

// To describe wso2mb products that are subscribed via the 'full' channel.
wum describe wso2mb full 

// To describe wso2mb-3.2.0 products that are subscribed via the 'full' channel.
wum describe wso2mb-3.2.0 full

// To describe a specified product in the repo.
wum describe <distribution-1.zip>

wum list

// To list the all products in wum-home.
wum list

// To list wso2mb products in wum-home.
wum list wso2mb

// To list wso2mb-3.2.0 products in wum-home.
wum list wso2mb-3.2.0

// To list wso2mb products that are subscribed via the 'full' channel.
wum list wso2mb full

// To list wso2mb-3.2.0 products that are subscribed via the 'full' channel.
wum list wso2mb-3.2.0 full

In the template mode, you can get a script-friendly output as follows. The template parameter of this command is ProductList.

// To display all the parameters that come in the template mode by default. In this case, it is just ProductList.
wum list wso2mb-3.2.0 --default-template

// To display a selected parameter in the output.
wum list wso2mb-3.2.0 --template {{.ProductList}}


// To define your own output.
list wso2mb-3.2.0 --template 'The product list is {{.ProductList}}'

wum delete

// Prompt to delete all the products in wum-home.
wum delete
  
// Prompt to delete wso2mb products in wum-home.
wum delete wso2mb

// Prompt to delete wso2mb-3.2.0 products in wum-home.
wum delete wso2mb-3.2.0

// Prompt to delete wso2mb products that are subscribed via the 'full' channel.
wum delete wso2mb full

// Prompt to delete wso2mb-3.2.0 products that are subscribed via the 'full' channel.
wum delete wso2mb-3.2.0 full

// Prompt to delete a specified product in the repo.
wum delete <distribution-1.zip>

wum config

// To change the location of the local product repository.
wum config local.product.repo ~/work/wso2/products

// To change the default channel.
wum config defaultchannel security

wum exit codes

Here are the exit codes of WUM:

ErrorExit Code
Command successfully executed0
Connection failures5
Errors in files system6
Errors reported from the server7
Errors reported from the API Manager8
Every other instance not mentioned above1
  • No labels