Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with aws-containers subgenerator #8366

Open
deepu105 opened this issue Sep 19, 2018 · 14 comments

Comments

Projects
None yet
6 participants
@deepu105
Copy link
Member

commented Sep 19, 2018

I have been playing with the AWS containers sub generator a lot these days and I find some issues there.

  • If the application contains a cameCase base name this doesn't work
  • For monoliths, there is microservice like flow which is useless and annoying
  • Error reporting needs improvements
  • The config is saved in the .yo-rc.json which is different from other cloud sub gens and could be confusing
  • Also out of the box the CF template doesn't work as it stalls towards the end. Maybe it's just for me (Seems like the issue is the app service is unable to pull the image from ECR, and only works if AssignPublicIp is enabled in the *AppService)
  • the config says no password for DB, but the created DB has a password so app fails

The microservice flow is broken and I don't think it works anyway

@deepu105 deepu105 self-assigned this Sep 19, 2018

@deepu105

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2018

some logs

$ jhipster aws-containers --skip-checks -d                   
Using JHipster version installed locally in current project's node_modules
Debug logging is on
DEBUG!  cmd: aws-containers
DEBUG!  args: commands: Object, options: Object, _execs: Object, _allowUnknownOption: true, _args: Object, _name: aws-containers, _noHelp: false, parent: Object, _description: Deploy the current application to Amazon Web Services using ECS, _argsDescription: undefined, _events: Object, _eventsCount: 1
DEBUG!  opts: desc: Deploy the current application to Amazon Web Services using ECS
DEBUG!  No Arguments found.
DEBUG!  cmdArgs: 
Executing jhipster:aws-containers
Options: skipChecks: true, d: true, from-cli: true, skip-checks: true
This AWS generator will help you deploy your JHipster app as a Docker container on AWS.
✔ Docker is installed
✔ AWS credentials using profile default.
❓ AWS prompting
? Which *type* of application would you like to deploy? Monolithic application
monolith
? Enter the root directory where your applications are located ../
2 applications found at /home/deepu/workspace/XL/aws-tests/

? Which applications do you want to include in your configuration? fargatetest
? Which region? eu-west-1
? Please select your target Virtual Private Network. vpc-00da496ce23cdde8d
? Which subnets should we deploy the Network Load Balancer (ELB) to? subnet-0e7a5c685e8a16b25, subnet-04798241011ba5293
? Which subnets should we deploy the Application & Database to? subnet-0e7a5c685e8a16b25, subnet-04798241011ba5293
? Please enter your stack's name. (must be unique within a region) fargatetest
CloudFormation Stack name will be fargatetest
? fargatetest Please select your performance level low
? fargatetest Please select your scaling level low
? fargatetest Please enter the password for the database. This value will be stored within Amazon SSM, and not within .yo-rc.json [hidden]
? Would you like to deploy now?. Yes
🔧🛠️ AWS configuring
✔ ECR Auth token has been retrieved.
AWS default
Warning fargatetest is using a cache provider, scaling will not be available. Refer to an AWS native scaling service.
 conflict build.gradle
? Overwrite build.gradle? overwrite this and all others
    force build.gradle
   create src/main/java/com/mycompany/myapp/bootstrap/AwsSSMConfiguration.java
   create src/main/resources/META-INF/spring.factories
   create src/main/resources/config/bootstrap-aws.yml
   create base.template.yml
   create fargatetest.template.yml
ls: no such file or directory: /home/deepu/workspace/XL/aws-tests/fargatetest/build/docker
Parallel execution is an incubating feature.

> Task :cleanResources
UP-TO-DATE
> Task :bootBuildInfo
> Task :nodeSetup
SKIPPED
> Task :npmSetup SKIPPED

> Task :npm_install
✖ npm WARN
✖ bootstrap@4.1.3 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN
✖ react-jhipster@0.5.8 requires a peer of reactstrap@^5.0.0 but none is installed. You must install peer dependencies yourself.
✖ npm WARN
✖ redux-devtools@3.4.1 requires a peer of redux@^3.5.2 but none is installed. You must install peer dependencies yourself.
✖ npm WARN
✖ optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
✖ npm WARN notsup
✖ SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
✖ 
audited 53195 packages in 14.103s
found 11 vulnerabilities (2 low, 9 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

> Task :webpack

> fargatetest@0.0.0 webpack:prod /home/deepu/workspace/XL/aws-tests/fargatetest
> npm run cleanup && npm run webpack:prod:main
> fargatetest@0.0.0 cleanup /home/deepu/workspace/XL/aws-tests/fargatetest
> rimraf build/www


> fargatetest@0.0.0 webpack:prod:main /home/deepu/workspace/XL/aws-tests/fargatetest
> npm run webpack -- --config webpack/webpack.prod.js --profile
> fargatetest@0.0.0 webpack /home/deepu/workspace/XL/aws-tests/fargatetest
> node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.prod.js" "--profile"
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit

✖ You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
✖ 
✖ You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
✖ 
✖ You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
✖ 
✖ You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
✖ 
✖ You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
You did not set any plugins, parser, or stringifier. Right now PostCSS do nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
Hash: ad16db6cad5218e9702b
Version: webpack 4.17.1
Time: 40780ms
Built at: 2018-09-19 16:03:10
                                                Asset       Size  Chunks                    Chunk Names
            swagger-ui/dist/lib/jquery.slideto.min.js  365 bytes          [emitted]         
         content/4d7a941186721ef8150a081fa7cfa010.svg   36.5 KiB          [emitted]         
              app/main.ad16db6cad5218e9702b.bundle.js   49.2 KiB       0  [emitted]         main
app/account.ad16db6cad5218e9702b.chunk.js   6.04 KiB       1  [emitted]         account
     app/administration.ad16db6cad5218e9702b.chunk.js   49.6 KiB       2  [emitted]         administration
             content/vendors.ad16db6cad5218e9702b.css   7.31 KiB       3  [emitted]         vendors
            app/vendors.ad16db6cad5218e9702b.chunk.js    937 KiB       3  [emitted]  [big]  vendors
content/images/logo-jhipster-react.svg   36.5 KiB          [emitted]         
                    swagger-ui/dist/swagger-ui.min.js    442 KiB          [emitted]  [big]  
                                          favicon.ico    5.3 KiB          [emitted]         
                                      manifest.webapp  739 bytes          [emitted]
robots.txt  239 bytes          [emitted]         
                        swagger-ui/dist/css/reset.css  773 bytes          [emitted]         
                        swagger-ui/dist/css/style.css   3.41 KiB          [emitted]
swagger-ui/dist/css/print.css   40.7 KiB          [emitted]         
                       swagger-ui/dist/css/screen.css   42.6 KiB          [emitted]         
                   swagger-ui/dist/css/typography.css    0 bytes          [emitted]         
                  swagger-ui/dist/lib/backbone-min.js   18.9 KiB          [emitted]
swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js  310 bytes          [emitted]         
                      swagger-ui/dist/lib/es5-shim.js   22.2 KiB          [emitted]         
          swagger-ui/dist/lib/highlight.9.1.0.pack.js   10.7 KiB          [emitted]
swagger-ui/dist/lib/jquery.ba-bbq.min.js   3.44 KiB          [emitted]
swagger-ui/dist/lib/jquery.wiggle.min.js  536 bytes          [emitted]         
                content/main.ad16db6cad5218e9702b.css    129 KiB       0  [emitted]         main
              swagger-ui/dist/lib/handlebars-4.0.5.js   69.8 KiB          [emitted]         
              swagger-ui/dist/lib/jquery-1.8.0.min.js   89.9 KiB          [emitted]         
                   swagger-ui/dist/lib/js-yaml.min.js   42.5 KiB          [emitted]         
       swagger-ui/dist/lib/object-assign-pollyfill.js  349 bytes          [emitted]         
                 swagger-ui/dist/lib/swagger-oauth.js   6.88 KiB          [emitted]
swagger-ui/dist/lib/marked.js   15.4 KiB          [emitted]         
                    swagger-ui/dist/lib/lodash.min.js   50.7 KiB          [emitted]         
                swagger-ui/dist/lib/jsoneditor.min.js    127 KiB          [emitted]
swagger-ui/dist/lib/sanitize-html.min.js    127 KiB          [emitted]         
                           content/images/hipster.png   9.28 KiB          [emitted]
content/images/hipster192.png   27.3 KiB          [emitted]         
                         content/images/hipster2x.png   18.4 KiB          [emitted]
content/images/hipster256.png   40.2 KiB          [emitted]         
                     content/images/logo-jhipster.png   4.35 KiB          [emitted]
content/images/hipster384.png   58.5 KiB          [emitted]         
                        content/images/hipster512.png   81.3 KiB          [emitted]
swagger-ui/dist/images/throbber.gif   9.04 KiB          [emitted]
swagger-ui/index.html   7.05 KiB          [emitted]         
                                           index.html   2.21 KiB          [emitted]
./i18n/en.json   11.2 KiB          [emitted]
precache-manifest.e4cdd2a37b8f09136814f994e03ce676.js   4.31 KiB          [emitted]         
                                    service-worker.js  955 bytes          [emitted]
Entrypoint main [big] = content/vendors.ad16db6cad5218e9702b.css app/vendors.ad16db6cad5218e9702b.chunk.js content/main.ad16db6cad5218e9702b.css app/main.ad16db6cad5218e9702b.bundle.js
[5] ./node_modules/reactstrap/dist/reactstrap.es.js + 5 modules 201 KiB {3} [built]
      |    6 modules
[6] ./src/main/webapp/app/shared/reducers/action-type.util.ts 375 bytes {0} [built]
      [] 1310ms -> [] 2778ms -> [] 2982ms -> [] 5980ms -> factory:278ms building:306ms = 13634ms
[8] ./node_modules/react-redux/es/index.js + 23 modules 43 KiB {3} [built]
      |    24 modules
[19] ./src/main/webapp/app/shared/reducers/authentication.ts 4.98 KiB {0} [built]
      [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
[26] ./src/main/webapp/app/config/constants.ts 593 bytes {0} [built]
[] 1310ms -> [] 2778ms -> factory:183ms building:157ms = 4428ms
 [34] ./src/main/webapp/app/shared/reducers/locale.ts 1.63 KiB {0} [built]
[] 1310ms -> [] 2778ms -> [] 2982ms -> factory:90ms building:5890ms dependencies:278ms = 13328ms
 [39] ./src/main/webapp/app/shared/error/error-boundary.tsx 1.27 KiB {0} [built]
[] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
[42] ./src/main/webapp/app/shared/error/error-boundary-route.tsx 708 bytes {0} [built]
      [] 1310ms -> [] 2778ms -> [] 20140ms -> factory:5094ms building:18287ms dependencies:190ms = 47799ms
[53] ./src/main/webapp/app/config/translation.ts 542 bytes {0} [built]
      [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
[298] ./node_modules/redux-promise-middleware/dist/es/index.js + 1 modules 7.94 KiB {3} [built]
      |    2 modules
[640] ./src/main/webapp/app/app.scss 39 bytes {0} [built]
      [] 1310ms -> [] 2778ms -> factory:457ms building:19683ms dependencies:3772ms = 28000ms
[695] ./src/main/webapp/app/index.tsx + 32 modules 68.7 KiB {0} [built]
      | ./src/main/webapp/app/config/error-middleware.ts 1.32 KiB [built]
|     [] 1310ms -> [] 2778ms -> factory:556ms building:2426ms dependencies:272ms = 7342ms
      | ./src/main/webapp/app/index.tsx 1.58 KiB [built]
|     factory:258ms building:1052ms = 1310ms
      | ./src/main/webapp/app/config/icon-loader.ts 2.47 KiB [built]
|     [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
      | ./src/main/webapp/app/app.tsx 2.98 KiB [built]
      |     [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
| ./src/main/webapp/app/config/axios-interceptor.ts 1.04 KiB [built]
      |     [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
| ./src/main/webapp/app/config/store.ts 1.15 KiB [built]
      |     [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
      | ./src/main/webapp/app/shared/auth/private-route.tsx 2.89 KiB [built]
|     [] 1310ms -> [] 2778ms -> factory:457ms building:19683ms dependencies:3772ms = 28000ms
      | ./src/main/webapp/app/config/devtools.tsx 479 bytes [built]
      |     [] 1310ms -> factory:121ms building:2657ms dependencies:180ms = 4268ms
| ./src/main/webapp/app/config/logger-middleware.ts 466 bytes [built]
      |     [] 1310ms -> [] 2778ms -> factory:556ms building:2426ms dependencies:272ms = 7342ms
      | ./src/main/webapp/app/shared/reducers/index.ts 1.24 KiB [built]
|     [] 1310ms -> [] 2778ms -> factory:556ms building:2426ms dependencies:272ms = 7342ms
      | ./src/main/webapp/app/routes.tsx 2.43 KiB [built]
      |     [] 1310ms -> [] 2778ms -> factory:457ms building:19683ms dependencies:3772ms = 28000ms
| ./src/main/webapp/app/config/notification-middleware.ts 5.09 KiB [built]
      |     [] 1310ms -> [] 2778ms -> factory:556ms building:2426ms dependencies:272ms = 7342ms
      | ./src/main/webapp/app/shared/layout/footer/footer.tsx 484 bytes [built]
|     [] 1310ms -> [] 2778ms -> factory:457ms building:19683ms dependencies:3772ms = 28000ms
      | ./src/main/webapp/app/shared/layout/header/header.tsx 2.73 KiB [built]
      |     [] 1310ms -> [] 2778ms -> factory:457ms building:19683ms dependencies:3772ms = 28000ms
| ./src/main/webapp/app/shared/reducers/application-profile.ts 911 bytes [built]
      |     [] 1310ms -> [] 2778ms -> [] 2982ms -> factory:90ms building:5890ms dependencies:278ms = 13328ms
      |     + 18 hidden modules
[696] ./node_modules/react-router-dom/es/Route.js + 1 modules 5.9 KiB {3} [built]
|    2 modules
[698] ./src/main/webapp/app/modules/administration/index.tsx + 15 modules 91.3 KiB {2} [built]
      | ./src/main/webapp/app/modules/administration/metrics/metrics.tsx 28.9 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/index.tsx 1.29 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> factory:5094ms building:18287ms dependencies:190ms = 47799ms
      | ./src/main/webapp/app/modules/administration/docs/docs.tsx 293 bytes [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/audits/audits.tsx 6.15 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/configuration/configuration.tsx 5.96 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/user-management/index.tsx 1.17 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/logs/logs.tsx 4.86 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/health/health.tsx 4.08 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:350ms building:926ms dependencies:29ms = 48914ms
      | ./src/main/webapp/app/modules/administration/user-management/user-management.tsx 9.33 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:90ms building:339ms dependencies:2ms = 49316ms
      | ./src/main/webapp/app/modules/administration/metrics/metrics-modal.tsx 7.88 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:4ms building:123ms dependencies:1ms = 49013ms
      | ./src/main/webapp/app/modules/administration/health/health-modal.tsx 1.67 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:129ms building:135ms dependencies:0ms = 49149ms
      | ./src/main/webapp/app/modules/administration/user-management/user-management-delete-dialog.tsx 2.64 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:90ms building:339ms dependencies:2ms = 49316ms
      | ./src/main/webapp/app/modules/administration/user-management/user-management-update.tsx 9.43 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:90ms building:339ms dependencies:2ms = 49316ms
      | ./src/main/webapp/app/modules/administration/user-management/user-management-detail.tsx 5.46 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:90ms building:339ms dependencies:2ms = 49316ms
      | ./src/main/webapp/app/shared/util/pagination.constants.ts 32 bytes [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> [] 1276ms -> factory:7ms building:25ms = 48917ms
      |     + 1 hidden module
[699] ./src/main/webapp/app/modules/account/index.tsx + 2 modules 10.2 KiB {1} [built]
      | ./src/main/webapp/app/modules/account/index.tsx 525 bytes [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> factory:5094ms building:18287ms dependencies:190ms = 47799ms
      | ./src/main/webapp/app/modules/account/settings/settings.tsx 4.71 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:195ms building:362ms dependencies:2ms = 48168ms
      | ./src/main/webapp/app/modules/account/password/password.tsx 4.87 KiB [built]
      |     [] 1310ms -> [] 2778ms -> [] 20140ms -> [] 23381ms -> factory:195ms building:362ms dependencies:2ms = 48168ms
    + 699 hidden modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  app/vendors.ad16db6cad5218e9702b.chunk.js (937 KiB)
  swagger-ui/dist/swagger-ui.min.js (442 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (1.1 MiB)
      content/vendors.ad16db6cad5218e9702b.css
      app/vendors.ad16db6cad5218e9702b.chunk.js
      content/main.ad16db6cad5218e9702b.css
      app/main.ad16db6cad5218e9702b.bundle.js

> Task :processResources
Download https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-ssm/1.11.409/aws-java-sdk-ssm-1.11.409.pom

Download https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.409/aws-java-sdk-core-1.11.409.pom
Download https://repo.maven.apache.org/maven2/com/amazonaws/jmespath-java/1.11.409/jmespath-java-1.11.409.pom
Download https://repo.maven.apache.org/maven2/com/amazonaws/jmespath-java/1.11.409/jmespath-java-1.11.409.jar
Download https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.409/aws-java-sdk-core-1.11.409.jar
Download https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-ssm/1.11.409/aws-java-sdk-ssm-1.11.409.jar

> Task :compileJava
✖ Note: Hibernate JPA 2 Static-Metamodel Generator 5.2.17.Final

> Task :generateGitProperties
> Task :classes
> Task :bootWar
> Task :copyDockerFiles

> Task :buildDocker
Building image using context '/home/deepu/workspace/XL/aws-tests/fargatetest/build/docker'.
Using tags 'fargatetest:latest', 'fargatetest:0.0.1-SNAPSHOT' for image.

Step 1/10 : FROM openjdk:8-jre-alpine

---> 319698b3b71a
Step 2/10 : ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS     JHIPSTER_SLEEP=0     JAVA_OPTS=""

---> Using cache
---> ee6fc6458a42
Step 3/10 : RUN adduser -D -s /bin/sh jhipster

---> Using cache
---> c8fbf0be613e
Step 4/10 : WORKDIR /home/jhipster
---> Using cache
---> 05aa33f79ff4
Step 5/10 : ADD entrypoint.sh entrypoint.sh

---> Using cache
---> 28bd1a98ce05
Step 6/10 : RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh
---> Using cache
---> f9f5773da11f
Step 7/10 : USER jhipster

---> Using cache
---> fdd1181e3e9f
Step 8/10 : ADD *.war app.war
---> dcc24e793369
Step 9/10 : ENTRYPOINT ["./entrypoint.sh"]

---> Running in ca99c7eb6d86
Removing intermediate container ca99c7eb6d86
---> 1fa3206f9309
Step 10/10 : EXPOSE 8080

---> Running in cf04003344c5
Removing intermediate container cf04003344c5
---> fb196fe32cf8
Successfully built fb196fe32cf8
Successfully tagged fargatetest:latest
Successfully tagged fargatetest:0.0.1-SNAPSHOT

> Task :buildDocker
Created image with ID 'fb196fe32cf8'.

BUILD SUCCESSFUL in 1m 16s
10 actionable tasks: 9 executed, 1 up-to-date
✔ The S3 Bucket fargatetest-1537365727982 has been created.
✔ base.template.yml has been updated to the S3 Bucket and can be found here: https://fargatetest-1537365727982.s3.amazonaws.com/base.template.yml
✔ fargatetest.template.yml has been updated to the S3 Bucket and can be found here: https://fargatetest-1537365727982.s3.amazonaws.com/fargatetest.template.yml
✔ Initialising CloudFormation Stack ☁️ (this can take up to 15 minutes depending on load)
16:03:31 CREATE IN_PROGRESS                  AWS::CloudFormation::Stack	fargatetest
16:03:34 CREATE IN_PROGRESS                  AWS::CloudFormation::Stack	fargatetest
16:03:36 CREATE IN_PROGRESS                  AWS::CloudFormation::Stack	fargatetest
16:03:35 	CREATE IN_PROGRESS                  AWS::CloudFormation::Stack	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::TargetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::ECS::Cluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::Logs::LogGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::IAM::Role	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::RDS::DBParameterGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::TargetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::ECR::Repository	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::RDS::DBSubnetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::ECS::Cluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:39 	CREATE IN_PROGRESS                  AWS::Logs::LogGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE IN_PROGRESS                  AWS::IAM::Role	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE COMPLETE                     AWS::ElasticLoadBalancingV2::TargetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE COMPLETE                     AWS::ECS::Cluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE IN_PROGRESS                  AWS::RDS::DBParameterGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE COMPLETE                     AWS::Logs::LogGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE IN_PROGRESS                  AWS::RDS::DBSubnetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE IN_PROGRESS                  AWS::ECR::Repository	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:40 	CREATE COMPLETE                     AWS::ECR::Repository	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:41 	CREATE COMPLETE                     AWS::RDS::DBSubnetGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:43 	CREATE COMPLETE                     AWS::RDS::DBParameterGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:44 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:45 	CREATE COMPLETE                     AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:47 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:47 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:52 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:52 	CREATE IN_PROGRESS                  AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:53 	CREATE COMPLETE                     AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:53 	CREATE COMPLETE                     AWS::EC2::SecurityGroup	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:55 	CREATE IN_PROGRESS                  AWS::RDS::DBCluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:56 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::LoadBalancer	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:56 	CREATE COMPLETE                     AWS::IAM::Role	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:57 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::LoadBalancer	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:57 	CREATE IN_PROGRESS                  AWS::RDS::DBCluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:03:59 	CREATE IN_PROGRESS                  AWS::IAM::Policy	fargatetest-fargatetest-18SMDJ4BSWP2N
16:04:00 	CREATE IN_PROGRESS                  AWS::IAM::Policy	fargatetest-fargatetest-18SMDJ4BSWP2N
16:04:08 	CREATE COMPLETE                     AWS::IAM::Policy	fargatetest-fargatetest-18SMDJ4BSWP2N
16:04:58 	CREATE COMPLETE                     AWS::RDS::DBCluster	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:01 	CREATE IN_PROGRESS                  AWS::RDS::DBInstance	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:02 	CREATE IN_PROGRESS                  AWS::ECS::TaskDefinition	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:03 	CREATE IN_PROGRESS                  AWS::RDS::DBInstance	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:04 	CREATE IN_PROGRESS                  AWS::ECS::TaskDefinition	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:04 	CREATE COMPLETE                     AWS::ECS::TaskDefinition	fargatetest-fargatetest-18SMDJ4BSWP2N
16:05:58 	CREATE COMPLETE                     AWS::ElasticLoadBalancingV2::LoadBalancer	fargatetest-fargatetest-18SMDJ4BSWP2N
16:06:00 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::Listener	fargatetest-fargatetest-18SMDJ4BSWP2N
16:06:01 	CREATE IN_PROGRESS                  AWS::ElasticLoadBalancingV2::Listener	fargatetest-fargatetest-18SMDJ4BSWP2N
16:06:01 	CREATE COMPLETE                     AWS::ElasticLoadBalancingV2::Listener	fargatetest-fargatetest-18SMDJ4BSWP2N
16:10:55 	CREATE COMPLETE                     AWS::RDS::DBInstance	fargatetest-fargatetest-18SMDJ4BSWP2N
16:10:58 	CREATE COMPLETE                     AWS::CloudFormation::Stack	fargatetest-fargatetest-18SMDJ4BSWP2N
16:11:09 CREATE COMPLETE                     AWS::CloudFormation::Stack	fargatetest
16:11:12 CREATE COMPLETE                     AWS::CloudFormation::Stack	fargatetest
✔ The CloudFormation Stack arn:aws:cloudformation:eu-west-1:932770550094:stack/fargatetest/c9d16030-bc14-11e8-84e1-50a686333cc5 has been created.
✔ ECR Repository ID for app fargatetest was found: fargatetest/fargatetest
✔ Password has been set in ASM Parameter: /fargatetest/fargatetest/spring.datasource.password
✔ ECR Repository URI for fargatetest was found: 932770550094.dkr.ecr.eu-west-1.amazonaws.com/fargatetest/fargatetest
✔ The Docker image was tagged: 932770550094.dkr.ecr.eu-west-1.amazonaws.com/fargatetest/fargatetest:latest
✖ WARNING! Using --password via the CLI is insecure. Use --password-stdin.
✖ WARNING! Your password will be stored unencrypted in /home/deepu/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
✔ Docker is now connected to your account in the region eu-west-1.
The push refers to repository [932770550094.dkr.ecr.eu-west-1.amazonaws.com/fargatetest/fargatetest]
6c7578bf3b41: Preparing
84e5237c2a9e: Preparing
91be1f3f784e: Preparing
8271cc609864: Preparing
cfb640bf36e1: Preparing
fc49ce05f457: Preparing
e154057080f4: Preparing
e154057080f4: Waiting
fc49ce05f457: Waiting
91be1f3f784e: Pushed
8271cc609864: Pushed
84e5237c2a9e: Pushed
fc49ce05f457: Pushed
e154057080f4: Pushed
cfb640bf36e1: Pushed
6c7578bf3b41: Pushed
latest: digest: sha256:b832a2bd716454813caa6a98f0729ce78a10f3621291ab91a6d176867f2d5e2c size: 1781
✔ Image is now pushed to repository 932770550094.dkr.ecr.eu-west-1.amazonaws.com/fargatetest/fargatetest:latest.
✔ Updating Existing CloudFormation Stack ☁️
16:13:41 	UPDATE IN_PROGRESS                  AWS::CloudFormation::Stack	fargatetest
16:13:46 	CREATE IN_PROGRESS                  AWS::ECS::Service	fargatetest-fargatetest-18SMDJ4BSWP2N
16:47:21 	UPDATE ROLLBACK_IN_PROGRESS         AWS::CloudFormation::Stack	fargatetest
16:47:22 	CREATE FAILED                       AWS::ECS::Service	fargatetest-fargatetest-18SMDJ4BSWP2N
✖ There was an error updating the stack: Creation of nested stack failed
Congratulations, JHipster execution is complete!
@deepu105

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2018

Has anyone had luck with deploying using this?

@deepu105

This comment has been minimized.

Copy link
Member Author

commented Sep 21, 2018

@ggotti from #6773 I see that you also implemented a microservice flow, but it seems broken, did you ever get a JH microservice to work with Fargate?

@deepu105 deepu105 removed their assignment Sep 23, 2018

@RizqonSidikMaulana

This comment has been minimized.

Copy link

commented May 6, 2019

@deepu105 I have an issue when run jhipster aws-containers

D:\arkanaApps\arkphilips>jhipster aws-containers
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:aws-containers
INFO! Options: from-cli: true
This AWS generator will help you deploy your JHipster app as a Docker container on AWS.
√ Docker is installed
√ AWS credentials using profile default.
❓ AWS prompting
? Which *type* of application would you like to deploy? Microservice application
microservice
? Enter the root directory where your gateway(s) and microservices are located ../
3 applications found at D:\arkanaApps\

? Which applications do you want to include in your configuration? arkgateway, arkphilips
? Which region? ap-southeast-1
? Please select your target Virtual Private Network. vpc-03da23defc35cd0ef
? Which subnets should we deploy the Network Load Balancer (ELB) to? subnet-0a21462a915175ebe, subnet-0bf654c84f073149a
? Which subnets should we deploy the Application & Database to? subnet-0a21462a915175ebe, subnet-0bf654c84f073149a
? Please enter your stack's name. (must be unique within a region) arkanaApps
CloudFormation Stack name will be arkanaApps
? arkgateway Please select your performance level high
? arkphilips Please select your performance level high
? arkgateway Please select your scaling level medium
? arkphilips Please select your scaling level medium
? arkgateway Please enter the password for the database. This value will be stored within Amazon SSM, and not within .yo-rc.json [hidden]
? arkphilips Please enter the password for the database. This value will be stored within Amazon SSM, and not within .yo-rc.json [hidden]
? Would you like to deploy now?. Yes
🔧🛠️ AWS configuring
√ ECR Auth token has been retrieved.
AWS default
Warning arkgateway is using a cache provider, scaling will not be available. Refer to an AWS native scaling service.
Warning arkphilips is using a cache provider, scaling will not be available. Refer to an AWS native scaling service.
identical ..\arkgateway\pom.xml
identical pom.xml
identical ..\arkgateway\src\main\java\com\arkana\arkgateway\bootstrap\AwsSSMConfiguration.java
identical ..\arkgateway\src\main\resources\META-INF\spring.factories
identical ..\arkgateway\src\main\resources\config\bootstrap-aws.yml
identical src\main\java\com\arkana\arkservices\bootstrap\AwsSSMConfiguration.java
identical src\main\resources\META-INF\spring.factories
identical src\main\resources\config\bootstrap-aws.yml
identical base.template.yml
 conflict arkgateway.template.yml
? Overwrite arkgateway.template.yml? overwrite this and all others
    force arkgateway.template.yml
    force arkphilips.template.yml
ls: no such file or directory: D:/arkanaApps/arkgateway/target/docker
ls: no such file or directory: D:/arkanaApps/arkphilips/target/docker
× '..' is not recognized as an internal or external command,
operable program or batch file.
× The Docker image build failed. Error: Command failed: ../arkgateway/./mvnw package -Pprod verify jib:dockerBuild
'..' is not recognized as an internal or external command,
operable program or batch file.

× '..' is not recognized as an internal or external command,
operable program or batch file.
× The Docker image build failed. Error: Command failed: ../arkphilips/./mvnw package -Pprod verify jib:dockerBuild
'..' is not recognized as an internal or external command,
operable program or batch file.

INFO! Congratulations, JHipster execution is complete!
@pascalgrimaud

This comment has been minimized.

Copy link
Member

commented May 8, 2019

@ggotti : will you have time to have a look on this ticket, which is opened 7 months ago, plz ?

@orbific

This comment has been minimized.

Copy link

commented May 21, 2019

Hello!

I've been trying to get this subgenerator working today using a fairly simple JHipster project and have been having issues. My first issue was with the S3 bucket creation - if the process fails, the bucket is not removed and causes subsequent attempts to fail. Having solved this by adding more error feedback, I then ran into trouble with the CloudFormation stage failing.

I am happy to put a little time into helping with this, but I am not sure where to begin; and I saw in issue #9685 that @pascalgrimaud was talking about removing this subgenerator from JHipster. So my questions are:

  1. Is this subgenerator definitely going to be included in future releases?
  2. If so then, as an open source novice, please can you point me towards how I can begin helping with this?
  3. Would it be useful for me to provide full bug reports for each of the issues I have faced?

Thank you!

@pascalgrimaud

This comment has been minimized.

Copy link
Member

commented May 22, 2019

@orbific : thanks a lot for taking time on this.

  1. no, it won't be removed without agreement of all core team. I was suggested that because I think it is useless to keep broken things. AWS Containers seems broken since 8 months! It's too much...
  2. first of all, you can have a look at:
  3. If you decide to work on this sub generator and face some issue, comment this ticket. We'll try to do our best to help you.
@orbific

This comment has been minimized.

Copy link

commented May 22, 2019

@pascalgrimaud: There are obvious issues with a generator that can't be regression tested which are probably wider than the scope of this issue. I agree this is an important piece of functionality, however, and worth supporting.

There are a few issues I am aware of at present. Please let me know if you would like me to raise them as separate issues within github:

  1. https://www.jhipster.tech/aws/ says "Currently only works with monolithic applications", but the monolithic options are still present in the generator menu.
  2. During the clean-up stage, the S3 bucket is not removed. This prevents further executions with the same settings until the bucket is manually removed.
  3. During clean-up, the CloudFormation logs are deleted. This means that information on failures is lost.
  4. By catching the logs before deletion, I saw that the main issue appears to be a parameter that does not match a required regex:

Invalid parameter at 'repositoryName' failed to satisfy constraint: 'must satisfy regular expression '(?:[a-z0-9]+(?:[.-][a-z0-9]+)/)[a-z0-9]+(?:[.-][a-z0-9]+)*''

Most of these issues were raised by @deepu105 in their initial report, and are still present in 6.0.1.

I am going to continue working with this and see if I can get further. My failures are occurring at a much earlier stage than in the logs from September, so hopefully I can make some progress today.

@orbific

This comment has been minimized.

Copy link

commented May 22, 2019

The good news is that I have now got the generator to work correctly, and deployed an application to AWS.

The main problem is that the baseName property in .yo-rc.json is used in various places by the script without being changed to lower case. This causes an error with the docker tags, and also with the repositoryName. It should be simple to fix this however.

There was also a minor issue with a stack trace/error message being thrown as part of a successful deployment.

I am going to see if I can produce a fix for this issue - I can produce some tests for this without needing AWS access, as I can check the yml files produced. I have not tested that the deployment and scaling work correctly, and will move onto that once the generator is updated.

@wmarques

This comment has been minimized.

Copy link
Contributor

commented May 22, 2019

@orbific You can start by providing a draft PR with only one thing fixed (for instance the non-deletion of the S3 bucket) and then go on with other fixes in this same PR.
This way we can help through the various steps if you don't understand all the generator's code that's totally fine :)

The issue we have with AWS is that our configuration isn't part of the free tier (and amazon doesn't give us credits) so we cannot test it...

@orbific

This comment has been minimized.

Copy link

commented May 24, 2019

@wmarques Thank you for the feedback. It's going to be a week or so before I get more time to work on this, but that sounds like a great way to start. I think the best initial change would be to update the usages of the baseName that must be lowercase.

@wmarques

This comment has been minimized.

Copy link
Contributor

commented May 27, 2019

@orbific Yes take your time no worries

orbific added a commit to orbific/generator-jhipster that referenced this issue May 29, 2019

@orbific orbific referenced a pull request that will close this issue May 29, 2019

Open

change aws parameters to be lower-case where necessary #9824

0 of 4 tasks complete
@orbific

This comment has been minimized.

Copy link

commented May 29, 2019

As noted above, I've created a pull request which fixes what was, for me, the breaking issue for this generator. With these changes made, I am able to run the command and create an AWS container deployment.

I could not find any existing test cases for the generator. I am happy to write these if needed, but will need a little support (I am a Java developer, not a Javascript one).

There are also a number of outstanding problems with the generator, as outlined above. The most important of these is that all executions of the script throw an error, even when successful. Should I create a new github issue for tracking this?

@jdubois jdubois added the $100 label May 29, 2019

@jdubois

This comment has been minimized.

Copy link
Member

commented May 29, 2019

I've added a $100 bug bounty here, as I know it's a huge work to sort this out.
All other major cloud providers like Microsoft, Google and Heroku support the project financially, I find it sad that we use our bug bounties system to have AWS working... There're the ones making the money out of JHipster, I don't understand why they don't sponsor or help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.