By Sally Khudairi, with Alex Karasulu and Lars Bøgild Thomsen.
Blueprints are quickly changing the process of application development and deployment —and the Subutai Blockchain-in-a-Box blueprint can take you from concept to executing Ethereum Smart Contracts in minutes.
Alex Karasulu (CTO and Founder of OptDyn, makers of Subutai) explains what makes blueprints so great:
Blueprints just rock! Users deploy an application at the press of a button into an existing or new environments. Subutai Blueprints let authors define an application once, and only once! Never do they have to go through defining it again. Plus authors can publish blueprints on the Subutai Bazaar so others can launch them with a button press. You can make serious amounts of GoodWill by publishing a tight blueprint. Minecraft server anyone? Hint hint …
The utility of the blueprints becomes most evident with the Blockchain-in-a-Box blueprint. It builds out an entire Solidity development environment with a private (or public) dedicate blockchain. It’s instant Blockchain-as-a-Service with steroids to get the developer going and fast. I hated having to deal with different versions and conflicts between Geth, Truffle … and all the other tools. What a pain to also deal with the infrastructure. When I need to go to town on a new contract I just fire up a new environment. The nice part is I can access my environment to continue developing from anywhere on any one of my machines at home or on the go.
Seriously though, when designing the blueprint feature, we wondered if we should take the Dockerfile approach, but then saw we need more power for proper devops and flexibility based on user needs. Blueprints had to be idempotent to perpetually update applications as environments change. Why reinvent the wheel right? We already have templates for containers, so the blueprint needed much more than a Dockerfile for templating a single host. It had to describe an entire application stack in a distributed P2P environment.
Personally I love the patterns Vagrant uses. I wanted blueprints to be like (more declarative) Vagrantfiles for entire virtual private cloud environments and application stacks. I dreamed of being able to do something like this:
`vagrant up`
And have it provision my blueprint right there and then like I do for single virtual machines using vagrant. Then I thought, “heck why not just do exactly that. We can write a Vagrant Plugin for Subutai.”
Well that day has come and it is glorious. So in any folder containing a Subutai.json blueprint, just run the command above to provision, meaning, build out that entire environment in a single virtual machine serving as a local or hub connected peer. This means you can check out projects from the GitHub having a Subutai.json file to launch an entire P2P cloud environment with a ready to go stack. The same blueprint can be exposed on the Subutai Bazaar for your projects. The Bazaar has GitHub integration that allows you to launch environments using your own blueprints, and version them. You can publish your blueprints on the Products page at the Bazaar too so others can use them as well.
So blueprints not only work inside the Bazaar, but they work with awesome developer and sysadmin tools like Vagrant. Next week we’ll be releasing our Ansible Module for Subutai specifically for system administrators to deploy armies of remote peers at the press of a button. In the meantime, everyone is welcome to sign up at our Blueprint Hackathon where all paricipants get GoodWill and prizes for blueprints. Feel free to PR us with your favorite application to add to the wish list of application blueprints for the hackathon. We have great docs (RTD integrated into our Website), and our community is ready to help out on our Slack if you have any questions.
Just last week, Alex imagined bringing Blockchain-as-a-Service (BaaS) functionality to blueprints with an all-inclusive developer environment for writing Solidity Smart Contracts and testing them on a private Ethereum network…and the idea for Blockchain-in-a-Box was launched.
With Alex’s vision on the board, OptDyn Senior Engineering Lead Lars Bøgild Thomsen began to design the blueprint. Mere days later, Blockchain-in-a-Box was born!
Here Lars describes the process on how to get started using just a browser and an Internet connection.
The hardest part? Waiting for the initial build —after all, this is an entire desktop system in a container. Once that’s complete, you’re on your way to writing Dapps in minutes! To quote Lars, this is possible “Only with Subutai!” [Watch Lars’s walkthrough below]
We hope you enjoy Subutai blueprints as much we do, and look forward to hearing your success on the Subutai Slack. Happy building!
Follow @Subutai_KHAN and stay tuned to the latest news from the horde.
# # #