Shiro pull request 863 for CME
Deploying Shiro Apache & Shiro Planting season Boot to the OpenShift Cluster along with HashiCorp Vault
Introduction
This content describes how to be able to deploy the Shiro Apache and Shiro Spring Boot apps to an OpenShift cluster, using HashiCorp Vault to handle secrets.
Prerequisites
- An OpenShift cluster
- HashiCorp Vault
- A GitHub account
- A Google Foriegn 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
occitan new-project shiro-apache
four. Create a secret for the Shiro Apache database password
oc create top secret generic shiro-apache-db-password --from-literal=password=my-password
5. Create an OpenShift deployment for Shiro Apache
oc 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 the particular Shiro Apache application
oc get course shiro-apache
Deploying Shiro Spring Boot
1. Duplicate the Shiro Early spring Boot repository
git clone https://github.com/apache/shiro-spring-boot.git
3. Build the Shiro Spring Boot photo
cd shiro-spring-boot mvn clean package -DskipTests
3. Create a secret for the particular Shiro Spring Boot database password
oc create secret generic shiro-spring-boot-db-password --from-literal=password=my-password
5. Create an OpenShift deployment for Shiro Spring Boot
occitan new-app --name=shiro-spring-boot shiro-spring-boot: 1. 5. three or more \ -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 Footwear application
oc acquire route shiro-spring-boot
Realization
Inside this article, all of us have shown how to deploy Shiro Apache and Shiro Spring Boot software to an OpenShift cluster, using HashiCorp Vault to control secrets. This technique provides a safeguarded and scalable method to deploy Shiro applications in a new production environment.