Shiro pull request 863 for CME

https stash.corp.netflix.com projects cme repos shiro pull-requests 863
https stash.corp.netflix.com projects cme repos shiro pull-requests 863

Deploying Shiro Indien & Shiro Springtime Boot to an OpenShift Cluster together with HashiCorp Vault

Introduction

This post describes how to be able to deploy the Shiro Apache and Shiro Spring Boot software to an OpenShift cluster, using HashiCorp Vault to control secrets.

Prerequisites

  • An OpenShift cluster
  • HashiCorp Vault
  • A GitHub account
  • A Google Fog up account

Deploying Shiro Apache

1. Clone this Shiro Apache archive

 git clone https://github.com/apache/shiro.git 

2. Build this Shiro Apache photo

 cd shiro mvn clean package -DskipTests 

3. Create a good OpenShift project

 occitan new-project shiro-apache 

5. Create a key for the Shiro Apache database username and password

 oc create secret generic shiro-apache-db-password --from-literal=password=my-password 

5. Create the OpenShift deployment regarding Shiro Apache

 occitan new-app --name=shiro-apache shiro-apache: 1. 5. 3 \ -e DATABASE_URL="jdbc: mysql: //mysql: 3306/shiro? user=shiro& password=$ secret/shiro-apache-db-password/password " \ --env=VAULT_ADDR=https://vault.example.com \ --env=VAULT_TOKEN=my-vault-token \ --env=KUBERNETES_PORT=443 \ --env=SERVICE_ACCOUNT=/var/run/secrets/kubernetes. io/serviceaccount/token \ --env=VAULT_ROLE=shiro-apache 

6. Access typically the Shiro Apache app

 oc get course shiro-apache 

Deploying Shiro Spring Boot

1. Clone the Shiro Planting season Boot repository

 git clone https://github.com/apache/shiro-spring-boot.git 

two. Build the Shiro Spring Boot photo

 cd shiro-spring-boot mvn clean package -DskipTests 

3. Create a new secret for this Shiro Spring Footwear database password

 occitan create secret general shiro-spring-boot-db-password --from-literal=password=my-password 

5. Create an OpenShift deployment for Shiro Spring Boot

 oc new-app --name=shiro-spring-boot shiro-spring-boot: 1. 5. several \ -e SPRING_DATASOURCE_URL="jdbc: mysql: //mysql: 3306/shiro? user=shiro& password=$ secret/shiro-spring-boot-db-password/password " \ --env=VAULT_ADDR=https://vault.example.com \ --env=VAULT_TOKEN=my-vault-token \ --env=KUBERNETES_PORT=443 \ --env=SERVICE_ACCOUNT=/var/run/secrets/kubernetes. io/serviceaccount/token \ --env=VAULT_ROLE=shiro-spring-boot 

5. Access typically the Shiro Spring Footwear application

 oc acquire route shiro-spring-boot 

Bottom line

Inside this article, we have shown how to deploy Shiro Apache and Shiro Spring Boot software to an OpenShift cluster, using HashiCorp Vault to handle secrets. This approach provides a protected and scalable method to deploy Shiro applications in a new production environment.