jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

Deploying fresh app to Openshift I get an error with NPM INSTALL #1896

Closed freakjony1 closed 8 years ago

freakjony1 commented 9 years ago

Hi guys, I'm trying to use following doc http://jhipster.github.io/openshift.html in order to try openshift deployment: After I run git push, I get this error

warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

When push.default is set to 'matching', git will push local branches to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple' behavior, which only pushes the current branch to the corresponding remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 372 bytes | 0 bytes/s, done. Total 4 (delta 3), reused 0 (delta 0) remote: Stopping DIY cartridge remote: CLIENT_RESULT: Application is already stopped remote: Stopping MySQL 5.5 cartridge remote: Repairing links for 1 deployments remote: Building git ref 'master', commit e2d4d0a remote: + '[' '!' -d /var/lib/openshift/55d517317628e105b9000110/app-root/data/jdk1.8.0_40 ']' remote: + '[' '!' -d /var/lib/openshift/55d517317628e105b9000110/app-root/data/apache-maven-3.3.3 ']' remote: + cd /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/ remote: + export M2=/var/lib/openshift/55d517317628e105b9000110/app-root/data/apache-maven-3.3.3/bin remote: + M2=/var/lib/openshift/55d517317628e105b9000110/app-root/data/apache-maven-3.3.3/bin remote: + export JAVA_HOME=/var/lib/openshift/55d517317628e105b9000110/app-root/data/jdk1.8.0_40 remote: + JAVA_HOME=/var/lib/openshift/55d517317628e105b9000110/app-root/data/jdk1.8.0_40 remote: + export PATH=/var/lib/openshift/55d517317628e105b9000110/app-root/data/jdk1.8.0_40/bin:/var/lib/openshift/55d517317628e105b9000110/app-root/data/apache-maven-3.3.3/bin:/bin:/usr/bin:/usr/sbin remote: + PATH=/var/lib/openshift/55d517317628e105b9000110/app-root/data/jdk1.8.0_40/bin:/var/lib/openshift/55d517317628e105b9000110/app-root/data/apache-maven-3.3.3/bin:/bin:/usr/bin:/usr/sbin remote: + mvn -B package -DskipTests=true -Dmaven.repo.local=/var/lib/openshift/55d517317628e105b9000110/app-root/data/maven/repository remote: [INFO] Scanning for projects... remote: [INFO]
remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] Building demo 0.0.1-SNAPSHOT remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] remote: [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ demo --- remote: [INFO] remote: [INFO] --- maven-processor-plugin:2.2.4:process (process) @ demo --- remote: [WARNING] diagnostic: warning: The following options were not recognized by any processor: '[mapstruct.defaultComponentModel, mapstruct.suppressGeneratorTimestamp]' remote: [INFO] remote: [INFO] --- yeoman-maven-plugin:0.4:build (run-grunt) @ demo --- remote: [INFO] node version : remote: v0.6.20 remote: [INFO] npm version : remote: 1.1.37 remote: [INFO] -------------------------------------- remote: [INFO] NPM INSTALL remote: [INFO] -------------------------------------- remote: npm ERR! install Couldn't read dependencies remote: npm ERR! Error: ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' remote: npm ERR! { [Error: ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json'] remote: npm ERR! errno: 34, remote: npm ERR! code: 'ENOENT', remote: npm ERR! path: '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' } remote: npm ERR! You may report this log at: remote: npm ERR! http://github.com/isaacs/npm/issues remote: npm ERR! or email it to: remote: npm ERR! npm-@googlegroups.com remote: remote: npm ERR! System Linux 2.6.32-504.34.1.el6.x86_64 remote: npm ERR! command "node" "/usr/bin/npm" "install" remote: npm ERR! cwd /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo remote: npm ERR! node -v v0.6.20 remote: npm ERR! npm -v 1.1.37 remote: npm ERR! path /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json remote: npm ERR! code ENOENT remote: npm ERR! message ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' remote: npm ERR! errno 34 remote: npm ERR! 34 errno remote: npm ERR! remote: npm ERR! Additional logging details can be found in: remote: npm ERR! /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/npm-debug.log remote: npm ERR! not ok code undefined remote: npm ERR! not ok code 34 remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] BUILD FAILURE remote: [INFO] ------------------------------------------------------------------------ remote: [INFO] Total time: 29.674 s remote: [INFO] Finished at: 2015-08-19T21:58:54-04:00 remote: [INFO] Final Memory: 38M/376M remote: [INFO] ------------------------------------------------------------------------ remote: [ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.4:build (run-grunt) on project demo: Error during : npm install: Process exited with an error: 34 (Exit value: 34) -> [Help 1] remote: [ERROR] remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging. remote: [ERROR] remote: [ERROR] For more information about the errors and possible solutions, please read the following articles: remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException remote: An error occurred executing 'gear postreceive' (exit code: 1) remote: Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 55d517317628e105b9000110 application demo

npm-debug.log 0 info it worked if it ends with ok 1 verbose cli [ 'node', '/usr/bin/npm', 'install' ] 2 info using npm@1.1.37 3 info using node@v0.6.20 4 verbose config file /var/lib/openshift/55d517317628e105b9000110/.npmrc 5 verbose config file /usr/etc/npmrc 6 verbose config file /usr/lib/node_modules/npm/npmrc 7 verbose read json /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json 8 error install Couldn't read dependencies 9 error Error: ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' 9 error { [Error: ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json'] 9 error errno: 34, 9 error code: 'ENOENT', 9 error path: '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' } 10 error You may report this log at: 10 error http://github.com/isaacs/npm/issues 10 error or email it to: 10 error npm-@googlegroups.com 11 error System Linux 2.6.32-504.34.1.el6.x86_64 12 error command "node" "/usr/bin/npm" "install" 13 error cwd /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo 14 error node -v v0.6.20 15 error npm -v 1.1.37 16 error path /var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json 17 error code ENOENT 18 error message ENOENT, open '/var/lib/openshift/55d517317628e105b9000110/app-root/runtime/repo/package.json' 19 error errno 34 20 error 34 errno 21 verbose exit [ 34, true ]

demo.log Unrecognized option: --spring.profiles.active=prod Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

.yo-rc.json { "generator-jhipster": { "baseName": "demo", "packageName": "com.mycompany.myapp", "packageFolder": "com/mycompany/myapp", "authenticationType": "xauth", "hibernateCache": "ehcache", "clusteredHttpSession": "no", "websocket": "no", "databaseType": "sql", "devDatabaseType": "mysql", "prodDatabaseType": "mysql", "searchEngine": "elasticsearch", "useCompass": true, "buildTool": "maven", "frontendBuilder": "grunt", "javaVersion": "8", "enableTranslation": true, "rememberMeKey": "3443be2fd49c3d1803f0e3a0ad5fe28b10ef1fd2" } }

jdubois commented 9 years ago

Looks like a lot of errors to me!! It's not very clear for me, at least there are some strange stuff:

freakjony1 commented 9 years ago

OK I delete de app and I made the new one without ElasticSearch, but I when i try to access I've got an 503 Service Temporarily Unavailable error.

Logs File demo2.log [INFO] com.mycompany.myapp.Application - Starting Application on ex-std-node686.prod.rhcloud.com with PID 179726 (started by 55d5b8c77628e1b08e000127 in /var/lib/openshift/55d5b8c77628e1b08e000127/diy) [DEBUG] com.mycompany.myapp.Application - Running with Spring Boot v1.2.5.RELEASE, Spring v4.1.7.RELEASE [WARN] org.springframework.core.io.support.PathMatchingResourcePatternResolver - Skipping [/var/lib/openshift/55d5b8c77628e1b08e000127/app-root/runtime/repo/target/demo2-0.0.1-SNAPSHOT.war] because it does not denote a directory

diy.log

2015-08-20 07:24:43] INFO WEBrick 1.3.1 [2015-08-20 07:24:43] INFO ruby 1.8.7 (2013-06-27) [x86_64-linux] [2015-08-20 07:24:43] INFO WEBrick::HTTPServer#start: pid=28001 port=8080 [2015-08-20 07:26:20] INFO going to shutdown ... [2015-08-20 07:26:20] INFO WEBrick::HTTPServer#start done. [2015-08-20 07:26:45] INFO WEBrick 1.3.1 [2015-08-20 07:26:45] INFO ruby 1.8.7 (2013-06-27) [x86_64-linux] [2015-08-20 07:26:45] INFO WEBrick::HTTPServer#start: pid=36912 port=8080 [2015-08-20 07:27:16] INFO going to shutdown ... [2015-08-20 07:27:16] INFO WEBrick::HTTPServer#start done. [2015-08-20 07:27:16] INFO WEBrick 1.3.1 [2015-08-20 07:27:16] INFO ruby 1.8.7 (2013-06-27) [x86_64-linux] [2015-08-20 07:27:16] INFO WEBrick::HTTPServer#start: pid=40579 port=8080 [2015-08-20 07:29:16] INFO going to shutdown ... [2015-08-20 07:29:16] INFO WEBrick::HTTPServer#start done.

mysql.log

[INFO] com.mycompany.myapp.Application - Starting Application on ex-std-node686.prod.rhcloud.com with PID 284975 (started by 55d5b8c77628e1b08e000127 in /var/lib/openshift/55d5b8c77628e1b08e000127/diy) [DEBUG] com.mycompany.myapp.Application - Running with Spring Boot v1.2.5.RELEASE, Spring v4.1.7.RELEASE [WARN] org.springframework.core.io.support.PathMatchingResourcePatternResolver - Skipping [/var/lib/openshift/55d5b8c77628e1b08e000127/app-root/runtime/repo/target/demo2-0.0.1-SNAPSHOT.war] because it does not denote a directory [demo2-appedidostest.rhcloud.com 55d5b8c77628e1b08e000127]> cat app-root/logs/mysql.log 150820 22:38:10 mysqld_safe Logging to '/var/lib/openshift/55d5b8c77628e1b08e000127/mysql//stdout.err'. 150820 22:38:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/55d5b8c77628e1b08e000127/mysql/data/ 150820 22:38:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/55d5b8c77628e1b08e000127/mysql/data/ 150820 22:38:10 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld (mysqld 5.5.45) starting as process 298488 ... 150820 22:38:10 [Note] Plugin 'FEDERATED' is disabled. 150820 22:38:10 InnoDB: The InnoDB memory heap is disabled 150820 22:38:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150820 22:38:10 InnoDB: Compressed tables use zlib 1.2.3 150820 22:38:10 InnoDB: Using Linux native AIO 150820 22:38:10 InnoDB: Initializing buffer pool, size = 32.0M 150820 22:38:10 InnoDB: Completed initialization of buffer pool 150820 22:38:10 InnoDB: highest supported file format is Barracuda. 150820 22:38:11 InnoDB: Waiting for the background threads to start 150820 22:38:12 InnoDB: 5.5.45 started; log sequence number 1595675 150820 22:38:12 [Note] Server hostname (bind-address): '127.10.183.130'; port: 3306 150820 22:38:12 [Note] - '127.10.183.130' resolves to '127.10.183.130'; 150820 22:38:12 [Note] Server socket created on IP: '127.10.183.130'. 150820 22:38:12 [Warning] 'proxies_priv' entry '@ root@ex-std-node686.prod.rhcloud.com' ignored in --skip-name-resolve mode. 150820 22:38:12 [Note] Event Scheduler: Loaded 0 events 150820 22:38:12 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connections. Version: '5.5.45' socket: '/var/lib/openshift/55d5b8c77628e1b08e000127/mysql//socket/mysql.sock' port: 3306 MySQL Community Server (GPL

.yo-rc.json { "generator-jhipster": { "baseName": "demo2", "packageName": "com.mycompany.myapp", "packageFolder": "com/mycompany/myapp", "authenticationType": "xauth", "hibernateCache": "ehcache", "clusteredHttpSession": "no", "websocket": "no", "databaseType": "sql", "devDatabaseType": "mysql", "prodDatabaseType": "mysql", "searchEngine": "no", "useCompass": false, "buildTool": "maven", "frontendBuilder": "grunt", "javaVersion": "8", "enableTranslation": true, "rememberMeKey": "5174e2954415da5b95ec193aaa8bf38236f8c4b3" }

jdubois commented 9 years ago

@outis10 I'm deleting your comment as you have your database credentials being shown in the logs!!! No time to read it, security first!

outis10 commented 9 years ago

@jdubois My mistake. Again I have an error deploying in openshift. I use jhipster. 2.20 without any changes and no added entities.

I can´t make start the app, I do not if because an issue or due to a capacity problems (I have a free account)

I get this message in web browser Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance 
downtime or capacity problems. Please try again later.
Apache/2.2.15 (Red Hat) Server at jh220-kalitron.rhcloud.com Port 80

This is the yo-rc Config:

    {
  "generator-jhipster": {
    "baseName": "jh220",
    "packageName": "com.kalitron.jh220",
    "packageFolder": "com/kalitron/jh220",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": "no",
    "websocket": "no",
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "mysql",
    "searchEngine": "no",
    "useSass": false,
    "buildTool": "maven",
    "frontendBuilder": "grunt",
    "javaVersion": "8",
    "enableTranslation": true,
    "rememberMeKey": "a90882765bffd6412a8e51eb852b9dd3b9f6a181"
  }
}

This is de console when I run GIT PUSH

λ git push                                                                                                     
Counting objects: 13, done.                                                                                    
Delta compression using up to 4 threads.                                                                       
Compressing objects: 100% (6/6), done.                                                                         
Writing objects: 100% (7/7), 697 bytes | 0 bytes/s, done.                                                      
Total 7 (delta 4), reused 0 (delta 0)                                                                          
remote: Stopping DIY cartridge                                                                                 
remote: CLIENT_RESULT: Application is already stopped                                                          
remote: Stopping PHPMyAdmin cartridge                                                                          
remote: Building git ref 'master', commit cb27867                                                              
remote: NOTE: The .openshift/action_hooks/pre_build hook is not executable, to make it executable:             
remote:       On Windows run:   git update-index --chmod=+x .openshift/action_hooks/pre_build                  
remote:       On Linux/OSX run: chmod +x .openshift/action_hooks/pre_build                                     
remote: NOTE: The .openshift/action_hooks/build hook is not executable, to make it executable:                 
remote:       On Windows run:   git update-index --chmod=+x .openshift/action_hooks/build                      
remote:       On Linux/OSX run: chmod +x .openshift/action_hooks/build                                         
remote: Preparing build for deployment                                                                         
remote: Deployment id is 36058254                                                                              
remote: Activating deployment                                                                                  
remote: Starting MySQL 5.5 cartridge                                                                           
remote: Starting PHPMyAdmin cartridge                                                                          
remote: Starting DIY cartridge                                                                                 
remote: ++ ls '/var/lib/openshift/xxxxf5cfd9990000ce/app-root/runtime/repo/target/*.war'                 
remote: ++ head -n1                                                                                            
remote: ls: cannot access /var/lib/openshift/xxx9f5cfd9990000ce/app-root/runtime/repo/target/*.war: No su
ch file or directory                                                                                           
remote: + jar=                                                                                                 
remote: + export JAVA_HOME=/var/lib/openshift/xxxx89f5cfd9990000ce/app-root/data/jdk1.8.0_40               
remote: + JAVA_HOME=/var/lib/openshift/xxxx5cfd9990000ce/app-root/data/jdk1.8.0_40                      
remote: + export PATH=/var/lib/openshift/xxxxx9f5cfd9990000ce/app-root/data/jdk1.8.0_40/bin:/bin:/usr/bin:/
usr/sbin                                                                                                       
remote: + PATH=/var/lib/openshift/xxxxf5cfd9990000ce/app-root/data/jdk1.8.0_40/bin:/bin:/usr/bin:/usr/sbi
n                                                                                                              
remote: + nohup java -server -jar --spring.profiles.active=prod --server.address=XXX.XXX.XXX.XXX --server.port=80
80 --spring.datasource.url=jdbc:mysql://XXX.XXX.XXX.XXX:3306/jh220 --spring.datasource.username=******* --sp
ring.datasource.password=*******                                                                          
remote: -------------------------                                                                              
remote: Git Post-Receive Result: success                                                                       
remote: Activation status: success                                                                             
remote: Deployment completed with status: success                                                              
To ssh://55fXXXXf5cfd9990000ce@jh220-kalitron.rhcloud.com/~/git/jh220.git/                                  
   deb11fb..cb27867  master -> master                                                                          

I use a tail command and this is the message:

==> app-root/logs/phpmyadmin.log <==
[Sun Sep 13 21:39:16 2015] [notice] caught SIGWINCH, shutting down gracefully
- - - [13/Sep/2015:21:39:16 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
[Sun Sep 13 21:44:33 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c3,c430
[Sun Sep 13 21:44:33 2015] [notice] Digest: generating secret for digest authentication ...
[Sun Sep 13 21:44:33 2015] [notice] Digest: done
[Sun Sep 13 21:44:33 2015] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
/usr/bin/tail: app-root/logs/jh220.log: file truncated
Unrecognized option: --spring.profiles.active=prod
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Thanks in advance!

deepu105 commented 9 years ago

@jdubois this doesnt seem like JHipster issue to me

jdubois commented 9 years ago

I confirm this doesn't work at all anymore.... They must have changed their API.

And of course, looking at my logs I see nothing.

I don't have the time to work on this. I'll try to find someone who has any interest in working on this, otherwise we will remove this sub-generator.

jdubois commented 8 years ago

This has been broken for more than 1 month, so I'm removing our Openshift support in the official documentation. From my understanding Openshift completely changed the way they work, and broke up everything... Thanks Redhat for not taking care of backward compatibility!!

atomfrede commented 8 years ago

I think the new OpenShift is based on google kubernetes, so it works with docker containers under the hood (as far as I know). So maybe we can use our docker containers for deploying to openshift somehow,

jdubois commented 8 years ago

So this should be pretty easy, it's mostly lack of time from my side

atomfrede commented 8 years ago

Ah, I didn't know of an official guide.

jdubois commented 8 years ago

@atomfrede yes the doc is here: http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#cloud-deployment-openshift

robertolos commented 8 years ago

I'm facing the same issue, in order to solve the error remote: npm ERR! Error: ENOENT, open '/var/lib/openshift/5645bca00c1e666e70000083/app-root/runtime/repo/package.json' I committed the file package.json, but then I have many issues because npm doesn't have write access to /var/lib/openshift/5645bca00c1e666e70000083/.npm I fixed this issue by setting the following environment variables in the ssh console: set_env_var 'NPM_CONFIG_USERCONFIG' '${OPENSHIFT_DATA_DIR}/.npmrc' $OPENSHIFT_HOMEDIR/.env/user_vars set_env_var 'NPM_CONFIG_CACHE' '${OPENSHIFT_DATA_DIR}/.npm' $OPENSHIFT_HOMEDIR/.env/user_vars The new npm configuration can be checked with the command: npm config list After re-running the deployment I get another write permission issue, caused by npm-gyp, not able to write in $OPENSHIFT_HOMEDIR/.npm-gyp The idea is to change the npm-gyp configuration, moving the .npm-gyp folder in ${OPENSHIFT_DATA_DIR} as before but I'm not able to find the right variable name/setting

UPDATE: I deployed a new app generated with the jhipster 2.23.1, I get now the following errors: http://pastebin.com/fMp7nnPY Looks like is an issue caused by an old version of npm as explained here https://github.com/npm/npm/issues/6101

pascalgrimaud commented 8 years ago

node : 0.6.20 npm : 1.1.37 I think it's very old !

robertolos commented 8 years ago

I've been able to upgrade node.js on openshift using the openshift way https://blog.openshift.com/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style/ The page doesn't looks updated, check the documentation on github https://github.com/ramr/nodejs-custom-version-openshift.git

Now NPM builds fine, but I have a new problem with the generation of the war file:

npm info ok 
Preparing build for deployment
Deployment id is 11483658
Activating deployment
Starting MySQL 5.5 cartridge
  - Checking to see if Node.js version 0.12.5 is installed ... 
  - Node.js version 0.12.5 is already installed
/var/lib/openshift/5645bca00c1e666e70000083/app-root/runtime/repo//.openshift/lib/utils: line 97: /var/lib/openshift/5645bca00c1e666e70000083//nodejs/configuration/node.env: No such file or directory
Starting DIY cartridge
++ head -n1
++ ls '/var/lib/openshift/5645bca00c1e666e70000083/app-root/runtime/repo/target/*.war'
ls: cannot access /var/lib/openshift/5645bca00c1e666e70000083/app-root/runtime/repo/target/*.war: No such file or directory
+ jar=
+ export JAVA_HOME=/var/lib/openshift/5645bca00c1e666e70000083/app-root/data/jdk1.8.0_40
+ JAVA_HOME=/var/lib/openshift/5645bca00c1e666e70000083/app-root/data/jdk1.8.0_40
+ export PATH=/var/lib/openshift/5645bca00c1e666e70000083/app-root/data/jdk1.8.0_40/bin:/bin:/usr/bin:/usr/sbin
+ PATH=/var/lib/openshift/5645bca00c1e666e70000083/app-root/data/jdk1.8.0_40/bin:/bin:/usr/bin:/usr/sbin
+ nohup java -server -jar --spring.profiles.active=prod --server.address=127.13.137.1 --server.port=8080 --spring.datasource.url=jdbc:mysql://127.13.137.2:3306/test --spring.datasource.username=********** --spring.datasource.password=**********
jdubois commented 8 years ago

As the OpenShift sub-generator has been broken for a long time, and as nobody is working on it, I am considering to remove it. If anyone is interested in doing OpenShift support for JHipster, this should be one of our new "modules".

-> if anyone is interested please add a comment to this ticket

mraible commented 8 years ago

I talked to a guy from Red Hat last week and let him know about this issue. He said he'd forward it on to OpenShift folks to look at.

Isn't there a way to deploy a war/jar to OpenShift like we do for Heroku?

jdubois commented 8 years ago

Yes it's probably not that difficult, but it's just that nobody's working on it... so if there is a lack of interest in the community, we can't support it. The module system is a good answer for this: if someone, for example from Redhat, is ready to do this, then it would be his own module. He doesn't need to have us merge his code, and he has to support his own code.

jdubois commented 8 years ago

So still nobody interested in OpenShift -> I will remove OpenShift support in our next release

deepu105 commented 8 years ago

I guess all the cloud generators can be made into modules

On Wed, 30 Dec 2015 6:27 pm Julien Dubois notifications@github.com wrote:

So still nobody interested in OpenShift -> I will remove OpenShift support in our next release

— Reply to this email directly or view it on GitHub https://github.com/jhipster/generator-jhipster/issues/1896#issuecomment-167974061 .

mistvan commented 8 years ago

Hi guys, I am interested in openshift deploy. I recently found tutorial to deploy war file to openshift via SCP/SFTP: https://developers.openshift.com/en/tomcat-deployment-options.html#_deploying_your_war_files_using_scp_sftp So I would like to test this these days. Will get back to you then.

Thanks

jdubois commented 8 years ago

@mistvan OK then we'll keep the ticket opened for you! You should have a look at https://blog.openshift.com/using-openshift-enterprise-grade-spring-boot-deployments/

jdubois commented 8 years ago

As this has been broken for a long time I have:

Those can be easily reverted, of course, but:

@mistvan if you still want to work on OpenShift support, I will happily merge it! But for the moment I'm closing this and I'm removing our OpenShift support.

raphaelbrugier commented 8 years ago

Hi,

Sorry @jdubois , I told you I was working on the issue but didn't take the time to finish the investigation :(

For history here what I found when I started to look into :

Current problems :

{ [Error: Command failed: /bin/sh -c git update-index --chmod=+x .openshift/action_hooks/build && git update-index --chmod=+x .openshift/action_hooks/start && git update-index --chmod=+x .openshift/action_hooks/stop && git update-index --chmod=+x .openshift/action_hooks/pre_build && git commit -m "Chmod"
error: .openshift/action_hooks/build: does not exist and --remove not passed
fatal: Unable to process path .openshift/action_hooks/build
]

After trying to debug a few times, I decided to restart from a fresh Spring-boot install and create the hook scripts manually. I could not find a correct setup where the application is automically stopped, packaged, start after a push to the openshift repository.

@jdubois told me about an alternative of the current openshift deployment process : https://blog.openshift.com/using-openshift-enterprise-grade-spring-boot-deployments/

This method is more flexible and modern. It combines docker and kubernetes to deploy the application in an appropriate container. Unfortunately, it's working with OpenShift v3 which is not the version deployed with the free plan available at openshift.com (which uses the cartridge system)

Deploying OpenShift v3 seems to be easily feasible on aws or google compute engine or even localy, see openshift.org , but it's not adressing the same use case anymore.

This definitely adds arguments to remove the OpenShift support!

@mistvan let me know if you start to work on it and have questions on this also. I'd be happy to help you

mistvan commented 8 years ago

Hi guys,

I dont understand the thing that it is not addressing the same use case anymore.

Last week I have used diy cartridge and was able to upload war file to openshift v2 here http://songbook-mistvan.rhcloud.com/. But I am still experiencing quota exceeding issue there.

So @raphaelbrugier, what is your email address so I can ask you about openshift platform.

Thanks

raphaelbrugier commented 8 years ago

Hi @mistvan,

Sorry for the confusion, the initial problem I was trying to solve was #778 which I believe require to use OpenShift V3 and not the cartridge system (if following the post on the openshift blog https://blog.openshift.com/using-openshift-enterprise-grade-spring-boot-deployments/ )

And by different use case, I meant this would require to setup an OpenShiftV3 infrastructure which is more complicated than just using the free offer on www.openshift.com and out of scope of JHipster

Maybe I missed something on the RedHat website, but I don't understand why they still propose the old openshift version on a free tier and by the same time promote OpenShiftV3

you can mail me: raphael dot brugier at gmail !