Sandboxes are isolated, full-stack environments that act as a run button for your repository. They provide a unique URL under which your app is running.
They’re a replacement for test, stage & preview servers. In other words, teams get automatic test environments per feature or bugfix without managing the orchestration.
Sandboxes make it easy for everyone to see the impact of a change before it goes to production.
- Empower teams with end-to-end visibility throughout the development process
- PMs, Designers & Clients can interact with features in development and identify issues & provide feedback earlier
- Cross-team changes can be validated by connecting sandboxes to other services in co-development
Why Sandboxes are better than servers, droplets, or VMs
- Instantly sharable: Share sandbox URLs for feedback, approval or validation with Designers, Product Managers & Owners and Testers without any configuration or setup costs
- No configuration: Buddy detects what’s inside the repository and runs most frameworks and stacks without any configuration with a click
- Insanely fast: There is no provision time. Apps are run immediately
- NoOps: Sandboxes are created automatically for branches or Pull Requests. No more DevOps work required to set up environments
- Cost-effective: Isolation with full server features like root and terminal access at a fraction of the cost
- Disposable: Quick to run, quick to kill
How Sandboxes work
Once you open a new Git branch, Buddy creates a new sandbox – the isolated environment for the branch.
If it’s the first sandbox in a project, Buddy will try to guess as much as possible about your app and ask you as little as possible about its settings & configuration.
If there is already an existing, working sandbox, Buddy will clone its settings and data used by services (ex: MySQL, MongoDB, Elastic) as a base to run the sandbox for another branch.
What you get
- Isolated environments with independent databases and other stateful services
- Always fresh as they are rebuild on code change pushed to a branch
- Full root/sudo access via terminal and full file system access via a file browser
- No infrastructure to manage
Tutorial: How to get started with Sandboxes
Sandboxes support most web app stacks and frameworks out of the box. For this tutorial needs, we will use an Admin dashboard template based on Angular 4+ & Bootstrap 4: ngx-admin.
INFO: We’ve just forked https://github.com/akveo/ngx-admin to our Github account. You can do the same to skip any code setup & preparations. You can also use any repository to plug-in to Buddy.
A new Buddy project
Create a new Buddy project and select your forked ngx-admin repository.
Buddy will start downloading the Github’s repository to your Buddy workspace.
Go to the Sandboxes
Once the Github synchronization is over, Buddy will display a welcome screen showing that it detected an Angular application.
The first screen is about deployment automation pipelines (that we don’t cover in this guide). Jump to the Sandboxes tab instead.
Launch the Sandbox
The Sandboxes tab will list all branches that are in the repository. To run a sandbox for a branch, click on its name. In our case it will be the
Once clicked, Buddy will ask about the application basics. It’s already detected that it’s an Angular app which is using npm for dependencies. In that case, you don’t need to configure anything else here.
Note: The ngx-admin requires 2 GB of RAM to run so we need to change the default setting from 512M to 2048M and click Launch.
Upon the launch Buddy will open the sandbox where we can see our application starting via a detailed view into the building logs.
The first sandbox run can take 1-3 minutes. Any other will be launched much quicker. When the sandbox initialization has completed, the running application will replace the building logs.
Playing with the Sandbox
The Sandbox panel is divided into two sections: the sandbox management bar pinned to the top, and the application view.
Overview of the sandbox management bar
The sandbox management & configuration is divided into several tabs. In our case, we didn’t have to do anything to run the ngx-admin demo as Buddy has detected and configured everything for us.
Sometimes, when it comes to more customized applications, you may be required to adjust the default settings.
Provide everything that’s required by your application to run: packages to be installed during the sandbox’s booting to prepare the environment for build commands, like task runners (ex: Gulp, Jenkins, npm), and finally the Run command that will execute the application itself.
Connect services like MySQL, MongoDB, Elastic and many others to the sandbox to create the full stack requried by your application.
App & Env
Type of the applicaiton and its run details, like Port or required RAM.
Full root access to the sandbox environment once it’s running. Use it like you would on any other server.
Development & collaboration with Sandboxes
Keeping the Sandboxes fresh
Once new commits are pushed to a branch, Buddy will automatically recreate the sandbox with the updated version. No action is needed on your end.
Create another sandbox for a new feature
When your first sandbox is fully running an application, its configuration, settings & data can be used for another branches.
Let’s create a new branch with a new ngx-admin design. In our case, we created a new branch called
ngx-admin-light and pushed it to the repository.
Buddy automatically detected the new branch and made it ready to be run in a sandbox.
Now, let’s run the
ngx-admin-light branch in a sandbox by clicking its name. As a result, Buddy will ask if we want to clone the existing sandbox as a base for the new sandbox (including its configuration and services data like MySQL), or start from scratch. In our case we will clone the
The new sandbox is now launched. Its initialization is much quicker than during the first time, as Buddy caches as much as possible to make things nearly instant.
Share Sandboxes with others
Once a sandbox is active, it’s possible to share its URL with the outside world.
INFO: The shareable URL doesn’t have the sandbox management bar and doesn’t require being logged in to your Buddy workspace.
Running custom applications
Sometimes Buddy can’t be sure what’s exactly in the repository. In that case, you will be asked to help it with configuration.
First, Buddy will ask what’s in the repository:
Then, a configuration wizard will be displayed for the particular application type. Here are a few examples:
If your applicaiton utilizes Docker, you can go with the Dockerfile-based configuration.
Streamline your development workflow with Sandboxes
Now when we covered the basis, you are ready to bring the Sandboxes to your development workflow.
Try it and discover how big a game changer they are for a web development.
TIP: Currently, the Sandboxes are in Beta. If you have any feedback, it would be awesome to hear from you! :)