Go – sometimes Golang because internet searching for just “go” is quite impossible – is a popular programming language. It was initially launched in 2012 and as been gaining popularity ever since. It has embraced many of the good things from other languages including Java and improved on a number of the existing weaknesses – such as concurrent programming at scale, dependency management, small and simple runtime, simplicity and readability. A Go application’s runtime incarnation is a single binary native executable. Its goroutine and channels make concurrent programming a breeze. Many popular open source projects – including Kubernetes, Terraform, Docker, Hugo, InfluxDB – have been implemented using Go. Go is a common choice for the implementation of serverless functions – thanks to it simple, compact, low footprint and fast starting runtime.
Go is well supported on and with Oracle Cloud Infrastructure (OCI). Programs written in Go can be built and run on OCI and can easily interact with OCI services and resources. OCI offers an SDK for Go – allowing interaction with OCI service to be programmed natively.
I have collaborated with the Oracle Developer Relations team and several Oracle product managers to compile a series of articles about Go and Oracle Cloud Infrastructure (OCI). This series discusses how Go applications can be created and run on OCI – in Compute Instances (VMs), containerized on Kubernetes, or as serverless Functions. The articles show how to automate the build and deployment of these Go applications using OCI DevOps. An important topic is how to use OCI services from within Go applications – both those running on OCI as well as Go code running elsewhere. Some of the OCI services discussed are Object Storage, Streaming, Key Vault and Autonomous Database.
This next figure shows the full breadth of the series. All services discussed in the five installments are shown as well as the Go artifacts that are developed in the articles that interact with these services. The combined scope of the articles is quite broad.
Although Go is the main focus, the series also demonstrates a number of the OCI features, such as a quick way to create a compute instance and install and run and expose and monitor applications on it, getting started with OCI DevOps for source code control, build and deployment, how to create an OKE (Kubernetes) instance and how to create Functions on OCI. Concepts such as resource principal and instance principal and how to assign required permissions on cloud resources through IAM policies and dynamic group is illustrated in quite a bit of detail.
In order to follow along with these articles, readers should have at least basic knowledge of how to create Go applications. It is assumed that readers have access to their own Go development environment – although OCI Cloud Shell & Code Editor are probably sufficient for most steps. Some of the examples and screenshots specifically mention VS Code as development tool. However, other editors and IDEs can be used as well. The Go code presented in these articles demonstrates a number of mechanisms in their simplest form for maximum clarity and with the least dependencies. Readers should not expect meaningful functionality or production ready code.
The articles describe how to get Going on OCI and try out the examples. To really benefit from the series, readers should have access to an OCI tenancy with permissions to create the OCI resources discussed in these articles. Most of the resources used are available in the Always Free Tier (Compute Instance, VCN, Autonomous Database, Object Storage, Logging, Resource Manager) or have a free allotment tier for limited monthly usage (Functions, API Gateway, Streaming, Vault, DevOps).
The articles are published on the new Go landing page: https://developer.oracle.com/languages/go.html. A quite relaxed interchange between Erin Dawson (Oracle Developer Relations) and Lucas Jellema (well, that;s me, author of the articles) introducing the article series can be found on YouTube : https://www.youtube.com/watch?v=M2wpfrxusEg.
The individual installments are accessible directly as well:
- Part 1 – How to get Going on Oracle Cloud Compute
- Part 2 – Go Software Engineering and Automation with Oracle Cloud Infrastructure DevOps
- Part 3 – Oracle Cloud Infrastructure Functions in Go and Using the OCI Go SDK for accessing OCI services from Go
- Part 4 – Working in Go applications with Oracle Database and Oracle Cloud Autonomous Database
- Part 5 – Hooking Go applications into OCI Streaming, using OCI Key Vault and Go Deployment on OKE
The Oracle Developer Go landing page: https://developer.oracle.com/languages/go.html
Chat between Erin Dawson (Oracle Developer Relations) and Lucas Jellema on Go, OCI and this article series (YouTube) https://www.youtube.com/watch?v=M2wpfrxusEg
Part 1 – How to get Going on Oracle Cloud Compute
Part 2 – Go Software Engineering and Automation with Oracle Cloud Infrastructure DevOps
Part 3 – Oracle Cloud Infrastructure Functions in Go and Using the OCI Go SDK for accessing OCI services from Go
Part 4 – Working in Go applications with Oracle Database and Oracle Cloud Autonomous Database
Part 5 – Hooking Go applications into OCI Streaming, using OCI Key Vault and Go Deployment on OKE