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

Avni-server Java upgrade #813

Open
Tracked by #817
mahalakshme opened this issue Oct 25, 2024 · 8 comments
Open
Tracked by #817

Avni-server Java upgrade #813

mahalakshme opened this issue Oct 25, 2024 · 8 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Oct 25, 2024

Need:

OpenJDK 8 is maintained by RedHat. They will support Java 8 until 2026: https://access.redhat.com/articles/1299013

For Java 8, Oracle has announced it is offering ‘Extended Support’ up until December 2030. Extend Support is Oracle’s way of extending the shelf life of Premier beyond its deadline.

For this service, organizations using Oracle Java pay an additional fee: an extra 10% on the existing support fee in year one, an extra 20% in year two, and another 20% in year three, etc.

Analysis:

11, 17, 21 are the 3 Java LTS versions.

AC:

Upgrade server to Java 21 (if this is not possible, developer can decide to upgrade it to a different version) which is the latest LTS version and make sure all features(esp., sync) works as expected.

  • requires springboot 3.2
  • upgrade usages of Java language and API
  • upgrade usages of SpringBoot API
  • upgrade dependencies and libraries

Out of scope:

ETL and integration-server are in Java 17. Hence they need not be upgraded now.

Sheet to note down issues encountered during Dev/ Review / Testing of Avni-server Java upgrade to version21

https://docs.google.com/spreadsheets/d/1IJMxsy-unLrtBbhqUC9y2YQgQ51YieDCmG_iZHaDqds/edit?usp=sharing

@mahalakshme mahalakshme converted this from a draft issue Oct 25, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Oct 25, 2024
@himeshr
Copy link
Contributor

himeshr commented Oct 25, 2024

For upgradation of Hateoas to new version, which would be needed once we upgrade the springboot version, do refer to following docs:

@himeshr himeshr changed the title Java upgrade Avni-server Java upgrade Oct 28, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Oct 28, 2024
@petmongrels petmongrels self-assigned this Oct 30, 2024
@petmongrels
Copy link
Contributor

petmongrels commented Oct 30, 2024

Things to sanity test

  • creation of rpm
  • check auth (done)
  • custom UUID in mobile app api response is correct (done)
  • security, auth, spring related abstract classes have been removed now (done)
  • keycloak based auth (done)
  • glific integration (test on staging)
  • read queries should not result in update queries (done)
  • spring batch (done)
  • rule server integration (done)
  • media app (test on staging)
  • mobile app sync (done)
  • mobile app save entities and upload sync (done)
  • ETL process (done)
  • external api (done)
  • EH Cache (done)

To Do

  • merge from master

Specific code changes to complete

  • org.avni.server.web.TransactionDataSyncTest#sync is not passing

major changes

  • jakarta from javax
  • hibernate user type approach change
  • use of java.time.LocalDateTime
  • ehcache

others

  • how is this used - org.avni.server.web.FormController#getFormsByProgram
  • rearrange properties in application.properties

notes

  • /resource/? doesn't work, one has to be /resource?
  • The configurers are interface but they have a lot of default empty method

petmongrels added a commit that referenced this issue Oct 30, 2024
petmongrels added a commit that referenced this issue Oct 30, 2024
petmongrels added a commit that referenced this issue Nov 1, 2024
petmongrels added a commit that referenced this issue Nov 1, 2024
petmongrels added a commit that referenced this issue Nov 5, 2024
…nged date time from joda to javax in User entity. First IT passed - FormElementRepositoryTest
petmongrels added a commit that referenced this issue Nov 6, 2024
petmongrels added a commit that referenced this issue Nov 6, 2024
petmongrels added a commit that referenced this issue Nov 8, 2024
petmongrels added a commit that referenced this issue Nov 8, 2024
himeshr added a commit that referenced this issue Dec 10, 2024
himeshr added a commit that referenced this issue Dec 13, 2024
himeshr added a commit that referenced this issue Dec 13, 2024
himeshr added a commit that referenced this issue Dec 13, 2024
@himeshr
Copy link
Contributor

himeshr commented Dec 17, 2024

Tasks to do:

  • Deploy on staging the 11.0 code for server and webapp //done
  • Ensure following are working fine:
Done

Keycloak, minio, metadata-connector,

Pending

Glific-rest-client, External APIs, Query API, etl, integration, media-server/webapp, int-admin-app and rules-server

himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
@himeshr
Copy link
Contributor

himeshr commented Dec 17, 2024

Avni-server JDK upgradation steps to be used for Prerelease and Prod Avni servers

Steps to clean up old JDK

-To uninstall OpenJDK (if installed). First check which OpenJDK packages are installed.

sudo dpkg --list | grep -i jdk
  • To remove openjdk:
sudo apt-get purge openjdk*
  • Uninstall OpenJDK related packages.
sudo apt-get purge icedtea-* openjdk-*
  • Check that all OpenJDK packages have been removed.
sudo dpkg --list | grep -i jdk

Steps to install JDK 21

In Avni-infra repo, modify the Make command corresponding to the Env, in configure/Makefile as follows:

deploy-avni-server-staging: ... --extra-vars '{"install_jdk":"true","java_apt_package":"openjdk-21-jdk",...}' //Done
deploy-avni-server-prod: ... --extra-vars '{"install_jdk":"true","java_apt_package":"openjdk-21-jdk",...}' // TODO when prod go-live
deploy-avni-server-prerelease: ... --extra-vars '{"install_jdk":"true","java_apt_package":"openjdk-21-jdk",...}' //TODO when prerelease is switched to jdk 21 

Trigger Deploy of Avni-server 11.0 branch jar to targeted environment server

himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 17, 2024
himeshr added a commit that referenced this issue Dec 17, 2024
@himeshr himeshr moved this from In Code Review to QA Ready in Avni Product Dec 18, 2024
himeshr added a commit that referenced this issue Dec 18, 2024
himeshr added a commit that referenced this issue Dec 18, 2024
himeshr added a commit that referenced this issue Dec 18, 2024
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 18, 2024
@himeshr
Copy link
Contributor

himeshr commented Dec 18, 2024

Steps to setup Postgres client 16 on Ubuntu (Reference)

Remove old postgres client

sudo apt-get remove -y postgresql-client

First, update the package index and install required packages:

sudo apt update
sudo apt install gnupg2 wget nano

Add the PostgreSQL 16 repository:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Import the repository signing key:

curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg

Update the package list:

sudo apt update

Install postgres-16 client

sudo apt-get install -y postgresql-client-16

himeshr added a commit to avniproject/avni-infra that referenced this issue Dec 19, 2024
@himeshr
Copy link
Contributor

himeshr commented Dec 19, 2024

Update avni-server Opts to use jdk21 property names

Refer to commit and do similar change to env-vars file in avni-infra

@AchalaBelokar
Copy link

  • After creating organisation message is not displaying that organisation created successfully ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In QA
Development

No branches or pull requests

4 participants