diff --git a/.github/resource/frontmatter.schema.json b/.github/resource/frontmatter.schema.json index b6955c08cb..e4481357a0 100644 --- a/.github/resource/frontmatter.schema.json +++ b/.github/resource/frontmatter.schema.json @@ -16,6 +16,14 @@ "draft": { "description": "Makes pages for incomplete features only visible in development mode.", "type": "boolean" + }, + "supported_version": { + "description": "Indicates whether this version is currently supported.", + "type": "boolean" + }, + "release_date": { + "description": "The release date of the version.", + "type": "string" } }, "additionalProperties": false diff --git a/src/pages/download.js b/src/pages/download.js new file mode 100644 index 0000000000..76294842e5 --- /dev/null +++ b/src/pages/download.js @@ -0,0 +1,233 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import Layout from '@theme/Layout'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; + +// Helper function to format version information +function formatVersionRow(version, releaseDate, isSupported) { + const versionNumber = version.replace('.md', ''); + return { + version: versionNumber, + releaseDate: releaseDate || 'Unknown', + isSupported: isSupported, + sourceDownload: { + source: `https://www.apache.org/dyn/closer.cgi/ozone/${versionNumber}/ozone-${versionNumber}-src.tar.gz`, + checksum: `https://downloads.apache.org/ozone/${versionNumber}/ozone-${versionNumber}-src.tar.gz.sha512`, + signature: `https://downloads.apache.org/ozone/${versionNumber}/ozone-${versionNumber}-src.tar.gz.asc` + }, + binaryDownload: { + binary: `https://www.apache.org/dyn/closer.cgi/ozone/${versionNumber}/ozone-${versionNumber}.tar.gz`, + checksum: `https://downloads.apache.org/ozone/${versionNumber}/ozone-${versionNumber}.tar.gz.sha512`, + signature: `https://downloads.apache.org/ozone/${versionNumber}/ozone-${versionNumber}.tar.gz.asc` + }, + releaseNotes: `/release-notes/${versionNumber}`, + ozoneArchiveLink: `https://archive.apache.org/dist/ozone/${versionNumber}/`, + hadoopArchiveLink: `https://archive.apache.org/dist/hadoop/ozone` + }; +} + +// Release dates are loaded from the frontmatter of each release notes markdown files +export default function Downloads() { + const {siteConfig} = useDocusaurusContext(); + + // Get all markdown files from the release-notes directory + const releaseNotesContext = require.context('../../src/pages/release-notes', false, /\.md$/); + const releaseNotes = releaseNotesContext.keys().map(fileName => { + const fileContent = releaseNotesContext(fileName); + const versionNumber = fileName.replace('./', '').replace('.md', ''); + + // Extract frontmatter data + let isSupported = false; + let releaseDate = 'Unknown'; + + if (fileContent.frontMatter) { + if (fileContent.frontMatter.supported_version !== undefined) { + isSupported = fileContent.frontMatter.supported_version; + } + + if (fileContent.frontMatter.release_date) { + releaseDate = fileContent.frontMatter.release_date; + } + } + + return formatVersionRow(versionNumber, releaseDate, isSupported); + }); + + // Sort versions by version number (descending) + releaseNotes.sort((a, b) => { + return b.version.localeCompare(a.version, undefined, { numeric: true, sensitivity: 'base' }); + }); + + // Helper function to check if version is less than 1.1.0 + const isLessThan110 = (version) => { + return version.localeCompare('1.1.0', undefined, { numeric: true, sensitivity: 'base' }) < 0; + }; + + // Separate versions into three categories + const supportedVersions = releaseNotes.filter(version => version.isSupported); + const ozoneArchivedVersions = releaseNotes.filter(version => + !version.isSupported && !isLessThan110(version.version) + ); + const hadoopArchivedVersions = releaseNotes.filter(version => + !version.isSupported && isLessThan110(version.version) + ); + + return ( + +
+

Downloads

+ +

Apache Ozone is released as source code tarball. Binary tarballs are also provided for convenience. Both kinds of tarballs are distributed via mirror sites. They should be verified after download against checksums and signatures, available directly from Apache.

+ +

Supported Releases

+

Releases in the table are supported by the Apache Ozone community for security fixes. Other versions are not supported, but are available from the archives.

+ + + + + + + + + + + + {supportedVersions.map((version) => ( + + + + + + + + ))} + +
VersionRelease DateSource DownloadBinary DownloadRelease Notes
{version.version}{version.releaseDate} + Source
+ Checksum
+ Signature +
+ Binary
+ Checksum
+ Signature +
+ Release Notes +
+ +

Archived Releases

+ +

Older releases (1.1.0 and newer) are available in the Apache Ozone archives. Please note that these versions are no longer supported:

+ + + + + + + + + + + + {ozoneArchivedVersions.map((version) => ( + + + + + + + ))} + +
VersionRelease DateRelease NotesArchive Link
{version.version}{version.releaseDate} + Release Notes + + Archive Link +
+ +

Apache Hadoop Archives

+ +

Releases before 1.1.0 can be found in the Apache Hadoop archives. Please note that these versions are no longer supported:

+ + + + + + + + + + + + {hadoopArchivedVersions.map((version) => ( + + + + + + + ))} + +
VersionRelease DateRelease NotesArchive Link
{version.version}{version.releaseDate} + Release Notes + + Archive Link +
+ +

Download

+ +
    +
  1. Download the release ozone-${OZONE_VERSION}-src.tar.gz from a mirror site.
  2. +
  3. Download signature or checksum from Apache.
  4. +
+ +

Verify

+ +

GnuPG Signature

+ +

Download Ozone developers' public KEYS.

+ +
+            
+                gpg --import KEYS
+            
+        
+
+            
+                gpg --verify ozone-${OZONE_VERSION}-src.tar.gz.asc ozone-${OZONE_VERSION}-src.tar.gz
+            
+        
+ +

SHA-512 Checksum

+ +
+          
+            sha512sum -c ozone-${OZONE_VERSION}-src.tar.gz.sha512
+          
+        
+ +

License

+ +

The software is licensed under Apache License 2.0

+
+
+ ); +} \ No newline at end of file diff --git a/src/pages/download.md b/src/pages/download.md deleted file mode 100644 index 91ecf8fc49..0000000000 --- a/src/pages/download.md +++ /dev/null @@ -1,14 +0,0 @@ -# Downloads - -**TODO [HDDS-9616](https://issues.apache.org/jira/browse/HDDS-9616) Fill in this page.** - -Fill this in similar to what is on the current website. - -- Create in a table with all release information from 1.0.0-1.3.0 (example below). -- Include instructions for verifying signatures and checksums. -- Include license information. -- Fill in the release notes pages for all past versions 1.0.0-1.3.0. - -| Version | Release Date | Source Download | Binary Download | Release Notes | -|-|-|-|-|-| -| 1.3.0 | 2022 Dec 18 | [Source](https://www.apache.org/dyn/closer.cgi/ozone/1.3.0/ozone-1.3.0-src.tar.gz)
[Checksum](https://downloads.apache.org/ozone/1.3.0/ozone-1.3.0-src.tar.gz.sha512)
[Signature](https://downloads.apache.org/ozone/1.3.0/ozone-1.3.0-src.tar.gz.asc) | [Binary](https://www.apache.org/dyn/closer.cgi/ozone/1.3.0/ozone-1.3.0.tar.gz)
[Checksum](https://downloads.apache.org/ozone/1.3.0/ozone-1.3.0.tar.gz.sha512)
[Signature](https://downloads.apache.org/ozone/1.3.0/ozone-1.3.0.tar.gz.asc) | [Release Notes](/release-notes/1.3.0) | diff --git a/src/pages/release-notes/1.0.0.md b/src/pages/release-notes/1.0.0.md index 5ace2d9ce6..dc12ef9a75 100644 --- a/src/pages/release-notes/1.0.0.md +++ b/src/pages/release-notes/1.0.0.md @@ -1,3 +1,8 @@ +--- +supported_version: false +release_date: "2020 Sep 02" +--- + # Apache Ozone 1.0.0 Release Notes **TODO [HDDS-9617](https://issues.apache.org/jira/browse/HDDS-9617) Fill in this page.** diff --git a/src/pages/release-notes/1.1.0.md b/src/pages/release-notes/1.1.0.md index 73b5ad62bd..753328b546 100644 --- a/src/pages/release-notes/1.1.0.md +++ b/src/pages/release-notes/1.1.0.md @@ -1,3 +1,8 @@ +--- +supported_version: false +release_date: "2021 Apr 19" +--- + # Apache Ozone 1.1.0 Release Notes **TODO [HDDS-9617](https://issues.apache.org/jira/browse/HDDS-9617) Fill in this page.** diff --git a/src/pages/release-notes/1.2.1.md b/src/pages/release-notes/1.2.1.md index 42d356db33..bd724210d3 100644 --- a/src/pages/release-notes/1.2.1.md +++ b/src/pages/release-notes/1.2.1.md @@ -1,3 +1,8 @@ +--- +supported_version: false +release_date: "2021 Dec 22" +--- + # Apache Ozone 1.2.1 Release Notes **TODO [HDDS-9617](https://issues.apache.org/jira/browse/HDDS-9617) Fill in this page.** diff --git a/src/pages/release-notes/1.3.0.md b/src/pages/release-notes/1.3.0.md index 7b39464ea5..36d875b080 100644 --- a/src/pages/release-notes/1.3.0.md +++ b/src/pages/release-notes/1.3.0.md @@ -1,3 +1,8 @@ +--- +supported_version: false +release_date: "2022 Dec 19" +--- + # Apache Ozone 1.3.0 Release Notes **TODO [HDDS-9617](https://issues.apache.org/jira/browse/HDDS-9617) Fill in this page.** diff --git a/src/pages/release-notes/1.4.1.md b/src/pages/release-notes/1.4.1.md new file mode 100644 index 0000000000..d59a88161c --- /dev/null +++ b/src/pages/release-notes/1.4.1.md @@ -0,0 +1,8 @@ +--- +supported_version: true +release_date: "2024 Nov 24" +--- + +# Apache Ozone 1.4.1 Release Notes + +**TODO [HDDS-9617](https://issues.apache.org/jira/browse/HDDS-9617) Fill in this page.**