Merge branch 'main' of github.com:openziti/zrok
43
.github/workflows/deploy-doc-site.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Deploy Doc Site
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
name: setup npm
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: "npm"
|
||||
cache-dependency-path: website/package-lock.json
|
||||
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
working-directory: website
|
||||
|
||||
# Popular action to deploy to GitHub Pages:
|
||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Build output to publish to the `gh-pages` branch:
|
||||
publish_dir: ./website/build
|
||||
# The following lines assign commit authorship to the official
|
||||
# GH-Actions bot for deploys to `gh-pages` branch:
|
||||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
|
||||
# The GH actions bot is used by default if you didn't specify the two fields.
|
||||
# You can swap them out with your own user credentials.
|
||||
#user_name: github-actions[bot]
|
||||
#user_email: 41898282+github-actions[bot]@users.noreply.github.com
|
22
.gitignore
vendored
@ -3,3 +3,25 @@
|
||||
*.db
|
||||
automated-release-build
|
||||
etc/dev.yml
|
||||
|
||||
# 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*
|
||||
|
||||
|
27
BUILD.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Build
|
||||
|
||||
## zrok
|
||||
|
||||
At this time, building `zrok` is pretty straightforward. You will require `node` v16+ to be installed in order to complete
|
||||
the build as well as `go`.
|
||||
|
||||
To build, follow these steps:
|
||||
* clone the repository
|
||||
* change to the existing `ui` folder
|
||||
* run `npm install`
|
||||
* run `npm run build` (this process takes a while the first time and only needs to be run if the ui changes)
|
||||
* change back to the checkout root
|
||||
* build the go project normally: `go build -o dist ./...`
|
||||
|
||||
## Documentation/Website
|
||||
|
||||
The doc website is based on [Docusaurus](https://docusaurus.io/) which in turn will require `npm` to be installed. `yarn`
|
||||
is another tool which is used to start the Docusaurus dev site.
|
||||
|
||||
To build the doc:
|
||||
* cd to `website`
|
||||
* run `yarn install` (usually only needed once)
|
||||
* run `yarn start` to start the development server (make sure port 3000 is open or change the port)
|
||||
|
||||
The development server infrequently behaves differently than the 'production' build. If you must use the 'production'
|
||||
build it is slower, but you can accomplish that with `yarn build`.
|
17
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Code of Conduct
|
||||
|
||||
All open source projects managed by NetFoundry share a common [code of
|
||||
conduct](https://netfoundry.github.io/policies/CODE_OF_CONDUCT.html) which all contributors are expected to follow.
|
||||
Please be sure you read, understand and adhere to the thoughts expressed therein.
|
||||
|
||||
Individuals acting in any way that is considered in violation of the Code of Conduct will receive corrective actions
|
||||
appropriate for the violation. It is possible to act in ways which technically do not violate the Code of Conduct but
|
||||
are clearly against the spirit of the project. These situations will also be considered on a case by case basis and if
|
||||
necessary the Code of Conduct will be revised accordingly and approrpiate notifications will be made to the community
|
||||
and to the violator.
|
||||
|
||||
## Violations
|
||||
|
||||
Contributors violating the Code of Conduct will receive public notification of the violation. Contined violations or
|
||||
aggregious violations of the Code of Conduct will result in the contributor being removed from the contributors list as
|
||||
well as further contributions being declined.
|
6
CONTRIBUTING.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Contributing
|
||||
|
||||
NetFoundry welcomes all and any contributions. All open source projects managed by NetFoundry share a common
|
||||
[guide for contributions](https://netfoundry.github.io/policies/CONTRIBUTING.html).
|
||||
|
||||
If you are eager to contribute to a NetFoundry-managed open source project please read and act accordingly.
|
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2019 NetFoundry, Inc.
|
||||
|
||||
Licensed 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.
|
17
README.md
@ -1,6 +1,6 @@
|
||||
![zrok](docs/images/zrok.png)
|
||||
|
||||
`zrok` is a next-generation sharing platform built on top of [Ziti](https://docs.openziti.io), a programmable zero-trust network overlay. `zrok` is a _Ziti Native Application_.
|
||||
`zrok` is a next-generation sharing platform built on top of [OpenZiti](https://docs.openziti.io), a programmable zero-trust network overlay. `zrok` is an _OpenZiti Native Application_.
|
||||
|
||||
`zrok` facilitates sharing resources both publicly and privately, exposing them to an audience you can easily control.
|
||||
|
||||
@ -24,7 +24,7 @@ You can be up and sharing using the `zrok.io` service in minutes. Here is a syno
|
||||
|
||||
* `zrok share` to share resources immediately, simply and securely
|
||||
|
||||
See the [Concepts and Getting Started Guide](docs/v0.3_getting_started/getting_started.md) for a full overview.
|
||||
See the [Concepts and Getting Started Guide](docs/getting-started/getting_started.md) for a full overview.
|
||||
|
||||
## Self-Hosting
|
||||
|
||||
@ -32,6 +32,15 @@ See the [Concepts and Getting Started Guide](docs/v0.3_getting_started/getting_s
|
||||
|
||||
`zrok` is also designed to scale down to support extremely small deployments. Run an OpenZiti network with `zrok` layered on top of it on a Raspberry Pi!
|
||||
|
||||
The single `zrok` binary contains everything you need to operate `zrok` environments and also host your own service instances. Just add a Ziti network and you're up and running.
|
||||
The single `zrok` binary contains everything you need to operate `zrok` environments and also host your own service instances. Just add an OpenZiti network and you're up and running.
|
||||
|
||||
See the [v0.3 Quick Start](docs/v0.3_quickstart.md) for details on getting your own `zrok` service instance running. This builds on top of the [Ziti Quick Start](https://docs.openziti.io/docs/learn/quickstarts/network/) to have you running a `zrok` service instance in minutes.
|
||||
See the [Quick Start](docs/v0.3_quickstart.md) for details on getting your own `zrok` service instance running. This builds on top of the [OpenZiti Quick Start](https://docs.openziti.io/docs/learn/quickstarts/network/) to have you running a `zrok` service instance in minutes.
|
||||
|
||||
## Building
|
||||
|
||||
If you are interested in building `zrok` for yourself instead of using a released package, please rerfer to [BUILD.md](./BUIlD.md)
|
||||
|
||||
## Contributing
|
||||
|
||||
If you'd like to contribute back to `zrok`, that'd be great. Please see our [CONTRIBUTING.md](./CONTRIBUTING.md) page and
|
||||
abide by the [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
|
11
SECURITY.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Until v1.0.0 or higher is reached, only the most recent version is supported. After v1.0.0 a new version support statement will be released.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you have an issue that is not a sensitive security issue, please submit your issue via the GitHub issue tracker on either the main repository.
|
||||
|
||||
If you have a sensitive security issue or are unsure if it is sensitive, please email it to: security@openziti.org
|
9
docs/downloads.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
sidebar_position: 100
|
||||
---
|
||||
|
||||
# Downloads
|
||||
|
||||
Right now all `zrok` binaries are delivered from the release page at GitHub.
|
||||
|
||||
Head over to https://github.com/openziti/zrok/releases/latest to find the latest downloads.
|
7
docs/getting-started/_category_.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Getting Started",
|
||||
"position": 10,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# Getting Started with zrok v0.3
|
||||
# Getting Started with zrok
|
||||
|
||||
`zrok` is a next-generation sharing platform built on top of [Ziti][openziti], a programmable zero trust network overlay. `zrok` is a _Ziti Native Application_.
|
||||
`zrok` is a next-generation sharing platform built on top of [OpenZiti](https://github.com/openziti/ziti/stargazers), a programmable zero trust network overlay. `zrok` is an _OpenZiti Native Application_.
|
||||
|
||||
`zrok` facilitates sharing resources publicly and privately with an audience of your choosing.
|
||||
|
||||
@ -13,7 +13,7 @@ Let's take a look at how to get started with `zrok`.
|
||||
|
||||
## Downloading zrok
|
||||
|
||||
In order to use `zrok`, you will need a `zrok` executable. [Download][zrok-download] a binary executable package for your platform at https://zrok.io.
|
||||
In order to use `zrok`, you will need a `zrok` executable. [Download](../downloads.md) a binary executable package for your platform at https://zrok.io.
|
||||
|
||||
> Releases are also available from the `zrok` project repository on Github: https://github.com/openziti/zrok
|
||||
|
||||
@ -124,12 +124,12 @@ $ zrok invite
|
||||
|
||||
enter and confirm your email address...
|
||||
|
||||
> michael.quigley@netfoundry.io
|
||||
> michael.quigley@netfoundry.io
|
||||
> user@domain.com
|
||||
> user@domain.com
|
||||
|
||||
[ Submit ]
|
||||
|
||||
invitation sent to 'michael.quigley@netfoundry.io'!
|
||||
invitation sent to 'user@domain.com'!
|
||||
```
|
||||
|
||||
The `zrok invite` command presents a small form that allows you to enter (and then confirm) your email address. Tabbing to the `[ Submit ]` button will send the request to your configured `zrok` service.
|
||||
@ -156,7 +156,7 @@ Congratulations! Your `zrok` account is ready to go!
|
||||
|
||||
When your `zrok` account was created, the service generated a _secret token_ that identifies and authenticates in a single step. Protect your secret token as if it were a password, or an important account number; it's a _secret_, protect it.
|
||||
|
||||
When we left off you had downloaded, extracted, and configured your `zrok` environment. In order to use that environment with your account, you'll need to `enable` it. Enabling an environment generates a secure identity and the necessary underlying security policies with the Ziti network hosting the `zrok` service.
|
||||
When we left off you had downloaded, extracted, and configured your `zrok` environment. In order to use that environment with your account, you'll need to `enable` it. Enabling an environment generates a secure identity and the necessary underlying security policies with the OpenZiti network hosting the `zrok` service.
|
||||
|
||||
From the web console, click on your email address in the upper right corner of the header. That drop down menu contains an `Enable Your Environment` link. Click that link and a modal dialog will be shown like this:
|
||||
|
||||
@ -271,7 +271,7 @@ The `zrok` service will respond with the following:
|
||||
access your share with: zrok access private wvszln4dyz9q
|
||||
```
|
||||
|
||||
Rather than allowing access to your service through a public frontend, a _private_ share is only exposed to the underlying Ziti network, and can only be accessed using the `zrok access` command.
|
||||
Rather than allowing access to your service through a public frontend, a _private_ share is only exposed to the underlying OpenZiti network, and can only be accessed using the `zrok access` command.
|
||||
|
||||
The `zrok access private wvszln4dyz9q` command can be run by any `zrok` user, allowing them to create and bind a local HTTP listener, that allows for private access to your shared resources.
|
||||
|
||||
@ -366,7 +366,7 @@ You use the `zrok reserve` command to create _reserved shares_. Reserved shares
|
||||
|
||||
## Self-Hosting a Service Instance
|
||||
|
||||
Interested in self-hosting your own `zrok` service instance? See the [self-hosting guide](../v0.3_self_hosting_guide.md) for details.
|
||||
Interested in self-hosting your own `zrok` service instance? See the [self-hosting guide](../guides/v0.3_self_hosting_guide.md) for details.
|
||||
|
||||
[openziti]: https://docs.openziti.io/ "OpenZiti"
|
||||
[ zrok-download]: https://zrok.io "Zrok Download"
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
7
docs/guides/_category_.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Guides",
|
||||
"position": 30,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# Nginx Reverse Proxy for zrok
|
||||
|
||||
I'll assume you have a running zrok controller and public frontend and wish to front both with Nginx providing server TLS. Go back to [the self-hosting guide](v0.3_self_hosting_guide.md) if you still need to spin those up.
|
||||
I'll assume you have a running zrok controller and public frontend and wish to front both with Nginx providing server TLS. Go back to [Self-Hosting Guide](./v0.3_self_hosting_guide.md) if you still need to spin those up.
|
||||
|
||||
## Choose a Reverse Proxy Address
|
||||
|
@ -1,6 +1,6 @@
|
||||
# v0.3 Self-Hosting Guide
|
||||
# Self-Hosting Guide
|
||||
|
||||
## Ziti Quickstart
|
||||
## OpenZiti Quickstart
|
||||
|
||||
https://openziti.github.io/docs/quickstarts/network/
|
||||
|
||||
@ -56,7 +56,7 @@ The `endpoint` section defines where your `zrok` controller will listen.
|
||||
|
||||
The `store` section defines the local `sqlite3` database used by the controller.
|
||||
|
||||
The `ziti` section defines how the `zrok` controller should communicate with your Ziti installation. When using the Ziti quickstart, an administrative password will be generated; the `password` in the `ziti` stanza should reflect this password.
|
||||
The `ziti` section defines how the `zrok` controller should communicate with your OpenZiti installation. When using the OpenZiti quickstart, an administrative password will be generated; the `password` in the `ziti` stanza should reflect this password.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
@ -70,9 +70,9 @@ In my case, I've set:
|
||||
$ export ZROK_API_ENDPOINT=http://localhost:18080
|
||||
```
|
||||
|
||||
## Bootstrap Ziti for zrok
|
||||
## Bootstrap OpenZiti for zrok
|
||||
|
||||
With your Ziti network running and your configuration saved to a local file (I refer to mine as `etc/ctrl.yml` in these examples), you're ready to bootstrap the Ziti network.
|
||||
With your OpenZiti network running and your configuration saved to a local file (I refer to mine as `etc/ctrl.yml` in these examples), you're ready to bootstrap the Ziti network.
|
||||
|
||||
Use the `zrok admin bootstrap` command to bootstrap like this:
|
||||
|
||||
@ -105,7 +105,7 @@ $ zrok admin bootstrap etc/ctrl.yml
|
||||
[ 0.140] INFO main.(*adminBootstrap).run: bootstrap complete!
|
||||
```
|
||||
|
||||
The `zrok admin bootstrap` command configures the `zrok` database, the necessary Ziti identities, and all of the Ziti policies required to run a `zrok` service.
|
||||
The `zrok admin bootstrap` command configures the `zrok` database, the necessary OpenZiti identities, and all of the OpenZiti policies required to run a `zrok` service.
|
||||
|
||||
Notice this warning:
|
||||
|
||||
@ -169,15 +169,15 @@ This process uses the `frontend` identity created during the bootstrap process t
|
||||
|
||||
```bash
|
||||
$ zrok invite
|
||||
New Email: michael@quigley.com
|
||||
Confirm Email: michael@quigley.com
|
||||
invitation sent to 'michael@quigley.com'!
|
||||
New Email: user@domain.com
|
||||
Confirm Email: user@domain.com
|
||||
invitation sent to 'user@domain.com'!
|
||||
```
|
||||
|
||||
If you look at the console output from your `zrok` controller, you'll see a message like this:
|
||||
|
||||
```
|
||||
[ 238.168] INFO zrok/controller.(*inviteHandler).Handle: account request for 'michael@quigley.com' has registration token 'U2Ewt1UCn3ql'
|
||||
[ 238.168] INFO zrok/controller.(*inviteHandler).Handle: account request for 'user@domain.com' has registration token 'U2Ewt1UCn3ql'
|
||||
```
|
||||
|
||||
You can access your `zrok` controller's registration UI by pointing a web browser at:
|
||||
@ -191,7 +191,7 @@ The UI will ask you to set a password for your new account. Go ahead and do that
|
||||
After doing that, I see the following output in my controller console:
|
||||
|
||||
```
|
||||
[ 516.778] INFO zrok/controller.(*registerHandler).Handle: created account 'michael@quigley.com' with token 'SuGzRPjVDIcF'
|
||||
[ 516.778] INFO zrok/controller.(*registerHandler).Handle: created account 'user@domain.com' with token 'SuGzRPjVDIcF'
|
||||
```
|
||||
|
||||
Keep track of the token listed above (`SuGzRPjVDIcF`). We'll use this to enable our shell for this `zrok` deployment.
|
BIN
docs/images/zrok_v0.1_overview.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
7
docs/network/_category_.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Network",
|
||||
"position": 60,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
}
|
||||
}
|
@ -1,13 +1,17 @@
|
||||
# zrok v0.1.x
|
||||
---
|
||||
sidebar_position: 0
|
||||
sidebar_label: What is zrok
|
||||
---
|
||||
# What is `zrok`
|
||||
|
||||
## What Is `zrok`?
|
||||
## Overview
|
||||
|
||||
`zrok` is a super-lightweight tool for providing on-demand access to dark, unreachable resources.
|
||||
The super-power of `zrok` is providing a single-step solution to creating ephemeral network connectivity. From an end-user perspective, `zrok` is a tool packaged as a single executable, which can be used as a "shim" to quickly create public endpoints for dark resources.
|
||||
|
||||
`zrok` is also a service (which can be self-hosted) and runs on top of any OpenZiti network. The service provides one or more listening endpoints (typically on the public internet), that are designed to dynamically expose endpoints (HTTP(S)-only, as of v0.1.x), as requested by the end-user `zrok` tooling.
|
||||
|
||||
`zrok` listening endpoints, and `zrok` terminating endpoints are typically used together to create the streamlined, ephemeral connectivity solution for dark services. But listening endpoints and the terminating endpoints can be used orthogonally, interoperating with other Ziti SDK clients.
|
||||
`zrok` listening endpoints, and `zrok` terminating endpoints are typically used together to create the streamlined, ephemeral connectivity solution for dark services. But listening endpoints and the terminating endpoints can be used orthogonally, interoperating with other OpenZiti SDK clients.
|
||||
|
||||
### The Primary Use Case
|
||||
|
||||
@ -31,7 +35,7 @@ $ zrok http http://localhost:3000
|
||||
http://d9121e7cdfd2dd2f.zrok.io/
|
||||
```
|
||||
|
||||
This URL can be shared with anyone, anywhere, allowing access to the developer's application as long as the developer is running the `zrok http` command. Simply ending that process will destroy all of the public access, and clean up the associated resources in the underlying Ziti environment.
|
||||
This URL can be shared with anyone, anywhere, allowing access to the developer's application as long as the developer is running the `zrok http` command. Simply ending that process will destroy all of the public access, and clean up the associated resources in the underlying OpenZiti environment.
|
||||
|
||||
## How Does `zrok` Work?
|
||||
|
||||
@ -49,11 +53,11 @@ When a new `zrok` user signs up for an account, they are issued a "secret token"
|
||||
When the user runs `zrok enable` from their shell, here's what happens:
|
||||
|
||||
1. The `zrok enable` client reaches out with an enable request to the `zrok` controller.
|
||||
2. The `zrok` controller creates a new Ziti identity for the environment and enrolls it.
|
||||
3. The `zrok` controller creates an edge router policy associating the new Ziti identity with `#all` edge routers.
|
||||
2. The `zrok` controller creates a new OpenZiti identity for the environment and enrolls it.
|
||||
3. The `zrok` controller creates an edge router policy associating the new OpenZiti identity with `#all` edge routers.
|
||||
4. The `zrok` controller returns the entire SDK configuration back to the `zrok enable` client.
|
||||
5. The `zrok enable` client then stores the Ziti identity along with a few other housekeeping details in the user's `~/.zrok` folder (we refer to this as `zrokdir`, conceptually in the code).
|
||||
6. With the Ziti identity and configuration details stored in the user's `zrokdir`, the user is then able to create any number of binding endpoints using the `zrok http` command.
|
||||
5. The `zrok enable` client then stores the OpenZiti identity along with a few other housekeeping details in the user's `~/.zrok` folder (we refer to this as `zrokdir`, conceptually in the code).
|
||||
6. With the OpenZiti identity and configuration details stored in the user's `zrokdir`, the user is then able to create any number of binding endpoints using the `zrok http` command.
|
||||
|
||||
|
||||
### The `zrok http` Flow
|
||||
@ -65,13 +69,13 @@ When a `zrok` user issues a `zrok http` command for an endpoint, here's what hap
|
||||
3. The `zrok` controller allocates a new "service name" for the binding.
|
||||
4. The `zrok` controller creates a `zrok.proxy.v1` configuration describing the user's requested authentication details (currently: `none` or `basic`).
|
||||
5. The `zrok` controller creates a new service, associating the service with the configuration.
|
||||
6. The `zrok` controller creates a bind service policy for the user's environment identity and the newly created Ziti service.
|
||||
6. The `zrok` controller creates a bind service policy for the user's environment identity and the newly created OpenZiti service.
|
||||
7. The `zrok` controller creates a dial service policy allowing the configured listening endpoints (ingress proxies) to dial the newly created service.
|
||||
8. The `zrok` controller creates a service edge router policy associating the newly created service with `#all` edge routers.
|
||||
9. The URL for the new `zrok` service is constructed and returned to the `zrok http` client.
|
||||
10. The `zrok http` client then binds the Ziti service with an SDK client, and begins reverse-proxying traffic received from Ziti across to the dark service.
|
||||
10. The `zrok http` client then binds the OpenZiti service with an SDK client, and begins reverse-proxying traffic received from OpenZiti across to the dark service.
|
||||
|
||||
When the user terminates the `zrok http` client, these resources are removed from the Ziti network.
|
||||
When the user terminates the `zrok http` client, these resources are removed from the OpenZiti network.
|
||||
|
||||
|
||||
### `zrok proxy` and HTTP Clients
|
||||
@ -83,6 +87,6 @@ When an HTTP request arrives as the `zrok proxy` listener, this happens:
|
||||
1. The `zrok proxy` parses the `Host` header provided by the client, extracting the `zrok` service name from the URL.
|
||||
2. The service is refreshed (if necessary) and retrieved. The `zrok.proxy.v1` configuration details are retrieved.
|
||||
3. The `zrok.proxy.v1` configuration is used to do authentication processing. If authentication is required, such a response is returned to the client.
|
||||
4. The `zrok proxy` then dials the Ziti service, and the dialed service is used to reverse proxy the request from the end user across Ziti to the binding endpoint, and then dark service.
|
||||
4. The `zrok proxy` then dials the OpenZiti service, and the dialed service is used to reverse proxy the request from the end user across OpenZiti to the binding endpoint, and then dark service.
|
||||
|
||||
The `zrok proxy` does not require any communication with the `zrok` controller, and is stateless. They can be pooled behind a load balancer. It is currently a goal is to maintain this lightweight nature.
|
7
docs/sharing/_category_.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Sharing",
|
||||
"position": 20,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# v0.3 Reserved Services
|
||||
# Reserved Services
|
||||
|
||||
The `v0.3` series introduces a concept of "reserving" services. The intention is that the `zrok` control plane will support limits on the number of reserved services (and eventually `frontend`instances) that an account is allowed to utilize. Service reservations could also be time-limited, or possibly even bandwidth-limited (the reservation expires after a bandwidth threshold is crossed).
|
||||
With v0.3, `zrok` introduced a concept of "reserving" services. The intention is that the `zrok` control plane will support limits on the number of reserved services (and eventually `frontend`instances) that an account is allowed to utilize. Service reservations could also be time-limited, or possibly even bandwidth-limited (the reservation expires after a bandwidth threshold is crossed).
|
||||
|
||||
## Reserved Services Example
|
||||
|
||||
`v0.3` introduces the `zrok reserve` command:
|
||||
With v0.3 `zrok` introduced the `zrok reserve` command:
|
||||
|
||||
```
|
||||
$ zrok reserve private http://localhost:9090
|
@ -1,6 +1,6 @@
|
||||
# v0.3 Public/Private Sharing
|
||||
# Public/Private Sharing
|
||||
|
||||
The `v0.3` series introduces new sharing modes, and new types of built-in services.
|
||||
In `v0.3` new sharing modes and new types of built-in services were introduced.
|
||||
|
||||
## Share Modes
|
||||
|
||||
@ -10,7 +10,7 @@ _Note: We're going to continue using `frontend` and `backend` as concepts, even
|
||||
|
||||
### Public Sharing
|
||||
|
||||
In `v0.2`, `zrok` only offered a "public" sharing mode. The public sharing mode will allow any configured `frontend` instances to send traffic to any `backend`. The policy and permission model was very simple and flat. A `v0.2` deployment considers any available `frontend` instance to be allowed to send traffic to configured services. The access for `frontend` instances is controlled by identity provisioning within the underlying Ziti network.
|
||||
In `v0.2`, `zrok` only offered a "public" sharing mode. The public sharing mode will allow any configured `frontend` instances to send traffic to any `backend`. The policy and permission model was very simple and flat. A `v0.2` deployment considers any available `frontend` instance to be allowed to send traffic to configured services. The access for `frontend` instances is controlled by identity provisioning within the underlying OpenZiti network.
|
||||
|
||||
In `v0.3`, `zrok` will offer both a "public" and a "private" sharing mode. When `v0.3` configures the policies for a service, a publicly-shared service will have policies created that allow whichever selected public `frontend` instances to access the shared `backend`. A `v0.3` deployment will have a collection of multi-tenant, high-capacity `frontend` instances available to be selected from. The `zrok` CLI will default to selecting the `public` `frontend` instances.
|
||||
|
||||
@ -18,7 +18,7 @@ The `frontend` selection approach also gives us a clean implementation for picki
|
||||
|
||||
### Private Sharing
|
||||
|
||||
`v0.3` introduces a "private" sharing mode. When provisioning a service for private sharing, `zrok` will not create any policies for the service, until a request for a `frontend` binding is created for the service (through the `v0.3` `zrok access` command).
|
||||
`v0.3` introduced "private" sharing mode. When provisioning a service for private sharing, `zrok` will not create any policies for the service, until a request for a `frontend` binding is created for the service (through the `v0.3` `zrok access` command).
|
||||
|
||||
The `v0.3` `zrok` API will support creating `frontend` instances for both identified users (where the `zrok` user has a provisioned `environment`), as well as ephemeral users (the `zrok` controller will create a single-use "ephemeral environment" for these `frontend` instances).
|
||||
|
||||
@ -42,11 +42,11 @@ This allows users to create read/write repositories of files that can be shared
|
||||
|
||||
## Entities (SQL)
|
||||
|
||||
`v0.3` introduces a new `frontends` table to allow the `zrok` controller to track the frontend instances that are available to any account or environment.
|
||||
`zrok` v0.3 introduced a new `frontends` table to allow the `zrok` controller to track the frontend instances that are available to any account or environment.
|
||||
|
||||
The following illustration shows the possibilities available.
|
||||
|
||||
![v0.3 Frontend Selection](images/zrok_frontends_v0.3.png)
|
||||
![Frontend Selection](../images/zrok_frontends_v0.3.png)
|
||||
|
||||
The `*.in.zrok.io` frontend is a "public" frontend, available to all `zrok` users. Most `zrok` installations will want to have at least one public, global frontend for all public, internet-facing ingress traffic for private backend instances. In the underlying data store, the public frontend will have a `name` set to `public` (or some other representative name), allowing users to reference that `frontend` using a friendly label.
|
||||
|
@ -1,102 +0,0 @@
|
||||
# zrok quickstart
|
||||
|
||||
## ziti quickstart
|
||||
|
||||
```
|
||||
$ source /dev/stdin <<< "$(wget -qO- https://raw.githubusercontent.com/openziti/ziti/release-next/quickstart/docker/image/ziti-cli-functions.sh)"; expressInstall
|
||||
```
|
||||
|
||||
## configure frontend identity
|
||||
|
||||
```
|
||||
$ ziti edge create identity service frontend -o ~/.zrok/identities/frontend.jwt
|
||||
New identity proxy created with id: -zbBF8eVb-
|
||||
Enrollment expires at 2022-08-10T18:46:16.641Z
|
||||
```
|
||||
|
||||
```
|
||||
$ ziti edge enroll -j ~/.zrok/identities/frontend.jwt -o ~/.zrok/identities/frontend.json
|
||||
INFO generating 4096 bit RSA key
|
||||
INFO enrolled successfully. identity file written to: proxy.json
|
||||
```
|
||||
|
||||
```
|
||||
$ ziti edge create erp frontend --edge-router-roles "#all" --identity-roles "@frontend"
|
||||
New edge router policy frontend created with id: aOxvtWIanFIAwuU51lF9SU
|
||||
```
|
||||
|
||||
## configure controller identity
|
||||
```
|
||||
$ ziti edge create identity service ctrl -o ~/.zrok/identities/ctrl.jwt
|
||||
New identity ctrl created with id: e8c3tQo3SR
|
||||
Enrollment expires at 2022-10-14T19:59:01.908Z
|
||||
```
|
||||
|
||||
```
|
||||
$ ziti edge enroll -j ~/.zrok/identities/ctrl.jwt -o ~/.zrok/identities/ctrl.json
|
||||
INFO generating 4096 bit RSA key
|
||||
INFO enrolled successfully. identity file written to: /home/michael/.zrok/identities/ctrl.json
|
||||
```
|
||||
|
||||
```
|
||||
$ ziti edge create erp ctrl --edge-router-roles "#all" --identity-roles "@ctrl"
|
||||
New edge router policy ctrl created with id: 7OxvtWIanFIAwuU51lF9SU
|
||||
```
|
||||
|
||||
## create metrics service
|
||||
```
|
||||
$ ziti edge create service metrics
|
||||
New service metrics created with id: 56y5AFsKmSsIWLsmFNBeJz
|
||||
```
|
||||
|
||||
### create service edge router policy for metrics service
|
||||
```
|
||||
$ ziti edge create serp ctrl-public --service-roles "@metrics" --edge-router-roles "#all"
|
||||
```
|
||||
|
||||
### allow the controller to bind the metrics service
|
||||
```
|
||||
$ ziti edge create sp ctrl-bind Bind --identity-roles "@ctrl" --service-roles "@metrics"
|
||||
New service policy ctrl-bind created with id: 3SXgFftSgBnenjgdBENOGR
|
||||
```
|
||||
|
||||
### allow frontends to dial the metrics service
|
||||
```
|
||||
$ ziti edge create sp ctrl-dial Dial --identity-roles "@frontend" --service-roles "@metrics"
|
||||
New service policy ctrl-dial created with id: 6pCe9uGj8oB2JXlWb44x2u
|
||||
```
|
||||
|
||||
## start zrok resources
|
||||
|
||||
adjust `ctrl.yml` (or create a copy for your environment).
|
||||
|
||||
```
|
||||
$ zrok ctrl etc/ctrl.yml
|
||||
```
|
||||
|
||||
```
|
||||
$ zrok proxy ~/.zrok/proxy.json
|
||||
```
|
||||
|
||||
## create zrok account
|
||||
|
||||
```
|
||||
$ zrok create account
|
||||
New Username: michael@quigley.com
|
||||
New Password:
|
||||
Confirm Password:
|
||||
[ 3.122] INFO main.glob..func1: api token: 9ae56d39a6e96d65a45518b5ea1637a0677581a33ba44bbc3c103f6351ec478fb8185e97a993382ed2daa26720d40b052824dbce5ef38874c82893f33e445b06
|
||||
```
|
||||
|
||||
## enable zrok for your shell
|
||||
|
||||
```
|
||||
$ zrok enable 9ae56d39a6e96d65a45518b5ea1637a0677581a33ba44bbc3c103f6351ec478fb8185e97a993382ed2daa26720d40b052824dbce5ef38874c82893f33e445b06
|
||||
[ 0.691] INFO main.enable: enabled, identity = 'ARjEc8eVA-'
|
||||
```
|
||||
|
||||
## tunnel
|
||||
|
||||
```
|
||||
$ zrok http <endpoint>
|
||||
```
|
22
website/.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
# 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*
|
||||
|
||||
.yarn
|
41
website/README.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Website
|
||||
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
$ yarn
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens 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
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> 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.
|
3
website/babel.config.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
123
website/docusaurus.config.js
Normal file
@ -0,0 +1,123 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Zrok',
|
||||
staticDirectories: ['static', '../docs/images'],
|
||||
tagline: 'Globally distributed reverse proxy',
|
||||
url: 'https://zrok.io',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/space-ziggy.png',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'NetFoundry', // Usually your GitHub org/user name.
|
||||
projectName: 'zrok', // Usually your repo name.
|
||||
|
||||
// Even if you don't use internalization, you can use this field to set useful
|
||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||
// to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
],
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
editUrl:
|
||||
'https://github.com/openziti/zrok/tree/main/',
|
||||
path: '../docs',
|
||||
include: ['**/*.md', '**/*.mdx'],
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
},
|
||||
pages: {
|
||||
path: './src/pages'
|
||||
},
|
||||
// googleAnalytics: {
|
||||
//
|
||||
// },
|
||||
// gtag: {
|
||||
//
|
||||
// },
|
||||
sitemap: {
|
||||
|
||||
}
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
navbar: {
|
||||
title: 'zrok',
|
||||
logo: {
|
||||
alt: 'Ziggy Goes to Space',
|
||||
src: 'img/space-ziggy.png',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'overview',
|
||||
position: 'right',
|
||||
label: 'What is zrok?',
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'overview',
|
||||
position: 'right',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'downloads',
|
||||
position: 'right',
|
||||
label: 'Downloads',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/openziti/zrok',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} NetFoundry Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
colorMode: {
|
||||
defaultMode: 'dark',
|
||||
disableSwitch: false,
|
||||
respectPrefersColorScheme: false,
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
autoCollapseCategories: true,
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
module.exports = config;
|
13654
website/package-lock.json
generated
Normal file
44
website/package.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "website",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "BUILD_PATH='./build/docs' docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.2.0",
|
||||
"@docusaurus/preset-classic": "2.2.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"remark-math": "^5.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.2.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
}
|
||||
}
|
33
website/sidebars.js
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['tutorial-basics/create-a-document'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
173
website/src/css/custom.css
Normal file
@ -0,0 +1,173 @@
|
||||
/**
|
||||
* Any CSS included here will be global. The classic template
|
||||
* bundles Infima by default. Infima is a CSS framework designed to
|
||||
* work well for content-centric websites.
|
||||
*/
|
||||
|
||||
/* Import Fonts */
|
||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #3e2693;
|
||||
--ifm-color-primary-dark: #372284;
|
||||
--ifm-color-primary-darker: #2c196e;
|
||||
--ifm-color-primary-darkest: #211158;
|
||||
--ifm-color-primary-light: #3e2693;
|
||||
--ifm-color-primary-lighter: #5a3cc2;
|
||||
--ifm-color-primary-lightest: #6747d9;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
||||
--ifm-menu-color: #252525;
|
||||
--code-background-color: rgba(62,38,147,.1);
|
||||
--code-font-color: #252525;
|
||||
--selection-font-color: #0f023b;
|
||||
--selection-background: #9BF316;
|
||||
--ifm-menu-color-background-hover: #6747d955;
|
||||
--ifm-menu-color-background-active: #FF0;
|
||||
--sidebar-selected: #6747d955;
|
||||
}
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #9bf316;
|
||||
--ifm-color-primary-dark: #8cdb14;
|
||||
--ifm-color-primary-darker: #80c814;
|
||||
--ifm-color-primary-darkest: #70b409;
|
||||
--ifm-color-primary-light: #9bf316;
|
||||
--ifm-color-primary-lighter: #9af90a;
|
||||
--ifm-color-primary-lightest: #99ff00;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
||||
--code-background-color: rgba(76, 55, 123, 0.53);
|
||||
--code-font-color: rgb(205, 180, 247);
|
||||
--selection-color: #0f023b;
|
||||
}
|
||||
|
||||
@media (min-width: 1416px) {
|
||||
.main-wrapper {
|
||||
align-self: center;
|
||||
max-width: 1400px;
|
||||
width: 1400px;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar .navbar__inner {
|
||||
margin: 0 auto;
|
||||
max-width: 1360px;
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
[data-theme='dark'] {
|
||||
--ifm-navbar-background-color: #0d0235;
|
||||
--ifm-background-color: unset;
|
||||
--ifm-link-color: #9bf316;
|
||||
--ifm-menu-color: #FFFFFFD4;
|
||||
|
||||
}
|
||||
|
||||
.footer--dark {
|
||||
--ifm-footer-background-color: #0d0235;
|
||||
}
|
||||
|
||||
[data-theme='dark']
|
||||
#__docusaurus {
|
||||
background: linear-gradient(180deg, rgba(20,12,66,1) 0%, rgba(35,16,105,1) 100%);
|
||||
}
|
||||
|
||||
.menu__link--active:not(.menu__link--sublist) {
|
||||
background-color: var(--sidebar-selected);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: var(--ifm-heading-color);
|
||||
font-family: 'Russo One', sans-serif;
|
||||
font-weight: 400;
|
||||
line-height: var(--ifm-heading-line-height);
|
||||
margin: var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
font-weight: 400;
|
||||
letter-spacing: 1;
|
||||
}
|
||||
|
||||
.menu__link {
|
||||
color: #252525;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
[data-theme='dark']
|
||||
.menu__link {
|
||||
color: #FFFFFFD4;
|
||||
}
|
||||
|
||||
.navbar__link:hover, .navbar__link--active {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
code {
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
padding: 0.2em 0.4em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
font-weight: 800;
|
||||
white-space: break-spaces;
|
||||
background-color: #f2f2f2;
|
||||
color2: rgb(167, 130, 217);
|
||||
color: var(--code-font-color);
|
||||
border-radius: 6px;
|
||||
border-width: 0px;
|
||||
border-color: var(--code-background-color);
|
||||
background-color2: rgba(76, 55, 123, 0.53);
|
||||
background-color: var(--code-background-color);
|
||||
}
|
||||
|
||||
[data-theme='dark']
|
||||
pre {
|
||||
background-color: #0b0031;
|
||||
}
|
||||
|
||||
[data-theme='dark']
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: var(--ifm-heading-color);
|
||||
}
|
||||
|
||||
[data-theme='dark']
|
||||
.docSidebarContainer_node_modules-\@docusaurus-theme-classic-lib-theme-DocPage-Layout-Sidebar-styles-module {
|
||||
border-right: 1px solid #9bf316;
|
||||
}
|
||||
[data-theme='dark']
|
||||
.table-of-contents__left-border {
|
||||
border-left: 1px solid #9bf316;
|
||||
}
|
||||
|
||||
a code {
|
||||
color: var(--code-font-color);
|
||||
}
|
||||
::-moz-selection { /* Code for Firefox */
|
||||
color: var(--selection-font-color);
|
||||
background: var(--selection-background);
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: var(--selection-font-color);
|
||||
background: var(--selection-background);
|
||||
}
|
6
website/src/pages/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
import React from 'react';
|
||||
import {Redirect} from '@docusaurus/router';
|
||||
|
||||
export default function Home () {
|
||||
return <Redirect to="/docs/overview" />;
|
||||
};
|
26
website/src/pages/index.module.css
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* CSS files with the .module.css suffix will be treated as CSS modules
|
||||
* and scoped locally.
|
||||
*/
|
||||
|
||||
.heroBanner {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.rowcontainer {display: flex; flex-grow: 1; width: 100%; height: 100%; flex-direction: column; overflow: hidden;}
|
||||
.secondrow { flex-grow: 1; border: none; margin: 0; padding: 0; }
|
0
website/static/.nojekyll
Normal file
1
website/static/CNAME
Normal file
@ -0,0 +1 @@
|
||||
docs.zrok.io
|
BIN
website/static/img/favicon.ico
Normal file
After Width: | Height: | Size: 3.5 KiB |
1
website/static/img/logo.svg
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
website/static/img/space-ziggy.png
Normal file
After Width: | Height: | Size: 178 KiB |