Giter Site home page Giter Site logo

pombredanne / vscode-openshift-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhat-developer/vscode-openshift-tools

0.0 1.0 0.0 200.56 MB

Microsoft Visual Studio Code extension for OpenShift

Home Page: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector

License: MIT License

TypeScript 96.91% JavaScript 1.18% HTML 1.20% EJS 0.62% CSS 0.09%

vscode-openshift-tools's Introduction

OpenShift Connector

Visual Studio Marketplace Downloads Gitter 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 container applications running on OpenShift.
  • Run local instance of OpenShift 4.9.0 using Red Hat CodeReady Containers.

 screencast

Supported OpenShift Clusters

Developer Sandbox

The extension allows users free access to the Developer Sandbox for Red Hat OpenShift. From Add Cluster View, users will be redirected to the dev sandbox instance. The sandbox provides you with a private OpenShift environment in a shared, multi-tenant OpenShift cluster that is pre-configured with a set of developer tools.

Local instance of OpenShift

This extension can work with local or remote OpenShift clusters.

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

Public cloud providers

To install OpenShift Container Platform 4 in the public cloud, in your datacenter or on your laptop please visit Red Hat Hybrid Cloud console. Here are different scenarios to try OpenShift:

  • Red Hat OpenShift Cluster Manager - This 60-day, self-supported trial lets you install and run Red Hat OpenShift Container Platform on infrastructure you manage.
  • Red Hat OpenShift Dedicated - Red Hat OpenShift Dedicated is a fully managed service of Red Hat OpenShift on Amazon Web Services (AWS) and Google Cloud.
  • Microsoft Azure Red Hat OpenShift - Azure Red Hat OpenShift is a fully-managed service of Red Hat OpenShift on Azure, jointly engineered, managed and supported by Microsoft and Red Hat.

Core Concepts

  • Project: A project is your source code, tests, and libraries organized in a separate single unit
  • Application: An application is a program designed for end users. An application consists of multiple microservices or components that work individually to build the entire application. Examples of applications: e-Shop, Hotel Reservation System, Online Booking
  • Component: A component is a set of Kubernetes resources which host code or data. Each component can be run and deployed separately. Examples of components: Warehouse API Backend, Inventory API, Web Frontend, Payment Backend
  • Service: A service is software that your component links to or depends on. Examples of services: MariaDB, MySQL
  • Devfile: A devfile is a portable YAML file containing the definition of a component and its related URLs, storages and services.

Commands and Features

The extension supports a number of commands to interact with OpenShift clusters and resources. The commands are accessible via the command palette (Cmd+Shift+P ⌘⇧P on macOS or Ctrl+Shift+P ⌃⇧P on Windows and Linux), Visual Studio Code View title buttons and tree context menus.

Commands Available in OpenShift Application Explorer View

Commands for a Cluster

  • Log in to cluster - Log in to your cluster and save login for subsequent use.
    • Credentials : Log in to the given cluster with the given credentials.
    • Token : Login using bearer token for authentication to the API server.
  • List catalog components - List all available Component Types.
  • List catalog services - List all available Services e.g. mysql-persistent.
  • New Project - Create new Project inside the OpenShift Cluster.
  • About - Provide the information about the OpenShift tools.
  • Log out - Log out of the current OpenShift Cluster.
  • Show Output Channel - Show commands running under the hood and their output.
  • Open Console Dashboard - Open the OpenShift Developer Console in default browser.
  • Create - Create an OpenShift resource using .json or .yaml file location from an active editor.
  • Set Active Project - Change active Project displayed in OpenShift Application View.

Commands for a Project

  • New Component - Create a new Component in the Project.
  • New Service - Perform Service Catalog operations when it is enabled.
  • Delete - Delete an existing Project.
  • Set Active Project - Change active Project displayed in OpenShift Application View.

Commands for an Application

  • New Component - Create a new Component inside the selected Application.
  • New Service - Perform Service Catalog operations when it is enabled.
  • Describe - Describe the given Application in terminal window.
  • Delete - Delete an existing Application.

Commands for a Component

Components can be in one of 3 states:

  • pushed - When the components are deployed into the cluster.
  • not pushed - When 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.

Components in different states have different set of commands available.

Commands for a pushed 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.
  • New Storage - Create Storage and mount to a Component. Push the component to reflect the changes on the cluster.
  • Describe - Describe the given Component in terminal window or inside a webview editor.
  • Show Log - Retrieve the log for the given Component or inside a webview editor
  • Follow Log - Follow logs for the given Component or inside a webview editor
  • Link Component - Link Component to another Component.
  • Link Service - Link Component to a Service.
  • Unlink - Unlink Component from Component/Service.
  • Open in Browser - Open the exposed URL in default browser.
  • Push - Push the source code to a Component.
  • Watch - Watch for changes, update Component on change.
  • Undeploy - Undeploys a Component from the cluster. The component still resides in the local config.
  • Debug - Debug local Java, Node.js and Python Component.
  • Test - Run test for the Component in cluster.
  • Reveal in Explorer - Show Component's context folder in Explorer view
  • Delete - Delete existing Component from the cluster and removes the local config also.
Commands for a not pushed 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.
  • New Storage - Create Storage and mount to a Component. Push the component to reflect the changes on the cluster.
  • Describe - Describe the given Component in terminal window or inside a webview editor.
  • Push - Push the source code to a Component.
  • Delete - Delete existing Component the local configuration and remove context from workspace.
Commands for a no context Component
  • Describe - Describe the given Component in terminal window or inside a webview editor.
  • 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.
  • Delete - Delete existing Component from the cluster.
Commands for a URL in a Component
  • Delete - Delete a URL from a Component.
  • Open URL - Open the specific URL in Browser.
  • Describe - Describe the given URL for the Component in terminal window.
Commands for a Storage
  • Delete - Delete a Storage from a Component.
Commands for a Service
  • Describe - Describe a Service Type for a selected Component
  • 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.

Running OpenShift Locally

The extension provides a view to run local instance of OpenShift. To open the view use Add OpenShift Cluster button  addclusterbutton from OpenShift: Application Explorer view title.

 addcluster

The view guides you through the steps required to create and start OpenShift 4 single node cluster on your workstation using Red Hat CodeReady Containers:

  • Download & Configure Red Hat CodeReady Containers
  • Set Virtual Machine parameters: number of CPUs and memory limit
  • Setup Red Hat CodeReady Containers
  • Run Red Hat CodeReady Containers commands to setup/start the cluster

The view provides following options to control cluster's state:

  • Start cluster
  • Stop cluster
  • Open OpenShift Developer Console for cluster
  • Refresh cluster's state

 screencast

Debug Support

OpenShift: Debug command simplifies the way to start debugging for OpenShift Components pushed to a cluster. It supports following devfile components: Node.js, Java and Python (including Django)

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 are required. OpenShift Connector extension will prompt the user to install missing extension(s) before it starts Debugger for a Java Component.

 screencast

Icons for OpenShift Application Explorer View Items

Add OpenShift Cluster
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
  • OpenShift Connector: Search CLI tools in PATH locations before using included binaries - Force extension to search for oc and odo CLI tools in PATH locations before using bundled binaries
  • OpenShift Connector: Use Webview based editors to show 'Show Log', 'Follow Log' and 'Describe' commands output - Use Webview based editors instead of Terminal view to show or follow logs
  • OpenShift Connector: CRC Executable Location - Provide the path where the CodeReady Containers executable file is present.
  • OpenShift Connector: CRC Pull Secret Path - Provide the path where the pull secret file is present.
  • OpenShift Connector: CRC Cpu Cores - Number of CPU cores to allocate to the OpenShift cluster as selected during the first run.
  • OpenShift Connector: CRC Memory Allocation - MiB of memory to allocate to the OpenShift cluster as selected during the first run.

OpenShift Resources

This Extension uses Kubernetes Extension API to show OpenShift specific resources like Projects, Routes, Deployment Configs, Image Streams, Templates and others in Kubernetes Clusters View.

OpenShift Connector extension provides Use Project command to switch between OpenShift Projects. It is available for Project items 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!

NOTE: CRC (Red Hat CodeReady Containers) version supported by the extension is 1.34.0 (OpenShift Version: 4.9.0)

Dependencies

Extensions

When installing the extension directly from the VSCode marketplace all the dependencies are installed automatically. For disconnected environments before installing the extension download and install dependencies in the order listed below:

CLI Tools

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

  • OKD CLI client tool - oc
  • odo - odo

oc and odo tools for Windows, Linux and macOS are included into extension package. Once the extension is installed it is ready to use.

Follow the links below for additional information:

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 from the release 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.

Data and telemetry

The Red Hat OpenShift Connector for Visual Studio Code collects anonymous usage data and sends it to Red Hat servers to help improve our products and services. Read our privacy statement to learn more. This extension respects the redhat.elemetry.enabled setting which you can learn more about at https://github.com/redhat-developer/vscode-commons#how-to-disable-telemetry-reporting

vscode-openshift-tools's People

Contributors

adietish avatar aditya-konarde avatar apupier avatar dependabot[bot] avatar dgolovin avatar girishramnani avatar gorkem avatar jeffmaury avatar jrichter1 avatar mohitsuman avatar nickboldt avatar ppatierno avatar scottkurz avatar sudhirverma avatar

Watchers

 avatar

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.