Skip to content

Commit 704e43c

Browse files
committed
edits
1 parent ec4bc7b commit 704e43c

File tree

1 file changed

+71
-79
lines changed

1 file changed

+71
-79
lines changed

articles/virtual-machines/workloads/redhat/jboss-eap-single-server-azure-vm.md

Lines changed: 71 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This article shows you how to quickly deploy JBoss EAP Server on an Azure virtua
1616
## Prerequisites
1717

1818
- [!INCLUDE [quickstarts-free-trial-note](../../../../includes/quickstarts-free-trial-note.md)]
19-
- [Azure CLI installed](/cli/azure/install-azure-cli)
20-
- Install a Java SE implementation version 8 or later (for example, [Microsoft build of OpenJDK](/java/openjdk)).
21-
- Install [Maven](https://maven.apache.org/download.cgi) 3.5.0 or higher.
19+
- Install [Azure CLI](/cli/azure/install-azure-cli).
20+
- Install a Java SE implementation version 8 or later - for example, [Microsoft build of OpenJDK](/java/openjdk).
21+
- Install [Maven](https://maven.apache.org/download.cgi), version 3.5.0 or higher.
2222
- Ensure the Azure identity you use to sign in has either the [Contributor](/azure/role-based-access-control/built-in-roles#contributor) role or the [Owner](/azure/role-based-access-control/built-in-roles#owner) role in the current subscription. For an overview of Azure roles, see [What is Azure role-based access control (Azure RBAC)?](/azure/role-based-access-control/overview)
2323

2424
## Deploy JBoss EAP Server on Azure VM
@@ -27,21 +27,19 @@ The steps in this section direct you to deploy JBoss EAP Server on Azure VMs.
2727

2828
:::image type="content" source="media/jboss-eap-single-server-azure-vm/portal-start-experience.png" alt-text="Screenshot of Azure portal showing JBoss EAP Server on Azure VM." lightbox="media/jboss-eap-single-server-azure-vm/portal-start-experience.png":::
2929

30-
The following steps show you how to find the JBoss EAP Server on Azure VM offer and fill out the **Basics** pane.
30+
The following steps show you how to find the JBoss EAP Server on Azure VM offer and fill out the **Basics** pane:
3131

32-
1. In the search bar at the top of the Azure portal, enter *JBoss EAP*. In the search results, in the **Marketplace** section, select **JBoss EAP standalone on RHEL VM**.
32+
1. In the search bar at the top of the Azure portal, enter *JBoss EAP*. In the search results, in the **Marketplace** section, select **JBoss EAP standalone on RHEL VM**. In the drop-down menu, ensure that **PAYG** is selected.
3333

3434
:::image type="content" source="media/jboss-eap-single-server-azure-vm/marketplace-search-results.png" alt-text="Screenshot of Azure portal showing JBoss EAP Server on Azure VM in search results." lightbox="media/jboss-eap-single-server-azure-vm/marketplace-search-results.png":::
3535

36-
In the drop-down menu, ensure **PAYG** is selected.
37-
38-
Alternatively, you can also go directly to the [JBoss EAP standalone on RHEL VM](https://aka.ms/eap-vm-single-portal) offer. In this case, the correct plan is already selected for you.
36+
Alternatively, you can go directly to the [JBoss EAP standalone on RHEL VM](https://aka.ms/eap-vm-single-portal) offer. In this case, the correct plan is already selected for you.
3937

4038
In either case, this offer deploys JBoss EAP by providing your Red Hat subscription at deployment time, and runs it on Red Hat Enterprise Linux using a pay-as-you-go payment configuration for the base VM.
4139

4240
1. On the offer page, select **Create**.
4341
1. On the **Basics** pane, ensure the value shown in the **Subscription** field is the same one that has the roles listed in the prerequisites section.
44-
1. You must deploy the offer in an empty resource group. In the **Resource group** field, select **Create new** and fill in a value for the resource group. Because resource groups must be unique within a subscription, pick a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier. For example, *ejb0823jbosseapvm*.
42+
1. You must deploy the offer in an empty resource group. In the **Resource group** field, select **Create new** and fill in a value for the resource group. Because resource groups must be unique within a subscription, pick a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier. For example, `ejb0823jbosseapvm`.
4543
1. Under **Instance details**, select the region for the deployment.
4644
1. Leave the default VM size for **Virtual machine size**.
4745
1. Leave the default option **OpenJDK 8** for **JDK version**.
@@ -61,15 +59,15 @@ The following steps show you how to fill out **JBoss EAP Settings** pane and sta
6159
1. Select **Create**.
6260
1. Track the progress of the deployment on the **Deployment is in progress** page.
6361

64-
Depending on network conditions and other activity in your selected region, the deployment may take up to 6 minutes to complete. After that, you should see text **Your deployment is complete** displayed on the deployment page.
62+
Depending on network conditions and other activity in your selected region, the deployment might take up to 6 minutes to complete. After that, you should see text **Your deployment is complete** displayed on the deployment page.
6563

6664
## Optional: Verify the functionality of the deployment
6765

6866
1. Open the resource group you just created in the Azure portal.
69-
2. Select the VM resource which name is "jbosieapVm".
70-
3. In the **Overview** pane, note the **Public IP address** assigned to the network interface.
71-
4. Copy the public IP address.
72-
1. Paste the public IP address in an Internet-connected web browser, append `:9990`, and press **Enter**. You should see the familiar **Red Hat JBoss Enterprise Application Platform** management console sign-in screen, as shown in the following screenshot.
67+
1. Select the VM resource named `jbosieapVm`.
68+
1. In the **Overview** pane, note the **Public IP address** assigned to the network interface.
69+
1. Copy the public IP address.
70+
1. Paste the public IP address in an Internet-connected web browser, append `:9990`, and press **Enter**. You should see the familiar **Red Hat JBoss Enterprise Application Platform** management console sign-in screen, as shown in the following screenshot:
7371

7472
:::image type="content" source="media/jboss-eap-single-server-azure-vm/jboss-eap-console-login.png" alt-text="Screenshot of JBoss EAP management console sign-in screen." lightbox="media/jboss-eap-single-server-azure-vm/jboss-eap-console-login.png":::
7573

@@ -84,96 +82,90 @@ Depending on network conditions and other activity in your selected region, the
8482

8583
## Optional: Deploy the app to the JBoss EAP Server
8684

87-
The following steps will guide you to create a "Hello World" application and then deploy it on JBoss EAP.
85+
The following steps show you how to create a "Hello World" application and then deploy it on JBoss EAP:
8886

89-
2. **Create a Maven Project:**
87+
1. Use the following steps to create a Maven project:
9088

91-
- Open a terminal or command prompt.
89+
1. Open a terminal or command prompt.
9290

93-
- Navigate to the directory where you want to create your project.
91+
1. Navigate to the directory where you want to create your project.
9492

95-
- Run the following Maven command to create a new Java web application:
93+
1. Run the following Maven command to create a new Java web application. Be sure to replace `<package-name>` with your desired package name and `<project-name>` with your project name.
9694

97-
```bash
98-
mvn archetype:generate -DgroupId=com.example -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
99-
```
95+
```bash
96+
mvn archetype:generate -DgroupId=<package-name> -DartifactId=<project-name> -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
97+
```
10098

101-
Replace `com.example` with your desired package name and `helloworld` with your project name.
99+
1. Use the following steps to update the project structure:
102100

103-
3. **Project Structure:**
101+
1. Navigate to the newly created project directory - for example, *helloworld*.
104102

105-
- Navigate to the newly created project directory (`helloworld`).
103+
The project directory has the following structure:
106104

107-
- The project directory will have the following structure:
105+
```
106+
helloworld
107+
├── src
108+
│ └── main
109+
│ ├── java
110+
│ └── webapp
111+
│ └── WEB-INF
112+
│ └── web.xml
113+
└── pom.xml
114+
```
108115

109-
```
110-
helloworld
111-
├── src
112-
│ └── main
113-
│ ├── java
114-
│ └── webapp
115-
│ └── WEB-INF
116-
│ └── web.xml
117-
└── pom.xml
118-
```
116+
1. Use the following steps to add a servlet class:
119117

120-
4. **Add a Servlet Class:**
118+
1. In the *src/main/java* directory, create a new package - for example, `com.example`.
121119

122-
- In the `src/main/java` directory, create a new package (e.g., `com.example`).
120+
1. Inside this package, create a new Java class named *HelloWorldServlet.java* with the following content:
123121

124-
- Inside this package, create a new Java class, `HelloWorldServlet.java`, with the following content:
122+
```java
123+
package com.example;
125124
126-
```java
127-
package com.example;
128-
129-
import java.io.IOException;
130-
import javax.servlet.ServletException;
131-
import javax.servlet.annotation.WebServlet;
132-
import javax.servlet.http.HttpServlet;
133-
import javax.servlet.http.HttpServletRequest;
134-
import javax.servlet.http.HttpServletResponse;
135-
136-
@WebServlet("/hello")
137-
public class HelloWorldServlet extends HttpServlet {
138-
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
139-
response.getWriter().print("Hello World!");
140-
}
141-
}
142-
```
125+
import java.io.IOException;
126+
import javax.servlet.ServletException;
127+
import javax.servlet.annotation.WebServlet;
128+
import javax.servlet.http.HttpServlet;
129+
import javax.servlet.http.HttpServletRequest;
130+
import javax.servlet.http.HttpServletResponse;
143131
144-
5. **Update `pom.xml`:**
132+
@WebServlet("/hello")
133+
public class HelloWorldServlet extends HttpServlet {
134+
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
135+
response.getWriter().print("Hello World!");
136+
}
137+
}
138+
```
145139

146-
- Add dependencies for Java EE APIs to your `pom.xml` file to ensure you have the necessary libraries to compile the servlet:
140+
1. Use the following steps to update the *pom.xml* file:
147141

148-
```xml
149-
<dependencies>
150-
<dependency>
151-
<groupId>javax.servlet</groupId>
152-
<artifactId>javax.servlet-api</artifactId>
153-
<version>4.0.1</version>
154-
<scope>provided</scope>
155-
</dependency>
156-
</dependencies>
157-
```
142+
1. Add dependencies for Java EE APIs to your *pom.xml* file to ensure that you have the necessary libraries to compile the servlet:
158143

159-
6. **Build the Project:**
144+
```xml
145+
<dependencies>
146+
<dependency>
147+
<groupId>javax.servlet</groupId>
148+
<artifactId>javax.servlet-api</artifactId>
149+
<version>4.0.1</version>
150+
<scope>provided</scope>
151+
</dependency>
152+
</dependencies>
153+
```
160154

161-
- Run `mvn package` in the root directory of your project to build the application. This will generate a `.war` file in the `target` directory.
155+
1. Build the project by running `mvn package` in the root directory of your project. This command generates a *.war* file in the *target* directory.
162156

163-
7. **Deploy the Application on JBoss EAP:**
164-
- Open the JBoss EAP admin console (`http://<public-ip-address-of-ipconfig1>:9990`).
165-
- Deploy the `.war` file using the admin console by uploading the file in the "Deployments" section.
166-
:::image type="content" source="media/jboss-eap-single-server-azure-vm/jboss-eap-console-upload-content.png" alt-text="Screenshot of the JBoss EAP management console Deployments tab with Upload Content menu item highlighted." lightbox="media/jboss-eap-single-server-azure-vm/jboss-eap-console-upload-content.png":::
157+
1. Use the following steps to deploy the application on JBoss EAP:
167158

168-
8. **Access the Application:**
169-
- Once deployed, you can access your "Hello World" application by navigating to `http://<public-ip-address-of-ipconfig1>:8080/helloworld/hello` in your web browser.
159+
1. Open the JBoss EAP admin console at `http://<public-ip-address-of-ipconfig1>:9990`.
160+
1. Deploy the *.war* file using the admin console by uploading the file in the **Deployments** section.
170161

162+
:::image type="content" source="media/jboss-eap-single-server-azure-vm/jboss-eap-console-upload-content.png" alt-text="Screenshot of the JBoss EAP management console Deployments tab." lightbox="media/jboss-eap-single-server-azure-vm/jboss-eap-console-upload-content.png":::
171163

172-
## Clean up resources
164+
1. After deployment, access your "Hello World" application by navigating to `http://<public-ip-address-of-ipconfig1>:8080/helloworld/hello` in your web browser.
173165

174-
To avoid Azure charges, you should clean up unnecessary resources.
166+
## Clean up resources
175167

176-
Run the following command to remove the resource group, VM, network interface, virtual network, and all related resources.
168+
To avoid Azure charges, you should clean up unnecessary resources. Run the following command to remove the resource group, VM, network interface, virtual network, and all related resources.
177169

178170
```azurecli
179171
az group delete --name <resource-group-name> --yes --no-wait

0 commit comments

Comments
 (0)