https://github.com/francomelandri/challenge
https://github.com/francomelandri/challenge
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/francomelandri/challenge
- Owner: FrancoMelandri
- Created: 2018-03-15T10:11:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T17:05:30.000Z (over 7 years ago)
- Last Synced: 2025-03-30T02:29:35.046Z (6 months ago)
- Language: C#
- Size: 529 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My personal challenge
The aim of this POC (my personal challenge) is to create an application using Service Fabric in a macOS environment.
The application is composed of four services:
* **ui-service** (stateless) that host an ASP.NET MVC dotnet core web site.
* **pl-service** (stateless) that host a WCF service and expose a catalog of products.
* **pd-service** (stateless) that host a WCF service and expose the product details.
* **graphql-service** (stateless) that host a graphQL entry point for the services.
Let's start.
---
* Setup develop environment1. Pull the docker image
`docker pull microsoft/service-fabric-onebox`
2. Start the service fabric container image
`docker run -itd -p 19080-19100:19080-19100 --name sfonebox microsoft/service-fabric-onebox`
3. Logon on the Docker container`docker exec -it sfonebox bash`
4. Run the script to fecth required dependencies
`./setup.sh`
please use: `apt-get install -y --allow-unauthenticated dotnet-runtime-2.0.0` inside the setup script.
`./run.sh`
5. At the end of this process if you tpye http://localhost:19080 in your browser you should see Service Fabric explorer
---
* Setup Service Fabric CLI1. Use brew to install the Service Fabric cli using the commands:
`brew install python3`
`[sudo] pip3 install sfctl`
2. After sfctl is installed you have to select the cluster
`sfctl cluster select --endpoint http://localhost:19080`
---
* Create the first **.NET Core** application1. Install Yeoman to generate the template of the application
`npm install -g yo`
2. Install the selected generator
`npm install -g generator-azuresfcsharp`
3. Create the applicaiton
`yo azuresfcsharp`
- select the name of the app (ui-service)
- select the type of the service (stateless service)
- select the name of the service (UiService)4. Updaload the application using the cli commnand
`sfctl application upload --path ui-service --show-progress`
5. Provisioning the service using the cli command
`sfctl application provision --application-type-build-path ui-service`
5. Create the instance of the service using the cli command
`sfctl application create --app-name fabric:/ui-service --app-type ui-serviceType --app-version 1.0.0`
6. You can also use the bash scripts to:`./build.sh`
build the service
`./install.sh`
deploy the service in the Service Fabric Cluster
`./unistall.sh`
to remove the service from cluster
---