Let’s get right to it…
By simply issuing the following command and with no prior setup…
oractl:>deploy --bind all --jarLocation mymicroservice.jar
…the Oracle Backend for Spring Boot will
- create an optimized container image
- tag and push it to the image repository
- introspect and create any database and messaging resources needed by the microservice
- create all of the Kubernetes deployment, service, secrets, etc. needed by the microservice.
- create necessary bindings and configuration for database and messaging, service discovery, observability, configuration, etc.
Microservices bring many advantages to decouple cross-cutting concerns such as underlying resource connectivity, observability (metrics, logs, and tracing), scalability, security, etc. from the core domain-level functionality of a given microservice, however, these concerns certainly do not go away and thus the increase in prevalence and importance of the DevOps role. If you work in the space you know the areas I am referring to and so I won’t go into depth, but suffice it to say microservices and the overall system architecture they run in are not simple. The new Oracle Backend for Spring Boot offering on the Oracle Cloud Marketplace aims to remove the burden of many of the aspects involved so that the developer can focus on writing that domain specific functionality without worrying about all the rest. The offering is free and installs in OCI cloud with just a few clicks.
This is a dev preview and there is quite a bit in it and even more coming but I will focus on the CLI (called `oractl`) and corresponding functionality of the admin server it calls into in this quick blog. You can learn more in the doc http://bit.ly/oraclespringboot
The current list of commands are as follows:
Admin Server Commands - `change-password`: Change password for OBaaS Spring Cloud admin user. - `connect`: Connect to the OBaaS Spring Cloud admin console. Application/Namespace Commands - `create`: Create an application/namespace. - `delete`: Delete a service or entire application/namespace. Built-In Commands - `help`: Display help about available commands - `stacktrace`: Display the full stacktrace of the last error. - `clear`: Clear the shell screen. - `quit`, `exit`: Exit the shell. - `history`: Display or save the history of previously run commands - `version`: Show version info - `script`: Read and execute commands from a file. Informational Commands - `list`: list/show details of application services. Service Commands - `bind`: Create a schema/user and bind it to service deployment. - `config`: View and modify application configuration. - `deploy`: Deploy a service.
Let’s look at the deploy command in particular…
oractl:>help deploy
NAME
deploy - Deploy a service.
SYNOPSIS
deploy --isRedeploy String --bind String --appName String --serviceName String --jarLocation String --imageVersion String --javaImage String
OPTIONS
--isRedeploy String
whether the service has already been deployed or not
[Optional, default = true]
--bind String
automatically create and bind resources. possible values are [jms]
[Optional, default = none]
--appName String
application/namespace
[Optional, default = cloudbank]
--serviceName String
service name
[Optional, default = banka]
--jarLocation String
service jar location
[Optional, default = target/banka-0.0.1-SNAPSHOT.jar]
--imageVersion String
image version
[Optional, default = 0.1]
--javaImage String
java image
[Optional, default = ghcr.io/graalvm/jdk:ol7-java17-22.2.0]
And an example usage…
oractl:>deploy --bind jms --jarLocation banka-0.0.1-SNAPSHOT.jar uploading... upload successful building and pushing image... docker build and push successful binding resources... successful (queue created) creating deployment and service... create deployment and service = banka, appName = cloudbank, isRedeploy = false successful successfully deployed
Check out my blog page as I post further pieces related to this topic as well as Mark Nelson’s and other’s from the team and the Oracle modern app dev page and please feel free to drop me or any of us a line with any questions or comments. Thanks for reading.
