{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/8887","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/8887/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/8887/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/8887/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/8887","id":384671787,"node_id":"MDU6SXNzdWUzODQ2NzE3ODc=","number":8887,"title":"JHipster Openshift deployment failure","user":{"login":"seyfullah","id":2758671,"node_id":"MDQ6VXNlcjI3NTg2NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/2758671?v=4","gravatar_id":"","url":"https://api.github.com/users/seyfullah","html_url":"https://github.com/seyfullah","followers_url":"https://api.github.com/users/seyfullah/followers","following_url":"https://api.github.com/users/seyfullah/following{/other_user}","gists_url":"https://api.github.com/users/seyfullah/gists{/gist_id}","starred_url":"https://api.github.com/users/seyfullah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seyfullah/subscriptions","organizations_url":"https://api.github.com/users/seyfullah/orgs","repos_url":"https://api.github.com/users/seyfullah/repos","events_url":"https://api.github.com/users/seyfullah/events{/privacy}","received_events_url":"https://api.github.com/users/seyfullah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-27T08:13:52Z","updated_at":"2018-11-27T12:34:06Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n- Please follow the issue template below for bug reports.\r\n- If you have a support request rather than a bug, please use [Stack Overflow](http://stackoverflow.com/questions/tagged/jhipster) with the JHipster tag.\r\n- For bug reports it is mandatory to run the command `jhipster info` in your project's root folder, and paste the result here.\r\n- Tickets opened without any of these pieces of information will be **closed** without any explanation.\r\n-->\r\n\r\n##### **Overview of the issue**\r\n\r\n<!-- Explain the bug, if an error is being thrown a stack trace helps -->\r\n\r\n1.  When OCP runs applications, there is an error as follows:\r\nChmod entrypoint.sh not permitted\r\n\r\n2. Once I deploy an image, next image deployments are not read. \r\nBecause of this setting: \r\nimagePullPolicy: IfNotPresent \r\n\r\n3. The following command doesn't generate a proper image, pom.xml jib-maven-plugin settings are not working correctly, it is not the same thing with DockerFile. Dockerfile is not being used to generate image. RUN adduser, WORKDIR commands are missing in this pom.xml file. \r\nmvnw package -Pprod jib:dockerBuild\r\n\r\nDockerFile\r\nFROM openjdk:8-jre-alpine\r\n\r\nENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \\\r\n    JHIPSTER_SLEEP=0 \\\r\n    JAVA_OPTS=\"\" \r\n\r\n## Add a jhipster user to run our application so that it doesn't need to run as root\r\nRUN adduser -D -s /bin/sh jhipster\r\nWORKDIR /home/jhipster\r\n\r\nADD entrypoint.sh entrypoint.sh\r\nRUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh\r\nUSER jhipster\r\n\r\nENTRYPOINT [\"./entrypoint.sh\"]\r\n\r\nEXPOSE 8202 5701/udp\r\n\r\nADD *.war app.war\r\n\r\npom.xml\r\n                <plugin>\r\n                    <groupId>com.google.cloud.tools</groupId>\r\n                    <artifactId>jib-maven-plugin</artifactId>\r\n                    <version>${jib-maven-plugin.version}</version>\r\n                    <configuration>\r\n                      <from>\r\n                          <image>openjdk:8-jre-alpine</image>\r\n                      </from>\r\n                      <to>\r\n                          <image>jhgateway:latest</image>\r\n                      </to>\r\n                      <container>\r\n                          <entrypoint>\r\n                              <shell>sh</shell>\r\n                              <option>-c</option>\r\n                              <arg>chmod +x /entrypoint.sh &amp;&amp; sync &amp;&amp; /entrypoint.sh</arg>\r\n                          </entrypoint>\r\n                          <ports>\r\n                              <port>8202</port>\r\n                              <port>5701/udp</port>\r\n                          </ports>\r\n                          <environment>\r\n                              <SPRING_OUTPUT_ANSI_ENABLED>ALWAYS</SPRING_OUTPUT_ANSI_ENABLED>\r\n                              <JHIPSTER_SLEEP>0</JHIPSTER_SLEEP>\r\n                          </environment>\r\n                          <useCurrentTimestamp>true</useCurrentTimestamp>\r\n                      </container>\r\n                  </configuration>\r\n                </plugin>\r\n\r\n4. Application and Gateway postgresql pods have following errors after my work arounds.\r\nSample pod name: jhapplication-postgresqldb-4-lw2tm  \r\nchown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0805': Permission denied\r\n--\r\n  | chown: changing ownership of '/var/lib/postgresql/data/.snapshot': Read-only file system\r\n\r\nchown: cannot read directory '/var/lib/postgresql/data/.snapshot/daily.2018-11-26_0010': Permission denied\r\n--\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0605': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0705': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0905': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/weekly.2018-11-25_0015': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_1005': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0505': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/weekly.2018-11-18_0015': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/daily.2018-11-27_0010': Permission denied\r\n  | chown: cannot read directory '/var/lib/postgresql/data/.snapshot/hourly.2018-11-27_0805': Permission denied\r\n  | chown: changing ownership of '/var/lib/postgresql/data/.snapshot': Read-only file system\r\n\r\n\r\n\r\n\r\n##### **Motivation for or Use Case**\r\n\r\n<!-- Explain why this is a bug for you -->\r\nThe generated files doesn't supply a proper way for deploying openshift. I know openshift deployment is in Beta now.\r\n\r\n##### **Reproduce the error**\r\n\r\n<!-- For bug reports, an unambiguous set of steps to reproduce the error -->\r\nI run following commands for building microservice application and gateway.\r\njhipster\r\njhipster openshift \r\nmvnw package -Pprod jib:dockerBuild\r\n ../ocp/ocp-apply.sh \r\n\r\n##### **Related issues**\r\n\r\n<!-- Has a similar issue been reported before? Please search both closed & open issues -->\r\nhttps://github.com/jhipster/generator-jhipster/issues/8869\r\n\r\n##### **Suggest a Fix**\r\n\r\n<!-- If you can't fix the bug yourself, perhaps you can point to what might be\r\n  causing the problem (line of code or commit) -->\r\nAs work arounds I followed these steps:\r\n1. I didn't use this command:\r\nmvnw package -Pprod jib:dockerBuild\r\nI used these command:\r\nmvnw package -Pprod\r\ncopy target\\*.war src\\main\\docker\r\ncd src\\main\\docker\r\ndocker build -t stikic/jhapplication .\r\n2. To pull new images I changed imagePullPolicy in aplication and gateway deployment.yml files as imagePullPolicy: Always\r\n3. In DockerFile files I added HOME variable, because it was giving error.\r\nJAVA_OPTS=\"\"\r\nto \r\nJAVA_OPTS=\"\" \\\r\nHOME=\"/home/jhipster\"\r\n4. I have no work around yet.\r\n\r\n##### **JHipster Version(s)**\r\n\r\n<!--\r\nWhich version of JHipster are you using, is it a regression?\r\n-->\r\n5.6.1\r\n##### **JHipster configuration**\r\n\r\n<!--\r\nTo provide all information we need, you should run `jhipster info` in the project root folder, and\r\ncopy/paste the result here.\r\nThe `.yo-rc.json` file generated in the root folder is mandatory for bug reports. This will help us to replicate the scenario.\r\nYou should remove any sensitive information like the rememberMe key or the jwtSecretKey key.\r\n-->\r\nINFO! Using JHipster version installed locally in current project's node_modules\r\nExecuting jhipster:info\r\nOptions: from-cli: true\r\nWelcome to the JHipster Information Sub-Generator\r\n\r\n##### **JHipster Version(s)**\r\n\r\n```\r\njh-application@0.0.0 c:\\Next\\next-all-repos\\next-JHipster\\jhApplication\r\n`-- generator-jhipster@5.6.1\r\n\r\n```\r\n\r\n\r\n##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**\r\n\r\n\r\n<details>\r\n<summary>.yo-rc.json file</summary>\r\n<pre>\r\n{\r\n  \"generator-jhipster\": {\r\n    \"promptValues\": {\r\n      \"packageName\": \"com.vodafone.next\",\r\n      \"nativeLanguage\": \"tr\"\r\n    },\r\n    \"jhipsterVersion\": \"5.6.1\",\r\n    \"applicationType\": \"microservice\",\r\n    \"baseName\": \"jhApplication\",\r\n    \"packageName\": \"com.vodafone.next\",\r\n    \"packageFolder\": \"com/vodafone/next\",\r\n    \"serverPort\": \"8201\",\r\n    \"authenticationType\": \"oauth2\",\r\n    \"cacheProvider\": \"hazelcast\",\r\n    \"enableHibernateCache\": true,\r\n    \"websocket\": false,\r\n    \"databaseType\": \"sql\",\r\n    \"devDatabaseType\": \"h2Disk\",\r\n    \"prodDatabaseType\": \"postgresql\",\r\n    \"searchEngine\": false,\r\n    \"messageBroker\": false,\r\n    \"serviceDiscoveryType\": \"eureka\",\r\n    \"buildTool\": \"maven\",\r\n    \"enableSwaggerCodegen\": false,\r\n    \"jwtSecretKey\": \"bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl\",\r\n    \"testFrameworks\": [],\r\n    \"jhiPrefix\": \"jhi\",\r\n    \"enableTranslation\": true,\r\n    \"clientPackageManager\": \"npm\",\r\n    \"nativeLanguage\": \"tr\",\r\n    \"languages\": [\r\n      \"tr\",\r\n      \"en\"\r\n    ],\r\n    \"skipClient\": true,\r\n    \"skipUserManagement\": true,\r\n    \"appsFolders\": [\r\n      \"jhApplication\",\r\n      \"jhGateway\"\r\n    ],\r\n    \"directoryPath\": \"../\",\r\n    \"monitoring\": \"no\",\r\n    \"dockerRepositoryName\": \"stikic\",\r\n    \"dockerPushCommand\": \"docker push\",\r\n    \"openshiftNamespace\": \"next-vfnet\",\r\n    \"storageType\": \"persistent\",\r\n    \"registryReplicas\": 2\r\n  }\r\n}\r\n</pre>\r\n</details>\r\n\r\n\r\n##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**\r\n\r\n<details>\r\n<summary>JDL entity definitions</summary>\r\n\r\n<pre>\r\n\r\n</pre>\r\n</details>\r\n\r\n\r\n##### **Environment and Tools**\r\n\r\njava version \"1.8.0_191\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_191-b12)\r\nJava HotSpot(TM) Client VM (build 25.191-b12, mixed mode)\r\n\r\ngit version 2.17.0.windows.1\r\n\r\nnode: v10.13.0\r\n\r\nnpm: 6.4.1\r\n\r\nyeoman: 2.0.5\r\n\r\nyarn: 1.10.1\r\n\r\nDocker version 18.09.0, build 4d60db4\r\n\r\ndocker-compose version 1.23.1, build b02f1306\r\n\r\nCongratulations, JHipster execution is complete!\r\n\r\n##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**\r\n\r\n<!--\r\nIf the error is during an entity creation or associated with a specific entity.\r\nIf you are using JDL, please share that configuration as well.\r\n-->\r\n\r\n##### **Browsers and Operating System**\r\n\r\n<!-- What OS are you on? is this a problem with all browsers or only IE8? -->\r\n\r\n-   [X] Checking this box is mandatory (this is just to show you read everything)\r\n\r\n<!-- Love JHipster? Please consider supporting our collective:\r\n👉  https://opencollective.com/generator-jhipster/donate -->\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/442042490","html_url":"https://github.com/jhipster/generator-jhipster/issues/8887#issuecomment-442042490","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/8887","id":442042490,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjA0MjQ5MA==","user":{"login":"PierreBesson","id":513471,"node_id":"MDQ6VXNlcjUxMzQ3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/513471?v=4","gravatar_id":"","url":"https://api.github.com/users/PierreBesson","html_url":"https://github.com/PierreBesson","followers_url":"https://api.github.com/users/PierreBesson/followers","following_url":"https://api.github.com/users/PierreBesson/following{/other_user}","gists_url":"https://api.github.com/users/PierreBesson/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreBesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreBesson/subscriptions","organizations_url":"https://api.github.com/users/PierreBesson/orgs","repos_url":"https://api.github.com/users/PierreBesson/repos","events_url":"https://api.github.com/users/PierreBesson/events{/privacy}","received_events_url":"https://api.github.com/users/PierreBesson/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T12:34:06Z","updated_at":"2018-11-27T12:34:06Z","author_association":"CONTRIBUTOR","body":"It seems no one has ever tested jib with the openshift deployment. @seyfullah If you have a fix, please make a PR.\r\nMaybe @srinivasa-vasu will have an idea."}}
{"actor":{"display_login":"PierreBesson"}}