Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 56 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p align="center">
<a href="https://join.slack.com/t/openvsxworkinggroup/shared_invite/zt-2y07y1ggy-ct3IfJljjGI6xWUQ9llv6A"><img alt="Slack workspace" src="https://img.shields.io/badge/Slack-Join%20workspace-4A154B?logo=slack&logoColor=white" /></a>
<a href="https://github.com/EclipseFdn/open-vsx.org/blob/main/LICENSE"><img alt="EPLv2 License" src="https://img.shields.io/github/license/EclipseFdn/open-vsx.org" /></a>
<a href="https://github.com/EclipseFdn/open-vsx.org/actions/workflows/main.yml?query=branch%3Aproduction"><img alt="Build Status @ production" src="https://github.com/EclipseFdn/open-vsx.org/actions/workflows/main.yml/badge.svg?branch:main" /></a>
<a href="https://github.com/EclipseFdn/open-vsx.org/actions/workflows/main.yml?query=branch%3Amain"><img alt="Build Status" src="https://github.com/EclipseFdn/open-vsx.org/actions/workflows/main.yml/badge.svg?branch=main" /></a>
<a href="https://scorecard.dev/viewer/?uri=github.com/EclipseFdn/open-vsx.org"><img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/EclipseFdn/open-vsx.org/badge" /></a>
</p>

Expand All @@ -30,33 +30,74 @@ the [open-vsx.org wiki](https://github.com/EclipseFdn/open-vsx.org/wiki).

If you want to refute a previously granted ownership, please comment on the corresponding issue.

## Getting started
## Getting Started

Enable Yarn, install dependencies, build assets and start a dev server:
### Prerequisites

- Node.js 22.0.0 or higher
- Yarn 4.9.1 (managed via Corepack)

### Local Development Setup

1. Navigate to the website directory and enable Yarn:

```bash
cd website
corepack enable
corepack prepare yarn@stable --activate
yarn --cwd website
yarn --cwd website compile
yarn --cwd website build
yarn --cwd website build:dev
yarn --cwd website start:dev
```

### Development
2. Install dependencies and build the project:

```bash
yarn install
yarn build
```

3. Start the development server:

```bash
yarn dev
```

The development server will be available at `http://localhost:5173` (default Vite port).

### Available Scripts

We recommend running `watch:tsc` and `watch:dev` afterwards to run the TypeScript compiler and Webpack in watch mode.
- `yarn build` - Build the production-ready website
- `yarn dev` - Start the development server with hot reload
- `yarn preview` - Preview the production build locally
- `yarn lint` - Check code quality with ESLint and Prettier
- `yarn format` - Auto-format code with Prettier

## Deployment

This project uses Kubernetes and Helm for deployment. See [kubernetes/README.md](kubernetes/README.md) for detailed deployment instructions.

## Contributing

We welcome contributions! Here's how to get started:

1. [Fork](https://help.github.com/articles/fork-a-repo/) the [eclipsefdn/open-vsx.org](https://github.com/eclipsefdn/open-vsx.org) repository
2. Clone repository: `git clone https://github.com/[your_github_username]/open-vsx.org.git`
3. Create your feature branch: `git checkout -b my-new-feature`
4. Commit your changes: `git commit -m 'Add some feature' -s`
5. Push feature branch: `git push origin my-new-feature`
6. Submit a pull request
2. Clone your fork: `git clone https://github.com/[your_github_username]/open-vsx.org.git`
3. Create a feature branch: `git checkout -b my-new-feature`
4. Make your changes and test locally
5. Commit with sign-off: `git commit -m 'Add some feature' -s`
6. Push to your fork: `git push origin my-new-feature`
7. [Submit a pull request](https://github.com/eclipsefdn/open-vsx.org/compare)

### Code Quality

Before submitting a PR, ensure your code passes linting:

```bash
cd website
yarn lint
```

### Commit Sign-off

All commits must be signed off (`-s` flag) to certify that you have the right to submit the code under the project's license.

### Declared Project Licenses

Expand Down
107 changes: 98 additions & 9 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,115 @@
## How to deploy staging instance for a given image?
# Kubernetes Deployment Guide

This directory contains Kubernetes deployment configurations and Helm charts for Open VSX.

## Prerequisites

Before deploying, ensure you have:

* Bash 4 or higher
* [Helm 3.x](https://helm.sh/) installed and configured
* `kubectl` configured with access to your Kubernetes cluster
* Appropriate cluster permissions (see RBAC setup below)

## Deployment Environments

Open VSX supports three deployment environments:

| Environment | Namespace | Release Name | Values File |
|-------------|-----------|--------------|-------------|
| Test | `open-vsx-org-test` | `test` | `values-test.yaml` |
| Staging | `open-vsx-org-staging` | `staging` | `values-staging.yaml` |
| Production | `open-vsx-org` | `production` | `values.yaml` |

## Deploying to Staging

Deploy a specific Docker image to the staging environment:

```bash
./helm-deploy.sh staging <docker_image_tag>
```

Where `<docker_image_tag>` can be de4f2c
## How to deploy production instance for a given image?
Example:
```bash
./helm-deploy.sh staging de4f2c
```

## Deploying to Production

Deploy a specific Docker image to the production environment:

```bash
./helm-deploy.sh production <docker_image_tag>
```

Where `<docker_image_tag>` can be de4f2c
Example:
```bash
./helm-deploy.sh production de4f2c
```

## Deploying to Test

## Preparing for EF JIRO specific environment
Since EF [JIRO](https://foundation.eclipse.org/ci/infra/job/open-vsx.org) runs with specific user, `clusterroles.yaml` has been added to allow jenkins to deploy environment. Resources need to be added with:
Deploy a specific Docker image to the test environment:

```bash
./helm-deploy.sh test <docker_image_tag>
```

## RBAC Setup for Jenkins (JIRO)

Since Eclipse Foundation [JIRO](https://foundation.eclipse.org/ci/infra/job/open-vsx.org) runs with a specific service account, cluster roles must be configured to allow Jenkins to deploy:

```bash
kubectl apply -f clusterroles.yaml
```

## Dependencies
This creates the necessary RBAC permissions for automated deployments.

## Helm Chart Configuration

The Helm chart is located in `../charts/openvsx/` and includes:

- **Chart.yaml**: Chart metadata and version
- **values.yaml**: Production configuration (default)
- **values-staging.yaml**: Staging-specific overrides
- **values-test.yaml**: Test-specific overrides
- **templates/**: Kubernetes resource templates

### Key Configuration Options

- `replicaCount`: Number of application replicas (default: 6 for production)
- `image.tag`: Docker image tag to deploy
- `resources`: CPU and memory limits/requests
- `website.jvmArgs`: JVM configuration for the Spring Boot application

## Troubleshooting

### Deployment fails with permission errors

Ensure RBAC is configured:
```bash
kubectl apply -f clusterroles.yaml
```

### Image pull errors

Verify the image tag exists at [ghcr.io/eclipsefdn/openvsx-website](https://github.com/orgs/EclipseFdn/packages/container/package/openvsx-website).

### Checking deployment status

```bash
kubectl get pods -n <namespace>
kubectl logs -n <namespace> <pod-name>
```

### Rolling back a deployment

```bash
helm rollback <release-name> -n <namespace>
```

## Additional Resources

* bash 4
* [Helm](https://https://helm.sh/)
- [Helm Documentation](https://helm.sh/docs/)
- [Kubernetes Documentation](https://kubernetes.io/docs/)
- [Eclipse Foundation JIRO](https://foundation.eclipse.org/ci/infra/)