Code Monkey home page Code Monkey logo

ziti-doc's Introduction

Building this Project

build & deploy

Prerequisite

  • Linux - Documentation is run routinely by our CI
  • Windows - Developed with Windows Subsystem for Linux (WSL)
  • Doxygen - Doxygen is used to generate the api documentation for the C SDK and is necessary to be on the path

Building the Docs Site

This project uses GitHub Pages to host the static HTML output of building the docs site. GitHub has a few options for where you can put your doc at this time: the main branch, a folder on the main branch named "docs," or a branch named "gh-pages." This project is currently configured to publish by running publish.sh which destructively pushes the build output to the root of branch "master" in another repository "openziti/openziti.github.io". That repo is configured to publish the contents of the "master" branch as the GitHub Pages custom domain "openziti.io."

The best/easiest thing to do in order to build these docs is to have Windows Subsystem for Linux installed or any shell which can execute a .sh script. As of 2020, there's a multitude of ways to get a BASH/shell interpreter in Windows. It's not feasible to test all these shells to make sure this script works so it's encouraged that you use a Linux-based flavor of BASH. If the script doesn't function - open an issue.

After cloning this repository, open the BASH shell and execute the gendoc.sh script. The script has a few flags to pass that control the cleanup of what the script does. In general, it's recommended you use the -w flag so that warnings are treated as errors.

Expected usage: ./gendoc.sh -c

Note

you must configure NodeJS >=16.14 before running yarn

Warning

Do not use npm to build this project or add a plugin. Always use yarn.

You can then run cd ./docusaurus && yarn install --frozen-lockfile && yarn start to serve the Docusaurus site from webpack. If you're testing configuration changes you will need to serve the production build with yarn serve instead.

Publishing this Site

./publish.sh is intended to run in GitHub Actions on branch main where the following variables are defined:

  • GIT_BRANCH: output of git rev-parse --abbrev-ref HEAD
  • gh_ci_key: base64 encoding of an OpenSSH private key authorized to clobber the main branch of the root doc repo for GitHub pages.

The ./publish.sh script emits a CNAME file that defines the custom domain to be used by GitHub Pages. If the script is not changed, the domain will revert to the value defined in the script every time the site is published.

To run this script locally, define the necessary variables in your environment.

Adding a NodeJS Package

Docusaurus plugins are distributed as NodeJS packages. This project uses yarn, not npm, to manage packages, build the project, and run the development server. To add a NodeJS package:

cd ./docusaurus
yarn add @hotjar/browser

This will update ./docusaurus/package.json and ./docusaurus/yarn.lock. Test and commit these changes.

Upgrading a NodeJS Package

Docusaurus plugins are distributed as NodeJS packages. This project uses yarn, not npm, to manage packages, build the project, and run the development server. To upgrade a NodeJS package:

cd ./docusaurus
yarn upgrade @docusaurus/plugin-content-docs

This will update ./docusaurus/package.json and ./docusaurus/yarn.lock. Test and commit these changes.

How Search Works

Algolia DocSearch provides search for this site.

  • Docusaurus v2's classic preset theme provides an integration with Algolia DocSearch v3 as a built-in plugin. The public search API key and application ID are properties in docusaurus.config.js. That plugin provides the site's /search URL and a search widget in the main navigation ribbon that's visible on all pages. The Javascript running in these elements returns search results from the DocSearch API.

  • The DocSearch API fetches records from an Algolia index that is populated by an Algolia crawler. Search results may be tuned by adjusting the crawler config. The crawler is specifically configured for the Docusaurus theme. If the theme changes structurally then it will be necessary to adjust the crawler config to suit. Changes to the site will not be reflected in the search results if the crawler config does not match the theme. The current config is based on this configuration template for Docusaurus v2.

Check For Broken Links

A CI job periodically detects broken links in the GH Pages site and incoming links from external sites but doesn't make any changes to the site source files. An alarm issue is raised and auto-resolved based on the result of the check.

With these scripts, you can test all the links in the site's pages and popular incoming request paths.

  • crawl-for-broken-links.sh: uses docker to run muffet which crawls the given base URL looking for broken links

    # check local dev server for broken outgoing links to itself and other sites, excluding a few hosts that are sensitive to being hammered by a crawler
    ./crawl-for-broken-links.sh http://127.0.0.1:3000
    
    # check the GH Pages site for broken links to anywhere
    ./crawl-for-broken-links.sh https://openziti.github.io --rate-limit=11
    
  • check-links.sh: uses curl to try a list of URL paths from a file

    # check a list of popular incoming links from external sites
    ./check-links.sh https://docs.openziti.io ./popular-docs-links.txt
    
    ./check-links.sh https://blog.openziti.io ./popular-blog-links.txt
    

    You will need to run yarn serve to crawl for broken links locally because the webpack server (yarn start) is not crawlable, and you will probably have to deploy to Vercel or GH Pages to test comprehensively for broken links. The docusaurus CLI's built-in development server preempts any request for a path ending .html with a permanent redirect (HTTP 301) to the same path without the suffix. This prevents the redirects plugin from placing effective redirects as files with .html suffixes and employing the meta refresh technique for redirecting user agents to the new location of a page.

Update the List of Popular Incoming Links

Use Google Analytics to build a "detail" report by modifying the standard report "Pages and screens." Add a column "Page path" to show the URL path for each record. Add a filter for the production hostname openziti.io to exclude test instances from the data. Click the "Share" button to export the data as a CSV file. Use a spreadsheet program to filter out redundant and irrelevant records.

How openziti.io Works

The openziti.io domain name resolves to GitHub Pages which hosts the static HTML that's output by the Docusaurus build that runs in a GitHub workflow.

How docs.openziti.io Works

This redirector's purpose is to preserve incoming links for this domain. The docs.openziti.io domain name resolves to a CloudFront distribution that only responds with an HTTP redirect. If the request path is / then it responds with https://openzit.io/docs (the docs landing page). Otherwise, it responds with the same path that was requested at https://openziti.io{path}.

The redirector's behavior is controlled by a Javascript CloudFront function that's deployed automatically when it is changed in this repository. The function is defined in cloudfront-function-docs-openziti-io.js. The function is deployed by a GitHub workflow that runs when the file is changed in the main branch.

ziti-doc's People

Contributors

andrewpmartinez avatar balliasghar avatar cinar avatar cnu1812 avatar dariuszski avatar davefinger avatar dependabot[bot] avatar dovholuknf avatar ekoby avatar emoscardini avatar evangertis avatar gberl002 avatar gooseleggs avatar grlcodr avatar jeremytellier avatar jkochanik avatar jlin-nf avatar mikegorman-nf avatar nicfragale avatar plorenz avatar qrkourier avatar rentallect avatar rgallettonf avatar sabedevops avatar scareything avatar tburtchell avatar thaungthanhan avatar tmousawnf avatar voskampm avatar ziti-ci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ziti-doc's Issues

Developer's Guide to Ziti Fabric Extension

A developer's guide for building solutions on top of the Ziti Fabric. Includes a full treatment of xgress, xctrl, and xmgmt extensions. Also includes routing extensions, and strategies for influencing and working with the smart routing implementation.

Built from the perspective of taking ziti-fabric and ziti-foundation as dependencies, to create custom solutions using the stack.

Define Link and Circuit

in the glossary add:

some getting started ideas:

I think of a link as point to point (between routers) and a circuit as an end-to-end path across the fabric (I.e., multiple fabric links)

npm express package required for zac

I'm not sure if this is a Mac specific thing but when I had first run the command to start up the ZAC server, I was presented with a failure that explained the express package was required.

After a simple npm install express and retrying to start ZAC everything worked.

We should verify if this is a widespread issue or just a local issue in this one case. If it's a widespread issue then update the doc to explain that this package is needed. Or maybe just add a blurb that it's needed and might not be installed and show how to install it.

ziti-router example configuration

I am looking for help configuring ziti-router i.e. example directives for config.yml. Specifically, I'm trying to find out whether a property needs to be set in config.yml to enabled the router's built-in tunneler features for hosting a Ziti service.

I found a v2 example in https://openziti.github.io/ziti/manage/edge-router.html#configuration, but it doesn't have a comment or placeholder for any tunneler-related properties. Does that mean the built-in tunneler stuff is only managed through the controller's management API, and no config properties are needed?

add fabric related PKI troubleshooting

The PKI troubleshooting only was edge focused at first when we only had ZEDE. with the open core coming out - add troubleshooting for routers/ziti-fabric

Describe services vs hosted services better

Right now the information around hosted services is more sparse and more difficult to understand than "non-hosted" services. Update the doc so that it's more clear as to the differences and what each type of service is

Review ZAC login steps

After ZAC is installed, during the login steps, the first step mentions "At this point you should be able to navigate to both" but since it's one big paragraph of text it's not clear what is meant by "both" so maybe make these sub-bullets as I believe it's referring to both the external URL and the url of the docker hostname.

It also appears there is a "NOTE" that should be showing differently in HTML based on docfx documentation but is just showing some brackets and a bunch of greater-than symbols. (this "> [!NOTE] >" plus all subsequent ">" symbols)

At this point you should be able to navigate to both: https://${ZITI_EDGE_CONTROLLER_HOSTNAME}:8443and see the ZAC login screen. (The TLS warnings your browser will show you are normal - it's because these steps use a self-signed certificate generated in the install process) > [!NOTE] > If you are using docker-compose to start your network, when you access ZAC for the first time you will need to > specify the url of the controller. Since everything is running in docker compose this url is relative to the > internal docker compose network that is declared in the compose file. You would enter > https://ziti-edge-controller:1280 as the controller's URL

First paragraph of "Services" messed up

The first sentence in the page describing services seems to be messed up in a few ways.

The primaryategy assumes that one ter function of Ziti is providing access to "services". A service encapsulates the definition of any resource that could be accessed by a client on a traditional network.

Quickstart CLI instructions need updating for no-docker install

There is a section that explains you may run into an issue if you run quickstart more than one. It directs the user to unset Ziti variables and run it again. However, this should be updated as a feature was added to prompt the user for input and then continue as directed rather than requiring them to manually unset the variables.

The warning appears with this text
"If you run this command twice in the same shell you'll see a message warning you that you've already run the command. It will look like this:"

Service Mesh - how is ziti different or the same?

lots of times we get asked questions about service mesh and how it's the same/different than ziti. let's produce some kind of wiki, doc, article around what ideas overlap, what ideas are different and how it all pertains to ziti

Inform user of quickstart stop commands

The "Local - No Docker" quickstart explains how there are two commands for starting up your controller startZitiController and router startExpressEdgeRouter but doesn't mention that there are also simple commands already sourced that will stop the processes. Those would be stopZitiController and stopAllEdgeRouters

It would be nice to add a section explaining that these commands are already provided by the express install, no need to find and kill the processes manually.

Linux tunneler help

Some notes that we could fold-in to https://openziti.github.io/ziti/clients/tunneler.html#linux

ziti-edge-tunnel

  • C-SDK tunneler aka "tunneler SDK"
  • a bit more advanced and less user-friendly than ziti-tunnel but has a superior approach to built-in DNS
  • is more performant than ziti-tunnel
  • run mode uses tun device IP routes to intercept service traffic and answer DNS via resolvectl
  • Future development will probably land first in the tunneler SDK
  • Experimental Docker container exists: netfoundry/ziti-edge-tunnel
  • systemd install
# transparent install procedure for ziti-edge-tunnel

# where to install the executable binary
❯ ZITI_EDGE_TUNNEL_BIN_DIR=/usr/local/bin

# where to look at startup for enrolled identity JSON config files
❯ ZITI_EDGE_TUNNEL_ID_DIR=~/.ziti-edge-tunnel

# create the identity directory
❯ mkdir -pvm0700 $ZITI_EDGE_TUNNEL_ID_DIR

# create a systemd service
❯ cat <<ZITI_SERVICE | sudo tee /usr/lib/systemd/system/ziti-edge-tunnel.service                
[Unit]
Description=Ziti Edge Tunnel
After=network.target
ConditionDirectoryNotEmpty=$ZITI_EDGE_TUNNEL_ID_DIR

[Service]
User=root
ExecStart=${ZITI_EDGE_TUNNEL_BIN_DIR}/ziti-edge-tunnel run --verbose 4 --identity-dir $ZITI_EDGE_TUNNEL_ID_DIR
Restart=always
RestartSec=2
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
ZITI_SERVICE

# load the new systemd config
❯ sudo systemctl daemon-reload

# download some version of ziti-edge-tunnel
❯ curl -sSLf https://raw.githubusercontent.com/openziti/ziti-tunnel-sdk-c/main/docker/fetch-github-releases.sh | ZITI_VERSION=0.17.7 bash -x /dev/stdin ziti-edge-tunnel

# install in a directory that is in the executable search PATH
❯ sudo mv -v ./ziti-edge-tunnel ${ZITI_EDGE_TUNNEL_BIN_DIR}/

# verify the installed version
❯ sudo ziti-edge-tunnel version

# use a downloaded enrollment token to generate an identity
❯ sudo ziti-edge-tunnel enroll --jwt ~/Downloads/linuxTunneler1.jwt --identity ${ZITI_EDGE_TUNNEL_ID_DIR}/linuxTunneler1.json

# start the daemon
❯ sudo systemctl start ziti-edge-tunnel.service

# view the logs
❯ sudo journalctl -lfu ziti-edge-tunnel.service

ziti-tunnel

  • the first Linux tunneler
  • Go-SDK tunneler
  • has useful modes proxy and host in addition to tproxy (IPtables intercepts)
  • works fairly well today in Docker: netfoundry/ziti-tunnel

Quick Fix - extra accent character in quickstart doc

There is an extra character in a sample command that will cause the command to not work if it is copied along with the command.

In Quickstart Local there is a command referenced as follows
`"${ZITI_BIN_DIR-}/ziti" edge list edge-routers

Just need that extra accent removed from the beginning of the command. I know, it probably took longer to create this issue but it's a good way for someone to get their name in on a code fix on an open source project.

Whitepaper style overview

Right now there is not a 'white paper style' doc to share for those more technically inclined people. It'd be helpful to have a white paper style doc to share which covers the values of zero trust and the awesome abilities ziti can provide by going app embedded

quickstart: PKCS11

It would be useful to show people how to use the C SDK to interact with a PKCS11 implementation such as SoftHSM

Ensure the quickstart/example outlines how to do this from a tunnel as well as from the C SDK

Add a "what is zero trust" to the landing page

Right now when people show up to openziti.github.io - there's a nice landing page but not a lot of info about what a zero trust overlay network really is. maybe put a link on it and let people learn about it

ExpressInstall, log out/login

Right now after running the expressInstall, when you are done you're given a startZitiController and other helpful functions but if you make a new shell, the functions aren't sourced. Discuss this in the doc.

Consider moving these sorts of functions to the env file that gets sourced/generated

update doc for enrolling

ziti-enroller is on its way out. ziti-tunnel now has the enroll capability. find any enrollment locations and make the doc better wrt how enrolling works on the many os's, refer to ziti-tunnel if one wants to enroll it manually etc

Update quickstart example outputs

with the release of 0.25.5 the ziti edge list... commands display in a "prettified" view that resembles a table. The quickstart docs (specifically for docker-compose but likely others as well) still reference the older style output and need to be updated to the new output.

Examples should be updated for both ziti edge list edge-routers and ziti edge list identities

OLD:

ziti@724087d30014:/openziti$ ziti edge list edge-routers
id: BZ.Y7vMdAI    name: ziti-edge-router    isOnline: true    role attributes: {}
id: NELWwjMd8    name: ziti-private-blue    isOnline: true    role attributes: {}
id: l9-W7jMf8    name: ziti-fabric-router-br    isOnline: true    role attributes: {}
id: rqZW7vMdA    name: ziti-edge-router-wss    isOnline: true    role attributes: {}
id: xmiYwvMf8    name: ziti-private-red    isOnline: true    role attributes: {}

NEW (despite the image, the command ziti edge list edge-routers should remain the same in the sample output):
image

Disclaimer: Fair warning that the formatting might be tricky converting the console output to look the same in markdown format. I'm not positive it will be cumbersome but it's worth noting as this is tagged "good first issue"

Document "how to" make a new sdk

There are certain steps one must go through when making an sdk. let's produce some guidance on what the best way is to adopt open ziti for times where there is no SDK for ${my.favorite.language}

Things to consider:

  • how to use ziti
  • main features
  • how do i maintain feature parity
  • how do i contribute the sdk back (and will you adopt it, maintain it etc)
  • other considerations?

state prerequisites for expressInstall in non-Docker quickstarts

jq is required for expressInstall and the install does check for this but it would be nice to enhance the part of the "Local - No Docker" install where it says jq is required so the user can install jq before watching quickstart fail because the prereq is not met.

Possibly explain how to check if it is (maybe a which jq orjq --version. Then also have a link to the jq install page in case it isn't installed.

Add the nuance of "the edge" to the overview

The edge part of a ziti overlay network is largely glossed over - mostly for a good reason. initial learners have a lot to digest as is. However - once someone starts looking into 'terminators' the nuance begins to be more important.

update the overview with some broad words about the edge and update more details about what 'the edge' means and how it's different (but incredibly similar to) 'the fabric'. Possibly include definition of terminators in the work. here's some words that might help frame terminators.

terminators are metadata stored in the controller which are used during path selection. these terminators represent all the possible routers where traffic can leave the openziti fabric. leaving the fabric does not necessarily mean leaving the overall, overlay network. If the final destination of the traffic is an edge component, the traffic continues on the ziti edge overlay network to the actual destination of the traffic.

Add detailed documentation for Routers

Should have a doc page explaining various types of routers with the following info

  • What they do
  • How they work
  • Differences between the various types (edge, fabric, private edge, wss edge, etc.)

Should also add information detailing the configuration file and what the different sections are for and how each affects the functionality of the router.

** Added the "help wanted" tag in case anyone wants to contribute more on what they'd like to see in the router doc.

Add link/information how to access ZEDE

Right now there's no text telling you how to get to the web ui. There should be some information informing the user that there's a web server running, what port it runs on (if not the default https port) and how to access the UI

SDK Matrix

Make a page exclusively for the sdk's. Ideally one which highlights functionality and which sdk's support which, lineage therein etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.