Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ethereum Cookbook

You're reading from   Ethereum Cookbook Over 100 recipes covering Ethereum-based tokens, games, wallets, smart contracts, protocols, and Dapps

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789133998
Length 404 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Manoj P R Manoj P R
Author Profile Icon Manoj P R
Manoj P R
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started 2. Smart Contract Development FREE CHAPTER 3. Interacting with the Contract 4. The Truffle Suite 5. Tokens and ICOs 6. Games and DAOs 7. Advanced Solidity 8. Smart Contract Security 9. Design Decisions 10. Other Protocols and Applications 11. Miscellaneous 12. Other Books You May Enjoy

Using Azure Ethereum as a service

Azure offers cloud solutions to deploy and configure Ethereum consortiums with a simple single-click deployment through the Azure portal. In this recipe, you will learn how to deploy a flexible Ethereum network, consisting of a set of load-balanced transaction nodes, with which an application or user can interact to submit transactions, and a set of mining nodes to record transactions.

Getting ready

You will need an Azure subscription to create an Ethereum consortium. Other dependencies will be configured by the provider itself.

How to do it...

Follow these steps to create an Ethereum POW blockchain in Azure:

  1. Log in to the Azure portal and click on Create a resource from the left navigation bar.
  1. Select Create Ethereum Proof-of-Work Consortium under Blockchain.

Once you click Create, you can see a five-step wizard that will guide you through the setup process. The first step will ask you to choose a username, password, subscription, location, and so on. Provide the appropriate values and click OK:

  1. Step 2 will ask you to configure the regions in which the nodes should be deployed. For a simple network, one region should be enough.
  2. Step 3 is all about configuring the number of nodes that should be dedicated to mining and transactions. Mining nodes do all the heavy lifting of creating blocks, and transaction nodes take care of broadcasting the transaction from your application. Choose the number of nodes for each category and their respective configuration to meet your needs.
  3. Step 4 focuses more on the parameters of blockchain that you are about to create. You can compare it with the genesis file you will create during private network configuration.
  1. Once you are finished on the Ethereum settings tab, you can choose the Operations Management Suite for your Azure resource. Create a new one if you are new to Azure and creating resources for the first time.
  2. If everything goes well, then the verification process in the Summary tab will be successful and you can proceed to purchase the service.
  3. Read through the Terms and Conditions and click Create. This will start deploying your resources and can take a few minutes to finish.
  4. Once the deployment is finished, you can see your resources in the resource group that you created/selected. Select your resource group from the Resource groups tab in the left navigation bar and Deployments.
  5. This will display the set of deployments that has been created as part of Ethereum consortium's deployment. Select the deployment name that starts with microsoft-azure-blockchain-ethereum:
  1. Select output from the window, and now you can see the access credentials for the resources that you created:

These are some of the credentials you can use in the Azure blockchain service:

  • ADMIN-SITE: Admin portal that you can use to view the current node status and send Ether to newly created accounts
  • OMS-PORTAL-URL: Azure Operations Management Portal for your resources
  • ETHEREUM-RPC-ENDPOINT: Ethereum RPC port for you to interact with the blockchain you created
  • SSH-TO-FIRST-TX-NODE-REGION1: Credentials for connecting to a transaction node that is in the first region

How it works...

Steps 1 to 9 guide you through the process of creating a private Ethereum consortium using services offered by Azure. This will create and deploy multiple peers across various regions behind a load balancer for you to interact with. Steps 10 to 12 describe the process of using these services. This helps you understand various services and where to use them.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime