Posts

Getting started with Serverless on Oracle Cloud

Image
  Serverless computing is where your cloud provider runs the servers in which your eventual application code runs, dynamically allocating resources. It allow you as the developer can focus on your application code. Functions can be manually triggered, or fire in response to events in the tenancy, such as a compute instance changing state. Installation The platform the supports serverless on Oracle Cloud is The Fn Project . So to get started the first task we need to do is install this in our local machine. The pre-requisites for this software is Docker - as at time of writing, this requires a minimum docker version of 17.10. If you're on Ubuntu you can install from the package docker.io . Alternatively, you can review the installation docs for best steps to install on your platform. Once Docker is installed, to install Fn, you can follow the install instructions as mentioned within their GitHub documentation . For a Linux environment, this is basically a matter of running an insta

Remote coding with Go and the OCI SDK

Image
Overview For our OCI work, we have some developed some tooling using the command line client, and usually development is done on my local machine and then later deployed onto a server housed within OCI, where we leverage instance principal authentication.  There is one problem with this architecture of development. You're not doing a like for like development with creating the tools and where they actually end up running, because locally you have to use a token authentication, whereas the underlying tools end up living on a server that relies on dynamic groups for instance principal authentication.  A better practice would be if you development was done with the same dynamic group applying to where you develop your code. Thankfully, a popular text editor/IDE, VSCode, has some tooling around remote development - so that on our local machine we can set up a SSH host to a server on OCI. OCI Setup Server The first step is to set up the environment where we will do our development that

New PL/SQL Array Enhancements in Oracle Database 20c

Image
I was catching up on some PL/SQL office hours the other day, and one of the topics was A Preview of Oracle Database 20c PL/SQL Enhancements . The parts of this session that I was particularly interested in were: Extended Iterator Constructs Aggregate Qualified Expressions Before we get started, it's worth noting these features are on version 20c of the Oracle Database, which has not yet been released. You can however boot up a preview version of this software from within Oracle Cloud. Environment Set Up To get set up, head over to your Oracle Cloud tenancy, assuming you have one. If you don't have one, you can sign up for a free trial and use this in your trial period. I am assuming you already have a Virtual Cloud Network configured, so I won't be diving into that aspect. Once you are signed into your cloud environment, on the menu navigate to Bare Metal, VM, and Exadata from within the Oracle Database section. From this landing page, click the button Create DB System .

A Universal Theme Adventure: Header Height

Image
This will be the first post in a series of posts covering some aspects of working with universal theme, where I hope to explore some more of Universal Theme and broaden my knowledge in the process. What first? I want to change the height of the header bar. To get started I create a brand new application - accepting any and all defaults. Any changes to a design/theme usually begins with Theme Roller, so first off: Theme Roller The first, and most obvious way is to leverage Theme Roller. Running the application, in the developer toolbar and select Theme Roller off to the right.  Within Theme Roller, there is one section titled Layout. This gives us a number of options, one of which is Header Height:   This gives us a slide with some preset options between 40 and 80 pixels, with increments of 4 pixels. (It's worth a brief mention that this range is defined from the Input Parameter File URLs given by the path: #THEME_IMAGES#less/theme/Vita.less, in the theme settings). As you adjust

Customising APEX built-in validation messages

Image
I was working on an application and when trying to save some data, I was getting these error messages despite the fact I had no validations on my page. And what I wanted to know, how do I change these message contents? APEX does some default checking based on entered data. A prime example of this is a date field. On a brand new application, I created a region and added a page item with the type as "Date Picker". If I enter text into the date input field that is not a date conforming to the date format, I will get the following error: "Date Field does not match format DS."   First of all, DS? What is that? This particular application was created by uploading a spreadsheet, and I did not set that. In fact, my spreadsheet had no date data to begin with. In saying that, a quick search in the globalization attributes, and somehow this application has the date format set to "DS". So first, let us change that - I like to use DD-MON-YYYY. So that fixes the error

Iterating OCI CLI list data in bash

Image
For automating tasks with OCI, you have a few options: OCI CLI (bash) Python SDK Go SDK Java SDK REST API I'm a bash first kinda guy, so would usually opt for trying with the bash solution if the requirement is simple enough. Anything beyond, it's worth moving over to Python or GO. When you run a command, you will typically get a JSON payload. But I'm in bash, how to I interact with this data? That's where this nice tool jq comes in. An interface to JSON data, where you can pass in a json path to get the data you want. When you get started with this you will want to leverage the website jqplay.org . It provides a visual interface to the query paths you build, along with some common examples. So, now over to iterating the data structure. I'm going to take the compartment list as an example. When calling the command: oci iam compartment list, the data set in my tenancy looks like this: { "data": [ { "compartment-id":

Oracle Cloud Infrastructure Cloud Shell - Here's what I discovered

Image
This week I spotted a new terminal-like icon at the top of my OCI tenancy. Upload clicking it, its a GCP-esque terminal emulator directly in the browser. I was doing some tweets about my discoveries, but thought I'd be a good idea to collate those in once place in a more consumable place. So, first I would say, it's possible you may not have it yet in your environment. At least for me, in my personal account, I do have it appearing. This was with a home region of Sydney. Once you launch the shell, type help and you will see a link to the official documentation. You can find it here: https://docs.cloud.oracle.com/en-us//iaas/Content/API/Concepts/cloudshellintro.htm Like in GCP, you get 5gb of storage. This will persist for at least 8 months. You get 6 months before OCI will email your tenant administrator and another 60 days after that before your data will be purged. So, a decent enough amount of time I would think. You can verify this with the command: df -h. On a fre