Skip to content
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

Fix and update customization docs #4478

Merged
merged 44 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2989e8b
Fixes #4335: Create Stratos static web site with better documentation
vvaradhan Jul 13, 2020
45cd11c
1) Re-organize some more existing doc files.
vvaradhan Jul 13, 2020
d26b948
Landing Page WIP
nwmac Jul 20, 2020
7181236
Documentation tweaks
nwmac Jul 20, 2020
5b394a0
Use better action names
nwmac Jul 20, 2020
bcb5529
More visual improvements to landing page
nwmac Jul 20, 2020
5741bf9
More doc and landing page improvements
nwmac Jul 22, 2020
7383f69
Remove publish workflow for now
nwmac Jul 22, 2020
208baa0
Typo fix
nwmac Jul 22, 2020
fff9924
Moer documentation improvements
nwmac Jul 22, 2020
2bbb535
Remove extra title from helm doc
nwmac Jul 22, 2020
388245c
Fix script when used from npm
nwmac Jul 22, 2020
796729c
Improve layout on mobile devices
nwmac Jul 22, 2020
17aaf09
More documentation improvements
nwmac Jul 22, 2020
3f093d4
Fix typo
nwmac Jul 22, 2020
fd17825
Merge downstream (#4441)
richard-cox Jul 20, 2020
dd34fc5
Show all favorites for an endpoint favorite if there is only one (#4440)
nwmac Jul 20, 2020
244f9fe
Merge downstream - JSON Viewer with dark mode & Header Fixes (#4444)
richard-cox Jul 20, 2020
9c94d60
Fix issues with tests not running if build upload fails (#4453)
nwmac Jul 21, 2020
56f0389
Improve autoscaler e2e logging (#4456)
richard-cox Jul 21, 2020
a4e14c1
Fix check-e2e-pr.sh for pr's from other repos (#4459)
richard-cox Jul 21, 2020
560b524
Convert Client Secret Input Fields to `password` (#4455)
richard-cox Jul 21, 2020
17f4f11
Insecure tlsv10 and tlsv11 ciphers in Stratos UI, bsc#1173295 (#411) …
richard-cox Jul 21, 2020
de9fb7a
[Security] Bump codecov from 3.7.0 to 3.7.1 (#4457)
dependabot-preview[bot] Jul 21, 2020
85290ad
Bump lodash from 4.17.15 to 4.17.19 (#4452)
dependabot[bot] Jul 21, 2020
e3ae282
Website update: Wed 22 Jul 2020 21:55:00 BST
nwmac Jul 22, 2020
99bd6ad
Website update: Wed 22 Jul 2020 21:56:45 BST
nwmac Jul 22, 2020
71bf0ad
Website update: Wed 22 Jul 2020 21:58:22 BST
nwmac Jul 22, 2020
43ffaf6
Remove dist
nwmac Jul 22, 2020
fa55ff2
FIx deploy script to remove old files
nwmac Jul 22, 2020
7147c81
Moer tidy ups
nwmac Jul 23, 2020
c3c9c73
Add CNAME file when publishing
nwmac Jul 23, 2020
67b08dc
Add talks doc
nwmac Jul 23, 2020
f659099
* Fix broken links due to reorganization of documents
vvaradhan Jul 24, 2020
b9bdeda
* Fix Getting Started broken link in page footer
vvaradhan Jul 24, 2020
fbd53ae
Only publish if there are website changes
nwmac Jul 24, 2020
ca1e052
Merge remote-tracking branch 'origin/master' into website
nwmac Jul 24, 2020
a47e5dd
Remove old doc
nwmac Jul 24, 2020
e4785a6
Publish website on merge
nwmac Jul 24, 2020
8b9dc27
Apply new theming process to acme example
richard-cox Jul 28, 2020
092bf5f
First pass at customization docs, most of themeing done
richard-cox Jul 28, 2020
993a137
Final pass at customization docs
richard-cox Jul 29, 2020
1de99e3
Merge remote-tracking branch 'origin/master' into customization-docs
richard-cox Aug 7, 2020
02fc006
Merge fixes
richard-cox Aug 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moer documentation improvements
  • Loading branch information
nwmac committed Jul 22, 2020
commit fff9924511da007dc10201781c452f6acc6cdd2f
409 changes: 409 additions & 0 deletions deploy/kubernetes/console/README.md

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion website/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

pushd $DIR > /dev/null
echo "Building website ..."
#npm run build

# Copy helm chart readme
cat << EOF > ./docs/deploy/kubernetes/install.md
---
id: helm-installation
title: Deploying Using Helm
sidebar_label: Deploy using Helm
---
EOF

# Concatentate the helm chart readme file
cat ${DIR}/../deploy/kubernetes/console/README.md >> ./docs/deploy/kubernetes/install.md
npm run build


# Build only
if [ "$1" == "-b" ]; then
exit 0
fi

msg="Website update: $(date)"

Expand Down
14 changes: 12 additions & 2 deletions website/docs/deploy/all-in-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ The all-in-one container sets up the Stratos components in a single container.

## Requirements:

You will need to have installed Docker, see:
You will need to have installed Docker, see [Docker Installation Documentation](https://docs.docker.com/engine/installation/).

* [Docker](https://docs.docker.com/engine/installation/)
## Quick Start

Run Stratos in Docker locally:

```
$ docker run -p 4443:443 splatform/stratos:latest
```

Once that has finished, you can then access Stratos by visiting [https://localhost:4443](https://localhost:4443).

You can configure a local admin account and set the password for future logins.

## Note regarding the Stratos Session Store Secret

Expand Down
58 changes: 58 additions & 0 deletions website/docs/deploy/cloud-foundry/cf-troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Troubleshooting Cloud Foundry Deployment
sidebar_label: Troubleshooting
---

## Creating logs for recent deployments
To create a log file of the push
```
cf push | tee cfpush.log
```

To create a log file of recent console output
```
cf logs console --recent | tee cfconsole.log
```
>**NOTE** If the name of the application has been changed from `console` in the manifest file please also change the name in the logs statement

## Turning on backend debugging logs

The `LOG_LEVEL` environment variable controls the backend logs

```
cf set-env console LOG_LEVEL debug
cf restart console
cf logs console
```

would output more debugging output such as

```
2018-10-24T14:47:36.91+0200 [RTR/1] OUT console.my.domain - [2018-10-24T12:47:36.850+0000] "GET /pp/v1/-o1F0L956QhAIK7R56Uc1lMh5L4/apps/3ddc0bc6-a645-4449-9d1b-6fe86146cf61/ssh/0 HTTP/1.1" 500 0 0 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0" "10.228.194.8:42182" "192.168.35.91:61044" x_forwarded_for:"10.228.194.8" x_forwarded_proto:"https" vcap_request_id:"182dddeb-d877-4d58-45f7-0bd886d1caf6" response_time:0.066925325 app_id:"0ba408ef-d0e6-4ab8-96bb-0bc078b8d8fb" app_index:"0" x_b3_traceid:"d166622a0d612fea" x_b3_spanid:"d166622a0d612fea" x_b3_parentspanid:"-"
2018-10-24T14:47:36.91+0200 [RTR/1] OUT
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] sessionCleanupMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] errorLoggingMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT INFO[Wed Oct 24 12:47:36 UTC 2018] Not redirecting this request
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSessionValue
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] setStaticContentHeadersMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] urlCheckMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] sessionMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSessionValue
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] xsrfMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] GetCNSIRecord
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] Find
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] decryptToken
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] Decrypt
[...]
```

## Application Security Groups

If you have problems when deploying Stratos as a Cloud Foundry application, check that the Application Security Group you have will allow Stratos to communicate with the Cloud Foundry API.

For information on the default ASGs, see [here](https://docs.cloudfoundry.org/concepts/asg.html#default-asg).

To configure a new ASG for the organization and space that are using Stratos, first create a new ASG definition, for example:
Original file line number Diff line number Diff line change
Expand Up @@ -161,62 +161,6 @@ When SSO Login is enabled, Stratos will also auto-connect to the Cloud Foundry i

For more information - see [Single-Sign On](../guides/admin/sso).

## Troubleshooting

### Creating logs for recent deployments
To create a log file of the push
```
cf push | tee cfpush.log
```
To create a log file of recent console output
```
cf logs console --recent | tee cfconsole.log
```
>**NOTE** If the name of the application has been changed from `console` in the manifest file please also change the name in the logs statement
### Turning on backend debugging logs
The `LOG_LEVEL` environment variable controls the backend logs
```
cf set-env console LOG_LEVEL debug
cf restart console
cf logs console
```
would output more debugging output such as
```
2018-10-24T14:47:36.91+0200 [RTR/1] OUT console.my.domain - [2018-10-24T12:47:36.850+0000] "GET /pp/v1/-o1F0L956QhAIK7R56Uc1lMh5L4/apps/3ddc0bc6-a645-4449-9d1b-6fe86146cf61/ssh/0 HTTP/1.1" 500 0 0 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0" "10.228.194.8:42182" "192.168.35.91:61044" x_forwarded_for:"10.228.194.8" x_forwarded_proto:"https" vcap_request_id:"182dddeb-d877-4d58-45f7-0bd886d1caf6" response_time:0.066925325 app_id:"0ba408ef-d0e6-4ab8-96bb-0bc078b8d8fb" app_index:"0" x_b3_traceid:"d166622a0d612fea" x_b3_spanid:"d166622a0d612fea" x_b3_parentspanid:"-"
2018-10-24T14:47:36.91+0200 [RTR/1] OUT
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] sessionCleanupMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] errorLoggingMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT INFO[Wed Oct 24 12:47:36 UTC 2018] Not redirecting this request
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSessionValue
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] setStaticContentHeadersMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] urlCheckMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] sessionMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSessionValue
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] getSession
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] xsrfMiddleware
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] GetCNSIRecord
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] Find
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] decryptToken
2018-10-24T14:47:36.85+0200 [APP/PROC/WEB/0] OUT DEBU[Wed Oct 24 12:47:36 UTC 2018] Decrypt
[...]
```
### Application Security Groups
If you have problems when deploying Stratos UI as a Cloud Foundry application, check that the Application Security Group you have will allow Stratos to communicate with the Cloud Foundry API.
For information on the default ASGs, see [here](https://docs.cloudfoundry.org/concepts/asg.html#default-asg).
To configure a new ASG for the organization and space that are using Stratos, first create a new ASG definition, for example:
```
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
id: helm-installation
title: Stratos Installation
title: Deploying Using Helm
sidebar_label: Deploy using Helm
---
# Stratos

Stratos is an Open Source Web-based Management console for Cloud Foundry. It allows users and administrators to both manage applications running in the Cloud Foundry cluster and perform cluster management tasks.

Expand Down Expand Up @@ -260,7 +261,7 @@ You will also need to specify:
- `console.mariadb.port` as the port of the external MariaDB database server (defaults to 3306)
- `console.mariadb.tls` as the TLS mode (default is `false,` use `true` for a TLS connection to the database server)
- `console.mariadb.database` as the name of the database
- `console.mariadb.user` as the username to connect to the database server
- `console.mariadb.user` as the username to connect to the database server
- `console.mariadb.userPassword` as the password to connect to the database server

When using an external database server, Stratos expects that you have:
Expand Down Expand Up @@ -411,4 +412,3 @@ kubectl create -f storageclass.yaml
```

See [Storage Class documentation](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/) for more information.

31 changes: 30 additions & 1 deletion website/docs/deploy/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,33 @@ Stratos can be deployed in the following environments:

> Note: that not all features are enabled in every environment - the Kubernetes deployment supports all features, but Cloud Foundry and Docker deployments do not support some features.

> Note: Some features are marked as 'Tech Preview' and are only available if tech preview features are enabled when deploying.
> Note: Some features are marked as 'Tech Preview' and are only available if tech preview features are enabled when deploying.

## Deployed in Cloud Foundry as an application

In this case, Stratos is deployed in a manner optimized for the management of a single Cloud Foundry instance. The 'Endpoints Dashboard' that allows multiple Cloud Foundry endpoints to be registered is not deployed. An extra component is deployed that detects that the Console is running as Cloud Foundry which does the following:

- Automatically detects the Cloud Foundry endpoint and located the UAA Endpoint to use for authentication
- Authenticates directly against the UAA for the Clound Foundry where the Console is deployed and assumes that Cloud Foundry admins are also Console admins (the UAA Scope 'cloud_controller.admin' is used to identify admins)
- Uses a SQLite database rather than Postgres
- Automatically connects to the Cloud Foundry endpoint when a user logs in to simplify the user flow when using the Console in this case

In this case, the front-end web application static resources are served by the API Server back-end rather than a separate web server.

By defaut, a non-persistent SQLite database is used - by automatically registering the cloud foundry endpoint and connecting to it on login, all data stored in the database can be treated as ephimeral, since it will be re-created next time a user logs in. Cloud Foundry Session Affinity is used to ensure that when scaling up the Console Application to multiple instances, the user is also directed to the instance which will know about them and their endpoints (since each Application instance will have its own local SQLite store).

Alternatively, Stratos can be configured [with a persistent Cloud Foundry database service](deploy/cloud-foundry/db-migration), which enables features requiring persistence such as user favorites.

## Deployed in Kubernetes

In this case, a Helm chart is used to deploy the Console into a Kubernetes environment.

At the outer-level there are two services - the external service that provides the Console itself and a private service that provides a Postgres DB to the Console service.

The Console service is provided by a deployment consisting of two containers, one providing the static front-end web application resources, served by an nginx instance, the other providing the API Server back-end.

## Deployed in Docker using a single container

In this case, a single Docker image is run in a container that hosts all services together. SQLite is used as the database, so any endpoint metadata registered is lost when the container is destroyed.

This deployment is recommended only for trying out the Console and for development.
2 changes: 1 addition & 1 deletion website/docs/deploy/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: troubleshooting
title: Troubleshooting
title: General Troubleshooting
sidebar_label: Troubleshooting
---

Expand Down
6 changes: 3 additions & 3 deletions website/docs/extensions/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Tabs can be added to the following views in Stratos:

For example:

![Example Application tab extension](images/extensions/app-tab-example.png)
![Example Application tab extension](../images/extensions/app-tab-example.png)

The approach for all of these is the same:

Expand Down Expand Up @@ -120,7 +120,7 @@ Actions can be added to the following views in Stratos:

An action is a icon button that appears at the top-right of a View. For example:

![Example Application action extension](images/extensions/appwall-action-example.png)
![Example Application action extension](../images/extensions/appwall-action-example.png)

The approach for all of these is the same:

Expand Down Expand Up @@ -267,5 +267,5 @@ export class CustomModule { }

You should now be able to run Stratos locally and see this new tab on the application page for an application - as illustrated below:

![Example tab extension](images/extensions/tab-example.png)
![Example tab extension](../images/extensions/tab-example.png)

12 changes: 1 addition & 11 deletions website/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For Cloud Foundry, it allows users and administrators to both manage application

For Kubernetes, it provides Developers with views of their Kubernetes resources, the ability to vide and deploy Helm Charts and view Workloads.

![Stratos Application view](images/screenshots/app-summary.png)
![Stratos Application view](../images/screenshots/app-summary.png)

## Quick Start

Expand All @@ -37,12 +37,8 @@ Please see our [Troubleshooting](guides/troubleshooting/troubleshooting) page.

## Further Reading

Take a look at the [Feature Set](features.md) for details on the feature set that Stratos provides.

Get an [Overview](overview.md) of Stratos, its components and the different ways in which it can be deployed.

Take a look at the [Development Roadmap](roadmap.md) to see where we are heading. We update our status page each week to summarize what we are working on - see the [Status Page](status_updates.md).

Browse through features and issues in the project's [issues](https://github.com/cloudfoundry/stratos/issues) page.

What kind of code is in Stratos? We've integrated [Code Climate](https://codeclimate.com) for some code quality and maintainability metrics. Take a stroll around the [project page](https://codeclimate.com/github/cloudfoundry/stratos)
Expand All @@ -59,12 +55,6 @@ We have a channel (#stratos) on the Cloud Foundy Slack where you can ask questio

You can join the Cloud Foundry Slack here - https://slack.cloudfoundry.org/ - and then join the #stratos channel.

## Acknowledgements

Tested with Browserstack

<a href="https://www.browserstack.com"><img width="240px" src="docs/images/Browserstack-logo.svg" alt="Browserstack" /></a>

## License

The work done has been licensed under Apache License 2.0. The license file can be found [here](LICENSE).
Expand Down
Loading