Update Command

Contents

◷ Reading Time: 5 minutes

The update command will run the process of updating an existing running app.

AWS Lambda

Firstly publish the updated project with the new Service Version. This should be different from the service version you have already deployed. The packageidentifier and its packageversion should be similar to the previous version.

Example

fr.exe publish --project "C:RepoOutputcalculator.frpj" --destination C:RepoOutputcalculator.frdp --profile "profile.xml" --includeassemblies true --packageidentifier appId --packageversion 1 --serviceversion 2 --method Package --runtime "C:RuntimeFolder" 

To update an existing app on the AWS cloud, you can use the command syntax below.

fr.exe update --to AWS --package <value> --includeAssemblies <value> --accesskeyid <value> --secret <value> --region <value> --bucket <value>--apiId <value> --function <value> --setasdefault <value>
  • to: This is the target environment to deploy the package; for time being AWS is the only available option.
  • package: Path to the updated .frdp package file to be deployed.
  • includeAssemblies: This can be either True or False. This determines whether or not to copy all the assemblies in the bin folder of the project to the destination.
  • accesskeyid: Access Key Id of AWS account.
  • secret: Secret for Access Key Id of AWS account.
  • region: Datacenter where the update is going to happen
  • bucket: The bucket name that your account has access to deploy the decision models.
  • apiId: AWS API Gateway ID.
  • function: Existing AWS Lambda function name to update.
  • setasdefault: By using this option with True value, it will set the version that you are about to publish as default.

To find apiId and function values of your running app, follow the instruction provided How to Deploy as an AWS Lambda – FlexRule Resource Hub

You can also use help function as a guide.

fr.exe --help update

Example

fr.exe update--to AWS --package C:RepoOutputcalculator.frdp --includeAssemblies true --accesskeyid YourAwsId 
--secret YourAwsSecret --region us-west-1 --bucket testbucket --function 133237533047452188 --apiId zj5nr7kxxx

Note that the default version does not specify a service version. We set it to the latest deployment version.

Azure

Firstly publish the updated project with the new Service Version. This should be different from the service version you have already deployed. The packageidentifier and its packageversion should be similar to the previous version.

Example

fr.exe publish --project "C:RepoOutputcalculator.frpj" --destination C:RepoOutputcalculator.frdp --profile "profile.xml" --includeassemblies true --packageidentifier appId --packageversion 1 --serviceversion 2 --method Package --runtime "C:RuntimeFolder" 

To update an existing app on the Azure cloud, you can use the command syntax below.

fr.exe update --to azure --package <value> --function <value> --subscriptionid <value> --tenantid <value> --clientid <value> --secret <value> --region <value> --resourcegroup <value> --plan <value> --setasdefault <value>
  • to: This is the target environment to deploy the package;
  • package: Path to the updated .frdp package file to be deployed.
  • function: The Azure Function Name.
  • subscriptionid: Azure Subscription Id
  • tenantid: Azure Tenant Id
  • clientid: Azure Client Id
  • secret: Azure client secret for authentication
  • region: Datacenter where the deployment is going to happen
  • resourcegroup: Azure resource Group to holds all the resources related to the deployment
  • setasdefault: By using this option with True value, it will set the version that you are about to publish as default.
  • plan: Azure service plan. Available options are SharedD1, BasicB1, BasicB2, BasicB3, StandardS1, StandardS2, StandardS3, PremiumP1, PremiumP2, PremiumP3, PremiumP1v2, PremiumP2v2, PremiumP3v2, PremiumP1v3, PremiumP2v3, PremiumP3v3- More information is on the URL

To find the function values of your running app, follow the instruction provided How to Deploy as an AZURE – FlexRule Resource Hub

You can also use help function as a guide.

fr.exe --help update

Example

fr.exe update --to azure --package C:\temp\c\output\1.frdp --function "CalcFunction" --subscriptionid "cbbaa004-9b53-xxx" --tenantid "99ee3352-0b2f-xxx" --clientid "14d412bc-xxx" --secret "R0_8Q~oUpninR2L2E7xxx" --region "West US" --resourcegroup Dev-Test --plan PremiumP1

Note that the default version does not specify a service version. We set it to the latest deployment version.

Updated on May 23, 2023

Was this article helpful?

Related Articles