Coder Social home page Coder Social logo

microsoft / vscode-service-fabric-reliable-services Goto Github PK

View Code? Open in Web Editor NEW
20.0 32.0 15.0 2.66 MB

Visual Studio Code extension for Reliable Services in Service Fabric

License: MIT License

TypeScript 78.71% Batchfile 1.21% PowerShell 0.93% C# 19.15%

vscode-service-fabric-reliable-services's Introduction

Service Fabric Extension for Visual Studio Code

A Visual Studio Code extension that provides support for building Service Fabric applications in Visual Studio Code.

Features

  • Create Service Fabric Applications (Java, C#, Container, Guest Executables)
  • Build Java and C# Service Fabric applications
  • Deploy applications to a local cluster
  • Publish applications to a remote cluster
  • Remove applications from a cluster
  • Debugging for Java and C# Service Fabric Applications(on Linux)

Service Fabric Commands in Visual Studio Code

Requirements

As VS Code is a lightweight editor, a number of dependencies must be first installed before Service Fabric applications can be created using VS Code.

npm install -g yo
npm install -g generator-azuresfjava
npm install -g generator-azuresfcsharp
npm install -g generator-azuresfcontainer
npm install -g generator-azuresfguest

Quickstart

Setup

  1. Open the VS Code application.
  2. Click on the extension icon in the explorer. Search for Service Fabric. Click install for the Service Fabric extension.

Commands

The Service Fabric extension for VS Code helps developers to create and deploy Service Fabric projects using many commands. Commands can be called pressing (Ctrl + Shift + p), typing the command name into the input bar, and selecting the desired command for the prompt list.

  • Service Fabric: Create Application
  • Service Fabric: Publish Application
  • Service Fabric: Deploy Application
  • Service Fabric: Remove Application
  • Service Fabric: Build Application
  • Service Fabric: Clean Application
  • Service Fabric: Upgrade Application

Service Fabric: Create Application

The Service Fabric: Create Application command allows you to create a new Service Fabric application in your current workspace. Depending on the yeoman generators that are installed you can create several types of Service Fabric application including Java, C#, Container, and Guest projects.

  1. Select the command Service Fabric: Create Application
  2. Select the type of your current Service Fabric application
  3. Enter the name of application you want to create
  4. Select the type of service that you would like to create in your Service Fabric application
  5. Follow the prompts for naming the service
  6. The new Service Fabric application will appear in the workspace
  7. Open the new folder so that this becomes the root folder in the workspace and you can continue executing the other commands from here

Service Fabric: Add Service

The Service Fabric: Add Service command allows you to create a new service to an existing Service Fabric application. The application that the service will be added to must be the root directory of the workspace.

  1. Select the command Service Fabric: Add Service
  2. Select the type of your current Service Fabric application
  3. Select the type of service that you would like to add to your Service Fabric application
  4. Follow the prompts for naming the service
  5. The new service will appear in your project directory

Service Fabric: Publish Application

The Service Fabric: Publish Application command deploys your Service Fabric application on a remote cluster the can be either secure or unsecure or on a local cluster if parameters are not mentioned in Cloud.json

  1. The first time that the application is built, a Cloud.json file will be generated in the project directory
  2. Input the values for the cluster that you would like to connect in the Cloud.json file
  3. Select the command Service Fabric: Publish Application
  4. View the Service Fabric Explorer of the desired cluster to ensure that the application has been installed Note : If required parameters are not mentioned then the application will be deployed to local cluster(if available)

Service Fabric: Deploy Application (Localhost)

The Service Fabric: Deploy Application command deploys your Service Fabric application on a one box cluster if you currently have one running.

  1. Select the command Service Fabric: Deploy Application
  2. View the Service Fabric Explorer of the local cluster to ensure that the application has been installed
  3. One can also use Service Fabric: Publish Application command with no paramters in Cloud.json file to deploy to a local cluster

Service Fabric: Upgrade Application

The Service Fabric: Upgrade Application command deploys a new version of your Service Fabric application on a remote cluster the can be either secure or unsecure or on a local cluster if parameters are not mentioned in Cloud.json

  1. The first time that the application is built, a Cloud.json file will be generated in the project directory
  2. Input the values for the cluster that you would like to connect in the Cloud.json file
  3. Set the ApplicationTypeVersion in the ApplicationManifest file
  4. Select the command Service Fabric: Upgrade Application
  5. View the Service Fabric Explorer of the desired cluster to ensure that the application has been upgraded Note : If required parameters are not mentioned then the application will be deployed to local cluster(if available)

Service Fabric: Remove Application

The Service Fabric: Remove Application command removes a Service Fabric application from the cluster that it was deployed to through the VS Code extension.

  1. Select the command Service Fabric: Remove Application
  2. View the Service Fabric Explorer to ensure that the application was removed

Service Fabric: Build Application

The Service Fabric: Build Application command can build either Java or C# Service Fabric Application

  1. Make sure you are in the application root folder before executing this command. This command will identify type of application(C# or Java) and fires build accordingly
  2. Select the command Service Fabric: Build Application
  3. The output of the build process will be output in the integrated terminal

NOTE : Service Fabric Java applications can be developed on windows but only can be deployed onto Linux Clusters.


Legal

Before we can accept your pull request you will need to sign a Contribution License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labelled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as cla-signed.

Contributing

Contributing

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

License

MIT

vscode-service-fabric-reliable-services's People

Contributors

ameyanator avatar anantshankar17 avatar michaelfery avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar millieolsenmicrosoft avatar msftgits avatar peterpogorski avatar rapatchi avatar raunakpandya avatar saichand345 avatar suhuruli avatar vshan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-service-fabric-reliable-services's Issues

Support virtual workspaces

πŸ‘‹ Hi there, Martin here, from the VS Code team.

Recently we've announced the Remote Repository feature that lets you browse and edit files and folders directly on GitHub.

Open Remote Repository... opens VSCode on a folder or workspace located on a virtual file system. We call this a virtual workspace. We observed that not all extension support this well, either because they can not, or they haven't thought about it.

It would be fantastic if you could test whether your extension can handle virtual workspaces:

Check out the Virtual Workspaces Extension Author Guide on how to do that.

When done, set the new virtualWorkspaces capability in your 'package.json'.

{
  "capabilities": {
    "virtualWorkspaces": true | false
  }
}
  • Use "virtualWorkspaces": true if your extension is prepared for virtual workspaces
  • Use "virtualWorkspaces": false if your extension should be disabled when a virtual workspace is opened

For questions and comments please use the Virtual Workspaces Tracking Issue.

Thanks for the support and the great work! ❀️

Windows deployment & debugging support

Currently, service fabric solutions are the only thing keeping my team from being able to fully switch to vscode. However, we are primarily windows based. Is there any planned support for being able to deploy & debug service fabric services on windows?

Support Workspace Trust

Hello πŸ‘‹ I'm from the VS Code team.

Recently, we have been exploring a security feature we refer to as Workspace Trust. This feature is intended to centralize and unify a security conscious decision required by a variety of VS Code features. With workspace trust, the user will be able to declare whether or not they trust the folder that is opened in VS Code before these features are executed.

Why you should care

Your extension is incredibly popular with VS Code users! We want to make sure that those users have a delightful experience with workspace trust and that includes extension authors deciding how much of their extension is supported in an untrusted workspace.

Workspace Trust experience

You can enable the feature with the following setting security.workspace.trust.enabled. Once enabled, you will see the following dialog when opening folders in VS Code.

Workspace Trust Startup Dialog

This dialog is important for allowing the user to make a decision early and understand the impact of their decision. Once you understand the feature, you may want to customize when to display the dialog using the setting security.workspace.trust.startupPrompt.

You can follow the development of Workspace Trust and provide feedback in issue #106488.

Workspace trust API

First off, all of what I am about to say can be found in issue #120251. That issue will include discussion of the feature and any updates to the feature.

The Workspace Trust extension API is now in stable. This allowed us to release the first cut of our guide for onboarding your extension to Workspace Trust. The API is small, so here is a quick look.

You can declare your extension to provide complete, partial or no support in untrusted workspaces using the untrustedWorkspaces capability in package.json.

The following example declares that the extension is supported completely in untrusted workspaces. In this case, the extension is enabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": true
  }
}

The next example declares that the extension is not supported in untrusted workspaces. In this case, the extension is disabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": false
  }
}

The third option is to declared limited support. There are three tools provided to you when you select the limited option.

First, if you have a setting that can be configured in the workspace but requires the workspace to be trusted in order to apply the workspace value, then you can include the setting using restrictedConfigurations array property in untrustedWorkspaces object. Doing so, VS Code will ignore the workspace value of these restricted settings when your extension reads these settings values using the VS Code Workspace Configuration API.

The following example declares the settings that are restricted in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": "limited",
    "restrictedConfigurations": [
      "markdown.styles"
    ]
  }
}

Next, you can also check and listen if the current workspace is trusted or not programmatically using the following API:

export namespace workspace {
  /**
   * When true, the user has explicitly trusted the contents of the workspace.
   */
  export const isTrusted: boolean;
  /**
   * Event that fires when the current workspace has been trusted.
   */
  export const onDidGrantWorkspaceTrust: Event<void>;
}

Lastly, you can hide commands or views declaratively with the isWorkspaceTrusted context key in your when clauses.

A far more detailed guide on how to onboard which will be updated as we receive feedback can be found in issue #120251.

Rollout plan

Workspace Trust will remain disabled for the month of May, but we are planning on enabling this by default in the future. To prepare for that day, we would love for you to try it out and provide feedback.

We'd love your feedback

Since this issue was created in an automated fashion, we won't be monitoring the responses in this issue (our notifications would explode!). Instead we ask you to drop questions, and feedback in issue #120251 as we've mentioned above.

We're excited to see what you do with workspace trust!

It doesn't work on MacOSX Ventura/Windows 11

Not create Service Fabric Application or Service.

I have followed that article:
https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-vs-code

I'm using:

  • dotnet-sdk-7.0.10
  • Vscode 1.81.1
  • Service Fabric latest plugin
  • C# Dev Kit latest plugin

Any error here or problem reported on vscode interface but not work.

Screenshot 2023-09-06 at 16 19 05

Screenshot 2023-09-06 at 16 20 58

Screenshot 2023-09-06 at 16 22 11

Screenshot 2023-09-06 at 16 22 29

The alternative is use inner terminal on Visual Studio Code with Yeoman to create Service Fabric Application and Service and after all other commands work: Build, Deploy...

Support for converting an existing VS 2017 Service Fabric Solution to VS Code (cross platform)

Hi @suhuruli, cross post with Support for Visual Code and Service Fabric Mesh but also relevant to Service Fabric. Have been converting an existing VS 2017 Service Fabric Solution (.Net Core) to run cross platform and so much (ALL) of the process is currently manual... hoping your efforts will take away the pain πŸ˜‰

That is, I have to create the various .sh files which build, publish and deploy the multi-project solution... not to mention configuring tasks.json & debugging etc. While the current Service Fabric Reliable Services Extension for Visual Studio Code is a good start, hope you can make converting existing solutions developed in VS 2017 to VS Code a one click experience?

For example I would like to open an existing Service Fabric solution built with VS 2017 and using .Net Core in VS Code on Linux... the VS Code Service Fabric Extension then kicks-in and "cross-platforms" the whole VS 2017 solution/projects, creates the relevant .sh Service Fabric / Mesh - Linux artifacts for building, cleaning, debugging, deploying, containerizing etc

PS. Let me know if you need any more detailed feedback... (EntryPoint, Runtime Identifiers, Release vs Debug mode support etc).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.