Deploy Blockchain Workbench
Blockchain Workbench allows you to deploy a blockchain ledger along with a set of Azure services used to build a dapp. Once deployed, Blockchain Workbench provides access to client apps to create and manage users and blockchain applications.
The following steps highlight on how to deploy blockchain workbench:
- Sign in to the Azure portal. If you don't have an account, create one and select a suitable service/subscription plan. You can try the "free plan" for 30 days to test the waters.
- In the left pane, select Create a resource. Search for
Azure Blockchain Workbenchin the Search the Marketplace search bar. Select Azure Blockchain Workbench and then Create
- Complete the basic settings and click OK, the wizard offers help text on each setting.
- In Advanced Settings, choose if you want to create a new blockchain network or use an existing blockchain network. To create a new blockchain network, select Create New option under Blockchain Network and then choose the Azure Blockchain Service Pricing Tier and Azure Active Directory Settings. To use an existing blockchain network, select Use Existing under Blockchain Network and set the Ethereum RPC Endpoint. Then choose Azure Active Directory Settings and change the VM Selection options if you need to. Click OK to finish the Advanced Settings.
- Check your settings are correct and click OK to deploy your Azure Blockchain Workbench.
Once the deployment of the Blockchain Workbench has completed (which can take around 90 minutes), it creates a new resource group with your Blockchain Workbench resources. You access Blockchain Workbench services through a web URL.
The following steps show you how to retrieve the web URL of the deployed framework:
- In the left-hand navigation pane, select Resource groups
- Choose the resource group name you specified when deploying Blockchain Workbench.
- Select the TYPE column heading to sort the list alphabetically by type.
- There are two resources with type App Service. Select the resource of type App Service without the "-api" suffix.
- In the App Service overview screen, copy the URL value, which represents the web URL to your deployed Blockchain Workbench.
Azure Active Directory (AD) configuration
Azure Blockchain Workbench requires Azure AD configuration and application registration. You can choose to do the Azure AD configurations manually before deployment or run a script post-deployment. If you are redeploying Blockchain Workbench, read Azure AD configuration to verify your Azure AD configuration.
Deploy Blockchain applications
To create a blockchain dapp read the previous tutorials in this series on how to create a full-stack dapp.
Deploying the dapp to Azure needs a JSON configuration file to represent the workflow, application roles and interaction with the blockchain application. View a sample configuration file here and find more documentation here.
To create a new contract, you need to be a member specified as a contract initiator. For information defining application roles and initiators for the contract, see workflows in the configuration overview. For information on assigning members to application roles, see add a member to application.
To add a blockchain application to Blockchain Workbench, you upload the configuration and smart contract files to define the application.
- In a web browser, navigate to the Blockchain Workbench web address which is in the format
- Sign in as a Blockchain Workbench administrator to assign roles to users.
- Select Applications > New, which displays the New application pane.
- Select Upload the contract configuration > Browse to locate the configuration file you created. The configuration file is automatically validated. Select the Show link to display validation errors. Fix validation errors before you deploy the application. Repeat the same for smart contract code file by selecting Upload the contract code > Browse to locate the smart contract code file.
- Click Deploy to create the blockchain application based on the configuration and smart contract files.
Deployment of the blockchain application takes a few minutes. When the deployment is finished, it displays the new application in Applications.
Modifying a smart contract
Depending on the state the contract is in, members can take actions to transition to the next state of the contract. Actions are defined as transitions within a state. Members belonging to an allowed application or instance role for the transition can take action.
- In the Blockchain Workbench application section, select the application tile that contains the contract to take action.
- Select the contract in the list, and this displays details about the contract in different sections.
- In the Action section, select Take action.
- This displays the details about the current state of the contract in a pane. Choose the action you want to take in the drop-down.
- Select Take action to initiate the action.
- If the action requires parameters, specify the values for the action.
- Select Take action to execute the action.
With active directory support and the permissions it brings, Azure's blockchain support aims itself at enterprise users looking to use Blockchain in their businesses. It offers graphical management of contracts and actions upon them, and a way to update and deploy them, again with permissions to determine who can take these actions. Its setup is not for the faint-hearted, but sign up for a free trial to see if it suits your use-case.