This video is a demo of Managed Self-Service in the env0 platform. Setup of our developers with deployer role, moving to a developer account to deploy an environment. Then they edit the code and re-deploy from that new branch. In 24 hours, the TTL expires and the environment is about to be destroyed. We extend the TTL for 1 week. Then, we see many environments deployed, with the cost associated, and set a 'max environments per user' policy.

Transcript

Hi, I'm Tim Davis, DevOps Advocate with env0. We've talked about Infrastructure-as-Code automation. We've talked about teams and governance. Now let's talk about managed self-service. So we can see here we have one project called on-demand environments. 

We look at our organization's policies here. We have a maximum environment TTL of one month and a default environment TTL of one day. We go and look at our project settings here. We have one team called the development team and they have deployer access. 

This means that they can deploy cloud resources. So let's switch over to a development account here. You'll notice that we've now lost access to our settings. So let's go into the project. Let's take a look at our project templates. 

And we have a full app or we have backend services only. Let's go ahead and deploy an environment here with backend services only. All right, so we can see that our ‘destroy’ environment has been destroyed in a day. 

That's our default policy, and we can see from our variables here we have some organization-level variables, some project-level variables, and some template-level variables. And if we wanted to, we could add an environment level, but we're just going to go ahead and leave it for now. 

We'll make this a ‘t2.micro’ and we'll leave it deploying to US West 1. And we'll deploy our application. As we can see by our Slack notification here, our environment has finished deploying. So we'll go ahead and click into that and pull the deployment up here. 

And we can see that we have our output of our address here, but since this is backend services only, this is only going to be an API endpoint, and we don't have any front-end services available. Now that our application is deployed, we're going to go ahead and make a change to the code. 

It's important to note that the developer always has control over their code base and the environments they deploy. So we'll go ahead and add a change here that's going to give us a new output of the public IP, and we'll save that into the patch 1 branch. 

And then we'll go back into env0 and we'll redeploy based off of that branch. We can see yet again that our deployment is complete. We'll go ahead and launch that deployment. As we can see, now we have our new output. 

Well, it's been 24 hours since we had our deploy. As you can see here, our environment is going to be destroyed due to the time-to-live (TTL) policy. So we'll go ahead and open this link up straight from Slack. 

As we can see here, we have 11 minutes left on the clock. I'm going to go ahead and edit this, and I'm going to extend that by a week. And as we can see, I now have a week left in my environment. So now we're logged back in as an organization admin. 

We can see that we have six active environments deployed in this project. Weekly, it's costing us about $10.20. If we come in, we can see a breakdown of how much each one of these is costing us. Now, for this, it's really not a ton of money, but this can get out of hand pretty quickly if people are just able to deploy as many environments as they want. 

So we'll go ahead and go into project settings: ‘Policies’ and we're going to limit the maximum number to three per user. 

This video is a demo of Managed Self-Service in the env0 platform. Setup of our developers with deployer role, moving to a developer account to deploy an environment. Then they edit the code and re-deploy from that new branch. In 24 hours, the TTL expires and the environment is about to be destroyed. We extend the TTL for 1 week. Then, we see many environments deployed, with the cost associated, and set a 'max environments per user' policy.

Transcript

Hi, I'm Tim Davis, DevOps Advocate with env0. We've talked about Infrastructure-as-Code automation. We've talked about teams and governance. Now let's talk about managed self-service. So we can see here we have one project called on-demand environments. 

We look at our organization's policies here. We have a maximum environment TTL of one month and a default environment TTL of one day. We go and look at our project settings here. We have one team called the development team and they have deployer access. 

This means that they can deploy cloud resources. So let's switch over to a development account here. You'll notice that we've now lost access to our settings. So let's go into the project. Let's take a look at our project templates. 

And we have a full app or we have backend services only. Let's go ahead and deploy an environment here with backend services only. All right, so we can see that our ‘destroy’ environment has been destroyed in a day. 

That's our default policy, and we can see from our variables here we have some organization-level variables, some project-level variables, and some template-level variables. And if we wanted to, we could add an environment level, but we're just going to go ahead and leave it for now. 

We'll make this a ‘t2.micro’ and we'll leave it deploying to US West 1. And we'll deploy our application. As we can see by our Slack notification here, our environment has finished deploying. So we'll go ahead and click into that and pull the deployment up here. 

And we can see that we have our output of our address here, but since this is backend services only, this is only going to be an API endpoint, and we don't have any front-end services available. Now that our application is deployed, we're going to go ahead and make a change to the code. 

It's important to note that the developer always has control over their code base and the environments they deploy. So we'll go ahead and add a change here that's going to give us a new output of the public IP, and we'll save that into the patch 1 branch. 

And then we'll go back into env0 and we'll redeploy based off of that branch. We can see yet again that our deployment is complete. We'll go ahead and launch that deployment. As we can see, now we have our new output. 

Well, it's been 24 hours since we had our deploy. As you can see here, our environment is going to be destroyed due to the time-to-live (TTL) policy. So we'll go ahead and open this link up straight from Slack. 

As we can see here, we have 11 minutes left on the clock. I'm going to go ahead and edit this, and I'm going to extend that by a week. And as we can see, I now have a week left in my environment. So now we're logged back in as an organization admin. 

We can see that we have six active environments deployed in this project. Weekly, it's costing us about $10.20. If we come in, we can see a breakdown of how much each one of these is costing us. Now, for this, it's really not a ton of money, but this can get out of hand pretty quickly if people are just able to deploy as many environments as they want. 

So we'll go ahead and go into project settings: ‘Policies’ and we're going to limit the maximum number to three per user. 

Logo Podcast
With special guest
Andrew Brown

Schedule a technical demo. See env0 in action.

CTA Illustration