Deployment and maintenance

There are a lot of good practices in the field of deployment and maintenance; some of the most important ones are as follows:

  • Docker is a must-have for the integration testing of microservices, but going into production with Docker is not easy, so you should use an orchestration tool, such as Kubernetes or OpenShift, for that.
  • Try to use Docker images even if you are building a monolith.
  • Run a production build immediately after the application is generated and deploy to production immediately while your app is still very simple. This will help ease any deployment issues, as you will be sure that the app works fine out of the box.
  • The production build is quite different from the development build when it comes to the client-side, as the resources are minified and optimized. When adding any new frontend code or libraries, always verify the production build as well to ensure that it works fine.
  • Run prod builds often, and when you do, always run them in prod mode in CI/CD.
  • Try to keep your client-side JS bundles small, as this will affect the performance. Similarly, only add a dependency if you must.
  • Always run end-to-end protractor tests with the prod profile.
  • Embrace the embedded servlet engine and forget about deploying to a JEE server such as WebLogic, WebSphere, JBoss, and so on. The artifacts produced are executable and have an embedded Undertow server.
Did you know that Java EE was renamed to Jakarta EE? Refer to https://www.infoq.com/news/2018/03/java-ee-becomes-jakarta-ee for more information.
  • Upgrade the application that often uses the JHipster upgrade sub-generator. This will ensure that the tools and technologies that you use are up to date and secure. Incremental upgrades will reduce merge conflicts and keep the process simple.
  • Add unit, integration, and e2e tests as much as possible. There is no such thing as too many tests.
  • Set up CI/CD for the application. An application with a decent CI/CD setup will save you countless hours spent on regressions and will improve your delivery speed.
  • Run CI builds when you commit to the master. Enable CI builds for PRs and merge PRs only when they pass. Following this, as a rule, will tremendously increase your code quality.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset