Shiro pull request 863 for CME
Deploying Shiro Indien & Shiro Spring and coil Boot to the OpenShift Cluster using HashiCorp Vault
Introduction
This post describes how to be able to deploy the Shiro Apache and Shiro Spring Boot apps to an OpenShift cluster, using HashiCorp Vault to manage secrets.
Prerequisites
- An OpenShift cluster
- HashiCorp Vault
- A GitHub account
- A Google Impair account
Deploying Shiro Apache
1. Clone this Shiro Apache archive
git clone https://github.com/apache/shiro.git 2. Build typically the Shiro Apache picture
cd shiro mvn clean package -DskipTests 3. Create an OpenShift project
oc new-project shiro-apache 4. Create a secret for the Shiro Apache database username and password
oc create magic formula generic shiro-apache-db-password --from-literal=password=my-password 5. Create the OpenShift deployment for Shiro Apache
oc new-app --name=shiro-apache shiro-apache: 1. 5. 3 or more \ -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 the particular Shiro Apache software
oc get path shiro-apache Deploying Shiro Spring Boot
1. Clone the Shiro Planting season Boot repository
git clone https://github.com/apache/shiro-spring-boot.git a couple of. Build the Shiro Spring Boot picture
cd shiro-spring-boot mvn clean package -DskipTests 3. Create the secret for the Shiro Spring Boot database password
occitan create secret common shiro-spring-boot-db-password --from-literal=password=my-password some. Create an OpenShift deployment for Shiro Spring Boot
oc new-app --name=shiro-spring-boot shiro-spring-boot: 1. 5. 3 \ -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 the Shiro Spring Shoe application
oc obtain route shiro-spring-boot Summary
Inside this article, many of us have shown exactly how to deploy Shiro Apache and Shiro Spring Boot programs to an OpenShift cluster, using HashiCorp Vault to control secrets. This method provides a safeguarded and scalable approach to deploy Shiro applications in some sort of production environment.