Developers October 23, 2020

Cloud dev environments: why I love them and I think you will too

Carter @Carter

I've used cloud dev envs for going on 6 years now, and I'm ready to call them the best tool I've ever used for development. Not by a little bit, but by a wide margin. And because I just can't help myself, I'm going to try and convince some of you that you should give them a try.

Now, I know that most people are resistant to the idea of developing anywhere but on their local machines. I never have to argue with any dev about say, deploying a production app with docker onto Heroku. But if I try to convince someone that we should have those same benefits for our dev envs, there's a disconnect. All I'm asking is that you give this idea a chance, I think it might change the way you develop and make you a happier dev.

You can save a lot of time, and stop polluting your local machine

These days, you would never setup your own bare metal server without a very good reason, right? You'd use AWS, Heroku, or some other VPS provider. But for some reason most of us still do that for our local development. I got tired of polluting my physical machine with dev tools, half forgotten hacks, and databases. I've used vagrant, docker, etc. to try to contain and manage them, but it always feels like I'm just adding one more layer of "things I'll need to configure and debug at some point", rather than reducing the cruft.

Cloning and templating a dev env can be 1-click easy

I've never been able to achieve this, even with docker running locally. There's always something that complicates things. With cloud environments I can clone or create a template from projects - with or without state - in literally a click or two. Why would you want that? Well, it's incredibly nice to be able to clone temporarily and test something out that requires some state (wordpress anyone?). Sometimes I clone it just to test out updating dependencies. It's also really nice to have some starter template envs to speed up the start of a project, like I often use for Laravel and Elixir Phoenix projects. As a freelancer, the time saved from this literally converts directly into income for me.

Projects are accessible from any device

This might not be a big deal for everyone, but it is for me. I develop on both my desktop (mainly) and my laptop. When I get up from my desktop and get on my laptop, my dev environments are all there waiting and ready to go on my laptop because they're the same. It also means that I can dev on almost any level of hardware. A cheap chromebook will do, or even my phone when I'm in a pinch (and on vacation). Personally this is one that I feel like you need to experience at least once to truly appreciate it. It feels like switching from local email to Gmail back in the day.

Consistency with other devs

The "it works on my machine" problem largely goes away with cloud dev envs. It reduces the configuration differences (all of you can use the same template), and even if you do find a problem unique to your env, you can give them temporary access remotely to sort it out with you. In my case, whenever I need to work with other freelance devs, or contract something out, I just clone my workspace and give them access, in about 30 seconds.

Forget localhost - automatic URLs, SSL, and other niceties

Most of the cloud dev options out there will give you some form of a public URL automatically per project. The best will let you use custom domains, subdomains, and any ports you'd like, and often it's offered by default, or configured with a few clicks. They almost always include lets encrypt SSL certs too. Never worry about configuring networking for localhost, or localhost specific issues ever again. I use this every single day, for previewing my work, and for demoing with clients. It's like having all the benefits of production but in my dev env.

In short, the benefits of cloud dev envs are:

  • Projects are entirely self contained
  • Keeps your local machine clean
  • Entirely cloneable/templateable - with state if you want
  • Accessible from any device
  • Picks up where you left off
  • Enables consistency with other devs
  • Automatic URLs, SSL certs, etc.
  • Fully shareable - either for collaboration or previews

Now, if you're tempted, there's a few cloud dev env providers out there, though not as many as I would like! They can vary in their approach quite a bit.

For ephemeral envs:

These disappear X minutes after you stop using them, and are especially great for open source work. You can spin up a PR in seconds.

I personally prefer more persistent workspaces, as I have less need for perfect consistency with other devs and persistent workspaces allow me to save a lot of time. For those you can look at:

Cloud9 (part of AWS)
This was my first cloud dev env and I fell in love with it, before it was acquired by AWS. I moved off of it after it became part of the ecosystem and lost a lot of it's convenience features (and I hate configuring things like IAMS and SAMS). It also became a per-minute cost, and ended up costing a lot more for me after that too.

Code Anywhere
This is what I use right now. It seems like it's a very small team that hasn't updated it much in a long while, but it checks all the boxes for now. I don't like the built in editor, so I just remotely connect with VS Code to workspaces, which works fine.

Code Base
Okay, this one is shameless self promotion since it's being built by me. I've waited years to build this because I was hoping someone else would do a better job of checking all the boxes off for me, which just hasn't happened yet. The goal of Code Base is to be the digital ocean of cloud dev envs - easy to use, intuitive, and reasonably priced with flat rates.

Codenvy
I haven't tried this one, mainly because it's marketing pages explained so little the last time I checked it out. It seems like it's really geared towards teams and might be great, I just haven't checked it out personally.

Many of these have free tiers, or very cheap starter plans. I really strongly recommend giving it a try for your next project. It's low commitment, and it's genuinely changed the way I develop for the better.

Cheers!

  1. 2

    I prefer a cloud dev environments too. Cloud9 use to be almost perfect for me before Amazon purchased it. I still use Cloud9 on AWS but only because I couldn’t find a better alternative. If you could build something close to what that experience was I’d switch in a second.

    1. 1

      That's exactly my goal! I loved cloud 9 so much before it went to AWS and lost a lot of the magic. I'm working towards basically an improved version of cloud 9, before it went to AWS, with a few main differences:

      • Using Theia (vs code) as an optional in browser editor instead of Ace.
      • Pay a flat rate for servers (you pick specs)instead of packages limiting workspaces. Put as many servers on a workspace as you want.
      • Full root access, ssh, and a range of ports
      • Custom domains at some point
      • Persistent workspaces by default, that can be configured to turn off after x mins if you want.
      • Workspace templates with state. Like cloning a workspace, but can be locked into a state with versioning and used to spin up multiple new workspaces.
      • Better setup for sharing workspaces and templates between teams/members

      And above all, making all of this as simple to use as possible, which has been the opposite of my experience with AWS.

  2. 2

    Native iPad OS app, even if its a webview wrapper or whatever, and i'm in!

    1. 1

      What about an installable PWA? Essentially the same as a WebView wrapper, without the app store.

      I'm not opposed to a native app, but adding in native mobile as a solo dev is likely more than I should bite off to start. Just keeping up with app store requirement changes has swamped past client projects I've worked on.

      1. 2

        Yea I think a PWA could work.

  3. 2

    Thanks for this write up, going to take a look. I am one of those resisting moving away from my local machine just out of pure habit and history.

    Maybe I need to stop being a grandpa coder LOL

    1. 1

      The best part is that you can try most of these options for free, and you don't need to switch everything over from local to do it. Try it out the next time you have an idea you want to work on!

      1. 2

        Yep next project is a good time to give it a go. Thanks.

  4. 2

    I did have environmennt setup issues etc. in the when I was starting to learn Docker as well, but once you know how to use it, it's awesome. Working in the cloud brings its problems as well.

    1. 1

      Definitely, nothing's perfect. And some people really do work on one project, on one device, for a long time. They might not need the pros that cloud offers, and the cons might really matter to them.

      What really kills the idea of cloud envs for you in particular?

      1. 1

        Well if I'm being honest, I can't give you a clear answer on your question. Isn't it pretty similar to using docker containers? On my windows machine, I do use WSL to code so this is like your working on your code in remote server, but I like to use docker for my projects because all environments are the same because of it.

        1. 1

          It's very similar, you're definitely right. I'd say that most cloud options add conveniences and niceties on top of that experience, which you might or might not care about. Easier setup, UIs, accessible anywhere, that kind of stuff. Also the power to scale up past what your local machine might have for specs (at a cost of course). All things you might not need, and if so, I'd say cloud might not be what you want.

  5. 2

    I do Cloud Dev because I have a pretty low powered laptop and builds take too long. Started using a windows server to dev on as an MVP way to do it.

    I think its awesome.

    VS Code seems to be offering a new solution which is to run VS Code in a docker container. Seems like it might be a possibility to add to the mix

    1. 1

      The teams working on vs code have done a lot for dev envs in general, I've been really impressed with them. The integration with docker is especially awesome, a bit like having a local cloud, with a bit more manual work to setup and maintain. I think it's a great middle ground for people who don't want to move to the cloud entirely.

    1. 1

      I didn't know that repl.it had moved from frontend only to being fully hosted, that's awesome! I'll have to look at it some more for sure. I'm so excited to have more players in this space.

  6. 2

    Can you hook up other editors/IDEs to it, e.g. MacVim or Xcode?

    1. 1

      A lot of these options you can, though it depends on the IDE's support for remote connections. Worst case you could mount an ssh/sftp folder from the server and treat it like local. I suspect that most IDEs are going to add some really nice support for remote in the next couple of years though, now that some big players are focusing on it so much.

  7. 2

    Good work Carter with CodeBase!!

    1. 1

      Thanks! Wish I had started years ago, but I waited because I thought someone would make what I was looking for. Can't wait to let people use it.

Recommended Posts