OCI Self-Service Instance Management

OCI Self-Service Instance Management
Page content

Introduction

๐Ÿ–๏ธ Dec 2022 update: with the new OCI Container Instances, I updated the deployment methods and you can now deploy the application on a Container Instance instead of a Compute VM on OCI.

Some of the advantages of Public Cloud, especially Oracle Cloud Infrastructure (OCI), are elasticity and cost: pay for what you really need, when you need it. With OCI, there are many services to help you with this: Cost Analysis, Budgets, Instance Auto-Scaling, Autonomous DB Auto-Scaling, Block Volume Performance Dynamic Scaling, …

In this post I will mainly talk about instances scaling.

My colleague,Richard Garsthagen, already created a script OCI-AutoScale to help you with instances auto-scaling: the script automatically starts, stops, scales-up or down, your OCI resources, especially VM instances, according to an hourly schedule you define in a Tag.

But what if you want to give your users the possibility to start some environments, VM instances on-demand; this could be especially useful for Dev, Test, Training environments you may only need from time to time. For example, a developer workstation may only be needed a few days a week. You can of course give them access to the OCI console, with the right groups and policies, and they could start/stop the VM from there:

oci-ssvm-instances-console

But maybe you don’t want to give them access to the OCI console or you don’t want the burden of managing the day-to-day users accesses, security management, … just so some developers could start their VM; and you may wonder if there were a way for them to do this very easily, only for a selected list of resources (VM, database, …)

I had this request from a few customers, some of them with applications like JD Edwards deployed on OCI: you still need VM instances for developers and sometimes quite a lot. Those VMs being Windows VM, you pay, not only for the infrastructure but also the Windows licenses when those VMs are powered-up.

That’s why I started developing the Web application oci-ssvm, a very simple Web portal where the users could only start & stop the VM instances when they need them. Combined with the OCI-AutoScale script, you schedule an automatic shutdown of those instances every night.

This application can be very easily deployed on an Always-Free Ampere instance, so at no cost to you. Security is defined in 2 ways:

  • you associate the instance running oci-ssvm with a security policy with only the start&stop actions for the selected compartments.; we use Instance Principals for managing the authentication.
  • for each vm instance, you define tags so they can appear in the list of instances inside the application oci-ssvm.

Then you only need to give the URL to your users and they can select the compartment and start/stop the instance they want to use and, within a few seconds, they can connect to the VM or access the application.

For JD Edwards customers you can even create an E1 Page with the link to the application and users could access oci-ssvm directly from their DV JD Edwards environment:

OCI SSVM Main Page

If you want to know more, I encourage you to have a look at the Github page hosting the application: oci-ssvm

There is also a script to automatically configure and start the application.

That’s all ๐ŸŽ‰ ๐Ÿ˜‰