Skip to content

Latest commit

 

History

History
212 lines (141 loc) · 15.9 KB

README.md

File metadata and controls

212 lines (141 loc) · 15.9 KB

Visual Studio Code OpenShift Connector

Visual Studio Marketplace Gitter Build Status Build Status Unit Tests Code Coverage License

Overview

OpenShift Connector extension provides an end-to-end developer experience for Red Hat OpenShift. Using this extension developers can easily create, deploy and live debug applications running on OpenShift.

 screencast

Supported OpenShift Clusters

This extension can work with local or remote OpenShift clusters.

To start local instance of OpenShift cluster, developers can use the following options:

For detail analysis of how to setup and run local OpenShift Cluster using minishift, please follow this wiki.

If developers can not run local OpenShift cluster the extension can work with remote one from various Red Hat products:

When working with OpenShift Online remote cluster only one component can be created for Starter plan and Pro plan with default 2GiB storage. If you want to create multi component application you could opt in for Pro plan with bigger persistence storage (up to 150GiB).

New and Noteworthy

Debug Support for Local Node.js and Java Components

This release provides new 'OpenShift: Debug' command to simplify the way to start debugging for OpenShift Components pushed to a cluster. It is an experimental feature, because it is using experimental OpenShift Do debug command under the hood and supports only local Java and Node.js components. The command is available from command pallet and context menu for Component nodes in OpenShift Application Explorer view.

Debug Node.js Component

Default Visual Studio Code installation includes JavaScript/TypeScript Language Support and Debugger Extensions required to debug a Node.js Component. That means new OpenShift: Debug command can be used without installing any additional extensions.

 screencast

Debug Java Component

To debug a Java Component Java Language Support and Java Debugger Extensions required. OpenShift Connector extension will request to install missing extension before it starts Debugger for a Java Component.

 screencast

Commands and Features

vs-openshift-connector supports a number of commands & actions for interacting with OpenShift clusters; these are accessible via the command menu (Cmd+Shift+P ⌘⇧P on macOS or Ctrl+Shift+P ⌃⇧P on Windows and Linux) and may be bound to keys in the normal way.

General Commands

  • OpenShift: Log in to cluster - Log in to your server and save login for subsequent use.
    • Credentials : Log in to the given server with the given credentials.
    • Token : Login using bearer token for authentication to the API server.
  • OpenShift: List catalog components - List all available Component Types from OpenShift's Image Builder.
  • OpenShift: List catalog services - Lists all available Services e.g. mysql-persistent.
  • OpenShift: New Project - Create new project inside the OpenShift Cluster.
  • OpenShift: About - Provides the information about the OpenShift tools.
  • OpenShift: Log out - Logs out of the current OpenShift Cluster.
  • OpenShift: Show Output Channel - Shows commands running under the hood and their output.
  • OpenShift: Open Console Dashboard - Opens the OpenShift webconsole URL.
  • OpenShift: Create - Creates an OpenShift resource using .json or .yaml file location from an active editor.

Actions Available for an OpenShift Cluster Project

  • Project -> New Component - Create a new Component from the Project.
    • git - Use a git repository as the source for the Component.
    • binary - Use binary file as a source for the Component
    • local - Use local directory as a source for the Component.
  • Project -> New Service - Perform Service Catalog operations when it is enabled.
  • Project -> Delete - Delete an existing Project.

Actions Available for an Application in a Project

  • Application -> New Component - Create a new Component inside the selected Application.
    • git - Use a git repository as the source for the Component.
    • binary - Use binary file as a source for the Component
    • local - Use local directory as a source for the Component.
  • Application -> New Service - Perform Service Catalog operations when it is enabled.
  • Application -> Describe - Describe the given Application in terminal window.
  • Application -> Delete - Delete an existing Application.

Actions Available for a Component in an Application

Components can be in 3 stages:
  pushed - When the components are deployed into the cluster.
  not pushed - When are the components are in local config but NOT deployed into the cluster.
  no context - When there is no context folder associated with the component in the workspace.

Actions for a Pushed Component

  • Component -> New URL - Expose Component to the outside world. The URLs that are generated using this command, can be used to access the deployed Components from outside the Cluster. Push the component to reflect the changes on the cluster.
  • Component -> New Storage - Create Storage and mount to a Component. Push the component to reflect the changes on the cluster.
  • Component -> Describe - Describe the given Component in terminal window.
  • Component -> Show Log - Retrieve the log for the given Component.
  • Component -> Follow Log - Follow logs for the given Component.
  • Component -> Link Component - Link Component to another Component.
  • Component -> Link Service - Link Component to a Service.
  • Component -> Unlink - Unlink Component from Component/Service.
  • Component -> Open in Browser - Open the exposed URL in browser.
  • Component -> Push - Push the source code to a Component.
  • Component -> Watch - Watch for changes, update Component on change. This is not supported for git based components.
  • Component -> Undeploy - Undeploys a Component from the cluster. The component still resides in the local config.
  • Component -> Delete - Delete an existing Component from the cluster and removes the local config also.
  • Component -> Debug - Debug local Java or Node.js Component.

Actions for a not Pushed Component

  • Component -> New URL - Expose Component to the outside world. The URLs that are generated using this command, can be used to access the deployed Components from outside the Cluster.
  • Component -> Push - Push the source code to a Component.
  • Component -> Delete - Delete an existing Component from the local config.

Actions for a no context Component

  • Component -> Describe - Describe the given Component in terminal window.
  • Component -> Delete - Delete an existing Component from the local config.
  • Component -> Import - If the component was created using old version of the extension (<=0.0.23), users can use the Import action to migrate to latest version and import the metadata changes.

Actions available for a URL in a Component

  • URL -> Delete - Delete a URL from a Component.
  • URL -> Open URL - Click on the icon opens the specific URL in Browser.

Actions available for a Storage in a Component

  • Storage -> Delete - Delete a Storage from a Component.

Actions available for a Service in an Application

  • Service -> Describe - Describe a Service Type for a selected Component
  • Service -> Delete - Delete a Service from an Application

NOTE: Currently we support creation of one component per folder. Multiple components from a folder might be supported in future releases.

Icons Representation

Log in to Cluster
Refresh Cluster
Cluster Resource Node
Project Resource
Application Resource
Git Component Resource
Local Workspace Component Resource
Binary File Component Resource
Service Resource
Storage Resource
URL Resource
Open URL

Extension Configuration Settings

  • OpenShift Connector: Show Channel On Output - Show OpenShift Connector output channel when new text added to output stream
  • OpenShift Connector: Output verbosity level - Output verbosity level (value between 0 and 9) for OpenShift Create, Push and Watch commands in output channel and terminal view

Dependencies

CLI Tools

This extension uses two CLI tools to interact with OpenShift cluster:

  • OKD CLI client tool - oc
  • OpenShift Do tool - odo

If oc and odo tools are located in a directory from PATH environment variable they will be used automatically. The extension will detect these dependencies and prompt the user to install if they are missing or have not supported version - choose Download & Install when you see an notification for the missing tool.

Extensions

This extension depends on Kubernetes Extension from Microsoft which is going to be installed automatically along with OpenShift Connector Extension. Latter is using Kubernetes Extension public API to show OpenShift specific resources like Projects, Routes, Deployment Configs, Image Streams and Templates in Kubernetes Clusters View. Those resources are visible only for OpenShift clusters.

OpenShift Connector extension also provides Use Project command to switch between OpenShift Projects in Kubernetes Clusters View.

 useproject

NOTE: This extension is in Preview mode. The extension support for OpenShift is strictly experimental - assumptions may break, commands and behavior may change!

Breaking Changes Between Previous Releases

Updating from release 0.0.23 or earlier

  • The Components created with previous versions(<=0.0.23) will no longer be visible in OpenShift Application Explorer view.
  • The Extension will prompt the user to specify the context folder when creating new Components and then add selected folder to workspace.
  • New Component, Url and Storage objects are created locally in context folder and not immediately pushed to the cluster.

Please follow the migration guide to resolve any possible issues.

In case of any queries, please use the Feedback & Question section.

Release Notes

See the change log.

Contributing

This is an open source project open to anyone. This project welcomes contributions and suggestions!

For information on getting started, refer to the CONTRIBUTING instructions.

Download the most recent openshift-connector-<version>.vsix file and install it by following the instructions here. Stable releases are archived here.

Feedback & Questions

If you discover an issue please file a bug and we will fix it as soon as possible.

License

MIT, See LICENSE for more information.