Juju: Multiple environments with just one account
by José Antonio Rey
Today, I was checking some charming as usual, and found myself in a problem. I wanted to have different environments for automated testing and manual code testing, but I only had one AWS account. I thought I needed an account in another cloud, or another AWS account, but after thinking for a while I decided it wasn’t worth it, leaving those thoughts in the past. But suddenly I asked myself if it was possible to just clone my information on my environments.yaml file and set up another environment with the same credentials. Indeed, it was.
The only thing I did here was:
- Open my environments.yaml file.
- Copy the exact same information I had for my old EC2 environment.
- Give a new name to the environment I was creating.
- Change the name of the storage bucket (as it has to be unique).
- Save the changes, close the file, and bootstrap the new environment.
Easy enough, right? That way you can just have multiple environments and execute different things on each one with just one account. I am not sure how this will work for other providers, but at least for AWS it works this way. This just adds more awesome-ness to Juju than it already has. Now, let’s play with this environments!