diff --git a/README.md b/README.md index 892b001e9..e2849d115 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@

Slack workspace EPLv2 License - Build Status @ production + Build Status OpenSSF Scorecard

@@ -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 diff --git a/kubernetes/README.md b/kubernetes/README.md index 72247ae2c..bff2d9a4b 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -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 ``` -Where `` 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 ``` -Where `` 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 +``` + +## 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 +kubectl logs -n +``` + +### Rolling back a deployment + +```bash +helm rollback -n +``` + +## 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/)