You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oracle Backend for Spring Boot and Microservices - Docs (#762)
* Oracle Backend for Spring Boot and Microservices: VS Code docs update
* obaas-cli update with graalvm commands
* fix to obass-cli docs
* fixed after reviewed
* last fixes
* Rhonda fixes
* More Rhonda fixes
* Rhonda fixes
* Rhonda fixes
* Rhonda fixes amn lower case microservice
---------
Co-authored-by: Andy Tael <andy.tael@yahoo.com>
An application is a namespace encompassing related Microservices. For example, a "cloudbank" application may have "banktransfer" and
65
-
"frauddetection" Microservices deployed within it.
64
+
An application is a namespace encompassing related microservices. For example, a "cloudbank" application may have "banktransfer" and
65
+
"frauddetection" microservices deployed within it.
66
66
67
-
The `create` command results in the creation of an application namespace (Kubernetes *namespace*). The application namespace provides a mechanism for isolating groups of resources, especially the Microservices.
67
+
The `create` command results in the creation of an application namespace (Kubernetes *namespace*). The application namespace provides a mechanism for isolating groups of resources, especially the microservices.
68
68
69
-
The `delete` command results in the delete of an application namespace (Kubernetes *namespace*) completely or a specific Microservice. <ins>**Be carefully**</ins> because it is not possible rollback the components deleted.
69
+
The `delete` command results in the complete deletion of an application namespace (Kubernetes *namespace*) or for a specific microservice. Ensure that you want to completely delete the application namespace. You cannot rollback the components once deleted.
70
70
71
71
The `bind` command results in the automatic creation of a database schema for a given service or user and binds the information for that schema or
72
-
database in the environment of the Microservice. The option of a prefix for the bound environment properties is also returned. For example, most
73
-
Spring Boot Microservices use `spring.datasource`.
72
+
database in the environment of the microservice. The option of a prefix for the bound environment properties is also returned. For example, most
73
+
Spring Boot microservices use `spring.datasource`.
74
74
75
75
The `deploy` command takes `service-name`, `app-name`, and `artifact-path` as the main arguments (`image-version` and `java-version` options are
76
-
also provided). When the `deploy` command is issued, the Microservice JAR file is uploaded to the backend and a container image is created for
77
-
the JAR or Microservice, and various Kubernetes resources such as **Deployment** and **Service** are also created. This is all done
78
-
automatically to simplify the development process and the management of the Microservices by the backend.
76
+
also provided). When the `deploy` command is issued, the microservice JAR file is uploaded to the backend and a container image is created for
77
+
the JAR or microservice, and various Kubernetes resources such as **Deployment** and **Service** are also created. This is all done
78
+
automatically to simplify the development process and the management of the microservices by the backend.
79
79
80
-
The `list` command shows the details of the deployed Microservice.
80
+
The `list` command shows the details of the deployed microservices.
81
81
82
82
The `config` command can also be used to add, view, update, and delete configurations managed by the Spring Cloud Config server.
83
83
@@ -113,7 +113,7 @@ The following is an example development workflow using the CLI:
113
113
obaas-cli: Successful connected.
114
114
```
115
115
116
-
2. Use the `create` command to create an application namespace (Kubernetes *namespace*). The application namespace provides a mechanism for isolating groups of resources, especially the Microservices. Names of resources need to be unique within a application namespace, but not across application namespaces.
116
+
2. Use the `create` command to create an application namespace (Kubernetes *namespace*). The application namespace provides a mechanism for isolating groups of resources, especially the microservices. Names of resources need to be unique within a application namespace, but not across application namespaces.
117
117
118
118
```cmd
119
119
oractl:>help create
@@ -141,10 +141,9 @@ The following is an example development workflow using the CLI:
141
141
application/namespace created successfully and image pull secret (registry-auth) created successfully and database TNSAdmin/wallet secret created successfully
142
142
```
143
143
144
+
3. Use the `delete` command to delete an application namespace (Kubernetes *namespace*) completely or a specific microservice inside an application namespace.
144
145
145
-
3. Use the `delete` command to delete an application namespace (Kubernetes *namespace*) completely or a specific Microservice inside an application namespace.
146
-
147
-
> ATTENTION: <ins>**Be carefully**</ins> because it is not possible rollback the components deleted.
146
+
> ATTENTION: Ensure that you want to completely delete the application namespace. You cannot rollback the components once deleted.
148
147
149
148
```cmd
150
149
oractl:>help delete
@@ -236,8 +235,8 @@ The following is an example development workflow using the CLI:
236
235
Schema {myserv} was successfully updated and Kubernetes Secret {myapp/myserv} was successfully updated.
237
236
```
238
237
239
-
5. Use the `deploy` command to create, build, and push an image for the Microservice and create the necessary deployment, service,
240
-
and secret Kubernetes resources for the Microservice.
238
+
5. Use the `deploy` command to create, build, and push an image for the microservice and create the necessary deployment, service,
239
+
and secret Kubernetes resources for the microservice.
241
240
242
241
```cmd
243
242
oractl:>help deploy
@@ -315,7 +314,7 @@ The following is an example development workflow using the CLI:
315
314
creating deployment and service... successfully deployed
316
315
```
317
316
318
-
6. Use the `list` command to show details of the Microservice deployed in the previous step. For example:
317
+
6. Use the `list` command to show details of the microservice deployed in the previous step. For example:
319
318
320
319
```cmd
321
320
oractl:>help list
@@ -560,3 +559,181 @@ The following is an example development workflow using the CLI:
560
559
oractl:>config list --service-name myserv --service-profile obaas --service-label 0.1 --property-key ktest2
561
560
400 : "Couldn't find any property for submitted query."
562
561
```
562
+
563
+
8. Use the `GraalVM Compile Commands` to:
564
+
565
+
* Upload a **.jar** file to the Oracle Backend for Spring Boot and microservices and its GraalVM compiler service.
566
+
* Start a compilation of your microservice to produce an executable native **.exec** file.
567
+
* Retrieve the last logs available regarding a compilation in progress or terminated.
568
+
* Download the **.exec** file to deploy on the backend.
569
+
* Purge the files remaining after a compilation on the remote GraalVM compiler service.
570
+
571
+
The GraalVM Compile Commands are the following:
572
+
573
+
```cmd
574
+
oractl:>help
575
+
576
+
GraalVM Compile Commands
577
+
compile-download: Download the compiled executable file.
578
+
compile: Compile a service with GraalVM.
579
+
compile-purge: Delete a launched job.
580
+
compile-logs: Compilation progress.
581
+
```
582
+
583
+
1. Use the `compile` command to upload and automatically start compilation using the following command:
584
+
585
+
```cmd
586
+
oractl:>help compile
587
+
NAME
588
+
compile - Compile a service with GraalVM.
589
+
590
+
SYNOPSIS
591
+
compile [--artifact-path String] --help
592
+
593
+
OPTIONS
594
+
--artifact-path String
595
+
Service jar to compile location
596
+
[Mandatory]
597
+
598
+
--help or -h
599
+
help for compile
600
+
[Optional]
601
+
```
602
+
603
+
Because the compilation of a **.jar** file using the tool `native-image` does not support cross-compilation, it must be on the same platform where the application will run. This service guarantees a compilation in the same operating system and CPU type where the service will be executed on the Kubernetes cluster.
604
+
605
+
The Spring Boot application **pom.xml** with the plugin:
606
+
607
+
```xml
608
+
<plugin>
609
+
<groupId>org.graalvm.buildtools</groupId>
610
+
<artifactId>native-maven-plugin</artifactId>
611
+
</plugin>
612
+
```
613
+
614
+
The project should be compiled on the developer desktop with GraalVM version 22.3 or later using an **mvn** command. For example:
This pre-compilation on your desktop checks if there are any issues on the libraries used in your Spring Boot microservice. In addition, your executable **.jar** file must include ahead-of-time (AOT) generated assets such as generated classes and JSON hint files. For additional information, see [Converting Spring Boot Executable Jar](https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced.converting-executable-jars).
621
+
622
+
The following is an example of the command output:
The following example shows the generated batch ID that must be used to retrieve the log files, download the compiled file, and purge the service instance:
0 commit comments