Skip to content

Commit

Permalink
JBEAP-13958 part 1: Update quickstart README files - replace shared d…
Browse files Browse the repository at this point in the history
…oc links with new adoc versions, fix formatting up to ejb quickstarts
  • Loading branch information
sgilda committed Jan 2, 2018
1 parent d80a946 commit 6a24d6a
Show file tree
Hide file tree
Showing 88 changed files with 2,314 additions and 2,037 deletions.
91 changes: 52 additions & 39 deletions README.adoc

Large diffs are not rendered by default.

133 changes: 72 additions & 61 deletions app-client/README.adoc
Expand Up @@ -20,9 +20,9 @@ The `app-client` quickstart demonstrates how to use the {productName} client con

This example consists of the following Maven projects, each with a shared parent:

[cols="<,<"]
[cols="30%,70%",options="headers"]
|===
|*Sub-project* |*Description*
|Sub-project |Description

|`ejb` |An application that can be called by the `client`.
|`ear` |The EAR packaging contains the server and client side.
Expand All @@ -35,85 +35,87 @@ The root `pom.xml` file builds each of the subprojects in the appropriate order.

The application this project produces is designed to be run on {productNameFull} {productVersion} or later.

All you need to build this project is {buildRequirements}. See https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN_JBOSS_EAP7.md#configure-maven-to-build-and-deploy-the-quickstarts[Configure Maven for {productName} {productVersion}] to make sure you are configured correctly for testing the quickstarts.
All you need to build this project is {buildRequirements}. See link:{configureMavenDocUrl}[Configure Maven to Build and Deploy the Quickstarts] to make sure you are configured correctly for testing the quickstarts.

== Use of {jbossHomeName}

In the following instructions, replace `{jbossHomeName}` with the actual path to your {productName} installation. The installation path is described in detail here: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_OF_{jbossHomeName}.md#use-of-eap_home-and-jboss_home-variables[Use of {jbossHomeName} and JBOSS_HOME Variables].
In the following instructions, replace `__{jbossHomeName}__` with the actual path to your {productName} installation. The installation path is described in detail here: link:{useProductHomeDocUrl}[Use of {jbossHomeName} and JBOSS_HOME Variables].

== Add the Application Users

If the client and server are run on different hosts, you must add the following users to the {productName} server side application. Be sure to use the names and passwords specified in the table as they are required to run this example.

[cols="<,<,<,<"]
[cols="20%,20%,20%,40%",options="headers"]
|===
|*UserName* |*Realm* |*Password* |*Roles*
|UserName |Realm |Password |Roles

|admin |ManagementRealm |admin-123 |_leave blank for none_
|quickuser |ApplicationRealm |quick-123 |_leave blank for none_
|admin |ManagementRealm |admin-123 |_leave blank for none_
|quickuser |ApplicationRealm |quick-123 |_leave blank for none_
|===

To add the users, open a command prompt and type the following commands:
To add the users, open a terminal and type the following commands:


[subs=normal]
[source,subs="+quotes,attributes+",options="nowrap"]
----
For Linux:
{jbossHomeName}/bin/add-user.sh -u admin -p admin-123
{jbossHomeName}/bin/add-user.sh -a -u quickuser -p quick-123
For Windows:
{jbossHomeName}\bin\add-user.bat -u admin -p admin-123
{jbossHomeName}\bin\add-user.bat -a -u quickuser -p quick-123
$ __{jbossHomeName}__/bin/add-user.sh -u admin -p admin-123
$ __{jbossHomeName}__/bin/add-user.sh -a -u quickuser -p quick-123
----

If you prefer, you can use the add-user utility interactively. For an example of how to use the add-user utility, see the instructions located here: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.md#add-an-application-user[Add an Application User].
NOTE: For Windows, use the `__{jbossHomeName}__\bin\add-user.bat` script.

== Start the Server
If you prefer, you can use the `add-user` utility interactively. For an example of how to use the add-user utility, see the instructions located here: link:{addApplicationUserDocUrl}[Add an Application User].

. Open a command prompt and navigate to the root of the {productName} directory.
. The following shows the command line to start the server:
== Start the Server

[subs=normal]
. Open a terminal and navigate to the root of the {productName} directory.
. Use the following command to start the server:
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
For Linux: {jbossHomeName}/bin/standalone.sh
For Windows: {jbossHomeName}\bin\standalone.bat
$ __{jbossHomeName}__/bin/standalone.sh
----
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\standalone.bat` script.

== Build and Deploy the Quickstart

. Make sure you have started the {productName} server as described above.
. Open a command prompt and navigate to the root directory of this quickstart.
. Open a terminal and navigate to the root directory of this quickstart.
. Type this command to build the artifacts:

+
[source,options="nowrap"]
----
mvn clean install wildfly:deploy
$ mvn clean install wildfly:deploy
----

== Access the Remote Client Application from the Same Machine

This example shows how to invoke an EJB from a remote standalone application on the same machine. Both the client and server are on the same machine, so the defaults are sufficient and no authentication is necessary.

. Be sure the quickstart deployed successfully as described above.
. Navigate to the root directory of this quickstart and type the following command to run the application. Be sure to replace `{jbossHomeName}` with the path to your {productName} installation.

. Navigate to the root directory of this quickstart and type the following command to run the application. Be sure to replace `__{jbossHomeName}__` with the path to your {productName} installation.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
For Linux: {jbossHomeName}/bin/appclient.sh ear/target/app-client.ear#simpleClient.jar Hello from command line
For Windows: {jbossHomeName}\bin\appclient.bat ear\target\app-client.ear#simpleClient.jar Hello from command line
$ __{jbossHomeName}__/bin/appclient.sh ear/target/app-client.ear#simpleClient.jar Hello from command line
----
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\appclient.bat` script.

. Review the result. The client outputs the following information provided by the server application:

. Review the result. The client outputs the following information, which is provided by the server application:
+
[source,options="nowrap"]
----
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@myhost
----

. Review the server log files to see the bean invocations on the server.

+
[source,options="nowrap"]
----
ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
----

== Access the Remote Client Application from a Different Machine
Expand All @@ -124,81 +126,90 @@ This example shows how to invoke an EJB from a remote standalone Java EE applica

. Install {productName} on this machine.
. Add the application users to the {productName} server on this machine as described above.
. Start the {productName} server with the following command. Be sure to replace `MACHINE_1_IP_ADDRESS` with the IP address of this machine. These arguments make the server accessible to the network.

[subs=normal]
. Start the {productName} server with the following command. Be sure to replace `__MACHINE_1_IP_ADDRESS__` with the IP address of this machine. These arguments make the server accessible to the network.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
For Linux: {jbossHomeName}/bin/standalone.sh -b MACHINE_1_IP_ADDRESS -bmanagement MACHINE_1_IP_ADDRESS
For Windows: {jbossHomeName}\bin\standalone.bat -b MACHINE_1_IP_ADDRESS -bmanagement MACHINE_1_IP_ADDRESS
$ __{jbossHomeName}__/bin/standalone.sh -b __MACHINE_1_IP_ADDRESS__ -bmanagement __MACHINE_1_IP_ADDRESS__
----
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\standalone.bat` script.


=== Configure Machine_2 (Local Client Machine)

. Install {productName} on this server. There is no need to add the application users to this server.
. Download the `app-client` quickstart to this machine.
. Create a `jboss-ejb-client.properties` file. This file can be located anywhere in the file system, but for ease of demonstration, we create it in the root directory of this quickstart. Add the following content, replacing `MACHINE_1_IP_ADDRESS` with the IP address of `Machine_1`.

. Create a `jboss-ejb-client.properties` file. This file can be located anywhere in the file system, but for ease of demonstration, we create it in the root directory of this quickstart. Add the following content, replacing `__MACHINE_1_IP_ADDRESS__` with the IP address of `Machine_1`.
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=MACHINE_1_IP_ADDRESS
remote.connection.default.host=__MACHINE_1_IP_ADDRESS__
remote.connection.default.port=8080
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.username=quickuser
remote.connection.default.password=quick-123
----

. Open a command prompt and navigate to the root directory of the quickstart.
. Open a terminal and navigate to the root directory of the quickstart.

. Deploy the `app-client` quickstart to the remote machine using the following command:

+
[source,subs="+quotes,attributes+",options="nowrap"]
----
mvn clean install wildfly:deploy -Dwildfly.hostname=MACHINE_1_IP_ADDRESS [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
$ mvn clean install wildfly:deploy -Dwildfly.hostname=__MACHINE_1_IP_ADDRESS__ [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
----

. Be sure that the quickstart deployed successfully and the server is running on `Machine_1` as described above.
. Type this command to run the `app-client` application:

[subs=normal]
+
[source,subs="+quotes,attributes+",options="nowrap"]
----
For Linux: {jbossHomeName}/bin/appclient.sh --ejb-client-properties=ejb-client.properties ear/target/app-client.ear#simpleClient.jar Hello from command line
For Windows: {jbossHomeName}\bin\appclient.bat --ejb-client-properties=ejb-client.properties ear\target\app-client.ear#simpleClient.jar Hello from command line
$ __{jbossHomeName}__/bin/appclient.sh --ejb-client-properties=ejb-client.properties ear/target/app-client.ear#simpleClient.jar Hello from command
----
+
NOTE: For Windows, use the `__{jbossHomeName}__\bin\appclient.bat` script.

. Review the result. The client outputs the following information, which was provided by the application:

+
[source,options="nowrap"]
----
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) Main started with arguments
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-51) [Hello, from, command, line]
[org.jboss.as.quickstarts.appclient.acc.client.Main] (Thread-##) Hello from StatelessSessionBean@theOtherHOST
----

. Review the server log files on the remote machine to see the bean invocations on the server.

+
[source,options="nowrap"]
----
ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
ClientContext is here = {Client =dev84, jboss.source-address=localhost/127.0.0.1:45315}
----

== Undeploy the Archive from the Local Machine

Follow these instructions if you are testing the quickstart on the same machine.

. Make sure you have started the {productName} server on the machine where the quickstart is deployed as described above.
. Open a command prompt on that server and navigate to the root directory of this quickstart.
. Open a terminal on that server and navigate to the root directory of this quickstart.
. When you are finished testing, type this command to undeploy the archive from the local machine.

+
[source,options="nowrap"]
----
mvn wildfly:undeploy
$ mvn wildfly:undeploy
----

== Undeploy the Archive from the Remote Machine

Follow these instructions if you are testing the quickstart on a different machine.

. Make sure you have started the {productName} server on the remote server machine, `Machine_1`, where the quickstart is deployed as described above.
. Open a command prompt on the local client machine, `Machine_2`, and navigate to the root directory of this quickstart.
. Open a terminal on the local client machine, `Machine_2`, and navigate to the root directory of this quickstart.
. When you are finished testing, type this command to undeploy the archive from the remote server machine, `Machine_1`.

+
[source,subs="+quotes,attributes+",options="nowrap"]
----
$ mvn wildfly:undeploy -Dwildfly.hostname=__MACHINE_1_IP_ADDRESS__ [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
----
mvn wildfly:undeploy -Dwildfly.hostname=MACHINE_1_IP_ADDRESS [-Dwildfly.port=9099] -Dwildfly.username=admin -Dwildfly.password=admin-123
----
25 changes: 23 additions & 2 deletions attributes.adoc
Expand Up @@ -3,6 +3,27 @@
:jbossHomeName: WILDFLY_HOME
:productVersion: 12
:buildRequirements: Java 8.0 (Java SDK 1.8) or later and Maven 3.3.1 or later
:githubRepoUrl: https://github.com/wildfly/quickstart/
:useEclipseUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.md#use-jboss-developer-studio-or-eclipse-to-run-the-quickstarts
:jbdsEapServerName: WildFly Application Server 11.x
:githubRepoUrl: https://github.com/wildfly/quickstart/
:useEclipseUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.adoc#use_red_hat_jboss_developer_studio_or_eclipse_to_run_the_quickstarts
:useEclipseDeployJavaClientDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.adoc#deploy_and_undeploy_a_quickstart_containing_server_and_java_client_projects
:useEclipseDeployEARDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.adoc#deploy_and_undeploy_a_quickstart_ear_project
:useProductHomeDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_OF_{jbossHomeName}.adoc#use_of_product_home_and_jboss_home_variables
:configureMavenDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN_JBOSS_EAP.adoc#configure_maven_to_build_and_deploy_the_quickstarts
:arquillianTestsDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/RUN_ARQUILLIAN_TESTS.adoc#run_the_arquillian_tests
:addUserDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.adoc#create_users_required_by_the_quickstarts
:addApplicationUserDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.adoc#add_an_application_user
:addManagementUserDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.adoc#add_an_management_user
:startServerDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/START_JBOSS_EAP.adoc#start_the_jboss_eap_server
:configurePostgresDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_JBOSS_EAP.adoc#configure_the_postgresql_database_for_use_with_the_quickstarts
:configurePostgresDownloadDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_JBOSS_EAP.adoc#download_and_install_postgresql
:configurePostgresCreateUserDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_JBOSS_EAP.adoc#create_a_database_user
:configurePostgresAddModuleDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_JBOSS_EAP.adoc#add_the_postgres_module_to_the_jboss_eap_server
:configurePostgresDriverDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_JBOSS_EAP.adoc#configure_the_postgresql_driver_in_the_jboss_eap_server
:configureBytementDownloadDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#download_and_configure_byteman
:configureBytemanDisableDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#disable_the_byteman_script
:configureBytemanClearDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#clear_the_transaction_object_store
:configureBytemanQuickstartDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#configure_byteman_for_use_with_the_quickstarts
:configureBytemanHaltDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#use_byteman_to_halt_the_application[
:configureBytemanQuickstartsDocUrl: https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.adoc#configure_byteman_for_use_with_the_quickstarts
>>>>>>> 3712738... JBEAP-13958 part 1: Update quickstart README files - replace shared doc links with new adoc versions, fix formatting up to ejb quickstarts

0 comments on commit 6a24d6a

Please sign in to comment.