This is a guest article written by Peter Jaap Blaakmeer from elgentos
Hypernode Brancher is a tool developed by Hypernode that allows developers to create an exact duplicate of a production (or development) Hypernode. An API is provided to automate the duplication of the Hypernode, making it easy to implement this into a CI/CD pipeline.
Hypernode has always offered a way of hosting a staging site on the production Hypernode, but we always felt that was playing fast and loose with the live system. Having an isolated environment eliminates the risk of changing the database or code on the live system, making it much safer to test new features, for us as development agency as well as for the client.
Previous implementation by elgentos
Almost 5 years ago, we at elgentos decided to build a CI/CD pipeline that allowed us to create disposable testing environments. This allows us to work on a feature in a separate Git branch and push that Git branch to a completely isolated environment.
For the past years, we have used virtual machines on Google Cloud Platform to set up a copy of the shop that resembles the live system as closely as possible. We did that using the Hypernode Docker container provided by Hypernode. Our pipeline creates a virtual machine, starts the Docker container and it pushes the code in the Git branch to that instance. It then imports an anonymized database (created by our tool Masquerade) and makes the shop available for the outside world. The client is then automatically notified of a deployment, including a URL and a random generated user/password combination for the admin.
After the feature has been approved and the merge request has been merged, the environment is automatically removed.
Migrating over to Hypernode Brancher and its benefits
In the past few months, we have been migrating our clients over to use Hypernode Brancher instead of the Google Cloud virtual machines. The biggest benefit of this is that the testing environment is an exact copy of the original Hypernode. Where the Docker container used previously still had some quirks and was lacking some tools and services that were available on the real Hypernodes, the Hypernode Brancher environments offer all the features the real Hypernode has.
This allows our developers to test their code in a realistic environment without affecting the live system. It also helps them identify any potential issues before they are deployed to the live system, thus reducing downtime and ensuring that any changes made are safe and secure. Having an exact clone of the live system makes it easier for our developers to replicate bugs and errors, allowing them to quickly fix any issues on the live system.
Making a new Brancher node takes about 5 minutes, which is faster than our previous process of creating a VM and pushing all data to that environment. So as an extra benefit, we have a quicker CI/CD pipeline.
The deployment of Magento to the Hypernode also uses a lot less lines of code, since we merely have to adjust the production settings to the review environment settings instead of creating this configuration altogether.
Another benefit for us is that the administrative task of billing the client for the review environments is now done by Hypernode. Hypernode Brancher is billed by the minute, so the faster a client tests their new feature, the less they have to pay. Great incentive, if you ask us 😉
Performing Brancher actions
To list, create and remove Hypernode Branchers, you can log in to the production Hypernode and use the `hypernode-brancher` tool there. You can also use our CLI tool written in PHP to perform these actions from your local machine. You’ll have to enable CLI access in My Hypernode and get the Hypernode API token found on your production Hypernode in `/etc/hypernode/app.json`.
Setting up CI/CD for your agency
If you run an agency, use Gitlab and are interested in implementing this CI/CD pipeline with Hypernode Brancher support, you’re in luck because we can set this up for you. For more information, see https://magecicd.com.
About elgentos
Elgentos is a small agency with a strong focus on building fast B2B e-commerce solutions using Magento. Elgentos is known for its expertise in Magento development and has a track record of working with a diverse range of clients across various B2B verticals. They aim to deliver high-quality, scalable, and efficient e-commerce solutions to help businesses succeed in the online marketplace. They do this using tools provided by partners like Hypernode, Hyvä, Mollie, Tweakwise, Sansec and RUMvision.
Hi! My name is Dion, Account Manager at Hypernode
Want to know more about Hypernode's Managed E-commerce Hosting? Schedule your online meeting.
schedule one-on-one meeting +31 (0) 648362102