Skip to content

Versioned docs POC #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
130 changes: 55 additions & 75 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import { themes } from "prism-react-renderer";
const path = require("path");
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import {themes as prismThemes} from 'prism-react-renderer';
import math from 'remark-math';
import katex from 'rehype-katex';
import remarkYamlToTable from 'remark-yaml-to-table';
import remarkCodeImport from 'remark-code-import';
import tabBlocks from 'docusaurus-remark-plugin-tab-blocks';
import "dotenv/config";

import platform_enterprise_latest_version from "./platform-enterprise_latest_version.js";
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

export default async function createConfigAsync() {
const changelog = {
Expand All @@ -26,26 +38,14 @@ export default async function createConfigAsync() {
const docs_platform_enterprise = [
"@docusaurus/plugin-content-docs",
{
id: "platform-enterprise",
routeBasePath: "/platform-enterprise",
includeCurrentVersion: false,
remarkPlugins: [
(await import("remark-code-import")).default,
(await require("remark-math")).default,
(await import("docusaurus-remark-plugin-tab-blocks")).default,
(await require("remark-yaml-to-table")).default,
],
rehypePlugins: [(await require("rehype-katex")).default],
editUrl: "https://github.com/seqeralabs/docs/tree/master/",
sidebarPath: false,
versions: {
// Replace /platform-enterprise with /platform-enterprise/24.2, when no version is specified in the URL.
// (Applies to latest version only)
[platform_enterprise_latest_version]: {
label: platform_enterprise_latest_version,
path: platform_enterprise_latest_version,
},
},
id: 'platform-enterprise',
path: 'platform-enterprise',
routeBasePath: '/platform-enterprise',
sidebarPath: './platform-enterprise/sidebar.json',
includeCurrentVersion: false,
remarkPlugins: [ math, remarkYamlToTable], //remarkCodeImport tabBlocks
rehypePlugins: [katex],
editUrl: 'https://github.com/seqeralabs/docs/tree/master/',
},
];

Expand Down Expand Up @@ -80,75 +80,55 @@ export default async function createConfigAsync() {
const docs_platform_cloud = [
"@docusaurus/plugin-content-docs",
{
id: "platform-cloud",
routeBasePath: "/platform-cloud",
path: "platform-cloud/docs",
remarkPlugins: [
(await import("remark-code-import")).default,
(await require("remark-math")).default,
(await import("docusaurus-remark-plugin-tab-blocks")).default,
(await require("remark-yaml-to-table")).default,
],
rehypePlugins: [(await require("rehype-katex")).default],
editUrl: "https://github.com/seqeralabs/docs/tree/master/",
sidebarPath: "./platform-cloud/cloud-sidebar.json",
id: 'platform-cloud',
path: "platform-cloud/docs",
routeBasePath: '/platform-cloud',
sidebarPath: './platform-cloud/cloud-sidebar.json',
editUrl: 'https://github.com/seqeralabs/docs/tree/master/',
remarkPlugins: [math, remarkYamlToTable, remarkCodeImport , tabBlocks],
rehypePlugins: [katex],
},
];

const docs_multiqc = [
"@docusaurus/plugin-content-docs",
{
id: "multiqc",
routeBasePath: "/multiqc",
path: "multiqc_docs/multiqc_repo/docs/markdown",
remarkPlugins: [
(await import("remark-code-import")).default,
(await require("remark-math")).default,
(await import("docusaurus-remark-plugin-tab-blocks")).default,
(await require("remark-yaml-to-table")).default,
],
rehypePlugins: [(await require("rehype-katex")).default],
editUrl: ({ docPath }) => {
return `https://github.com/MultiQC/MultiQC/blob/main/docs/markdown/${docPath.replace("multiqc_docs/multiqc_repo/docs", "")}`;
},
sidebarPath: "./multiqc_docs/sidebar.js",
id: 'multiqc',
path: "multiqc_docs/multiqc_repo/docs/markdown",
routeBasePath: '/multiqc',
sidebarPath: './multiqc_docs/sidebar.js',
remarkPlugins: [math, remarkYamlToTable, remarkCodeImport , tabBlocks],
rehypePlugins: [katex],
editUrl: ({ docPath }) => {
return `https://github.com/MultiQC/MultiQC/blob/main/docs/markdown/${docPath.replace('multiqc', '')}`
},
},
];
const docs_fusion = [
"@docusaurus/plugin-content-docs",
{
id: "fusion",
routeBasePath: "/fusion",
path: "fusion_docs",
remarkPlugins: [
(await import("remark-code-import")).default,
(await require("remark-math")).default,
(await import("docusaurus-remark-plugin-tab-blocks")).default,
(await require("remark-yaml-to-table")).default,
],
rehypePlugins: [(await require("rehype-katex")).default],
editUrl: "https://github.com/seqeralabs/docs/tree/master/",
sidebarPath: "./fusion_docs/sidebar.json",
id: 'fusion',
path: 'fusion_docs',
routeBasePath: '/fusion',
sidebarPath: './fusion_docs/sidebar.json',
remarkPlugins: [math, remarkYamlToTable, remarkCodeImport , tabBlocks],
rehypePlugins: [katex],
editUrl: 'https://github.com/seqeralabs/docs/tree/master/',
},
];

const docs_wave = [
"@docusaurus/plugin-content-docs",
{
id: "wave",
routeBasePath: "/wave",
path: "wave_docs/wave_repo/docs",
remarkPlugins: [
(await import("remark-code-import")).default,
(await require("remark-math")).default,
(await import("docusaurus-remark-plugin-tab-blocks")).default,
(await require("remark-yaml-to-table")).default,
],
rehypePlugins: [(await require("rehype-katex")).default],
editUrl: ({ docPath }) => {
return `https://github.com/seqeralabs/wave/blob/master/docs/${docPath.replace("wave_docs/wave_repo/docs", "")}`;
},
sidebarPath: "./wave_docs/sidebar.json",
id: "wave",
routeBasePath: "/wave",
path: "wave_docs/wave_repo/docs",
sidebarPath: './wave_docs/sidebar.json',
remarkPlugins: [math, remarkYamlToTable, remarkCodeImport , tabBlocks],
rehypePlugins: [katex],
editUrl: ({ docPath }) => {
return `https://github.com/seqeralabs/wave/blob/master/docs/${docPath.replace('wave', '')}`
},
},
];

Expand Down Expand Up @@ -402,8 +382,8 @@ export default async function createConfigAsync() {
copyright: `© ${new Date().getFullYear()} Seqera`,
},
prism: {
theme: themes.oneLight,
darkTheme: themes.oneDark,
theme: prismThemes.oneLight,
darkTheme: prismThemes.oneDark,
additionalLanguages: [
"bash",
"docker",
Expand Down
Binary file added platform-enterprise/_images/nf_home_page.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 added platform-enterprise/_images/overview_image.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 added platform-enterprise/_images/staging_options.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 added platform-enterprise/_images/tw_agent.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 added platform-enterprise/_images/tw_agent_running.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 added platform-enterprise/_images/tw_cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions platform-enterprise/_templates/aws-batch/forge-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TowerForge0",
"Effect": "Allow",
"Action": [
"ssm:GetParameters",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:GetRole",
"iam:RemoveRoleFromInstanceProfile",
"iam:CreateRole",
"iam:DeleteRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:AddRoleToInstanceProfile",
"iam:PassRole",
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:DeleteRolePolicy",
"iam:ListRolePolicies",
"iam:TagRole",
"iam:TagInstanceProfile",
"batch:CreateComputeEnvironment",
"batch:DescribeComputeEnvironments",
"batch:CreateJobQueue",
"batch:DescribeJobQueues",
"batch:UpdateComputeEnvironment",
"batch:DeleteComputeEnvironment",
"batch:UpdateJobQueue",
"batch:DeleteJobQueue",
"batch:TagResource",
"fsx:DeleteFileSystem",
"fsx:DescribeFileSystems",
"fsx:CreateFileSystem",
"fsx:TagResource",
"ec2:DescribeSecurityGroups",
"ec2:DescribeAccountAttributes",
"ec2:DescribeSubnets",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeLaunchTemplateVersions",
"ec2:CreateLaunchTemplate",
"ec2:DeleteLaunchTemplate",
"ec2:DescribeKeyPairs",
"ec2:DescribeVpcs",
"ec2:DescribeInstanceTypeOfferings",
"ec2:GetEbsEncryptionByDefault",
"elasticfilesystem:DescribeMountTargets",
"elasticfilesystem:CreateMountTarget",
"elasticfilesystem:CreateFileSystem",
"elasticfilesystem:DescribeFileSystems",
"elasticfilesystem:DeleteMountTarget",
"elasticfilesystem:DeleteFileSystem",
"elasticfilesystem:UpdateFileSystem",
"elasticfilesystem:PutLifecycleConfiguration",
"elasticfilesystem:TagResource"
],
"Resource": "*"
}
]
}
36 changes: 36 additions & 0 deletions platform-enterprise/_templates/aws-batch/launch-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TowerLaunch0",
"Effect": "Allow",
"Action": [
"batch:DescribeJobQueues",
"batch:CancelJob",
"batch:SubmitJob",
"batch:ListJobs",
"batch:TagResource",
"batch:DescribeComputeEnvironments",
"batch:TerminateJob",
"batch:DescribeJobs",
"batch:RegisterJobDefinition",
"batch:DescribeJobDefinitions",
"ecs:DescribeTasks",
"ec2:DescribeInstances",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstanceAttribute",
"ecs:DescribeContainerInstances",
"ec2:DescribeInstanceStatus",
"logs:Describe*",
"logs:Get*",
"logs:List*",
"logs:StartQuery",
"logs:StopQuery",
"logs:TestMetricFilter",
"logs:FilterLogEvents",
"secretsmanager:ListSecrets"
],
"Resource": "*"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::YOUR-BUCKET-NAME"
]
},
{
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectTagging",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::YOUR-BUCKET-NAME/*"
],
"Effect": "Allow"
}
]
}
14 changes: 14 additions & 0 deletions platform-enterprise/_templates/eks/eks-iam-policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "TowerEks0",
"Effect": "Allow",
"Action": [
"eks:ListClusters",
"eks:DescribeCluster"
],
"Resource": "*"
}
]
}
60 changes: 60 additions & 0 deletions platform-enterprise/_templates/k8s/tower-launcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: v1
kind: Namespace
metadata:
name: tower-nf

---

apiVersion: v1
kind: ServiceAccount
metadata:
name: tower-launcher-sa
namespace: tower-nf

---

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: tower-launcher-role
namespace: tower-nf
rules:
- apiGroups: [""]
resources: ["pods", "pods/status", "pods/log", "pods/exec", "persistentvolumeclaims", "configmaps"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["batch"]
resources: ["jobs", "jobs/status", "jobs/log"]
verbs: ["get", "list", "watch", "create", "delete"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tower-launcher-rolebind
namespace: tower-nf
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: tower-launcher-role
subjects:
- kind: ServiceAccount
name: tower-launcher-sa

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: tower-launcher-userbind
namespace: tower-nf
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: tower-launcher-role
subjects:
- kind: User
name: tower-launcher-user
Loading
Loading