<span>The microservice architecture has been adopted by many developer teams around the world. To be successful, it's crucial that you understand how to program a microservice and get it running in the cloud. This book will walk you through the process of how to build, test, and deploy a Java-based
Introducing Micronaut: Build, Test, and Deploy Java Microservices on Oracle Cloud
✍ Scribed by Todd Raymond Sharp
- Publisher
- Apress
- Year
- 2022
- Tongue
- English
- Leaves
- 139
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
The microservice architecture has been adopted by many developer teams around the world. To be successful, it's crucial that you understand how to program a microservice and get it running in the cloud. This book will walk you through the process of how to build, test, and deploy a Java-based Micronaut microservice to the Oracle Cloud with GitHub Actions.
You'll learn how to create a Virtual Machine (with both the Oracle Cloud Infrastructure (OCI) CLI and the OCI Gradle Plugin), as well as create and deploy the microservice as a Docker container that can be stored in Oracle Container Infrastructure Registry (OCIR) and deployed to an Oracle Kubernetes Engine (OKE) cluster. The microservice will use Micronaut Data for persistence, Testcontainers for testing, and Liquibase to manage your Oracle DB production schema.
After reading or using this book, you'll be able to build, test and deploy your first microservices using theMicronaut framework, Oracle Cloud and more.
What You'll Learn
- Build and deploy Java-based microservices using Micronaut and Oracle Cloud
- Run tests and publishing reports
- Deploy to Oracle Cloud using OCI CLI and the OCI Gradle plug-in
- Add a persistence tier to the microservice
- Distribute a microservice with persistence
Programmers and software developers with experience in Java and microservices programming who are new to Micronaut.
✦ Table of Contents
Table of Contents
About the Author
Acknowledgments
Introduction
Chapter 1: Creating a Micronaut Application and Getting Started with GitHub Actions
Creating the Service
Running the App
Adding Support for GitHub Actions
Bling
TL;DR
Next
Source Code
Chapter 2: Building and Publishing a JAR
Runners
Intro to “Actions”
Checkout
Setup Java
Progress Check
Building the JAR
Publishing the JAR
TL;DR
Next
Source Code
Chapter 3: Running Tests and Publishing Test Reports
Preparing Our App for Spock
Create a Spock Test
Add a Controller and Test It
Add an Action to Run Tests
Add an Action to Publish Tests
When Failure Happens
TL;DR
Next
Source Code
Chapter 4: Deploying a Microservice to Oracle Cloud with GitHub Actions and the OCI CLI
Can You Keep a Secret?
Using Secrets in Your Workflow
Installing the CLI
Creating the Instance
Deploy the App
Wait for SSH
Stop App
Push JAR
Start App
Run the Build
TL;DR
Next
Source Code
Chapter 5: Deploying a Microservice to Oracle Cloud with GitHub Actions and the OCI Gradle Plugin
Configure Gradle
TL;DR
Next
Source Code
Chapter 6: Adding a Persistence Tier to the Microservice
Managing Schema Modifications
Spin Up a DB
Liquibase-Micronaut Integration
Add Micronaut Data
Add Dependencies
Start the Application
Create a Model
Create a Repository
Modify the Controller
Test Persistence
TL;DR
Next
Source Code
Chapter 7: Testing the Persistence Tier with Testcontainers
Adding Dependencies
Modifying Our Abstract Spec
Running the Pipeline Tests with Testcontainers
TL;DR
Next
Source Code
Chapter 8: Deploying the Microservice with a Tested Persistence Tier in Place
Autonomous Wallet
Configure the Local Autonomous DB Datasource
Configure the Production Datasource
TL;DR
Next
Source Code
Chapter 9: Deploying the Microservice as a Docker Container
The Dockerfile
Preparing to Build the Docker Image
Building the Docker Image
Running the Docker Build Locally
Modifying the Build
TL;DR
Next
Source Code
Chapter 10: Deploying the Microservice Docker Container to Kubernetes
Create a Service Account
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Create Kubernetes Deployment Configuration
Create a Secret
Create Deployment YAML
Add a Deployment Step
Kill an Existing Pod
The Final Build
TL;DR
Next
Source Code
Index
📜 SIMILAR VOLUMES
<span>The microservice architecture has been adopted by many developer teams around the world. To be successful, it's crucial that you understand how to program a microservice and get it running in the cloud. This book will walk you through the process of how to build, test, and deploy a Java-based
Design and develop Java-based RESTful APIs using the latest versions of the Spring MVC and Spring Boot frameworks. This book walks you through the process of designing and building a REST application while delving into design principles and best practices for versioning, security, documentation, err
Design and develop Java-based RESTful APIs using the latest versions of the Spring MVC and Spring Boot frameworks. This book walks you through the process of designing and building a REST application while delving into design principles and best practices for versioning, security, documentation, err
<span><p class="description">Master Java EE Application Development on Oracle Java Cloud Build highly available, scalable, secure, distributed applications on Oracle Java Cloud. In this Oracle Press guide, Oracle ACE Director and Java Champion Harshad Oak leads you through the entire Java EE cloud-b
Filled with real-world examples, ready-to-use code, and best practices, this is an invaluable resource for anyone looking to meet the growing demand for cloud-based development skills. Learn how to set up an Oracle Java Cloud instance and manage users and roles; build an application with NetBeans ID