I tried Azure Service Fabric (Java), so I will keep it as a record.
OS: macOS Mojave Version 10.14.6 (18G84)
STS: Spring Tool Suite 4 Version: 4.5.0.RELEASE Build Id: 201912171052
Eclise: Eclipse IDE for Java Developers Version: 2019-12 (4.14.0) Build id: 20191212-1212
1.1 CLI Azure Service Fabric CLI
Set up your development environment on Mac OS X
docker run -itd -p 19080:19080 -p 19000:19000 -p 25100-25200:25100-25200 -p 8080:8080 -v [/Users/tworks55/eclipse-workspaces/mySFWorkspace]:/tmp/mySFWorkspace --name sfonebox mysfcluster
* [/Users/tworks55/eclipse-workspaces/mySFWorkspace]Part is changed according to the environment
sfctl cluster select --endpoint http://localhost:19080
docker logs sfonebox
docker stop sfonebox
docker rm -f sfonebox
http://localhost:19080/ http://localhost:8080/
Quick Start: Deploy Java Spring Boot App on Azure Service Fabric (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-quickstart-java-spring-boot)
Deployment is possible for the time being, but Scale up / Fail Over is not good. It may be unavoidable because it is a local environment.
As a caveat
--Don't forget -p 8080: 8080 when launching sftestcluster --The name of the jar file written in entryPoint.sh matches the one that was built. --If you scale and make 3 instances, Port will be covered and an error will occur (as expected?) --Restart the running instance and Fail Over, but DownTime occurs (cause unknown)
It is around.
Image after startup
Quick Start: Deploy Java App on Azure Service Fabric on Linux (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-quickstart-java-reliable-services)
Plugin cannot be used in Eclipse / STS on Mac. Right-clicking on Project does not bring up the Service Fabric menu.
Right-click on the project and select Publish Application from the Service Fabric dropdown.
Cannot be operated.
[Tutorial: Create an application with Java API front-end service and stateful back-end service on Azure Service Fabric](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric- tutorial-create-java-app)
Plugin cannot be used in Eclipse / STS on Mac. I get an error like this when I try to create a Project. It seems that Windows is not good for Linux in the first place, but what about Mac? https://github.com/MicrosoftDocs/azure-docs/issues/30819
As long as you check the following, it seems that you can go on a Mac. https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-fabric/service-fabric-get-started-eclipse.md
[!NOTE] If Eclipse isn't working as expected on your Mac, or needs you run as super user), go to the ECLIPSE_INSTALLATION_PATH folder and navigate to the subfolder Eclipse.app/Contents/MacOS. Start Eclipse by running ./eclipse.
Develop Java Service Fabric applications using Visual Studio Code (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-develop-java-applications-with-vs -code)
Even if I built it using Service Fabric Reliable Services extension for VSCode, it was not built, so I built it in Terminal. (Gradle quits without doing anything, maybe the PATH from VS Code is not enough)
VSCODE.
/asf/service-fabric-java-quickstart $ gradle
> Task :help
Welcome to Gradle 6.0.1.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
For troubleshooting, visit https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 685ms
1 actionable task: 1 executed
~/asf/service-fabric-java-quickstart $ gradle --version
------------------------------------------------------------
Gradle 6.0.1
------------------------------------------------------------
Build time: 2019-11-18 20:25:01 UTC
Revision: fad121066a68c4701acd362daf4287a7c309a0f5
Kotlin: 1.3.50
Groovy: 2.5.8
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 1.8.0_231 (Oracle Corporation 25.231-b11)
OS: Mac OS X 10.14.6 x86_64
~/asf/service-fabric-java-quickstart $ gradle
> Task :help
Welcome to Gradle 6.0.1.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
For troubleshooting, visit https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 584ms
1 actionable task: 1 executed
terminal.
~/asf/service-fabric-java-quickstart/Voting $ gradle
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 32s
15 actionable tasks: 11 executed, 4 up-to-date
~/asf/service-fabric-java-quickstart/Voting $
After that, install it with the extension function and it works normally. The atmosphere that the extension of VS CODE is not stable yet.
Recommended Posts