Shiro pull request 863 for CME
Deploying Shiro Indien & Shiro Spring Boot to the OpenShift Cluster together with HashiCorp Vault
Introduction
This article describes how for you 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 the particular Shiro Apache databases
git clone https://github.com/apache/shiro.git 2. Build this Shiro Apache graphic
cd shiro mvn clean package -DskipTests 3. Create a good OpenShift project
oc new-project shiro-apache four. Create a key for the Shiro Apache database security password
oc create top secret generic shiro-apache-db-password --from-literal=password=my-password 5. Create a great OpenShift deployment intended for Shiro Apache
oc new-app --name=shiro-apache shiro-apache: 1. 5. three 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 typically the 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 two. Build the Shiro Spring Boot photo
cd shiro-spring-boot mvn clean package -DskipTests 3. Create a secret for the Shiro Spring Boot database password
occitan create secret universal 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 Boot application
oc obtain route shiro-spring-boot Conclusion
In this article, many of us have shown precisely how to deploy Shiro Apache and Shiro Spring Boot software to an OpenShift cluster, using HashiCorp Vault to handle secrets. This method provides a secure and scalable method to deploy Shiro applications in a production environment.