Coder Social home page Coder Social logo

googlecloudplatform / google-cloud-visualstudio Goto Github PK

View Code? Open in Web Editor NEW
87.0 45.0 49.0 9.29 MB

Google Cloud Tools for Visual Studio

Home Page: https://cloud.google.com/tools/visual-studio/docs/

License: Apache License 2.0

C# 95.22% CSS 0.11% HTML 3.25% JavaScript 0.64% PowerShell 0.20% Python 0.40% Batchfile 0.04% Shell 0.12% ASP.NET 0.01%
google-cloud dotnet visual-studio vs visual-studio-extension

google-cloud-visualstudio's Introduction

Build status Code Coverage

Visual Studio Extension for Google Cloud Platform

This repo contains the source code for Cloud Tools for Visual Studio, an extension for integrating Google Cloud Platform into Visual Studio.

Install

You can install the extension from the Visual Studio Marketplace. The current and previous vsix packages are available on the releases page. The latest development vsix package is avalable on appveyor.

Dependencies on Google Cloud SDK

The Visual Studio extension depends on the Cloud SDK for certain functionality, make sure that you have at least version 174.0.0 of the Cloud SDK installed when running the extension.

You can install the Google Cloud SDK from https://cloud.google.com/sdk/. You will also need to make sure that you have the kubectl component. It is used for interactions with Google Kubernetes Engine.

You can make sure that you have all the necessary components installed by running the command:

gcloud components install kubectl

Support

To get help on using the Visual Studio Extension, please log an issue with this project. While we will eventually be able to offer support on Stack Overflow or a Google+ community, for now your best bet is to report issues in this Github project.

Build

To build the extension you will need to have Visual Studio 2017. You will need the the Visual Studio extension development toolset installed to be able to develop and build the extension. You can then open the main solution file: GoogleCloudExtension\GoogleCloudExtension.sln. If you get a build/project load error, try restoring NuGet packages first, as the project files reference files in one of the packages. If you get an error during the restoration of the NuGet packages, ensure that you have enabled nuget.org as a source in the NuGet Package Manager.

Build tools

We use Microsoft.VSSDK.BuildTools. This NuGet package provides MSBuild .props and .targets files we use to build the extension.

Continuous Building/Testing

We use appveyor to build on every push. The latest vsix package built from the master branch can be found here.

Contributing

Patches are encouraged, and may be submitted by forking this project and submitting a Pull Request. See CONTRIBUTING.md for more information.

License

Apache 2.0. See LICENSE for more information.

This extension allows you to opt-in to collect usage data and send it to Google to help improve our products and services. For more information, refer to the Google Privacy Policy.

google-cloud-visualstudio's People

Contributors

amanda-tarafa avatar deren-liao avatar glouischandra avatar iantalarico avatar ivannaranjo avatar jskeet avatar meteatamel avatar normanjoyner avatar quoctruong avatar redborian avatar

Stargazers

 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  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  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-cloud-visualstudio's Issues

Actions for zone nodes in the GCE Cloud Explorer source

Currently the zone nodes in the GCE data source for the Cloud Explorer don't have any actions. We should have at least a "Get Info" action that the user can invoke, redirect to the cloud console for further actions until those are implemented locally.

Extension still displays deleted projects

REPRO
Create a new project called aaaaaaaaa and spin up an instance
Delete the aaaaaaaaa project
Install extension and authenticate

CURRENT
By default, the app shows the data for the deleted project, aaaaaaaaa

EXPECTED
Project aaaaaaaaa is not shown in the extensions

Show last published version in Cloud Explorer

Some participants in our study wanted to also see some status about what was running on their IIS instance, in particular what build was currently running, when it was last published, etc.

Parse app.yaml and verify it.

Show relevant pieces of data from the app.yaml in the dialogs, such as the module that is being deployed.

Also, set the stage for having auto-complete for app.yaml.

Possible support for using browser to get user credentials instead of custom dialog

It seems that the best practice is to open the default browser in the system to ask the user for credentials instead of having a custom dialog.

This work will require us to:

  • Open an HTTP port on the machine to listen for the redirect from the oauth server to capture the auth_code.
  • Show a dialog that the user can use to cancel the operation if they did close the browser window.

Gcloud integration for password reset.

Implement the gcloud integration for password reset. The extension will be able to reset Windows VMs passwords, given the username and show it to the user.

The user will access this from the context menu for the VM.

Add publish menu entry for project.

This menu entry will show a dialog with information about publishing the project, offer a link to a page with more information about how to publish ASP.NET 4.x apps.

Analytics opt-in

Need to implement the analytics opt-in for the extension, ensure it follows the guidelines.

Support dark theme

CURRENT
In dark theme, the UI shows the following UI bugs:

  • Project drop down is black text on grey background, almost impossible to read. Text should be light (white or default font color for the theme).
  • Tree background is light, should be dark grey with light text.

Error connecting to the localhost server when processing result of OAUTH

It seems that sometimes the browser will fail to connect to the localhost HTTP server opened to receive the OAUTH code after the operation has completed.

Probably a race condition, the localhost server is shutdown before the browser has the chance to talk to it to get the page. This should hopefully go away once the we redirect to an actual HTTP address outside of the machine.

Should use the existing pages for IntelliJ until the VS pages are alive.

Error message to ask to install SDK should include link to SDK install page

REPRO
Install VS extension
Authenticate with GCP credentials
Spin up an ASP.NET instance from Cloud Console
In the Cloud Explorer, refresh the view, then right click on instance you just created and click on "reset..."

CURRENT
Error dialog appears telling the user he needs to install Cloud SDK to do this. Option is only to dismiss the dialog.

EXPECTED (options in order or preference)
Option 1. It just works
Option 2. It offers a wizard to install it, and then continues the flow
Option 3. The dialog offers a link to where the user can download the extension.

Analytics for the extension

Ensure that the extension has the right analytics in place to track feature use, mainly concerned with:

  • Commands, where they are launched, etc...
  • Results of the commands, failure, success, etc...
  • Counters, numbers of active accounts, etc...

Ensure templates build out of the box

It seems that the project templates carry some dependencies from the machine in which they were created. Ensure that the templates can build everywhere.

Missing contextual menu on parent nodes in the Cloud Explorer tree

CURRENT
Right-clicking on parent nodes (like a service node or region node) does nothing. Users might infer that right click is not available on this UI.

RECOMMENDATION
Offer options on right-click of nodes, even if those options only take them to the Console for now.

Detect the appropriate port is open for the requested action in a GCE VM

When requesting an action, detect that the necessary port is open or not in the instance and if not prompt the user with a warning and the possibility of opening said port before the action is taken.

For example, if the user invokes the "Open Terminal Server Session..." command in the instance's context menu then check that the RDP port is opened on the target machine. If we can't determine that it is open, we can prompt the user with a special dialog to let the user know that the operation might fail unless we open the port; we can offer opening the port before the terminal session is started.

This will help eliminate some of the friction related to firewall ports. The user can close the port after the operation is completed, for security reasons.

Styling of dialogs, ui theming

Need to ensure that we're using the right brushes for all backgrounds, foregrounds, etc... So the dialogs and tool windows look as close as the native ones in Visual Studio as possible.

Consider: Showing all available services in Cloud Explorer

Currently, only a limited set of the GCP services are exposed in the Cloud Explorer. However, there is not obvious reason for the user as to why, and they may draw misleading inferences as to whether the other services do not exist, or are not available for ASP.NET developers.

I suggest two avenues for solutions:
Option 1) Only show services that are enabled, and a clear affordance for adding more
Option 2) Show all the services that are available, distinguishing the active ones from the inactive ones, e.g. greying out inactive, or separating into two lists, active and inactive ones.

Wrong URL when browsing to buckets.

Currently we're opening an internal website, which is not the URL we should navigate. It should be https://console.cloud.google.com/storage/browser/{bucket}/?project={project}.

Use the preconditions library.

Jon has a nice preconditions library up in his repo here, copy it in this repo for now and use it in the code when null checks, and other conditions are required.

Icons, etc... for the Visual Studio extension

Need to have an updated set of icons for the extension.

The preliminary list of needed icons is:

  • Icons for the areas covered by the extension:
    • GCE
    • GCS
    • Pub/Sub
  • Icons for commands:
    • Refresh
    • Filter to Windows machines only.
    • Possibly icons for the main commands, Manage Accounts and Cloud Explorer.

Zero state for the cloud explorer

Ensure that the zero state for the Cloud Explorer is meaningful. It should:

  • Show the user that they need to log in, if they are not already.
  • Show that there are not projects, encourage them to go to the console to create one.
  • Show that there are no instances/buckets, encourage them to go the console to create one.

Currently the list of projects is empty, but the different data sources for the cloud explorer do show a meaningful message, although not the best.
screen shot 2016-04-26 at 4 11 07 pm

It should show that there are no projects.

Ensure the current credentials are used when launching ASP.NET projects

When launching ASP.NET projects locally, if the project is using the useable auth library it will pick up the credentials to use, the application_default_credentials.json file, that is generated by GCloud CLI. We want to ensure that the app will instead pick up the credentials for the current user selected in Visual Studio.
In order to do this we need to set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to a file of our creation which will contain the credentials for the currently selected user. This file will be overwritten every time the current user is changed in Visual Studio.
Because it is an env variable it will be inherited by the child process (created when the app is started by Visual Studio) so we will set that variable in Visual Studio's own environment.

Menu not showing up

I was running the new installer experience, and I've ran into a situation where the plug-in is installed but the menu isn't showing up within Visual Studio.

It's possible the problem is with my machine or how I am calling VSIXInstaller.exe. Does anything from the VSIX log stand out? Did you release an update of your plug-in recently that would have caused problems? (The installer pulls from https://storage.googleapis.com/aspnet-mvm/extension/GoogleCloudExtension.vsix.)

Screen shot

https://screenshot.googleplex.com/JfSHH3WyT4k.png

Installation command (via NSIS)

Nothing too crazy is going on here. This worked in the past, so I assume it has to do with versioning or a botched uninstall of the plugin (from the Visual Studio UI).

Section /o "Cloud Tools for Visual Studio" section_visualStudioAddIn
  ${DetailLog} "Downloading the Google Cloud extension for Visual Studio:"
  NSISdl::download_quiet /TIMEOUT=30000 \
      "${PATH_TO_GOOGLE_CLOUD_EXTENSION_VSIX}" \
      "$PLUGINSDIR\GoogleCloudExtension.vsix"
  Pop $R0 ; Get the return value.
  ${If} $R0 != "success"
    MessageBox MB_OK|MB_ICONEXCLAMATION "Error downloading the Google Cloud Extension for Visual Studio."
    ${DetailLog} "Download failed: ${PATH_TO_GOOGLE_CLOUD_EXTENSION_VSIX}"
    Abort "Download failed."
  ${EndIf}

  ; Perform the installation.
  ${DetailLog} "Installing: GoogleCloudExtension.vsix"
  ${If} $instMode == 0
    Exec '"$pathToVsIdeFolder\VSIXInstaller.exe" /quiet "$PLUGINSDIR\GoogleCloudExtension.vsix"'
  ${Else}
    Exec '"$pathToVsIdeFolder\VSIXInstaller.exe" /quiet /admin "$PLUGINSDIR\GoogleCloudExtension.vsix"'
  ${EndIf}
SectionEnd

VSIXInstaller.exe log

12/18/2015 11:01:44 AM - Microsoft VSIX Installer
12/18/2015 11:01:45 AM - -------------------------------------------
12/18/2015 11:01:45 AM - Initializing Install...
12/18/2015 11:01:45 AM - Extension Details...
12/18/2015 11:01:45 AM -    Identifier      : GoogleAppEngine.Google.d3d3eeb8-3710-4bd9-97ba-1401bf2acd22
12/18/2015 11:01:45 AM -    Name            : Google Cloud Platform Extension for Visual Studio
12/18/2015 11:01:45 AM -    Author          : Google Inc.
12/18/2015 11:01:45 AM -    Version         : 0.4.20151216
12/18/2015 11:01:45 AM -    Description     : Tools to develop applications for Google Cloud Platform.
12/18/2015 11:01:45 AM -    Locale          : en-US
12/18/2015 11:01:45 AM -    MoreInfoURL     : https://github.com/GoogleCloudPlatform/gcloud-visualstudio
12/18/2015 11:01:45 AM -    InstalledByMSI  : False
12/18/2015 11:01:45 AM -    SupportedFrameworkVersionRange : [4.5,)
12/18/2015 11:01:45 AM - 
12/18/2015 11:01:45 AM -    Supported Products : 
12/18/2015 11:01:45 AM -        Microsoft.VisualStudio.Community
12/18/2015 11:01:45 AM -            Version : [14.0]
12/18/2015 11:01:45 AM - 
12/18/2015 11:01:45 AM -    References      : 
12/18/2015 11:01:45 AM -        -------------------------------------------------------
12/18/2015 11:01:45 AM -        Identifier   : Microsoft.VisualStudio.MPF.14.0
12/18/2015 11:01:45 AM -        Name         : Visual Studio MPF 14.0
12/18/2015 11:01:45 AM -        Version      : [14.0]
12/18/2015 11:01:45 AM -        MoreInfoURL  : 
12/18/2015 11:01:45 AM -        Nested       : No
12/18/2015 11:01:45 AM - 
12/18/2015 11:01:45 AM - 
12/18/2015 11:01:45 AM - Searching for applicable products...
12/18/2015 11:01:45 AM - Found installed product - Microsoft Visual Studio Community 2015
12/18/2015 11:01:47 AM - The extension will be upgraded from version 0.4.20151216.
12/18/2015 11:01:47 AM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
12/18/2015 11:01:47 AM - Found installed product - Global Location
12/18/2015 11:01:47 AM - Uninstalling 'Google Cloud Platform Extension for Visual Studio', version 0.4.20151216.
12/18/2015 11:01:47 AM - Beginning to install extension to Microsoft Visual Studio Community 2015...
12/18/2015 11:01:48 AM - Install to Microsoft Visual Studio Community 2015 completed successfully. The extension has been installed to C:\USERS\CHRSMITH\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\CEOEGGGK.A3I\

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.