Skip to content

GarrettCooperDev/JavaShowcase

Repository files navigation

LinkedIn


Logo

Garrett Cooper Development Showcase

Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contact

About The Project

A simple Java application leveraging the Spring Boot framework to implement a RESTful API with configurations for virtualized deployment into Docker containers within a Kubernetes cluster.

(back to top)

Built With

  • Java
  • Maven
  • Spring Boot
  • Docker
  • Kubernetes

(back to top)

Getting Started

An IDE such as IntelliJ is recommended for building and running the project, but the same functions can also be run from the command line.

Prerequisites

For Docker and Kubernetes deployments you will need to install the following:

  • Docker
  • Minikube

Recommended:

  • Postman

Installation

  1. Clone the repo
    git clone https://github.com/GarrettCooperDev/Showcase.git
  2. Use Maven to build the project
    • If you are using an IDE such as IntelliJ use the Maven tool window to run the 'install' command
    • Maven can also be run from the command line
      mvn install
  3. Docker Deployment
    • If you are using an IDE such as IntelliJ, the Dockerfile and compose.yaml files have already been configured and running the application will automatically build a new image and run a Docker container
    • Docker can also be run from the command line
      docker build -t showcase .
      docker run -p 8000:8080 showcase
  4. Kubernetes Deployment using minikube
    • Start the minikube cluster
      minikube start
    • Push the ConfigMap to the cluster
      kubectl kubectl apply -f showcase-config.yaml
    • Push the Secret
      kubectl kubectl apply -f showcase-secret.yaml
    • Push the showcase.yaml file that contains the configuration for both the Service and the Deployment
      kubectl kubectl apply -f showcase.yaml
    • The application should now be running in the Kubernetes cluster, get the IP address of the cluster by calling
      minikube ip        

(back to top)

Usage

  • Call the API within the docker container
    • Use PostMan to make a GET request to the following URL
      http://localhost:8000
    • The same request can also be made using curl from the command line
      curl http://localhost:8000
    • To call the API in the Kubernetes cluster replace http:localhost:8000 with the IP address of the cluster and append the nodePort number 30100

(back to top)

Roadmap

  • Spring Boot RESTful API
  • Docker Containerization
  • Kubernetes Deployment
  • Unit Testing with JUnit5 and Mockito
  • Database Access
    • H2 InMemory Database
    • PostgreSQL
  • Spring beans and dependency injection

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

Garrett Cooper - [email protected]

Project Link: https://github.com/GarrettCooperDev/JavaShowcase

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published