Skip to content

Commit

Permalink
refactor: jetty 10.x --> 11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Jan 30, 2025
1 parent 1961268 commit a34e447
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<model.version>2.0.74</model.version>
<hibernate.version>6.1.7.Final</hibernate.version>
<jetty.version>10.0.22</jetty.version>
<jetty.version>11.0.24</jetty.version>
<spring.version>6.0.8</spring.version>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
</properties>
Expand Down
16 changes: 8 additions & 8 deletions src/main/config/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Version: `17`

We use [Eclipse Jetty](https://jetty.org/) as our web server.

Version: `Jetty 10.0.22` (requires Java 11 or newer)
Version: `Jetty 11.0.24` (requires Java 11 or newer)

### Jetty Maven Plugin 🪶

Expand All @@ -45,23 +45,23 @@ You can find the download links for each release at https://jetty.org/download.h
On your production server, go to the temporary folder, and download the release:

cd /tmp
wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/10.0.22/jetty-home-10.0.22.tar.gz
wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/11.0.24/jetty-home-11.0.24.tar.gz

Extract the archive:

tar -zxvf jetty-home-10.0.22.tar.gz
tar -zxvf jetty-home-11.0.24.tar.gz

Move the folder to `/opt`:

mv jetty-home-10.0.22 /opt/
mv jetty-home-11.0.24 /opt/

### Configure Jetty ⚙️

#### System Startup

Add the `jetty` service:

ln -s /opt/jetty-home-10.0.22/bin/jetty.sh /etc/rc.d/init.d/jetty
ln -s /opt/jetty-home-11.0.24/bin/jetty.sh /etc/rc.d/init.d/jetty

Enable the `jetty` server on system init:

Expand All @@ -80,7 +80,7 @@ Create the folder that will contain Jetty configuration and `*.war` files:
Add Jetty modules:

cd /opt/jetty-base/
java -jar /opt/jetty-home-10.0.22/start.jar --add-module=server,http,deploy,jsp
java -jar /opt/jetty-home-11.0.24/start.jar --add-module=server,http,deploy,jsp

#### Set Default Values

Expand All @@ -102,7 +102,7 @@ Copy the port number configuration from [`centos-stream-9/opt/jetty-base/start.d

Add the latest release of your `*.war` file to `/opt/jetty-base/webapps/`. In our case, we download WAR releases from an external URL:

wget -O /opt/jetty-base/webapps/webapp.war https://jitpack.io/com/github/elimu-ai/webapp/webapp-2.4.25/webapp-webapp-2.4.25.war
wget -O /opt/jetty-base/webapps/webapp.war https://jitpack.io/com/github/elimu-ai/webapp/webapp-2.4.66/webapp-webapp-2.4.66.war

> [!IMPORTANT]
> The WAR file's name must match the context file's name, e.g. `webapp.war` and `webapp.xml`.
Expand All @@ -123,7 +123,7 @@ Start the `jetty` service:
systemctl start jetty

> [!TIP]
> To verify that everything has been configured correctly, you can run `cd /opt/jetty-base/; java -jar /opt/jetty-home-10.0.22/start.jar --list-config` and `systemctl status jetty`
> To verify that everything has been configured correctly, you can run `cd /opt/jetty-base/; java -jar /opt/jetty-home-11.0.24/start.jar --list-config` and `systemctl status jetty`
## MariaDB Database 🛢️

Expand Down
2 changes: 1 addition & 1 deletion src/main/config/centos-stream-9/etc/default/jetty
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
JETTY_HOME=/opt/jetty-home-10.0.22
JETTY_HOME=/opt/jetty-home-11.0.24
JETTY_BASE=/opt/jetty-base
64 changes: 32 additions & 32 deletions src/main/resources/META-INF/jpa-schema-export.sql
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
checksumMd5 varchar(255),
contentType varchar(255),
fileSizeInKb integer,
icon longblob,
icon mediumblob,
label varchar(255),
minSdkVersion integer,
timeUploaded datetime,
Expand All @@ -162,7 +162,7 @@
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl longtext,
attributionUrl text,
contentLicense varchar(255),
contentType varchar(255),
audioFormat varchar(255),
Expand Down Expand Up @@ -205,7 +205,7 @@

create table AudioContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -217,7 +217,7 @@
create table AudioPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment longtext,
comment text,
timestamp datetime,
contributor_id bigint,
audioContributionEvent_id bigint,
Expand All @@ -230,7 +230,7 @@
firstName varchar(255),
imageUrl varchar(255),
lastName varchar(255),
motivation longtext,
motivation text,
occupation varchar(255),
providerIdDiscord varchar(255),
providerIdGitHub varchar(255),
Expand All @@ -250,7 +250,7 @@
create table DbMigration (
id bigint not null auto_increment,
calendar datetime,
script longtext,
script text,
version integer,
primary key (id)
) type=MyISAM;
Expand All @@ -275,8 +275,8 @@
timeLastUpdate datetime,
usageCount integer,
glyph varchar(4),
unicodeEmojiVersion double precision,
unicodeVersion double precision,
unicodeEmojiVersion float(53),
unicodeVersion float(53),
primary key (id)
) type=MyISAM;

Expand All @@ -293,10 +293,10 @@
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl longtext,
attributionUrl text,
contentLicense varchar(255),
contentType varchar(255),
bytes longblob,
bytes mediumblob,
cid varchar(255),
dominantColor varchar(255),
imageFormat varchar(255),
Expand Down Expand Up @@ -334,7 +334,7 @@

create table ImageContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -357,7 +357,7 @@

create table LetterContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -368,7 +368,7 @@

create table LetterLearningEvent (
id bigint not null auto_increment,
additionalData longtext,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
Expand Down Expand Up @@ -405,7 +405,7 @@

create table LetterSoundContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -417,7 +417,7 @@
create table LetterSoundPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment longtext,
comment text,
timestamp datetime,
contributor_id bigint,
letterSoundContributionEvent_id bigint,
Expand Down Expand Up @@ -445,7 +445,7 @@

create table NumberContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -457,7 +457,7 @@
create table NumberPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment longtext,
comment text,
timestamp datetime,
contributor_id bigint,
numberContributionEvent_id bigint,
Expand Down Expand Up @@ -488,7 +488,7 @@

create table SoundContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -504,9 +504,9 @@
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl longtext,
attributionUrl text,
contentLicense varchar(255),
description longtext,
description text,
readingLevel varchar(255),
title varchar(255),
coverImage_id bigint,
Expand All @@ -523,20 +523,20 @@

create table StoryBookContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
paragraphTextAfter longtext,
paragraphTextBefore longtext,
paragraphTextAfter text,
paragraphTextBefore text,
contributor_id bigint,
storyBook_id bigint,
primary key (id)
) type=MyISAM;

create table StoryBookLearningEvent (
id bigint not null auto_increment,
additionalData longtext,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
Expand All @@ -550,7 +550,7 @@

create table StoryBookParagraph (
id bigint not null auto_increment,
originalText longtext,
originalText text,
sortOrder integer,
storyBookChapter_id bigint,
primary key (id)
Expand All @@ -566,7 +566,7 @@
create table StoryBookPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment longtext,
comment text,
timestamp datetime,
contributor_id bigint,
storyBookContributionEvent_id bigint,
Expand Down Expand Up @@ -598,11 +598,11 @@
revisionNumber integer,
timeLastUpdate datetime,
usageCount integer,
attributionUrl longtext,
attributionUrl text,
contentLicense varchar(255),
contentType varchar(255),
bytes longblob,
thumbnail longblob,
thumbnail mediumblob,
title varchar(255),
videoFormat varchar(255),
primary key (id)
Expand Down Expand Up @@ -638,7 +638,7 @@

create table VideoLearningEvent (
id bigint not null auto_increment,
additionalData longtext,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
Expand Down Expand Up @@ -673,7 +673,7 @@

create table WordContributionEvent (
id bigint not null auto_increment,
comment longtext,
comment text,
revisionNumber integer,
timeSpentMs bigint,
timestamp datetime,
Expand All @@ -684,7 +684,7 @@

create table WordLearningEvent (
id bigint not null auto_increment,
additionalData longtext,
additionalData text,
androidId varchar(255),
learningEventType varchar(255),
packageName varchar(255),
Expand All @@ -698,7 +698,7 @@
create table WordPeerReviewEvent (
id bigint not null auto_increment,
approved bit,
comment longtext,
comment text,
timestamp datetime,
contributor_id bigint,
wordContributionEvent_id bigint,
Expand Down

0 comments on commit a34e447

Please sign in to comment.