Skip to content

Commit

Permalink
Merge pull request #20 from kaje94/update-to-choreo-v2
Browse files Browse the repository at this point in the history
Update Readme.md to choreo v2
  • Loading branch information
kaje94 authored Jun 25, 2024
2 parents 3b27863 + e206899 commit bc0619f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 144 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.DS_Store
112 changes: 35 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,106 +1,64 @@
> ⚠️ Click [here](README_V2.md) for details on the upcoming **version 2.0**
# Choreo Extension for Visual Studio Code

# The Choreo extension for Visual Studio Code
The Choreo VS Code extension enhances your local development experience with [Choreo projects](https://wso2.com/choreo/) by providing comprehensive project and component management capabilities. Learn more about [Choreo](https://wso2.com/choreo/docs/).

The Choreo VS Code extension enhances your local development experience with [Choreo projects](https://wso2.com/choreo/) by providing a wide range of project and component management capabilities. Learn more about [Choreo](https://wso2.com/choreo/docs/).
## Getting Started

## Get started
To utilize the Choreo extension in the VS Code editor, you need an active Choreo account. Follow these steps to set up the extension:

You need an active Choreo account to utilize the capabilities of the Choreo extension in the VS Code editor. If you already have a Choreo account, follow the steps below to set up the extension.
1. Install the [Choreo VS Code extension](https://marketplace.visualstudio.com/items?itemName=WSO2.choreo) and wait for initialization.

1. Install the [Choreo VS Code extension](https://marketplace.visualstudio.com/items?itemName=WSO2.choreo) and wait for the extension to be initialized.
2. Sign in to Choreo using one of the following methods:

2. Sign in to Choreo using one of the following methods.
- Click the `Sign In` button within the Choreo activity panel.
- Use the `Sign In` command provided by the Choreo extension.

- Via the `Sign In` prompt displayed upon successful initialization of the extension
- Via the `Sign In` options available by clicking the Choreo icon on the activity bar of your VS Code editor
![Sign In](docs/choreo-extension/images/v2/sign-in.png)

![Sign In](docs/choreo-extension/images/signIn.gif)
> **Tip:** Upon successful sign-in, your account details will be visible in the user account view of the Choreo activity panel.
> **Tip:** The above step redirects you to an external URI to complete the authentication process. If the sign-in is successful, the organization linked to your Choreo account will be visible in the Choreo activity panel.
## Create and Manage Components

## Create a project
Follow these steps to create and manage Choreo components directly from VS Code:

Follow the steps below to create a new Choreo project directly from VS Code.
1. In the Choreo activity panel, click the **Create Component** button or execute the **Create new component** command from the Command palette.

> **Tip:** If you already have a Choreo project, you can skip this section and move to the [Open Project](#open-project) section.
![Create component button](docs/choreo-extension/images/v2/create-component-btn.png)

1. In the Choreo activity panel, click the **Create Project** button to create a new project.
2. Select the organization and project for your component. You can also create a new project if needed.

> **Tip:** Alternatively, execute the **Create new project** command in the Command palette.
3. Provide component details in the **New Choreo Component** pane and click **Create**.

2. In the **New Choreo Project** pane, complete the new project wizard by specifying appropriate values for the required fields.
![Component form](docs/choreo-extension/images/v2/component-form.png)

> **Tip:** If you want to use a single repo to store all the components of the project, select the **Mono repository** option, and provide a GitHub **Repository** and its **Organization**. This will redirect you to GitHub to authorize a repository to link it to the project.
> **Tip:** Ensure the selected directory is within a Git repository.
![New Project Wizard](docs/choreo-extension/images/CreateProject.gif)
4. Once created, the component details view will open, and the Choreo activity panel will update with the new component.

## Open project
![Component details](docs/choreo-extension/images/v2/component-details-view.png)

Follow the step below to open an exisiting Choreo project and create a copy of it in the local environment.
> **Tip:** A `.choreo/context.yaml` file will be generated at the root of the Git repository directory to associate the directory with your Choreo project. If it's not available, regenerate it using the `Select Project` command.
1. Click **Open Project** button to get the project list present in your organization.
5. The component details view allows various actions such as:
- Trigger builds for selected commits
- View lists of builds and their statuses
- Diagnose build failures using build logs
- Deploy builds in available environments
- Access runtime logs to monitor deployed components
- Test deployed components

2. In the Command palette, select the project from the **PROJECTS** list.
## Discover Additional Features

3. Select a directory in your local machine to store the project.
Access a range of functionalities provided by the Choreo extension by opening the VS Code command palette and typing `Choreo`.

> **Tip:** Once the project is cloned, it opens as a workspace in VS Code. Each component will be available as a workspace item.
## Troubleshooting

![Open Project](docs/choreo-extension/images/openProject.gif)
To troubleshoot Choreo extension issues:

## Design and develop your application
1. Open the **OUTPUT** pane by clicking **View** and then **OUTPUT** from the main menu.

Follow the steps below to design and develop your application by adding components to it.

> **Info:** This creates the sources for each component locally in the given repo, and each component will be added as a workspace item in VS Code. To sync your local changes with the Choreo console, you'll need to perform a [push your changes to Choreo](#push-your-changes-to-choreo) step. This will update the Choreo console with the latest version of your components.
1. In the Choreo activity panel, click **Add Component** button.

2. Specify appropriate values for the required fields to create the new component.

3. Once the component is created, **Cell View** is enabled.

4. Click **+** icon in components section to create components.

![Architecture Diagram](docs/choreo-extension/images/CreateComponent.gif)

The above step will create sources for each component locally in the given repo, and each component will be added as a workspace item in VS Code.

## Push your changes to Choreo

Follow the steps below to push the changes to Choreo after creating the components.

1. In the Component pane, expand the component you need to push to Choreo.

2. Under Action section, select **Commit and Push** option.

3. Add the respective changes, enter an appropriate commit message, and click **Commit** to commit the changes.

4. Once all the componets are commited, **Push to Choreo** option will be made available.

5. Click **Push to Choreo** to upload the components to the Choreo platform.

> **Info:** Once you push the components, they will be visible on the Choreo platform.
![Push Changes](docs/choreo-extension/images/PushToChoreo.gif)

## Deploy your components

After creating the components, follow the steps below to deploy your components.

1. In the [Choreo Console](https://console.choreo.dev/), navigate to the **Deploy** page, to deploy the components. Learn more about [Builds and Deployments](https://wso2.com/choreo/docs/devops-and-ci-cd/builds-and-deployments/)

2. Once the components are deployed, view the build and deployment status from the Choreo activity panel.

## Troubleshoot

Follow the steps below to troubleshoot Choreo extension issues.

1. From the main menu, Click **View** and Click **OUTPUT** to open the **OUTPUT** pane.

2. From the drop-down menu on the RHS, select **Choreo** to view the Choreo output for troubleshooting.
2. Select **Choreo** from the drop-down menu on the right-hand side to view Choreo output for troubleshooting.

## Ask for help

Create [Github issues](https://github.com/wso2/choreo-vscode/issues) to reach out to us.
Feel free to create [GitHub issues](https://github.com/wso2/choreo-vscode/issues) or reach us out on [Discord](https://discord.com/invite/wso2).
67 changes: 0 additions & 67 deletions README_V2.md

This file was deleted.

Binary file modified docs/choreo-extension/images/v2/component-details-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/choreo-extension/images/v2/component-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/choreo-extension/images/v2/create-component-btn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/choreo-extension/images/v2/sign-in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc0619f

Please sign in to comment.