Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

ZNTA-939 Add support for wildfly 10 #990

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e42e819
Update config for WildFly 10.0.0.Beta2
seanf Sep 30, 2015
490b128
Update config for WildFly 10.0.0.CR2
seanf Sep 30, 2015
e0e94d4
Update config for WildFly 10.0.0.CR3
seanf Oct 22, 2015
1167244
Merge remote-tracking branch 'origin/master' into wildfly10
seanf Jan 11, 2016
9a363f1
Update to WildFly 10.0.0.CR5
seanf Jan 11, 2016
d70e87f
Update to WildFly 10.0.0.Final
seanf Feb 1, 2016
b86a23e
Revert incomplete logstash changes
seanf Feb 2, 2016
7c2c9ac
Update docs and version check for EAP 6.4.5, WF 10
seanf Feb 3, 2016
bb48e0d
add wildfly 10 overlay configuration
Feb 4, 2016
abb2151
Update docs and version check for EAP 6.4.6
seanf Feb 5, 2016
93bda0c
Merge remote-tracking branch 'origin/master' into wildfly10
seanf Mar 3, 2016
cd91da8
Update JMS config docs/script for WildFly 10
seanf Mar 7, 2016
373c39c
chore: rename wildfly-10, remove wildfly-9 in zanata-overlay
seanf Mar 9, 2016
21c1ad1
Try to eliminate RichFaces Push warning
seanf Mar 8, 2016
b11bd71
Group jboss module dependencies by dodginess
seanf Mar 8, 2016
dd77506
Filter out some unavoidable startup log warnings
seanf Mar 9, 2016
858d47b
Merge remote-tracking branch 'origin/master' into wildfly10
seanf Mar 11, 2016
f1604c3
Add document.storage.directory property
seanf Mar 14, 2016
fcd1117
Update arquillian config to match functional tests
seanf Mar 14, 2016
39f9481
Update test to match standalone.xml
seanf Mar 14, 2016
cfd7478
Fix ClassCastException on WildFly
seanf Mar 14, 2016
e482683
Merge remote-tracking branch 'origin/reinstate-dom4j' into wildfly10
seanf Mar 14, 2016
5ebc7bc
Get hibernate module from bintray (no https redirect)
seanf Mar 14, 2016
5442e0e
Improve wording for platform requirements
seanf Mar 16, 2016
d94386c
Add check for EAP 7 product name
seanf Mar 18, 2016
2daaba7
Change wildfly 10 config to be closer to old config
seanf Mar 18, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/release-notes.md
Expand Up @@ -33,6 +33,9 @@
* [ZNTA-928](https://zanata.atlassian.net/browse/ZNTA-928) - Readonly project doesn't have "lock" icon in UI
* [ZNTA-793](https://zanata.atlassian.net/browse/ZNTA-793) - Remove unused method in TranslationMemoryAction

<h5>Infrastructure Changes</h5>
* Zanata now requires JBoss EAP 6.4.6.GA or later (recommended), or WildFly version 10.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires, but recommended? Or is "later than 6.4.6.GA" recommended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the idea is that EAP is recommended (6.4.6 or later), but WildFly 10
is also... possible.

On 16 March 2016 at 13:51, Damian Jansen notifications@github.com wrote:

In docs/release-notes.md
#990 (comment):

@@ -33,6 +33,9 @@

  • ZNTA-928 - Readonly project doesn't have "lock" icon in UI
  • ZNTA-793 - Remove unused method in TranslationMemoryAction

+

Infrastructure Changes

+* Zanata now requires JBoss EAP 6.4.6.GA or later (recommended), or WildFly version 10.x.

Requires, but recommended? Or is "later than 6.4.6.GA" recommended?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/zanata/zanata-server/pull/990/files/5ebc7bcb5d17ad1f2421243ecd6379f78e6142fd#r56278787

Sean Flanigan

Principal Software Engineer
Globalisation Tools Engineering
Red Hat

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


-----------------------
## 3.8.3
<h5>Bug fixes</h5>
Expand Down
11 changes: 8 additions & 3 deletions docs/user-guide/system-admin/configuration/installation.md
Expand Up @@ -2,11 +2,11 @@ Zanata can be installed by downloading a web archive (war) file, and configuring

## What you need

- JBoss Enterprise Application Platform 6.4 (EAP). This is the recommended container for Zanata, and it can be [downloaded here](http://www.jboss.org/jbossas/downloads/).
- ... OR WildFly (recommended version is 9.0) which can be [downloaded here](http://wildfly.org/downloads/)
- JBoss Enterprise Application Platform (EAP), version 6.4.6 or later. This is the recommended container for Zanata, and it can be [downloaded here](http://www.jboss.org/jbossas/downloads/).
- ... OR WildFly (version 10.0.0.Final) which can be [downloaded here](http://wildfly.org/downloads/)
- A suitable MySQL database. This is NOT included in the Zanata archive. You can [download MySQL here](http://dev.mysql.com/downloads/mysql/).
- An email (SMTP) server for email verification and notifications.
- JDK version 1.7 or later. [OpenJDK](http://openjdk.java.net/install/) is recommended, but you can also download [Oracle's JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- JDK version 1.8 or later. [OpenJDK](http://openjdk.java.net/install/) is recommended, but you can also download [Oracle's JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)

The following packages are optional, but recommended:

Expand Down Expand Up @@ -38,6 +38,11 @@ $ ./install.sh

(there's also a .bat file if you are on Windows) The installation script will start asking some configuration questions. It will also download the Zanata web application and place it in the JBoss installation.

## Editing standalone.xml yourself

This is not generally recommended, but if you want to create the configuration yourself, please ensure you start with `standalone-full.xml`, not `standalone.xml`, since `standalone-full.xml` enables subsystems which are required by Zanata. Either copy `standalone-full.xml` to `standalone.xml`, or make sure `standalone.sh` is always launched with arguments to activate the desired configuration, for instance `$JBOSS_HOME/bin/standalone.sh --server-config=standalone-full.xml`.


## Some advanced configuration

Zanata does not create an admin user by default. You need to register specific users to have administrative privileges.
Expand Down
125 changes: 55 additions & 70 deletions docs/user-guide/system-admin/configuration/jms-messaging.md
Expand Up @@ -6,103 +6,88 @@ You should see an entry like this:
<socket-binding name="management-native" interface="management"
port="${jboss.management.native.port,env.JBOSS_MANAGEMENT_NATIVE_PORT:9999}" />

Once you have management socking binding open, download the [messaging config file](https://raw.githubusercontent.com/zanata/zanata-server/master/etc/scripts/standalone.cli.messaging.config).
Once you have management socket binding open, download the [messaging config file](https://raw.githubusercontent.com/zanata/zanata-server/master/etc/scripts/standalone.cli.messaging.config).

> This config file has been tested with EAP6 and Wildfly8.1.0-FINAL
> This config file has been tested with EAP6 and WildFly 10.0.0.Final.

Run
Run

jboss-cli.sh --file=path/to/standalone.cli.messaging.config

Verify the result is successful. You should have the configuration file looks like below (**NOTE:** xmlns will vary depending on which version of EAP or wildfly you are using.):
Verify that the result is successful.

If it says something like this:

> Unexpected command 'jms-queue add --queue-address=MailsQueue --durable=true
> --entries=["java:/jms/queue/MailsQueue"]'. Type 'help --commands' for the
> list of supported commands.

then please make sure you are using standalone-full.xml, not standalone.xml (which doesn't include the messaging subsystem). (You will need to restart the app server if you have to change this.)

You should end up with a configuration file which looks like one of these examples (**NOTE:** xmlns may vary depending on which version of EAP or WildFly you are using.):

EAP 6:

```xml
<server xmlns="urn:jboss:domain:1.4">
<server xmlns="urn:jboss:domain:1.7">
<extensions>
<!-- omit other things -->
<extension module="org.jboss.as.ejb3" />
<extension module="org.jboss.as.messaging"/>
<!-- omit other things -->
</extensions>
<profile>
<subsystem xmlns="urn:jboss:domain:ejb3:1.4">
<!-- omit other things -->
<subsystem xmlns="urn:jboss:domain:ejb3:1.5">
<!-- omit other things -->
<mdb>
<resource-adapter-ref resource-adapter-name="hornetq-ra"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<!-- omit other things -->
<!-- omit other things -->
</subsystem>
<!-- omit other things -->
<subsystem xmlns="urn:jboss:domain:messaging:1.2">
<subsystem xmlns="urn:jboss:domain:messaging:1.4">
<hornetq-server>
<persistence-enabled>true</persistence-enabled>
<security-enabled>false</security-enabled>
<journal-type>NIO</journal-type>
<journal-file-size>102400</journal-file-size>
<journal-min-files>2</journal-min-files>
<connectors>
<in-vm-connector name="in-vm" server-id="0"/>
</connectors>
<acceptors>
<in-vm-acceptor name="in-vm" server-id="0"/>
</acceptors>
<security-settings>
<security-setting match="#">
<permission type="send" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
</security-setting>
</security-settings>
<address-settings>
<!--default for catch all-->
<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>5000</redelivery-delay>
<max-delivery-attempts>2</max-delivery-attempts>
<max-size-bytes>10485760</max-size-bytes>
<address-full-policy>BLOCK</address-full-policy>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
</address-setting>
</address-settings>
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
</connection-factory>
<pooled-connection-factory name="hornetq-ra">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
</pooled-connection-factory>
</jms-connection-factories>

<jms-destinations>
<!-- omit other things -->
<jms-queue name="MailsQueue">
<entry name="jms/queue/MailsQueue"/>
<durable>true</durable>
</jms-queue>
<jms-queue name="ExpiryQueue">
<entry name="jms/queue/ExpiryQueue"/>
<durable>true</durable>
</jms-queue>
<jms-queue name="DLQ">
<entry name="jms/queue/DLQ"/>
<durable>true</durable>
</jms-queue>
<!-- omit other things -->
</jms-destinations>
</hornetq-server>
</subsystem>
```

Restart your server.
or (Wildfly 10, EAP 7):

```xml
<server xmlns="urn:jboss:domain:4.0">
<extensions>
<!-- omit other things -->
<extension module="org.wildfly.extension.messaging-activemq"/>
<!-- omit other things -->
</extensions>
<profile>
<!-- omit other things -->
<subsystem xmlns="urn:jboss:domain:ejb3:4.0">
<!-- omit other things -->
<mdb>
<resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
<bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
</mdb>
<!-- omit other things -->
</subsystem>
<!-- omit other things -->
<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
<server name="default">
<!-- omit other things -->
<jms-queue name="MailsQueue" entries="java:/jms/queue/MailsQueue"/>
<!-- omit other things -->
</server>
</subsystem>
```

The only Zanata-specific change here is the addition of the JMS queue "MailsQueue" - the mdb configuration is simply copied from `standalone-full.xml`.

Restart your server to ensure changes are applied.
3 changes: 3 additions & 0 deletions etc/scripts/allocate-jboss-ports
Expand Up @@ -13,3 +13,6 @@ JBOSS_TXN_STATUS_PORT
SMTP_PORT
EOF
)
# we might want these in future:
# JBOSS_IIOP_PORT
# JBOSS_IIOP_SSL_PORT
53 changes: 1 addition & 52 deletions etc/scripts/standalone.cli.messaging.config
@@ -1,63 +1,12 @@
# run jboss-cli.sh --file <location of this file> to apply messaging changes
# run jboss-cli.sh --file=<location of this file> to apply messaging changes

connect

# jboss cli specification for an operation request
#[/node-type=node-name (/node-type=node-name)*] : operation-name [( [parameter-name=parameter-value (,parameter-name=parameter-value)*] )]

# add messaging extension if not already exist
if (outcome == failed) of /extension=org.jboss.as.messaging:read-resource()
/extension=org.jboss.as.messaging:add()
end-if

if (outcome == failed) of /subsystem=messaging:read-resource()
/subsystem=messaging:add()
end-if

batch

/subsystem=ejb3:write-attribute(name="default-resource-adapter-name", value="hornetq-ra")
/subsystem=ejb3:write-attribute(name="default-mdb-instance-pool", value="mdb-strict-max-pool")

/subsystem=messaging/hornetq-server=default:add(persistence-enabled=true, security-enabled=false, journal-type=NIO, journal-min-files=2)
#/subsystem=messaging/hornetq-server=default/:write-attribute(name=persistence-enabled, value=true)
#/subsystem=messaging/hornetq-server=default/:write-attribute(name=security-enabled, value=false)
#/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-type, value=NIO)
#/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-min-files, value=2)

/subsystem=messaging/hornetq-server=default/address-setting=#:add(address-full-policy="PAGE", \
dead-letter-address="jms.queue.DLQ", expiry-address="jms.queue.ExpiryQueue", expiry-delay=-1L, \
last-value-queue=false, max-delivery-attempts=3, max-size-bytes=10485760L, message-counter-history-day-limit=10, \
page-max-cache-size=5, page-size-bytes=2097152L, redelivery-delay=5000L, redistribution-delay=5000L, send-to-dla-on-no-route=false)

/subsystem=messaging/hornetq-server=default/in-vm-connector=in-vm:add(server-id=0)
/subsystem=messaging/hornetq-server=default/in-vm-acceptor=in-vm:add(server-id=0)

/subsystem=messaging/hornetq-server=default/connection-factory=InVmConnectionFactory:add(connector={"in-vm"=>undefined}, entries = ["java:/ConnectionFactory"])
/subsystem=messaging/hornetq-server=default/pooled-connection-factory=hornetq-ra:add(connector={"in-vm"=>undefined}, entries=["java:/JmsXA","java:jboss/DefaultJMSConnectionFactory"])
/subsystem=messaging/hornetq-server=default/pooled-connection-factory=hornetq-ra/:write-attribute(name=min-pool-size,value=2)
/subsystem=messaging/hornetq-server=default/pooled-connection-factory=hornetq-ra/:write-attribute(name=max-pool-size,value=10)

/subsystem=messaging/hornetq-server=default/security-setting=#:add()
/subsystem=messaging/hornetq-server=default/security-setting=#/role=guest:add(consume=true, create-durable-queue=false, create-non-durable-queue=true, delete-durable-queue=false, delete-non-durable-queue=true, manage=false, send=true)

jms-queue add --queue-address=ExpiryQueue --durable=true --entries=["java:/jms/queue/ExpiryQueue"]
jms-queue add --queue-address=DLQ --durable=true --entries=["java:/jms/queue/DLQ"]
jms-queue add --queue-address=MailsQueue --durable=true --entries=["java:/jms/queue/MailsQueue"]

# if we want to add netty as remote connector
#/subsystem=messaging/hornetq-server=default/remote-connector=netty/:add(socket-binding=messaging)
#/subsystem=messaging/hornetq-server=default/remote-connector=netty-throughput/:add(socket-binding=messaging-throughput)
#/subsystem=messaging/hornetq-server=default/remote-connector=netty-throughput/param=batch-delay/:add(value=50)
#/subsystem=messaging/hornetq-server=default/remote-connector=netty-throughput/param=direct-deliver/:add(value=false)

#/subsystem=messaging/hornetq-server=default/remote-acceptor=netty/:add(socket-binding=messaging)
#/subsystem=messaging/hornetq-server=default/remote-acceptor=netty-throughput/:add(socket-binding=messaging-throughput)
#/subsystem=messaging/hornetq-server=default/remote-acceptor=netty-throughput/param=batch-delay:add(value=50)
#/subsystem=messaging/hornetq-server=default/remote-acceptor=netty-throughput/param=direct-deliver:add(value=false)

#/socket-binding-group=standard-sockets/socket-binding=messaging:add(port="${jboss.messaging.port,env.JBOSS_MESSAGING_PORT:5445}")
#/socket-binding-group=standard-sockets/socket-binding=messaging-group:add(port=0, multicast-address="${jboss.messaging.group.address:231.7.7.7}", multicast-port="${jboss.messaging.group.port:9876}")
#/socket-binding-group=standard-sockets/socket-binding=messaging-throughput:add(port="${jboss.messaging.throughput.port,env.JBOSS_MESSAGING_THROUGHPUT_PORT:5455}")

run-batch
25 changes: 19 additions & 6 deletions functional-test/src/test/resources/conf/standalone.xml
Expand Up @@ -28,7 +28,12 @@
</extensions>
<system-properties>
<property name="zanata.javaScriptTestHelper" value="true" />
<property name="document.storage.directory"
value="./target/documents" />
<property name="jboss.as.management.blocking.timeout" value="1000"/>
<property name="javamelody.storage-directory" value="${jboss.server.data.dir}/zanata/stats"/>
<property name="hibernate.search.default.indexBase" value="${jboss.server.data.dir}/zanata/indexes"/>
<property name="ehcache.disk.store.dir" value="${jboss.server.data.dir}/zanata/ehcache"/>
</system-properties>
<management>
<security-realms>
Expand Down Expand Up @@ -94,18 +99,26 @@
<logger category="org.jboss.as.config">
<level name="DEBUG" />
</logger>
<!-- Disable some startup warnings triggered by third-party jars -->
<logger category="org.jboss.as.server.deployment">
<filter-spec value="not(any( match(&quot;JBAS015960&quot;), match(&quot;JBAS015893&quot;) ))"/>
</logger>
<!-- Disable WARN about GWT's org.hibernate.validator.ValidationMessages -->
<logger category="org.jboss.modules">
<level name="ERROR"/>
</logger>
<!-- Disable WARN: "Queue with name '...' has already been registered" -->
<logger category="org.richfaces.log.Components">
<level name="ERROR"/>
</logger>
<!-- Disable WARN: "RP discovery / realm validation disabled;" -->
<logger category="org.openid4java.server.RealmVerifier">
<level name="ERROR"/>
</logger>
<!-- Disable WARN: "JMS API was found on the classpath..." -->
<logger category="org.richfaces.log.Application">
<filter-spec value="not( match(&quot;JMS API was found on the classpath&quot;) )"/>
</logger>
<!-- Disable WARN: "Queue with name '...' has already been registered" -->
<logger category="org.richfaces.log.Components">
<level name="ERROR"/>
</logger>
<!-- Enable if you want to log all HTTP requests to server.log: -->
<!--<logger category="org.zanata.requests">-->
<!--<level name="DEBUG"/>-->
Expand Down Expand Up @@ -354,9 +367,9 @@
value="no-reply@zanata.org" />
<simple name="java:global/zanata/smtp/port" value="${smtp.port,env.SMTP_PORT:2552}" />
<simple name="java:global/zanata/files/document-storage-directory"
value="${project.build.directory}/zanata-documents" />
value="${jboss.server.data.dir}/zanata/documents"/>
<lookup name="java:jboss/exported/zanata/files/document-storage-directory"
lookup="java:global/zanata/files/document-storage-directory" />
lookup="java:global/zanata/files/document-storage-directory"/>
</bindings>
<remote-naming />
</subsystem>
Expand Down