You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. In the context menu, select one of the following options:
92
93
- To build the application without cleaning, click **Build Application**.
93
94
- To do a clean build of the application, click **Rebuild Application**.
94
95
- To clean the application of built artifacts, click **Clean Application**.
96
+
97
+
## Deploy a Service Fabric application to the local cluster with Eclipse
98
+
99
+
After you have built your Service Fabric application, follow these steps to deploy it to the local cluster.
100
+
101
+
1. If you haven't started the local cluster, follow the instructions in [Set up a local cluster](./service-fabric-get-started-linux.md#set-up-a-local-cluster) to start your local cluster and make sure that it is running.
102
+
2. Right-click your Service Fabric application, and then select **Service Fabric**.
3. From the context menu, click **Deploy Application**.
107
+
4. You can follow the progress of the deploy operation in the Console window.
108
+
5. To verify that your application is running, open Service Fabric Explorer on your local cluster in a browser window [http://localhost:19080/Explorer](http://localhost:19080/Explorer). Expand the **Applications** node and make sure your application is running.
109
+
110
+
To learn how to debug your application in Eclipse using the local cluster, see [Debug a Java service in Eclipse](./service-fabric-debugging-your-application-java.md).
111
+
112
+
You can also deploy your application to the local cluster wuth the **Publish Application** command:
113
+
114
+
1. Right-click your Service Fabric application, and then select **Service Fabric**.
115
+
2. From the context menu, click **Publish Application...**.
116
+
3. In the **Publish Application** window, choose **PublishProfiles/Local.json** as the Target Profile and click **Publish**.
By default, the Local.json publishing profile is set up to publish to the local cluster. For more information about the connection and endpoint parameters present in publishing profiles, see the next section.
121
+
122
+
## Publish your Service Fabric application to Azure with Eclipse
123
+
124
+
To publish your application to the cloud, follow these steps:
125
+
126
+
1. To publish your application to a secure cluster in the cloud, you need an X.509 certificate to use to communicate with your cluster. In test and development environments, the certificate used is often the cluster certificate. In production environments, the certificate should be a client certificate that is distinct from the cluster certificate. You need both the certificate and the private key. The certificate (and key) file must be PEM-formatted. You can create a PEM file that contains the certificate and private key from a PFX file with the following openssl command:
95
127
96
-
3. From this menu, you also can deploy, undeploy, and publish your application:
97
-
- To deploy to your local cluster, click **Deploy Application**.
98
-
- In the **Publish Application** dialog box, select a publish profile:
These JavaScript Object Notation (JSON) files store information (such as connection endpoints and security information) that is required to connect to your local or cloud (Azure) cluster.
132
+
If the PFX file is not password protected, use `--passin pass:`for the last parameter.
103
133
104
-
![Service Fabric Publish menu][publish/Publish]
134
+
2. Open the **Cloud.json** file under the **PublishProfiles** directory. You need to configure the cluster endpoint and security credentials appropriately for your cluster.
135
+
136
+
- The `ConnectionIPOrURL` field contains the IP address or URL of your cluster. Note that the value does not contain the URL scheme (`https://`).
137
+
- By default the `ConnectionPort` field should be `19080`, unless you explicitly have changed this port for your cluster.
138
+
- The `ClientKey` field should point to a PEM-formatted .pem or .key file on your local machine that contains the private key for your client or cluster certificate.
139
+
- The `ClientCert` field should point to a PEM-formatted .pem or .crt file on your local machine that contains the certificate data for your client or cluster. certificate.
4. You can follow the progress of the publish operation in the Console window.
160
+
5. To verify that your application is running, open Service Fabric Explorer on your Azure cluster in a browser window. For the example above, this would be: `https://lnxxug0tlqm5.westus.cloudapp.azure.com:19080/Explorer`. Expand the **Applications** node and make sure your application is running.
161
+
162
+
163
+
On secure Linux clusters, if your application contains Reliable Services services, you will also need to configure a certificate that your services can use to call Service Fabric runtime APIs. To learn more, see [Configure a Reliable Services app to run on Linux clusters](./service-fabric-configure-certificates-linux.md#configure-a-reliable-services-app-to-run-on-linux-clusters).
164
+
165
+
For a quick walk through of how to deploy a Service Fabric Reliable Services application written in Java to a secure Linux cluster, see [Quckstart: Deploy a Java Reliable Services application](./service-fabric-quickstart-java-reliable-services.md).
166
+
167
+
## Deploy a Service Fabric application by using Eclipse run configurations
105
168
106
169
An alternate way to deploy your Service Fabric application is by using Eclipse run configurations.
107
170
108
-
1. Go to **Run** > **Run Configurations**.
109
-
2. Under **Gradle Project**, select the **ServiceFabricDeployer** run configuration.
110
-
3. In the right pane, on the **Arguments** tab, for **publishProfile**, select **local** or **cloud**. The default is **local**. To deploy to a remote or cloud cluster, select **cloud**.
111
-
4. To ensure that the proper information is populated in the publish profiles, edit **Local.json** or **Cloud.json** as needed. You can add or update endpoint details and security credentials.
112
-
5. Ensure that **Working Directory** points to the application you want to deploy. To change the application, click the **Workspace** button, and then select the application you want.
113
-
6. Click **Apply**, and then click **Run**.
171
+
1. In Eclipse, go to **Run**>**Run Configurations**.
172
+
2. Under **Gradle Project**, selectthe**ServiceFabricDeployer** run configuration.
173
+
3. In the right pane, on the **Arguments** tab, make sure the **ip**, **port**, **clientCert**, and **clientKey** parameters are set appropriately foryour deployment. By default, the parameters are set to deploy to the local cluster asin the following screenshot. To publish your app to Azure you can modify the parameters to contain the endpoint details and security credentials for your Azure cluster. For more information, see the previous section, [Publish your Service Fabric application to Azure with Eclipse](#publish-your-service-fabric-application-to-azure-with-eclipse).
5. Make sure that **Working Directory** points to the application you want to deploy. To change the application, click the **Workspace** button, and thenselectthe application you want.
178
+
6. Click **Apply**, and then click **Run**.
114
179
115
180
Your application builds and deploys within a few moments. You can monitor the deployment status in Service Fabric Explorer.
116
181
@@ -160,6 +225,12 @@ The application upgrade takes a few minutes. You can monitor the application upg
160
225
## Migrating old Service Fabric Java applications to be used with Maven
161
226
We have recently moved Service Fabric Java libraries from Service Fabric Java SDK to Maven repository. While the new applications you generate using Eclipse, will generate latest updated projects (which will be able to work with Maven), you can update your existing Service Fabric stateless or actor Java applications, which were using the Service Fabric Java SDK earlier, to use the Service Fabric Java dependencies from Maven. Please follow the steps mentioned [here](service-fabric-migrate-old-javaapp-to-use-maven.md) to ensure your older application works with Maven.
162
227
228
+
## Next steps
229
+
230
+
- For quick steps on building Java Reliable service application and deploying it locally and to Azure, see [Quckstart: Deploy a Java Reliable Services application](./service-fabric-quickstart-java-reliable-services.md).
231
+
- To learn how to debug a Java application on your local cluster, see [Debug a Java service in Eclipse](./service-fabric-debugging-your-application-java.md).
232
+
- To learn how to monitor and diagnose Service Fabric applications, see [Monitor and diagnose services in a local machine development setup](./service-fabric-diagnostics-how-to-monitor-and-diagnose-services-locally-linux.md).
0 commit comments