The new OCI Code Editor is a great (new!) tool to make life easier.
We have the entire OCI development ecosystem ready to be used in a couple of clicks.
These are some of the features:
- Create and edit code files in 15 languages, including Java, Python, Docker, JSON, YAML, and Terraform.
- Out-of-the-box managed plugins for OCI services enable a seamless code editing experience
Git integration - Persists state across user sessions
- Direct access to Cloud Shell and its 30+ cloud-based tools
- Workspace and user management
- Personalized user experience through multiple color themes, language localization, customizable keyboard shortcuts, customizable screen layouts, and more
Start the OCI Code Editor
Start the OCI Code Editor from a context
This will open the editor in the context of the OCI service, in the above case, functions.
There are some samples in Github that allow for a quick start
https://github.com/oracle-devrel/oci-code-editor-samples
Create and deploy a new OCI Function
Interestingly, when I try to create a new function, I get a different menu. The one above was from a documentation screenshot. The one I have is slightly different, but it does show the option to create a function with the Code Editor.
Then wait for the editor to initialize…
The panel on the left side will show you the navigation of the tenancy, with compartments and existing functions and applications under each compartment.
Right-clicking on the existing function application will allow us to create a new one.
We have 3 methods to choose from. I will use the code from the GitHub repository (https://github.com/ashok-cm/oci-function-python-hello-world)
I made a minor change to the code and once again with a simple right-click, we can deploy the function.
We have the possibility to define the deployment parameters in the GUI
You need to fill the Auth token with an OCI-generated token, and the Registry Location with the name of an existing container registry.
Wrap up
This is just an example of the plethora of possibilities one has when using the OCI code editor. The entire OCI services and tools become readily available in a fast and secure environment.