From 2989e8ba547a11ffa255d44fbafd2ec3c866c90a Mon Sep 17 00:00:00 2001 From: Veerapuram Varadhan Date: Mon, 13 Jul 2020 15:38:17 +0530 Subject: [PATCH 01/42] Fixes #4335: Create Stratos static web site with better documentation structure using docusaurus. Initial commit. --- website/.gitignore | 20 + website/README.md | 33 + website/babel.config.js | 3 + website/blog/2019-05-28-hola.md | 11 + website/blog/2019-05-29-hello-world.md | 17 + website/blog/2019-05-30-welcome.md | 13 + {docs => website/docs}/apiDefinition.json | 0 {docs => website/docs}/cf-api-v2-usage.md | 0 {docs => website/docs}/cf-api-v3.md | 0 {docs => website/docs}/cf-entity-scaling.md | 0 {docs => website/docs/deploy}/access.md | 6 +- .../docs/deploy/all-in-one.md | 6 +- .../docs/deploy/cloud-foundry.md | 22 +- .../docs/deploy/kubernetes.md | 6 +- .../docs/guides/admin}/invite-user-guide.md | 6 +- {docs => website/docs/guides/admin}/sso.md | 6 +- .../docs/guides/contribution}/contributing.md | 6 +- .../guides/contribution}/issue_template.md | 14 +- .../contribution}/pull_request_template.md | 6 + .../docs/guides/customization}/customizing.md | 6 +- .../developers}/developers-guide-e2e-tests.md | 6 +- .../developers}/developers-guide-env-tech.md | 6 +- .../guides/developers}/developers-guide.md | 7 +- .../guides/extensions}/backend-plugins.md | 6 +- .../guides/extensions/frontend-extensions.md | 50 +- {docs => website/docs/guides/i18n}/i18n.md | 0 .../docs/guides/metrics}/bosh-metrics.md | 0 .../troubleshooting}/troubleshooting.md | 8 +- .../docs}/images/Browserstack-logo.svg | 0 .../images/extensions/app-tab-example.png | Bin .../extensions/appwall-action-example.png | Bin .../docs}/images/extensions/tab-example.png | Bin .../docs}/images/high-level-arch.png | Bin .../docs}/images/screenshots/app-summary.png | Bin website/docs/introduction.md | 71 + website/docs/old-index.html | 1 + {docs => website/docs}/overview.md | 6 +- {docs => website/docs}/planning/angular.md | 0 .../docs}/planning/cf-user-management.md | 0 {docs => website/docs}/planning/metrics.md | 0 {docs => website/docs}/planning/services.md | 0 {docs => website/docs}/roadmap.md | 0 {docs => website/docs}/status_updates.md | 0 website/docusaurus.config.js | 105 + website/package-lock.json | 13192 ++++++++++++++++ website/package.json | 30 + website/sidebars.js | 40 + website/src/css/custom.css | 25 + website/src/pages/index.js | 97 + website/src/pages/styles.module.css | 37 + website/static/.nojekyll | 0 website/static/img/favicon.ico | Bin 0 -> 3626 bytes website/static/img/logo.svg | 1 + .../static/img/undraw_docusaurus_mountain.svg | 170 + .../static/img/undraw_docusaurus_react.svg | 169 + website/static/img/undraw_docusaurus_tree.svg | 1 + 56 files changed, 14148 insertions(+), 61 deletions(-) create mode 100644 website/.gitignore create mode 100644 website/README.md create mode 100644 website/babel.config.js create mode 100644 website/blog/2019-05-28-hola.md create mode 100644 website/blog/2019-05-29-hello-world.md create mode 100644 website/blog/2019-05-30-welcome.md rename {docs => website/docs}/apiDefinition.json (100%) rename {docs => website/docs}/cf-api-v2-usage.md (100%) rename {docs => website/docs}/cf-api-v3.md (100%) rename {docs => website/docs}/cf-entity-scaling.md (100%) rename {docs => website/docs/deploy}/access.md (97%) rename deploy/all-in-one/README.md => website/docs/deploy/all-in-one.md (97%) rename deploy/cloud-foundry/README.md => website/docs/deploy/cloud-foundry.md (94%) rename deploy/kubernetes/README.md => website/docs/deploy/kubernetes.md (91%) rename {docs => website/docs/guides/admin}/invite-user-guide.md (98%) rename {docs => website/docs/guides/admin}/sso.md (97%) rename {docs => website/docs/guides/contribution}/contributing.md (97%) rename {docs => website/docs/guides/contribution}/issue_template.md (77%) rename {docs => website/docs/guides/contribution}/pull_request_template.md (91%) rename {docs => website/docs/guides/customization}/customizing.md (99%) rename {docs => website/docs/guides/developers}/developers-guide-e2e-tests.md (98%) rename {docs => website/docs/guides/developers}/developers-guide-env-tech.md (98%) rename {docs => website/docs/guides/developers}/developers-guide.md (99%) rename {docs => website/docs/guides/extensions}/backend-plugins.md (98%) rename docs/extensions.md => website/docs/guides/extensions/frontend-extensions.md (84%) rename {docs => website/docs/guides/i18n}/i18n.md (100%) rename {docs => website/docs/guides/metrics}/bosh-metrics.md (100%) rename {docs => website/docs/guides/troubleshooting}/troubleshooting.md (78%) rename {docs => website/docs}/images/Browserstack-logo.svg (100%) rename {docs => website/docs}/images/extensions/app-tab-example.png (100%) rename {docs => website/docs}/images/extensions/appwall-action-example.png (100%) rename {docs => website/docs}/images/extensions/tab-example.png (100%) rename {docs => website/docs}/images/high-level-arch.png (100%) rename {docs => website/docs}/images/screenshots/app-summary.png (100%) create mode 100644 website/docs/introduction.md create mode 100644 website/docs/old-index.html rename {docs => website/docs}/overview.md (98%) rename {docs => website/docs}/planning/angular.md (100%) rename {docs => website/docs}/planning/cf-user-management.md (100%) rename {docs => website/docs}/planning/metrics.md (100%) rename {docs => website/docs}/planning/services.md (100%) rename {docs => website/docs}/roadmap.md (100%) rename {docs => website/docs}/status_updates.md (100%) create mode 100644 website/docusaurus.config.js create mode 100644 website/package-lock.json create mode 100644 website/package.json create mode 100644 website/sidebars.js create mode 100644 website/src/css/custom.css create mode 100644 website/src/pages/index.js create mode 100644 website/src/pages/styles.module.css create mode 100644 website/static/.nojekyll create mode 100644 website/static/img/favicon.ico create mode 100644 website/static/img/logo.svg create mode 100644 website/static/img/undraw_docusaurus_mountain.svg create mode 100644 website/static/img/undraw_docusaurus_react.svg create mode 100644 website/static/img/undraw_docusaurus_tree.svg diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 0000000000..b2d6de3062 --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,20 @@ +# Dependencies +/node_modules + +# Production +/build + +# Generated files +.docusaurus +.cache-loader + +# Misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/website/README.md b/website/README.md new file mode 100644 index 0000000000..ee0ccc9d18 --- /dev/null +++ b/website/README.md @@ -0,0 +1,33 @@ +# Website + +This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. + +### Installation + +``` +$ yarn +``` + +### Local Development + +``` +$ yarn start +``` + +This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. + +### Build + +``` +$ yarn build +``` + +This command generates static content into the `build` directory and can be served using any static contents hosting service. + +### Deployment + +``` +$ GIT_USER= USE_SSH=true yarn deploy +``` + +If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. diff --git a/website/babel.config.js b/website/babel.config.js new file mode 100644 index 0000000000..e00595dae7 --- /dev/null +++ b/website/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/website/blog/2019-05-28-hola.md b/website/blog/2019-05-28-hola.md new file mode 100644 index 0000000000..5552da124f --- /dev/null +++ b/website/blog/2019-05-28-hola.md @@ -0,0 +1,11 @@ +--- +id: hola +title: Hola +author: Gao Wei +author_title: Docusaurus Core Team +author_url: https://github.com/wgao19 +author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4 +tags: [hola, docusaurus] +--- + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/website/blog/2019-05-29-hello-world.md b/website/blog/2019-05-29-hello-world.md new file mode 100644 index 0000000000..3b33193938 --- /dev/null +++ b/website/blog/2019-05-29-hello-world.md @@ -0,0 +1,17 @@ +--- +id: hello-world +title: Hello +author: Endilie Yacop Sucipto +author_title: Maintainer of Docusaurus +author_url: https://github.com/endiliey +author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4 +tags: [hello, docusaurus] +--- + +Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://v2.docusaurus.io/). + + + +This is a test post. + +A whole bunch of other information. diff --git a/website/blog/2019-05-30-welcome.md b/website/blog/2019-05-30-welcome.md new file mode 100644 index 0000000000..3b5affedce --- /dev/null +++ b/website/blog/2019-05-30-welcome.md @@ -0,0 +1,13 @@ +--- +id: welcome +title: Welcome +author: Yangshun Tay +author_title: Front End Engineer @ Facebook +author_url: https://github.com/yangshun +author_image_url: https://avatars0.githubusercontent.com/u/1315101?s=400&v=4 +tags: [facebook, hello, docusaurus] +--- + +Blog features are powered by the blog plugin. Simply add files to the `blog` directory. It supports tags as well! + +Delete the whole directory if you don't want the blog features. As simple as that! diff --git a/docs/apiDefinition.json b/website/docs/apiDefinition.json similarity index 100% rename from docs/apiDefinition.json rename to website/docs/apiDefinition.json diff --git a/docs/cf-api-v2-usage.md b/website/docs/cf-api-v2-usage.md similarity index 100% rename from docs/cf-api-v2-usage.md rename to website/docs/cf-api-v2-usage.md diff --git a/docs/cf-api-v3.md b/website/docs/cf-api-v3.md similarity index 100% rename from docs/cf-api-v3.md rename to website/docs/cf-api-v3.md diff --git a/docs/cf-entity-scaling.md b/website/docs/cf-entity-scaling.md similarity index 100% rename from docs/cf-entity-scaling.md rename to website/docs/cf-entity-scaling.md diff --git a/docs/access.md b/website/docs/deploy/access.md similarity index 97% rename from docs/access.md rename to website/docs/deploy/access.md index e55688dc5c..81ffe6a171 100644 --- a/docs/access.md +++ b/website/docs/deploy/access.md @@ -1,4 +1,8 @@ -# Accessing Stratos +--- +id: access +title: Accessing Stratos +sidebar_label: Accessing Stratos +--- Depending on the deployment mode, you may require access to an UAA. Stratos also has the option to configure a local user account which removes the need for a UAA in non-Cloud Foundry deployments. diff --git a/deploy/all-in-one/README.md b/website/docs/deploy/all-in-one.md similarity index 97% rename from deploy/all-in-one/README.md rename to website/docs/deploy/all-in-one.md index a9d392934e..b886200088 100644 --- a/deploy/all-in-one/README.md +++ b/website/docs/deploy/all-in-one.md @@ -1,4 +1,8 @@ -# Deploying with the All-In-One Docker Container +--- +id: all-in-one +title: Deploying with the All-In-One Docker Container +sidebar_label: Deploy as Docker Container +--- The all-in-one container sets up the Stratos components in a single container. diff --git a/deploy/cloud-foundry/README.md b/website/docs/deploy/cloud-foundry.md similarity index 94% rename from deploy/cloud-foundry/README.md rename to website/docs/deploy/cloud-foundry.md index d06e09234e..c024ff244d 100644 --- a/deploy/cloud-foundry/README.md +++ b/website/docs/deploy/cloud-foundry.md @@ -1,4 +1,8 @@ -# Deploying as a Cloud Foundry Application +--- +id: cloud-foundry +title: Deploying as a Cloud Foundry Application +sidebar_label: Deploy on Cloud Foundry +--- ## Deployment Steps @@ -6,8 +10,8 @@ The quickest way to install Stratos is to deploy it as a Cloud Foundry applicati You can do it in two ways: -1. [Deploy Stratos from source](#Deploy-Stratos-from-source) -1. [Deploy Stratos from docker image](#Deploy-Stratos-from-docker-image) +1. [Deploy Stratos from source](#deploy-stratos-from-source) +1. [Deploy Stratos from docker image](#deploy-stratos-from-docker-image) You will then be able to open a web browser and navigate to the console URL: @@ -15,12 +19,12 @@ You will then be able to open a web browser and navigate to the console URL: Where `` is the default domain configured for your Cloud Foundry cluster. -To login use the following credentials detailed [here](../../docs/access.md). +To login use the following credentials detailed [here](access.md). If you run into issues, please refer to the [Troubleshooting Guide](#troubleshooting) below. > The console will pre-configure the host Cloud Foundry endpoint. No other CF instance should be registered unless the instructions in - the section [Associate Cloud Foundry database service](#Associate-Cloud-Foundry-database-service) are followed. + the section [Associate Cloud Foundry database service](#associate-cloud-foundry-database-service) are followed. All other deployment methods (helm, docker all-in-one, etc) allow the registration of multiple CF instances by default. Note: @@ -61,7 +65,7 @@ applications: This will set the the UAA client and UAA secret used to invite users for the default CF only. -See the [invite users guide](../../docs/invite-user-guide.md) for more information about user invites in Stratos. +See the [invite users guide](../guides/admin/invite-user-guide) for more information about user invites in Stratos. #### Use of the Default Embedded SQLite Database @@ -80,7 +84,7 @@ git checkout tags/stable -b stable cf push ``` -If the cf push exceeds the time allowed see the instructions [here](#Pre-building-the-UI) +If the cf push exceeds the time allowed see the instructions [here](#pre-building-the-ui) #### Pre-building the UI @@ -123,7 +127,7 @@ cf push console -o splatform/stratos:stable -m 128M -k 384M Alternatively cf push using a manifest -- download [manifest-docker.yml](../../manifest-docker.yml) or create your own manifest file: +- download [manifest-docker.yml](../../../manifest-docker.yml) or create your own manifest file: ```yaml applications: - name: console @@ -155,7 +159,7 @@ applications: When SSO Login is enabled, Stratos will also auto-connect to the Cloud Foundry it is deployed in using the token obtained during the SSO Login flow. -For more information - see [Single-Sign On](../../docs/sso.md). +For more information - see [Single-Sign On](../guides/admin/sso). ## Troubleshooting diff --git a/deploy/kubernetes/README.md b/website/docs/deploy/kubernetes.md similarity index 91% rename from deploy/kubernetes/README.md rename to website/docs/deploy/kubernetes.md index 6d8d583560..23b74f58f1 100644 --- a/deploy/kubernetes/README.md +++ b/website/docs/deploy/kubernetes.md @@ -1,4 +1,8 @@ -# Deploying in Kubernetes +--- +id: kubernetes +title: Deploying in Kubernetes +sidebar_label: Deploy on Kubernetes +--- Stratos can be deployed to Kubernetes using [Helm](https://github.com/kubernetes/helm). diff --git a/docs/invite-user-guide.md b/website/docs/guides/admin/invite-user-guide.md similarity index 98% rename from docs/invite-user-guide.md rename to website/docs/guides/admin/invite-user-guide.md index 58f9283f96..92aa2d7705 100644 --- a/docs/invite-user-guide.md +++ b/website/docs/guides/admin/invite-user-guide.md @@ -1,4 +1,8 @@ -# Invite User Guide +--- +id: invite-user-guide +title: Invite User Guide +sidebar_label: Invite Users +--- Stratos provides a way for Cloud Foundry administrators and organization managers to invite users to an organization or space. diff --git a/docs/sso.md b/website/docs/guides/admin/sso.md similarity index 97% rename from docs/sso.md rename to website/docs/guides/admin/sso.md index 8f9f747c67..f96f69b1f7 100644 --- a/docs/sso.md +++ b/website/docs/guides/admin/sso.md @@ -1,4 +1,8 @@ -# Single Sign On +--- +id: sso +title: Single Sign On +sidebar_label: Configure Single Sign On +--- By default, Stratos will authenticate against a UAA using username and password, for both logging into Stratos and when connecting Cloud Foundry endpoints. diff --git a/docs/contributing.md b/website/docs/guides/contribution/contributing.md similarity index 97% rename from docs/contributing.md rename to website/docs/guides/contribution/contributing.md index 2aeca4f947..0ecadf7a57 100644 --- a/docs/contributing.md +++ b/website/docs/guides/contribution/contributing.md @@ -1,4 +1,8 @@ -# Contributing to Stratos UI +--- +id: contributing +title: Contributing to Stratos UI +sidebar_label: Contributing to Stratos UI +--- ## Reporting issues diff --git a/docs/issue_template.md b/website/docs/guides/contribution/issue_template.md similarity index 77% rename from docs/issue_template.md rename to website/docs/guides/contribution/issue_template.md index dffaf1add3..b7db21a17a 100644 --- a/docs/issue_template.md +++ b/website/docs/guides/contribution/issue_template.md @@ -1,8 +1,10 @@ +--- +id: issue_template +title: Issue report template +sidebar_label: Issue report template +--- + -### Stratos Version - - - ### Frontend Deployment type @@ -25,11 +27,11 @@ ### Actual behaviour -### Steps to reproduce the behaviour +### Steps to reproduce the behavior ### Log output covering before error and any error statements ``` -Insert your log here +Insert log hereCopy ``` diff --git a/docs/pull_request_template.md b/website/docs/guides/contribution/pull_request_template.md similarity index 91% rename from docs/pull_request_template.md rename to website/docs/guides/contribution/pull_request_template.md index e651b7af6d..11568562b2 100644 --- a/docs/pull_request_template.md +++ b/website/docs/guides/contribution/pull_request_template.md @@ -1,3 +1,9 @@ +--- +id: pull_request_template +title: Pull request template for contributions to Stratos +sidebar_label: PR template +--- + ## Description diff --git a/docs/customizing.md b/website/docs/guides/customization/customizing.md similarity index 99% rename from docs/customizing.md rename to website/docs/guides/customization/customizing.md index e81f9ebabd..58780c1914 100644 --- a/docs/customizing.md +++ b/website/docs/guides/customization/customizing.md @@ -1,4 +1,8 @@ -# Customizing Stratos +--- +id: customizing +title: Customizing Stratos +sidebar_label: Customizing Stratos +--- Stratos provides a mechanism for customization - the following customizations are currently supported: diff --git a/docs/developers-guide-e2e-tests.md b/website/docs/guides/developers/developers-guide-e2e-tests.md similarity index 98% rename from docs/developers-guide-e2e-tests.md rename to website/docs/guides/developers/developers-guide-e2e-tests.md index dbac463428..4ae87a94de 100644 --- a/docs/developers-guide-e2e-tests.md +++ b/website/docs/guides/developers/developers-guide-e2e-tests.md @@ -1,4 +1,8 @@ -# E2E Tests +--- +id: developers-guide-e2e-tests +title: E2E Tests +sidebar_label: E2E Tests +--- The Stratos E2E test suite exercises the Stratos UI using protractor/web-driver. diff --git a/docs/developers-guide-env-tech.md b/website/docs/guides/developers/developers-guide-env-tech.md similarity index 98% rename from docs/developers-guide-env-tech.md rename to website/docs/guides/developers/developers-guide-env-tech.md index 7e22201b90..76918f9fba 100644 --- a/docs/developers-guide-env-tech.md +++ b/website/docs/guides/developers/developers-guide-env-tech.md @@ -1,4 +1,8 @@ -# Stratos Tech + Developer Environment +--- +id: developers-guide-env-tech +title: Stratos Tech + Developer Environment +sidebar_label: Dev Environment +--- ## ES6 diff --git a/docs/developers-guide.md b/website/docs/guides/developers/developers-guide.md similarity index 99% rename from docs/developers-guide.md rename to website/docs/guides/developers/developers-guide.md index 5491b1b705..f7163b1f20 100644 --- a/docs/developers-guide.md +++ b/website/docs/guides/developers/developers-guide.md @@ -1,5 +1,8 @@ - -# Developing the Stratos Console +--- +id: developers-guide +title: Developing the Stratos Console +sidebar_label: Stratos Development +--- 1. [Introduction](#introduction) 1. [Frontend Development](#frontend-development) diff --git a/docs/backend-plugins.md b/website/docs/guides/extensions/backend-plugins.md similarity index 98% rename from docs/backend-plugins.md rename to website/docs/guides/extensions/backend-plugins.md index 4aba144c68..33b64f8a05 100644 --- a/docs/backend-plugins.md +++ b/website/docs/guides/extensions/backend-plugins.md @@ -1,4 +1,8 @@ -# Backend Plugins +--- +id: backend-plugins +title: Backend Plugins +sidebar_label: Backend +--- This document provides a brief outline for extending the Stratos backend (Jetstream). diff --git a/docs/extensions.md b/website/docs/guides/extensions/frontend-extensions.md similarity index 84% rename from docs/extensions.md rename to website/docs/guides/extensions/frontend-extensions.md index 918c25df18..cf70417e58 100644 --- a/docs/extensions.md +++ b/website/docs/guides/extensions/frontend-extensions.md @@ -1,4 +1,8 @@ -# Front-end Extensions +--- +id: frontend-extensions +title: Front-end Extensions +sidebar_label: Frontend +--- An example illustrating the various front-end extension points of Stratos is included in the folder `examples/custom-src`. @@ -81,20 +85,7 @@ For example: The approach for all of these is the same: 1. Create a new component that will provide the tab contents -2. Ensure that your component is declared with the `ExtensionService` in the imports of your custom module, for example: -``` - @NgModule({ - imports: [ - ExtensionService.declare([ - ExtensionComponent, - ]) - ], - declarations: [ - ExtensionComponent - ] - }) -``` - +2. Ensure that your component is included in the `EntryComponent` section of your custom module 2. Decorate the component with the `StratosTab` decorator, for example: ``` @@ -107,13 +98,13 @@ The approach for all of these is the same: Where: -- indicates where the tab should appear and can be: +- < TYPE > indicates where the tab should appear and can be: - StratosTabType.Application - Application View - StratosTabType.CloudFoundry - Cloud Foundry view - StratosTabType.CloudFoundryOrg - Cloud Foundry Org view - StratosTabType.CloudFoundrySpace - Cloud Foundry Space view --