diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..9188f00
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1 @@
+* @pnpavlov
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..3091cc1
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,25 @@
+version: 2
+updates:
+ # Enable version updates for npm
+ - package-ecosystem: "npm"
+ # Look for `package.json` and `lock` files in the `root` directory
+ directory: "/"
+ # Check the npm registry for updates every day (weekdays)
+ schedule:
+ interval: "weekly"
+
+ # Enable version updates for Docker
+ - package-ecosystem: "docker"
+ # Look for a `Dockerfile` in the `root` directory
+ directory: "/"
+ # Check for updates once a week
+ schedule:
+ interval: "weekly"
+
+ # Enable version updates for GitHub Actions
+ - package-ecosystem: "github-actions"
+ # Workflow files stored in the default location of `.github/workflows`
+ # You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/release-to-container.yaml b/.github/workflows/release-to-container.yaml
new file mode 100644
index 0000000..a2f003b
--- /dev/null
+++ b/.github/workflows/release-to-container.yaml
@@ -0,0 +1,98 @@
+name: Release Container
+
+# Based on https://vitepress.dev/guide/deploy#github-pages
+# Enables automatic publishing of the website to GitHub Pages from main branch.
+env:
+ platforms: linux/amd64,linux/arm64
+on:
+ # run the workflow only for main branch or PRs
+ push:
+ branches:
+ - main
+ pull_request:
+ release:
+ types:
+ - released
+ # Allows you to run this workflow manually from the Actions tab for debugging purposes
+ workflow_dispatch:
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: container
+ cancel-in-progress: false
+
+jobs:
+ # Build job
+ build-web:
+ name: Build
+ # Specify runner + deployment step
+ runs-on: ubuntu-latest
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ # Check out the branch
+ - name: Checkout
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
+ # Fix "Corepack must currently be enabled by running corepack enable in your terminal."
+ - name: Enable Corepack
+ run: corepack enable
+ # Setup Node.js with yarn support
+ - name: Setup Node
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
+ with:
+ node-version: "lts/*" # Ensures the latest LTS version is used
+ cache: yarn # npm / pnpm / yarn
+ # Install javascript dependencies with yarn
+ - name: Install dependencies
+ run: yarn install # or pnpm install / yarn install / bun install
+ # Build the website
+ - name: Build with VitePress
+ run: yarn run build # or pnpm docs:build / yarn docs:build / bun run docs:build
+ # # Publish as container
+ # publish-as-container:
+ # permissions:
+ # contents: read
+ # packages: write
+ # name: Build Container Image
+ # runs-on: ubuntu-latest
+ # # Add a dependency to the build job
+ # needs: build-web
+ # steps:
+ - name: Log in to GHCR
+ uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Collect metadata
+ uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f
+ id: meta
+ with:
+ images: |
+ ghcr.io/${{ github.repository}}
+ tags: |
+ type=semver,pattern={{version}}
+ type=ref,event=branch
+ type=ref,event=tag
+ type=ref,event=pr
+ type=sha
+ flavor: |
+ latest=${{ startsWith(github.ref, 'refs/tags/') }}
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
+ with:
+ platforms: ${{ env.platforms }}
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
+ - name: Build and push Docker image
+ uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
+ with:
+ context: .
+ platforms: ${{ env.platforms }}
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ file: Containerfile
+ push: true
diff --git a/.github/workflows/deploy-github-pages.yaml b/.github/workflows/release-to-github-pages.yaml
similarity index 87%
rename from .github/workflows/deploy-github-pages.yaml
rename to .github/workflows/release-to-github-pages.yaml
index 4db8491..4a77c78 100644
--- a/.github/workflows/deploy-github-pages.yaml
+++ b/.github/workflows/release-to-github-pages.yaml
@@ -1,13 +1,13 @@
-name: Deploy VitePress site to Pages
+name: Release GitHub Page
# Based on https://vitepress.dev/guide/deploy#github-pages
-# Enables automatic publishing of the website to GitHub Pages from main branch.
+# Enables automatic publishing of the website to GitHub Pages from main branch.
on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
- push:
- branches: [main]
+ # push:
+ # branches: [main]
# Allows you to run this workflow manually from the Actions tab for debugging purposes
workflow_dispatch:
@@ -17,9 +17,9 @@ permissions:
contents: read
pages: write
id-token: write
-
+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
@@ -34,8 +34,6 @@ jobs:
# Check out the branch
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- with:
- fetch-depth: 0
# Fix "Corepack must currently be enabled by running corepack enable in your terminal."
- name: Enable Corepack
run: corepack enable
@@ -43,7 +41,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
- node-version: 'lts/*' # Ensures the latest LTS version is used
+ node-version: "lts/*" # Ensures the latest LTS version is used
cache: yarn # npm / pnpm / yarn
# Configure GitHub Pages
- name: Setup Pages
@@ -53,7 +51,7 @@ jobs:
run: yarn install # or pnpm install / yarn install / bun install
# Build the website
- name: Build with VitePress
- run: yarn run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
+ run: yarn run build # or pnpm docs:build / yarn docs:build / bun run docs:build
# Upload the artefact to GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
@@ -65,7 +63,7 @@ jobs:
# Execute deployment only from master branch
if: github.ref == 'refs/heads/main'
name: Deploy
- runs-on: ubuntu-latest
+ runs-on: ubuntu-latest
# Add a dependency to the build job
needs: build
# Deploy to the github-pages environment
diff --git a/.pnp.cjs b/.pnp.cjs
index aecdba8..647e4ad 100755
--- a/.pnp.cjs
+++ b/.pnp.cjs
@@ -8050,7 +8050,8 @@ class ZipFS extends BasePortableFakeFS {
const entries = Array.from(directoryListing, (name) => {
return Object.assign(this.statImpl(`lstat`, ppath.join(p, name)), {
name,
- path: PortablePath.dot
+ path: PortablePath.dot,
+ parentPath: PortablePath.dot
});
});
for (const entry of entries) {
@@ -8061,7 +8062,8 @@ class ZipFS extends BasePortableFakeFS {
for (const child of subListing) {
entries.push(Object.assign(this.statImpl(`lstat`, ppath.join(p, subPath, child)), {
name: child,
- path: subPath
+ path: subPath,
+ parentPath: subPath
}));
}
}
@@ -8082,7 +8084,8 @@ class ZipFS extends BasePortableFakeFS {
return Array.from(directoryListing, (name) => {
return Object.assign(this.statImpl(`lstat`, ppath.join(p, name)), {
name,
- path: void 0
+ path: void 0,
+ parentPath: void 0
});
});
} else {
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..80a17b5
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,2 @@
+FROM nginx:1-alpine-slim
+COPY ./web/.vitepress/dist /usr/share/nginx/html
diff --git a/README.md b/README.md
index e352845..85fbf55 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,16 @@
## Run locally
-### Prerequisites
+### Local development
+
+**TLDR:** If you have already Node.JS and yarn, you can start locally with `yarn dev`. If you don't - you can install them on MacOS via `./bin/prepare.sh`. The script follows the steps below:
1. Node.js is required. Recommendation is to manage it over [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating). Can be as simple as
```bash
# Run latest https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# Install latest Node.js LTS version
- nvm install --lts
+ nvm install --lts --latest-npm
nvm use --lts
```
@@ -24,9 +26,31 @@
3. After Node.js and yarn are configured, you can run the app locally as described in the scripts section of package.json.
```bash
- yarn docs:dev
+ yarn dev
```
+### Running in container
+
+You can the generated website in with prefered websever via podman or docker.
+```bash
+# build the website
+yarn build
+# run with podman, docker or your prefered container environment
+podman run --rm -v ./web/.vitepress/dist:/usr/share/nginx/html:ro -it nginx:1.29-alpine-slim
+```
+
+### Building a container
+
+```bash
+# build the website
+yarn build
+# build your container
+podman build -t ghcr.io/gardenlinux/website:local .
+# run the image
+podman run --rm -it -p 8080:80 ghcr.io/gardenlinux/website:local
+```
+
+
## Bootstrap decisions
### Package manager
diff --git a/bin/prepare.sh b/bin/prepare.sh
new file mode 100755
index 0000000..5fff754
--- /dev/null
+++ b/bin/prepare.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -euo pipefail
+
+# solve nvm: command not found
+. ~/.nvm/nvm.sh
+
+# use latest lts nodejs & npm
+nvm install --lts --latest-npm
+nvm use --lts
+
+# prepare yarn
+npm install -g corepack
+yarn set version stable
+yarn install
\ No newline at end of file
diff --git a/deployment/k8s/website.dev.yaml b/deployment/k8s/website.dev.yaml
new file mode 100644
index 0000000..3584836
--- /dev/null
+++ b/deployment/k8s/website.dev.yaml
@@ -0,0 +1,88 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ annotations:
+ linkerd.io/inject: enabled
+ name: website
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ app: website
+ name: website
+ namespace: website
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: website
+ template:
+ metadata:
+ annotations:
+ linkerd.io/inject: enabled
+ labels:
+ app: website
+ spec:
+ containers:
+ - image: ghcr.io/gardenlinux/website:latest
+ name: http-echo
+ ports:
+ - containerPort: 80
+ resources:
+ limits:
+ cpu: 250m
+ memory: 256Mi
+ requests:
+ cpu: 125m
+ memory: 128Mi
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: website
+ name: website
+ namespace: website
+spec:
+ ports:
+ - port: 80
+ protocol: TCP
+ targetPort: 80
+ selector:
+ app: website
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: website
+ namespace: website
+ annotations:
+ # Let Gardener manage external DNS records for this Ingress.
+ dns.gardener.cloud/dnsnames: dev.gardenlinux.org # Use "*" to collects domains names from .spec.rules[].host
+ dns.gardener.cloud/ttl: "300"
+ dns.gardener.cloud/class: garden
+ # If you are delegating the certificate management to Gardener, uncomment the following line
+ cert.gardener.cloud/purpose: managed
+ # If you're using a load balancer on AWS and expect the creation of both `A` and `AAAA` records, uncomment the following line
+ dns.gardener.cloud/ip-stack: dual-stack
+spec:
+ ingressClassName: nginx
+ rules:
+ - host: dev.gardenlinux.org
+ http:
+ paths:
+ - pathType: Prefix
+ path: "/"
+ backend:
+ service:
+ name: website
+ port:
+ number: 80
+ # Uncomment the following part if you are delegating the certificate management to Gardener
+ tls:
+ - hosts:
+ - dev.gardenlinux.org
+ secretName: dev-gl-org
+---
+
diff --git a/package.json b/package.json
index 960e6ee..9117bf9 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,12 @@
{
- "packageManager": "yarn@4.9.4",
+ "packageManager": "yarn@4.10.3",
"devDependencies": {
"vitepress": "^2.0.0-alpha.12",
"vue": "^3.5.21"
},
"scripts": {
- "docs:dev": "vitepress dev web",
- "docs:build": "vitepress build web",
- "docs:preview": "vitepress preview web"
+ "dev": "vitepress dev web",
+ "build": "vitepress build web",
+ "preview": "vitepress preview web"
}
}
diff --git a/web/index.md b/web/index.md
index 65c40e6..064b318 100644
--- a/web/index.md
+++ b/web/index.md
@@ -5,7 +5,7 @@ layout: home
hero:
name: "Garden Linux"
# text: "Cloud OS"
- tagline: "Operating system bult for cloud native workloads."
+ tagline: "Operating system built for cloud native workloads."
# actions:
# - theme: brand
# text: Download OS images
@@ -15,11 +15,11 @@ hero:
# link: /api-examples
features:
- - title: "Stable release: 1877.3.0"
+ - title: "Stable release: 1877.6.0"
details: "Download latest stable OS image.
Includes:
- Linux LTS Kernel: 6.12
- Containerd: 2.0"
- link: https://github.com/gardenlinux/gardenlinux/releases/tag/1877.3
- - title: "Nighlty unstable release"
- details: "Download latest cutting edge OS images.
Includes:
- Linux LTS Kernel: 6.12
- Containerd: 2.0"
+ link: https://github.com/gardenlinux/gardenlinux/releases/tag/1877.6
+ - title: "Nightly release"
+ details: "Download latest cutting-edge OS images.
Includes:
- Linux LTS Kernel: 6.12
- Containerd: 2.0"
link: https://github.com/gardenlinux/gardenlinux/actions/workflows/nightly.yml
- title: "Container images"
details: "Download container base images."