Release Development Environments

Erik Landerholm
October 25, 2022
4
Min

Introducing Release Development Environments

Kubernetes is the best way to manage and orchestrate modern, complex container-based applications in the cloud.  

While this is great for production environments it poses serious challenges for developers and DevOps practitioners. The differences between development and production often result in the utterance of the most dreaded words in application development, “But it works on my machine!” at the most inopportune times, specifically when there is an outage in production.  

There are a few ways to mitigate this issue, but the only “win-win-win” solution is a development environment that replicates production. Historically, this was often too difficult, time-consuming, and expensive, but Release has bridged the gap to provide you with a single pane of glass for all categories of environments you might need.

You may already know that Release can create ephemeral environments on pull requests and run your staging and production environments. But did you know that Release can also install your SaaS-based offerings in your customer’s VPCs, all from the same UI/CLI? 

With this new feature, we have added production-like, cloud-based development environments to our industry-leading offerings. Your developer teams now get all the benefits of a traditional cloud-based development environment:

  • Write code on your machine (thin client, laptop, small supercomputer under your desk), but run it remotely with production mirroring hardware, software and configuration.
  • Total control over the configuration of remote development environments: You can build remote development environments to be as much like production as you need.
  • Bring your own tools.  Release doesn’t force you to use a web-based IDE or change anything about your development, build, or deployment process.

While other solutions may give you these same benefits, Release has always maintained a focus on merging development, staging, and production, meaning we can offer further benefits that our competitors simply can’t:

  • Instant datasets so that you can develop using production or production-like data.  You will no longer need to worry anymore that your seed data and production data have diverged. Test all of your migrations during development on real data before running them in production.  Customer-facing bugs that only appear on production can now be debugged and fixed in record time!
  • Model the most complicated applications and develop against multiple services at once, even if each service needs its own data store and custom configuration.

With Release, you have the best of all worlds and can finally feel confident that “works on my machine” will be a thing of the past.

Let’s take a look at how you can get started with Release development environments.

Getting Started

Starting remote development with Release consists of two steps:

  • Add configuration to a particular environment or Application Template.
  • Use the ReleaseHub CLI to set up the environment in development mode.

Each step takes less than a minute to set up and you will be happily remote developing in record time!

Watch a video showing the set-up steps in detail with an example or read our how-to-guide for more details.

Configuration

To enable remote development on an ephemeral environment you will need to add a new high-level stanza to your Application Template or Environment Configuration.


development_environment:
  services:
   - name: api #references service from config
     command: bundle exec rails s -b 0.0.0.0 #optional, can use default command if the same
     sync: #block to tell Release which paths to sync from local to remote
     - local_path: "."  #path on your local machine to sync to...
       remote_path: "/app" #this remote path in the cloud
     port_forwards: #port mapping from local to remote, localhost:3010 now points to remote end-point
     - remote_port: 3000
       local_port: 3010
   - name: sidekiq #develop against multiple services
     command: bundle exec sidekiq
     sync:
     - local_path: "."
       remote_path: "/app"


 Example of multi-service remote development

This example allows you to develop against two different services, in the cloud, while exposing ports for the API service but not the sidekiq service. Once you save this configuration, you can use the CLI to activate development mode for this particular environment. You can view the full documentation here.

The above syntax works per environment or at the application level and affects all ephemeral environments.

CLI

Next, use the CLI to set up a bidirectional sync between your local machine and the remote environment. Release development environments use a sync process to mirror changes locally with your development environment. This allows you to work locally should you have connectivity issues, unlike developing directly on a remote container in the cloud.

From the directory with the source code for the particular environment, run a single command using the Release CLI:


release envs dev –app backend –environment env_id

‘env_id’ is the ID of the environment

The CLI will:

  • Start a deployment and set the environment to development mode using your configuration.
  • Activate the bidirectional sync service.
  • Set up the port forwards.
  • Launch the command you defined locally via SSH. This allows you to interact with your container as if it was local. You can run commands on the container and send signals (such as ctrl-c) as if it was a local service.

That’s it! You are now ready to start making changes locally that will be synced to your remote containers.

Conclusion

The addition of Development Environments to our services makes Release the most complete EaaS (Environments as a Service) platform available. Your entire development life cycle can now be implemented using Release environments, from development to production.

The adoption of new technologies, like k8s, can result in massive changes or regressions in our development process. Release mitigates these trade-offs by offering a complete solution in one platform, including features like instant datasets and developing against multiple services that just aren't possible with other solutions.

Not quite ready to do it on your own? Set up time with our team to walk you through.  

About ReleaseHub

Release is the simplest way to spin up even the most complicated environments. We specialize in understanding your complex application and data to create reproducible environments on demand.

About ReleaseHub

Release is the simplest way to spin up even the most complicated environments. We specialize in taking your complicated application and data and making reproducible environments on-demand.

Join our newsletter

Get noticed about our blog posts and other high quality content. No spam.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Release Your Ideas

Start today, or contact us with any questions.