The complete solution code is available in the ch2 folder, available at the https://github.com/PacktPublishing/Hands-On-IoT-Solutions-with-Blockchain.git repository.
Make sure that you have also installed Cloud Foundry CLI and Bluemix CLI; the installation process for these command-line interfaces is described at https://console.bluemix.net/docs/cli/index.html#overview.