-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc udpates for 1.1 --------- Signed-off-by: Mark Nelson <[email protected]> Co-authored-by: Andy Tael <[email protected]>
- Loading branch information
1 parent
0135104
commit 6ea25bb
Showing
47 changed files
with
877 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,26 @@ | ||
This section provides information about how to develop and deploy Spring Boot applications | ||
with the Oracle Backend for Spring Boot and Microservices. | ||
--- | ||
title: "Development" | ||
description: "How to develop and deploy Spring Boot applications with the Oracle Backend for Spring Boot and Microservices" | ||
keywords: "spring springboot microservices development oracle backend" | ||
--- | ||
|
||
Spring Boot applications can be developed with no special requirements and | ||
be deployed into Oracle Backend for Spring Boot and Microservices. However, if you do opt-in to the platform | ||
services provided and the CLI, you can shorten your development time and avoid unnecessary | ||
work. | ||
This section provides information about how to develop and deploy Spring Boot applications with the Oracle Backend for Spring Boot and Microservices. | ||
|
||
Oracle Backend for Spring Boot provides the following services that applications can use: | ||
Spring Boot applications can be developed with no special requirements and be deployed into Oracle Backend for Spring Boot and Microservices. However, if you do opt-in to the platform services provided and the CLI, you can shorten your development time and avoid unnecessary work. | ||
|
||
- An Oracle Autonomous Database instance in which applications can manage relational, | ||
document, spatial, graph and other types of data, can use Transactional Event Queues for | ||
messaging and events using Java Message Service (JMS), Apache Kafka or Representational | ||
State Transfer (REST) interfaces, and even run machine learning (ML) models. | ||
- A Kubernetes cluster in which applications can run with namespaces pre-configured with | ||
Kubernetes Secrets and ConfigMaps for access to the Oracle Autonomous Database instance | ||
associated with the backend. | ||
- An Apache APISIX API Gateway that can be used to expose service endpoints outside the Kubernetes | ||
cluster, to the public internet. All standard Apache APISIX features like traffic management, | ||
monitoring, authentication, and so on, are available for use. | ||
- Spring Boot Eureka Service Registry for service discovery. The API Gateway and monitoring | ||
services are pre-configured to use this registry for service discovery. | ||
- Spring Cloud Config Server to serve externalized configuration information to applications. | ||
This stores the configuration data in the Oracle Autonomous Database | ||
instance associated with the backend. | ||
- Netflix Conductor OSS for running workflows to orchestrate your services. | ||
- Hashicorp Vault for storing sensitive information. | ||
- Spring Admin for monitoring your services. | ||
- Prometheus and Grafana for collecting and visualizing metrics and for alerting. | ||
- Jaeger for distributed tracing. Applications deployed with the Oracle Backend for | ||
Spring Boot and Microservices CLI have the Open Telemetry Collector automatically added as a Java | ||
agent to provide tracing from the application into the Oracle Database. | ||
Oracle Backend for Spring Boot provides the following services that applications can use: | ||
|
||
An integrated development environment is recommended for developing applications. Oracle | ||
recommends Visual Studio Code or IntelliJ. | ||
* An Oracle Autonomous Database instance in which applications can manage relational, document, spatial, graph and other types of data, can use Transactional Event Queues for messaging and events using Java Message Service (JMS), Apache Kafka or Representational State Transfer (REST) interfaces, and even run machine learning (ML) models. | ||
* A Kubernetes cluster in which applications can run with namespaces pre-configured with Kubernetes Secrets and ConfigMaps for access to the Oracle Autonomous Database instance associated with the backend. | ||
* An Apache APISIX API Gateway that can be used to expose service endpoints outside the Kubernetes cluster, to the public internet. All standard Apache APISIX features like traffic management, monitoring, authentication, and so on, are available for use. | ||
* Spring Boot Eureka Service Registry for service discovery. The API Gateway and monitoring services are pre-configured to use this registry for service discovery. | ||
* Spring Cloud Config Server to serve externalized configuration information to applications. This stores the configuration data in the Oracle Autonomous Database instance associated with the backend. | ||
* Netflix Conductor OSS for running workflows to orchestrate your services. | ||
* Hashicorp Vault for storing sensitive information. | ||
* Spring Admin for monitoring your services. | ||
* Prometheus and Grafana for collecting and visualizing metrics and for alerting. | ||
* Jaeger and Open Telemetry (OTEL) for distributed tracing. Applications deployed to the Oracle Backend for Spring Boot may use Jaeger or OTEL for distributed tracing. See the [Environment Variables page](envvars) for variables that can be used. | ||
|
||
Java, Maven or Gradle, a version control system (Oracle recommends git), and other | ||
tools may be required during development. | ||
An integrated development environment is recommended for developing applications. Oracle recommends Visual Studio Code or IntelliJ. | ||
|
||
Java, Maven or Gradle, a version control system (Oracle recommends git), and other tools may be required during development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: "OBaaS CLI" | ||
description: "Command Line Interface for Oracle Backend for Spring Boot and Microservices" | ||
keywords: "cli tool deployment spring springboot microservices development oracle backend" | ||
--- | ||
|
||
The Oracle Backend for Spring Boot and Microservices offers a command-line interface (CLI), `oractl`. The CLI commands simplify the deployment of | ||
|
@@ -18,6 +20,8 @@ Table of Contents: | |
* [Delete application namespace](#delete) | ||
* [Bind database schema/kubernetes secrets](#bind) | ||
* [Deploy a service](#deploy) | ||
* [Create a horizontal pod autoscaler](#create-autoscaler) | ||
* [Delete a horizontal pod autoscaler](#delete-autoscaler) | ||
* [List - show details about deployments](#list) | ||
* [Manage config server data](#config) | ||
* [GraalVM compile commands](#compile) | ||
|
@@ -44,13 +48,15 @@ Short descriptions for the available commands can be viewed by issuing the `help | |
commands can be viewed by issuing `help [command-name]`. For example: | ||
|
||
```cmd | ||
oractl:>help | ||
AVAILABLE COMMANDS | ||
Admin Server Commands | ||
connect: Connect to the OBaaS Spring Cloud admin console. | ||
Application/Namespace Commands | ||
create: Create an application/namespace. | ||
* create: Create an application/namespace. | ||
Autoscaler Commands | ||
* create-autoscaler: Create an autoscaler. | ||
* delete-autoscaler: Delete an autoscaler. | ||
Built-In Commands | ||
help: Display help about available commands | ||
|
@@ -62,19 +68,32 @@ Built-In Commands | |
script: Read and execute commands from a file. | ||
GraalVM Compile Commands | ||
compile-download: Download executable file compiled | ||
compile: Compile a service with GraalVM | ||
compile-purge: Delete a job launched | ||
compile-logs: Compilation progress | ||
* compile-download: Download executable file compiled | ||
* compile: Compile a service with GraalVM | ||
* compile-purge: Delete a job launched | ||
* compile-logs: Compilation progress | ||
Identity and Access Management Service | ||
* user list: Lists the users in your platform. | ||
* user create: Creates a new user in your platform. | ||
* user get: Gets the specified user’s information. | ||
* user delete: Delete a user in your platform. | ||
* user change-roles: Change the roles from the specified user. | ||
connect: Connect to the OBaaS Admin Service. | ||
* user change-password: Change password for the specified user. | ||
Informational Commands | ||
list: list/show details of application services. | ||
* list: list/show details of application services. | ||
Service Commands | ||
bind: Create or Update a schema/user and bind it to service deployment. | ||
delete: Delete a service or entire application/namespace. | ||
config: View and modify Service configuration. | ||
deploy: Deploy a service. | ||
* bind: Create or Update a schema/user and bind it to service deployment. | ||
* delete: Delete a service or entire application/namespace. | ||
* config: View and modify Service configuration. | ||
* deploy: Deploy a service. | ||
Commands marked with (*) are currently unavailable. | ||
Type `help <command>` to learn more. | ||
Ask for Help | ||
Slack: https://oracledevs.slack.com/archives/C03ALDSV272 | ||
|
@@ -91,6 +110,8 @@ The [`bind`](#bind) command results in the automatic creation of a database sche | |
|
||
The [`deploy`](#deploy) command takes `service-name`, `app-name`, and `artifact-path` as the main arguments (`image-version` and `java-version` options are also provided). When the `deploy` command is issued, the microservice JAR file is uploaded to the backend and a container image is created for the JAR or microservice, and various Kubernetes resources such as **Deployment** and **Service** are also created. This is all done automatically to simplify the development process and the management of the microservices by the backend. | ||
|
||
The [`create-autoscaler`](#create-autoscaler) and [`delete-autoscaler`](#delete-autoscaler) commands allow you to create and delete horizontal pod autoscalers for specific microservices. | ||
|
||
The [`list`](#list) command shows the details of the deployed microservices. | ||
|
||
The [`config`](#config) command can also be used to add, view, update, and delete configurations managed by the Spring Cloud Config server. | ||
|
@@ -284,13 +305,9 @@ NAME | |
deploy - Deploy a service. | ||
SYNOPSIS | ||
deploy --redeploy boolean --bind String --app-name String [--service-name String] [--image-version String] --service-profile String --port String --java-version String --add-health-probe boolean --liquibase-db String [--artifact-path String] --initial-replicas int --graalvm-native boolean --help | ||
deploy --bind String --app-name String [--service-name String] [--image-version String] --service-profile String --port String --java-version String --add-health-probe boolean --liquibase-db String [--artifact-path String] --initial-replicas int --cpu-request String --graalvm-native boolean --apigw boolean --route String --apikey String --help | ||
OPTIONS | ||
--redeploy boolean | ||
whether the service has already been deployed or not | ||
[Optional, default = false] | ||
--bind String | ||
automatically create and bind resources. possible values are [jms] | ||
[Optional] | ||
|
@@ -335,18 +352,39 @@ OPTIONS | |
The initial number of replicas | ||
[Optional, default = 1] | ||
--cpu-request String | ||
The amount of CPU to request | ||
[Optional, default = 500m] | ||
--graalvm-native boolean | ||
Artifact is a graalvm native compiled by Oracle Backend | ||
[Optional, default = false] | ||
--apigw boolean | ||
open routing through APISIX | ||
[Optional, default = false] | ||
--route String | ||
set an APISIX route path | ||
[Optional, default = /api/v1/] | ||
--apikey String | ||
set APISIX API_KEY | ||
[Optional] | ||
--help or -h | ||
help for deploy | ||
[Optional] | ||
CURRENTLY UNAVAILABLE | ||
you are not signedIn. Please sign in to be able to use this command! | ||
Ask for Help | ||
Slack: https://oracledevs.slack.com/archives/C03ALDSV272 | ||
E-mail: [email protected] | ||
``` | ||
``` | ||
|
||
For example: | ||
|
||
|
@@ -363,6 +401,104 @@ Ask for Help | |
oractl:>deploy --app-name cloudn --service-name account --artifact-path obaas/myserv/target/accounts-0.0.1-SNAPSHOT.jar.exec --image-version 0.0.1 --graalvm-native --java-version container-registry.oracle.com/os/oraclelinux:7-slim | ||
``` | ||
|
||
### create-autoscaler | ||
|
||
Use the `create-autoscaler` command to create a horizontal pod autoscaler for a microservice you have deployed. You can specify the target scaling threshold using CPU percentage. Note that your microservice must have its CPU request set in order to use the autoscaler. It is set to `500m` (that is, half a core) by the `deploy` command if you did not override the default. | ||
|
||
```cmd | ||
oractl:>help create-autoscaler | ||
NAME | ||
create-autoscaler - Create an autoscaler. | ||
SYNOPSIS | ||
create-autoscaler --app-name String [--service-name String] --min-replicas int --max-replicas int --cpu-percent int --help | ||
OPTIONS | ||
--app-name String | ||
application/namespace | ||
[Optional, default = application] | ||
--service-name String | ||
Service Name | ||
[Mandatory] | ||
--min-replicas int | ||
The minimium number of replicas | ||
[Optional, default = 1] | ||
--max-replicas int | ||
The maximum number of replicas | ||
[Optional, default = 4] | ||
--cpu-percent int | ||
The CPU percent at which to scale | ||
[Optional, default = 80] | ||
--help or -h | ||
help for create-autoscaler | ||
[Optional] | ||
Ask for Help | ||
Slack: https://oracledevs.slack.com/archives/C03ALDSV272 | ||
E-mail: [email protected] | ||
``` | ||
|
||
For example: | ||
|
||
```cmd | ||
oractl:>create-autoscaler --app-name application --service-name creditscore --cpu-percent 80 --min-replicas 2 --max-replicas 6 | ||
obaas-cli [create-autoscaler]: Autoscaler was successfully created. | ||
``` | ||
|
||
You can view the details of the autoscaler using `kubectl`, for example: | ||
|
||
```cmd | ||
$ kubectl -n application get hpa | ||
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE | ||
creditscore Deployment/creditscore 0%/80% 2 6 2 26s | ||
customer Deployment/customer 4%/80% 2 6 2 26h | ||
``` | ||
|
||
### delete-autoscaler | ||
|
||
Use the `delete-autoscaler` command to delete a horizontal pod autoscaler for a microservice you have deployed. | ||
|
||
```cmd | ||
oractl:>help delete-autoscaler | ||
NAME | ||
delete-autoscaler - Delete an autoscaler. | ||
SYNOPSIS | ||
delete-autoscaler --app-name String [--service-name String] --help | ||
OPTIONS | ||
--app-name String | ||
application/namespace | ||
[Optional, default = application] | ||
--service-name String | ||
Service Name | ||
[Mandatory] | ||
--help or -h | ||
help for delete-autoscaler | ||
[Optional] | ||
Ask for Help | ||
Slack: https://oracledevs.slack.com/archives/C03ALDSV272 | ||
E-mail: [email protected] | ||
``` | ||
|
||
For example: | ||
|
||
```cmd | ||
oractl:>delete-autoscaler --app-name application --service-name creditscore | ||
obaas-cli [delete-autoscaler]: Autoscaler was successfully deleted. | ||
``` | ||
|
||
### list | ||
|
||
Use the `list` command to show details of the microservice deployed in the previous step. For example: | ||
|
Oops, something went wrong.