visit
As web3 engineering grows in complexity, there is an increasing need for DevOps practices and philosophies that have proven proficiency with web2 apps at scale, sometimes to billions of users.
In this article, we’ll explore how DevOps—an engineering philosophy that facilitates fast and efficient collaboration, maintenance, and release of software—works in web3. We’ll walk through tools that you can use as-is from traditional software engineering, and we’ll look at offerings that are specifically intended for end-to-end blockchain application development.
DevOps is a software-development philosophy that emphasizes collaboration, communication, and integration between various engineering stakeholders.
Used well, DevOps can drastically increase the speed and quality of software development as well as the reliability and resilience of the systems being developed. DevOps creates a unified pipeline that facilitates efficient coding and testing, continuous delivery, robust releases, monitoring, and planning.
Given the many complex operations DevOps brings together, it tends to require separate tools for each component. As a result, there is an extremely mature ecosystem of DevOps tools available for web3 engineers.
There are, however, nuances associated with web3 that don't translate from web2. One such case is the use of a public, decentralized ledger as a backend as opposed to private, centralized databases. Fortunately, web3-specific DevOps tooling is growing rapidly, thanks to companies like ConsenSys which provides the essential tools for every stage of development to streamline web3 engineering.
As stated earlier, web3 DevOps is a mixture of traditional web2 engineering tools and offerings that cater to web3’s unique needs. In this section, we’ll survey the tools available for each component of the DevOps pipeline. Let’s walk through some of the DevOps stages and see how they look in web3:
Perhaps the most obvious and visible component, the build or development team is responsible for creating new features, improving existing features, fixing bugs, and documenting code.
Blockchain engineering usually entails the creation of special programs called smart contracts that run on top of a blockchain. As a result, a unique set of tools is required for building such apps. There are many development environments available, such as , that facilitate this. However, the most popular and robust option available is the .
The Truffle suite allows developers to work seamlessly with web3 components such as wallets, chains, and node providers. Some of the things you can do with Truffle include:
Other options include and for EVM smart contracts, for Solana, and the for Flow.
Testing is a critical component of web3 DevOps, as it helps ensure the quality and reliability of the software. This is even more critical with web3, where you often deal with contracts that are immutable and extraordinarily expensive to deploy and maintain.
There are several types of testing that may be used in a DevOps environment including unit, integration, functional, and performance testing. In the case of web3 (and more specifically blockchain), unit testing and integration testing are perhaps the most important. The former involves testing individual units or components of the software to ensure that they are working correctly. The latter is more focused on how different components of the software work together.
Developers/Ops engineers are often advised to set up a local instance of a blockchain for testing before deploying it to a public network. One of the most popular tools that allows us to do this is . Since Ganache is maintained by the same development team, it seamlessly integrates into the Truffle suite.
Tests are usually written the same way as in web2, using libraries like and . also has built-in support for tests.
By their very nature, smart contracts tend to be immutable and unforgiving of critical security flaws. As a result, the degree of web3 security testing is much higher than what is expected out of a traditional web2 project. If the contract is expected to handle a large amount of money and/or assets, it is strongly suggested that external security audits be conducted in addition to the testing mentioned above.
Continuous Integration and Continuous Delivery, often abbreviated as CI/CD, involves automating the build, test, and deployment process for software updates and new features.
Once the development team publishes new code to the repository, the CI component integrates the code into the codebase to ensure there are no breaking changes. Once the changes are deemed satisfactory, a new build is triggered (by the CD tool) and deployed to the various environments (typically staging and production).
Although certain tests and testing environments may be different when working with web3 dapps, Truffle works exceptionally well with traditional CI/CD tools such as Gradle, , and .
Some of the things these tools offer out of the box include:
As mentioned above, installation and setup of your chosen tool is almost identical to any other software engineering project, with enterprise support available when needed.
Monitoring, like its sister components, also ensures the performance and reliability of systems. It does this by tracking the health and performance of systems, and by identifying and resolving issues in a timely manner.
Key aspects of monitoring in DevOps include collecting and storing log data from systems, configuring systems to send alerts when certain conditions or thresholds are met, and dashboards that display real-time performance and health of systems.
When dealing with dapps, we are interested in monitoring both the overall health of the blockchain as well as activity and incidents that are specific to our smart contracts. Leading node providers like present both these macro and micro assessments via readily accessible APIs and dashboards.
In the case of general blockchain, Infura provides APIs you can use to access any information relevant for that particular blockchain. Some of the web3 information you might want to monitor includes:
If you’re using Infura’s nodes, they will also give you detailed information on the health of your smart contract/dapp, how much traffic Infura is witnessing, how many users are interacting with it, etc.
Planning and feedback ensure that the entire development process is aligned with business goals and priorities, and that timely progress is being made. This includes agile planning using methodologies like Scrum and Kanban, mechanisms that facilitate continuous feedback, and metrics that track progress and identify areas for improvement.
Most of the tools used for planning and feedback in traditional software engineering, such as , Trello, Slack, and , can be used in web3 development as well. For blockchain-specific metrics, you can continue to use the monitoring tools highlighted in the previous section (for example, Infura).
As web3 and blockchain engineering grow in complexity, they require large teams to collaboratively deliver results quickly and efficiently. Therefore, the DevOps philosophy has become as integral to web3 engineering teams as it has been for traditional software.
Web3 engineers will find that existing DevOps tools work very well for their use cases, and the ecosystem of tools coming up to serve the nuances of web3 is also growing all the time.
Also published .