generator-jhipster
generator-jhipster copied to clipboard
jhipster k8s generator not working
Overview of the issue
jhipster k8s command generates nothing
Motivation for or Use Case
I tried to deploy a monolith jhipster app I just created, to a configured Azure AKS, however after running jhipster k8s, it didn't ask my any question and doesn't seem generate all the files it needed.
Reproduce the error
"jhipster app" to create app "jhipster k8s" to generate k8s config "bash ./kubctl-apply.sh -f" to deploy this is the output
feiya200@Feis-M1-Pro azAKS2 % jhipster k8s
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.1.0
⎈ Welcome to the JHipster Kubernetes Generator ⎈
Files will be generated in folder: /Users/feiya200/Downloads/azAKS2
INFO! Docker is installed
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.7
WARNING: version difference between client (1.29) and server (1.27) exceeds the supported minor version skew of +/-1
✔ applying multi-step templates
✔ prettier configuration files committed to disk
identical kubectl-apply.sh
identical K8S-README.md
identical kustomization.yml
identical skaffold.yml
✔ files committed to disk
No change to package.json was detected. No package manager install will be executed.
Checking Docker images in applications directories...
INFO!
Kubernetes configuration successfully generated!
WARNING!
You will need to push your image to a registry. If you have not done so, use the following commands to tag and push the images:
You can deploy all your apps by running the following kubectl command:
INFO! bash kubectl-apply.sh -f
[OR]
If you want to use kustomize configuration, then run the following command:
INFO! bash kubectl-apply.sh -k
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
feiya200@Feis-M1-Pro azAKS2 % bash kubectl-apply.sh -f
Applying default `kubectl apply -f`
Related issues
Suggest a Fix
JHipster Version(s)
v8.1.0
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "azAks2",
"buildTool": "maven",
"cacheProvider": "redis",
"clientFramework": "react",
"clientTestFrameworks": [],
"clientTheme": "none",
"creationTimestamp": 1707463431628,
"databaseType": "sql",
"dbRandomPassword": "eb61f1a04c3bf8bd3a4f24cb24f9d4f9a5850a506d38025f5370e8b6618d",
"devDatabaseType": "postgresql",
"devServerPort": 9060,
"enableGradleEnterprise": null,
"enableHibernateCache": true,
"enableSwaggerCodegen": false,
"enableTranslation": true,
"entities": [],
"feignClient": false,
"gradleEnterpriseHost": null,
"jhipsterVersion": "8.1.0",
"languages": [
"en"
],
"messageBroker": false,
"microfrontend": null,
"microfrontends": [],
"monorepository": true,
"nativeLanguage": "en",
"packageName": "com.mycompany.myapp",
"prodDatabaseType": "postgresql",
"reactive": false,
"searchEngine": false,
"serverPort": null,
"serverSideOptions": [],
"serviceDiscoveryType": false,
"skipCommitHook": true,
"testFrameworks": [],
"websocket": false,
"withAdminUi": true
}
}
Environment and Tools
openjdk version "21.0.2" 2024-01-16 LTS OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)
git version 2.39.3 (Apple Git-145)
node: v18.18.2 npm: 9.8.1
Docker version 25.0.2, build 29cf629
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
MacOS 14.3
- [ x] Checking this box is mandatory (this is just to show you read everything)
Does the generator only works with micro-service, not monolith?
I'm experiencing the same issue with JHipster 8.6.0.
The sub-generator is supposed to ask what type of application we have (monolith vs microservce), so it should work with both and it used to work for me with JHipster v7.
Additionally, when I run the generator in the parent folder of my app, then it asks the questions, but when I give it the location of my monolith app, it fails saying it didn't find any monolith apps there.