- Login with your Red Hat Account. https://console.redhat.com/openshift/sandbox. Select "OpenShift Dev Spaces".
- Fork this repo and complete Git Repo URL parameter with your repo info.
- Open terminal on Red Hat OpenShift Dev Spaces and run.
jhipster-devspace (master) $ rm -r app && mkdir app
rm -r app && mkdir app
- Copy jhipster-devspace-model.jdl to app directory.
cp template-jdl/jhipster-devspace-model.jdl app
- Run 'jhipster jdl' command. info https://www.jhipster.tech/jdl/getting-started JDL Studio.
jhipster-devspace (master) $cd app && jhipster jdl jhipster-devspace-model.jdl
cd app
jhipster jdl jhipster-devspace-model.jdl
Output:
jhipster-devspace (master) $ cd app
app (master) $ jhipster jdl jhipster-devspace-model.jdl
INFO! Using JHipster version installed globally
INFO! Executing import-jdl jhipster-devspace-model.jdl
INFO! The JDL is being parsed.
warn: An Entity name 'User' was used: 'User' is an entity created by default by JHipster. All relationships toward it will be kept but any attributes and relationships from it will be disregarded.
INFO! Found entities: Producto, ProductoCategoria, Cliente, Carrito, ProductoOrden.
INFO! The JDL has been successfully parsed
INFO! Generating 1 application.
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.1.0
Application files will be generated in folder: /projects/jhipster-devspace/app
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
______________________________________________________________________________
...more lines...
Entity Producto generated successfully.
Entity ProductoCategoria generated successfully.
Entity Cliente generated successfully.
Entity Carrito generated successfully.
Entity ProductoOrden generated successfully.
INFO! Generator app succeed
Congratulations, JHipster execution is complete!
Sponsored with ❤️ by @oktadev.
- Run Development Mode the JHipster Application on Red Hat OpenShift Dev Spaces.
./mvnw
From terminal on Red Hat Openshift Dev Spaces an Red Hat OpenShift
By default, the repo contains a version generated for testing this section with the name "Delivery", if you want to change it in your fork you will need to change it to the new value in the yaml objects and the jhispter JDL file.
- Fork this repo and modify the yaml files with your environment keys.
k8s/overlay/develop/route.yaml <---
spec:
host: delivery-<NAMESPACE>.apps.sandbox-m2.ll9k.p1.openshiftapps.com
k8s/overlay/develop/deployment-patches.yaml <---
spec:
containers:
- name: delivery
image: image-registry.openshift-image-registry.svc:5000/<NAMESPACE>/delivery
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:mariadb://mariadb.<NAMESPACE>.svc.cluster.local:3306/delivery
- Create a Tekton Pipeline, Tekton Task and PVC with oc apply command.
jhipster-devspace (master) $ oc apply -f pipeline.yaml
Output
persistentvolumeclaim/workspace created
task.tekton.dev/npm created
pipeline.tekton.dev/jhipster-devspace created
- Run a Pipeline jhipster-devspace from Red Hat OpenShift Pipelines.
- View Topology and logs java POD.
- Check in your browser the app run in production mode, status and metric views.
- Create Pipeline jhipster-pyhipster-generator-pipeline
oc apply -f jhipster-pyhipster-generator-pipeline.yaml
Output
jhipster-devspace (master) $ oc apply -f jhipster-pyhipster-generator-pipeline.yaml
persistentvolumeclaim/workspace created
task.tekton.dev/cleanup-workspace created
task.tekton.dev/pyhipster-generator created
task.tekton.dev/jhipster-generator created
pipeline.tekton.dev/jhipster-pyhipster-generator-pipeline created
- Generate Access Token from your gitlab repo with api, read_repository, write_repository rule.
https://gitlab.com/-/user_settings/personal_access_tokens
- Run pipeline jhipster-generator-tekton-pipeline on OpenShift Pipeline. Complate de GITLAB paramaters with your repo info.
- Check your GitLab Repository to see if the app was created
NOTE: You need destroy jhipster-devspace or pyhipster-devpsace workspace for try devspaces app create because the application was build with devfile.yaml from this repository. Custom tasks "cleanup-workspace" fail but work because remove all files from directory workspace and don't remove mountpath.
Try to changing the value from "quartz" to "vapor" in "clientTheme" from template-jdl/jhipster-despace-model.jdl and run steps 1 to 4 for re-generate proyect section.
template-jdl/jhipster-despace-model.jdl
application {
config {
applicationType monolith
baseName delivery
packageName com.delivery.app
authenticationType jwt
prodDatabaseType mariadb
databaseType sql
devDatabaseType h2Memory
buildTool maven
clientFramework vue
clientTheme vapor //<---This
clientThemeVariant dark
enableTranslation true
nativeLanguage es
languages [en, nl]
}
entities *
}
The landing page should look like this: