Skip to content

Commit 17c2dc3

Browse files
authored
Merge pull request #103346 from v-thepet/quickstarts11
Two service-fabric quickstarts
2 parents e540bcb + 7b3e219 commit 17c2dc3

File tree

2 files changed

+36
-59
lines changed

2 files changed

+36
-59
lines changed

articles/service-fabric/service-fabric-quickstart-java-reliable-services.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,22 @@ ms.custom: mvc, devcenter, seo-java-august2019, seo-java-september2019
1010
---
1111
# Quickstart: Deploy a Java app to Azure Service Fabric on Linux
1212

13-
This quickstart shows how to deploy your first Java application to Azure Service Fabric using the Eclipse IDE on a Linux developer machine. When you're finished, you have a voting application with a Java web front end that saves voting results in a stateful back-end service in the cluster.
13+
In this quickstart, you deploy a Java application to Azure Service Fabric using the Eclipse IDE on a Linux developer machine. When you're finished, you have a voting application with a Java web front end that saves voting results in a stateful back-end service in the cluster.
1414

1515
Azure Service Fabric is a distributed systems platform for deploying and managing microservices and containers.
1616

17-
![Azure Service Fabric voting sample](./media/service-fabric-quickstart-java/service-fabric-voting-sample.png)
18-
19-
In this quickstart, you learn how to:
20-
21-
* Use Eclipse as a tool for your Service Fabric Java applications
22-
* Deploy the application to your local cluster
23-
* Scale-out the application across multiple nodes
24-
2517
## Prerequisites
2618

27-
To complete this quickstart:
28-
29-
1. [Install Service Fabric SDK & Service Fabric Command Line Interface (CLI)](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#installation-methods)
30-
2. [Install Git](https://git-scm.com/)
31-
3. [Install Eclipse](https://www.eclipse.org/downloads/)
32-
4. [Set up Java Environment](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-java-development), making sure to follow the optional steps to install the Eclipse plug-in
19+
- [Java environment](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-java-development) and [Yeoman](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-yeoman-generators-for-containers-and-guest-executables)
20+
- [Eclipse Neon (4.6)+](https://www.eclipse.org/downloads/packages/) and [Eclipse plug-in for Service Fabric](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#install-the-eclipse-plug-in-optional)
21+
- [Service Fabric SDK and Command Line Interface (CLI)](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#installation-methods)
22+
- [Git](https://git-scm.com/downloads)
3323

3424
## Download the sample
3525

3626
In a command window, run the following command to clone the sample app repository to your local machine.
3727

38-
```git
28+
```bash
3929
git clone https://github.com/Azure-Samples/service-fabric-java-quickstart.git
4030
```
4131

@@ -46,13 +36,13 @@ git clone https://github.com/Azure-Samples/service-fabric-java-quickstart.git
4636
```bash
4737
sudo /opt/microsoft/sdk/servicefabric/common/clustersetup/devclustersetup.sh
4838
```
49-
The startup of the local cluster takes some time. To confirm that the cluster is fully up, access the Service Fabric Explorer at **http://localhost:19080**. The five healthy nodes indicate the local cluster is up and running.
39+
The startup of the local cluster takes some time. To confirm that the cluster is fully up, access the Service Fabric Explorer at `http://localhost:19080`. The five healthy nodes indicate the local cluster is up and running.
5040

5141
![Azure Service Fabric Explorer shows healthy nodes](./media/service-fabric-quickstart-java/service-fabric-explorer-healthy-nodes.png)
5242

5343
2. Open Eclipse.
5444
3. Select **File** > **Import** > **Gradle** > **Existing Gradle Project** and follow the wizard.
55-
4. Select **Directory** and choose the `Voting` directory from the `service-fabric-java-quickstart` folder you cloned from GitHub. Select **Finish**.
45+
4. Select **Directory** and choose the **Voting** directory from the **service-fabric-java-quickstart** folder you cloned from GitHub. Select **Finish**.
5646

5747
![Import Gradle project into Eclipse](./media/service-fabric-quickstart-java/eclipse-import-gradle-project.png)
5848

@@ -67,15 +57,17 @@ git clone https://github.com/Azure-Samples/service-fabric-java-quickstart.git
6757

6858
You can now add a set of voting options, and start taking votes. The application runs and stores all data in your Service Fabric cluster, without the need for a separate database.
6959

60+
![Azure Service Fabric voting sample](./media/service-fabric-quickstart-java/service-fabric-voting-sample.png)
61+
7062
## Scale applications and services in a cluster
7163

72-
Services can be scaled across a cluster to accommodate for a change in the load on the services. You scale a service by changing the number of instances running in the cluster. There are many ways of scaling your services; for example, you can use scripts or commands from Service Fabric CLI (sfctl). The following steps use Service Fabric Explorer.
64+
Services can be scaled across a cluster to accommodate for a change in the load on the services. You scale a service by changing the number of instances running in the cluster. There are many ways of scaling your services. For example, you can use scripts or commands from Service Fabric CLI (`sfctl`). The following steps use Service Fabric Explorer.
7365

74-
Service Fabric Explorer runs in all Service Fabric clusters and can be accessed from a browser by browsing to the cluster's HTTP management port (19080); for example, `http://localhost:19080`.
66+
Service Fabric Explorer runs in all Service Fabric clusters and can be accessed from a browser by browsing to the cluster's HTTP management port (19080). For example, `http://localhost:19080`.
7567
7668
To scale the web front-end service, do the following:
7769
78-
1. Open Service Fabric Explorer in your cluster - for example, `https://localhost:19080`.
70+
1. Open Service Fabric Explorer in your cluster. For example, `https://localhost:19080`.
7971
2. Select the ellipsis (**...**) next to the **fabric:/Voting/VotingWeb** node in the treeview and select **Scale Service**.
8072
8173
![Scale a service in Azure Service Fabric](./media/service-fabric-quickstart-java/service-fabric-scale-service.png)

articles/service-fabric/service-fabric-quickstart-java-spring-boot.md

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,64 +10,47 @@ ms.custom: mvc, devcenter, seo-java-august2019, seo-java-september2019
1010
---
1111
# Quickstart: Deploy a Java Spring Boot app on Azure Service Fabric
1212

13-
This quickstart shows how to deploy a Java Spring Boot application to Azure Service Fabric. Azure Service Fabric is a distributed systems platform for deploying and managing microservices and containers.
14-
15-
This quickstart uses the [Getting Started](https://spring.io/guides/gs/spring-boot/) sample from the Spring website. Using familiar command-line tools, this quickstart walks you through deploying the Spring Boot sample as a Service Fabric application. When you're finished, you have the Spring Boot Getting Started sample working on Service Fabric.
16-
17-
![Spring Boot Service Fabric sample](./media/service-fabric-quickstart-java-spring-boot/spring-boot-service-fabric-sample.png)
18-
19-
In this quickstart, you learn how to:
20-
21-
* Deploy a Spring Boot application to Service Fabric
22-
* Deploy the application to your local cluster
23-
* Scale-out the application across multiple nodes
24-
* Perform failover of your service with no hit to availability
13+
In this quickstart, you deploy a Java Spring Boot application to Azure Service Fabric by using familiar command-line tools on Linux or MacOS. Azure Service Fabric is a distributed systems platform for deploying and managing microservices and containers.
2514

2615
## Prerequisites
2716

28-
To complete this quickstart:
17+
#### [Linux](#tab/linux)
2918

30-
1. Install Service Fabric SDK & Service Fabric Command Line Interface (CLI)
19+
- [Java environment](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-java-development) and [Yeoman](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-yeoman-generators-for-containers-and-guest-executables)
20+
- [Service Fabric SDK & Service Fabric Command Line Interface (CLI)](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#installation-methods)
21+
- [Git](https://git-scm.com/downloads)
3122

32-
a. [Mac](https://docs.microsoft.com/azure/service-fabric/service-fabric-cli#cli-mac)
33-
34-
b. [Linux](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#installation-methods)
35-
36-
1. [Install Git](https://git-scm.com/)
37-
1. Install Yeoman
23+
#### [MacOS](#tab/macos)
3824

39-
a. [Mac](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-mac#create-your-application-on-your-mac-by-using-yeoman)
25+
- [Java environment and Yeoman](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-mac#create-your-application-on-your-mac-by-using-yeoman)
26+
- [Service Fabric SDK & Service Fabric Command Line Interface (CLI)](https://docs.microsoft.com/azure/service-fabric/service-fabric-cli#cli-mac)
27+
- [Git](https://git-scm.com/downloads)
4028

41-
b. [Linux](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-yeoman-generators-for-containers-and-guest-executables)
42-
1. Set up Java Environment
43-
44-
a. [Mac](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-mac#create-your-application-on-your-mac-by-using-yeoman)
45-
46-
b. [Linux](https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started-linux#set-up-java-development)
29+
---
4730

4831
## Download the sample
4932

50-
In a terminal window, run the following command to clone the Spring Boot Getting Started sample app to your local machine.
33+
In a terminal window, run the following command to clone the Spring Boot [Getting Started](https://github.com/spring-guides/gs-spring-boot) sample app to your local machine.
5134

5235
```bash
5336
git clone https://github.com/spring-guides/gs-spring-boot.git
5437
```
5538

5639
## Build the Spring Boot application
57-
1. Inside the `gs-spring-boot/complete` directory, run the command below to build the application
40+
Inside the *gs-spring-boot/complete* directory, run the command below to build the application
5841

59-
```bash
60-
./gradlew build
61-
```
42+
```bash
43+
./gradlew build
44+
```
6245

6346
## Package the Spring Boot application
64-
1. Inside the `gs-spring-boot` directory in your clone, run the `yo azuresfguest` command.
47+
1. Inside the *gs-spring-boot* directory in your clone, run the `yo azuresfguest` command.
6548

6649
1. Enter the following details for each prompt.
6750

6851
![Spring Boot Yeoman entries](./media/service-fabric-quickstart-java-spring-boot/yeoman-entries-spring-boot.png)
6952

70-
1. In the `SpringServiceFabric/SpringServiceFabric/SpringGettingStartedPkg/code` folder, create a file called `entryPoint.sh`. Add the following to the `entryPoint.sh` file.
53+
1. In the *SpringServiceFabric/SpringServiceFabric/SpringGettingStartedPkg/code* folder, create a file called *entryPoint.sh*. Add the following code to the *entryPoint.sh* file.
7154

7255
```bash
7356
#!/bin/bash
@@ -86,7 +69,7 @@ git clone https://github.com/spring-guides/gs-spring-boot.git
8669
</Resources>
8770
```
8871

89-
The **ServiceManifest.xml** now looks like this:
72+
The *ServiceManifest.xml* now looks like this:
9073

9174
```xml
9275
<?xml version="1.0" encoding="utf-8"?>
@@ -131,17 +114,17 @@ At this stage, you have created a Service Fabric application for the Spring Boot
131114
docker run --name sftestcluster -d -p 19080:19080 -p 19000:19000 -p 25100-25200:25100-25200 -p 8080:8080 mysfcluster
132115
```
133116

134-
The startup of the local cluster takes some time. To confirm that the cluster is fully up, access the Service Fabric Explorer at **http://localhost:19080**. The five healthy nodes indicate the local cluster is up and running.
117+
The startup of the local cluster takes some time. To confirm that the cluster is fully up, access the Service Fabric Explorer at `http://localhost:19080`. The five healthy nodes indicate the local cluster is up and running.
135118

136119
![Service Fabric Explorer shows healthy nodes](./media/service-fabric-quickstart-java-spring-boot/service-fabric-explorer-healthy-nodes.png)
137120

138-
1. Open the `gs-spring-boot/SpringServiceFabric` folder.
121+
1. Open the *gs-spring-boot/SpringServiceFabric* folder.
139122
1. Run the following command to connect to your local cluster.
140123

141124
```bash
142125
sfctl cluster select --endpoint http://localhost:19080
143126
```
144-
1. Run the `install.sh` script.
127+
1. Run the *install.sh* script.
145128
146129
```bash
147130
./install.sh
@@ -153,6 +136,8 @@ At this stage, you have created a Service Fabric application for the Spring Boot
153136
154137
You can now access the Spring Boot application that was deployed to a Service Fabric cluster.
155138
139+
For more information, see the Spring Boot [Getting Started](https://spring.io/guides/gs/spring-boot/) sample on the Spring website.
140+
156141
## Scale applications and services in a cluster
157142
158143
Services can be scaled across a cluster to accommodate for a change in load on the services. You scale a service by changing the number of instances running in the cluster. There are many ways of scaling your services, for example, you can use scripts or commands from Service Fabric CLI (sfctl). The following steps use Service Fabric Explorer.

0 commit comments

Comments
 (0)