Skip to content

Commit

Permalink
Merge pull request #1941 from openziti/de-hyphenate-ziti-controller
Browse files Browse the repository at this point in the history
de-hyphenate old mentions of ziti-controller as 'ziti controller'
  • Loading branch information
qrkourier committed Apr 30, 2024
2 parents 7f16da2 + b9f8e1c commit c78ab3d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 144 deletions.
2 changes: 1 addition & 1 deletion changelogs/CHANGELOG.0.30.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Currently only HTTP Connect proxies which don't require authentication are suppo
not create the usual edge router/service edge router policy.
* [Issue #1397](https://github.com/openziti/ziti/issues/1397) - HTTP Proxy support for host.v1/host.v2 config types
* [Issue #1423](https://github.com/openziti/ziti/issues/1423) - Controller crashes when edge router reconnects (Client Hello)
* [Issue #1414](https://github.com/openziti/ziti/issues/1414) - Race condition in xgress_edge_tunnel tunneller at start but not seen in pre-compiled binary
* [Issue #1414](https://github.com/openziti/ziti/issues/1414) - Race condition in xgress_edge_tunnel tunneler at start but not seen in pre-compiled binary
* [Issue #1406](https://github.com/openziti/ziti/issues/1406) - Entity change event dispatcher isn't shutting down properly when controller shuts down
* [Issue #1382](https://github.com/openziti/ziti/issues/1382) - service failure costs are not shrinking over time

Expand Down
2 changes: 1 addition & 1 deletion controller/server/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (c *Controller) checkEdgeInitialized() {

if admin == nil {
if !c.AppEnv.GetHostController().IsRaftEnabled() {
log.Fatal("the Ziti Edge has not been initialized via 'ziti-controller edge init', no default admin exists")
log.Fatal("the Ziti Edge has not been initialized via 'ziti controller edge init', no default admin exists")
}

if first {
Expand Down
4 changes: 2 additions & 2 deletions controller/subcmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ func NewEdgeInitializeCmd(versionProvider versions.VersionProvider) *cobra.Comma
cmd := &cobra.Command{
Use: "init <config> [-p]",
Aliases: []string{"initialize"},
Example: "ziti-controller edge init controller.yml -u admin -p o93wjh5n",
Example: "ziti controller edge init controller.yml -u admin -p o93wjh5n",
Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
return errors.New("config file not specified: ziti-controller edge init <config>")
return errors.New("config file not specified: ziti controller edge init <config>")
}

return nil
Expand Down
34 changes: 17 additions & 17 deletions doc/001-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ and management of endpoints that make use of the Ziti SDK. The Ziti SDK can be b
ingress and egress to the Ziti overlay network as well as to provide application specific networking to an individual
application. Enabling the Edge features is optional.

Both the Fabric and Edge features are built into the ziti-controller and ziti-router binaries.
Both the Fabric and Edge features are built into the ziti binary.

## Ziti Controller

The Ziti Controller (ziti-controller) is the main server component of a Ziti environment. It is the first piece of Ziti
The Ziti Controller is the main server component of a Ziti environment. It is the first piece of Ziti
that must be setup and configured. The controller houses all the router, service, and management data necessary
to run a Ziti environment. There is one, and only one, controller per Ziti environment.

Expand Down Expand Up @@ -49,42 +49,42 @@ Below is an outline of all the applications that are generated from this reposit
The following binaries are used to deploy long running servers that route traffic and manage the
configuration of a Ziti environment.

| Binary Name | Description|
| Subcommand | Description|
|-------------------| -----------|
| ziti-controller | Runs a central server necessary for Ziti environments|
| ziti-router | Runs a server capable of ingress'ing and egress'ing Ziti traffic standalone or as a mesh|
| ziti controller | Runs a central server necessary for Ziti environments|
| ziti router | Runs a server capable of ingress'ing and egress'ing Ziti traffic standalone or as a mesh|

### Tools

The following binaries provide utility or testing functionality.
The following commands provide utility or testing functionality.

| Binary Name | Description|
| Subcommand | Description|
|-------------------| -----------|
| ziti-enroller | Provides enrollment processing features for executables that do not directly support enrollment
| ziti-fabric-gw | Provides JSON RCP web service access to Ziti fabric management features
| ziti-fabric-test | The Ziti Fabric Toolbox which is used to test deployed fabric components|
| ziti edge enroll | Provides enrollment processing features for executables that do not directly support enrollment|
| ziti fabric inspect | Observe Ziti Fabric runtime values |

### Management

The following binaries are used to configure and manage a Ziti environment via command line interactions.

| Binary Name | Description|
| Subcommand | Description|
|-------------------| -----------|
| ziti-fabric | Provides command line access to Ziti Fabric management features|
| ziti | Provides command line access to Ziti management features|
| ziti fabric | Provides command line access to Ziti Fabric management features|
| ziti edge | Provides command line access to Ziti management features|

## Endpoint Clients

The following binaries are Ziti endpoint clients which have the Ziti SDK built into them and can connected to an
edge router. Endpoint clients can be application specific or act as a bridge to other applications, hosts, or underlay
networks.

| Binary Name | Description|
| Subcommand | Description|
|-------------------| -----------|
| ziti-tunnel | Provides the ability to intercept traffic to route traffic across Ziti|
| ziti tunnel | Provides the ability to intercept traffic to route traffic across Ziti|

All of the above binaries are cross platform compatible, except ziti-tunnel which is currently Linux only.
All of the above binaries are cross platform compatible, except `ziti tunnel` which is currently Linux-only.

## Further Exploration

Continue your OpenZiti exploration in [the next article about getting set up for local development](./002-local-dev.md) and building the apps from source.
Continue your OpenZiti exploration in [the next article about getting set up for local development](./002-local-dev.md)
and building the apps from source.
19 changes: 2 additions & 17 deletions doc/002-local-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ grep -Po '^go\s+\K\d+\.\d+(\.\d+)?$' go.mod

## Build and Install All Applications

This repo contains several Go applications, e.g. ziti-controller, ziti-router. These applications were reorganized as subcommands of the `ziti` CLI application, so it's no longer necessary to build the discrete binaries. Only the `ziti` CLI is necessary. The easiest way to build and install `ziti` in `${GOPATH}/bin` is:
This repo contains one main Go application, i.e. `ziti` with many subcommands. The easiest way to build and install `ziti` in `${GOPATH}/bin` is:

```bash
# build and install ziti CLI
Expand All @@ -23,22 +23,7 @@ If you add `${GOPATH}/bin` to your executable search `${PATH}` then you may imme

```bash
$ ziti version
NAME VERSION
ziti v0.0.0
ziti-controller not installed
ziti-prox-c not installed
ziti-router not installed
ziti-tunnel not installed
ziti-edge-tunnel v0.20.18-local
```

## Build ziti CLI

```bash
# build the binary without installing in GOPATH
go build -o ./build/ziti ./ziti/
# execute the binary
./build/ziti version
v0.0.0
```

## Run a Local Ziti Stack
Expand Down
4 changes: 2 additions & 2 deletions doc/ops-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Use unix sockets to limit security risk. Only the user on the machine who starte

Examples:

1. `ziti-controller --cli-agent-addr unix:/tmp/my-special-agent-file.sock`
2. `ziti-controller --cli-agent-addr tcp:127.0.0.1:10001`
1. `ziti controller --cli-agent-addr unix:/tmp/my-special-agent-file.sock`
2. `ziti controller --cli-agent-addr tcp:127.0.0.1:10001`

### Disabling the Agent

Expand Down
105 changes: 1 addition & 104 deletions quickstart/README.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,6 @@
# Quickstart

This directory contains a set of scripts designed to make it easy to establish a starter overlay network.
The expectation is that these scripts and docker image are useful for learning or for establishing
simple networks. As with any solution it is common for additional changes to the configuration to be required
after expanding beyond the initial setup.

There are three different modes contained in these folders. One mode allows you very quickly get setup and
run the two main components of a OpenZiti network: ziti-controller and ziti-router. The [Express](#express)
configuration will guide you here.

The remaining two modes all use [docker](https://docs.docker.com/get-started/) to establish environments.
The first of the docker-based quickstarts uses [docker-compose](https://docs.docker.com/compose/).
You will find a fully defined OpenZiti Network in a compose file which should allow you to understand better
and learn how multiple routers can be linked to form a mesh network or serve as an initial
template to build your own compose file from.

Lastly, you can choose to run [docker](https://docs.docker.com/get-started/) directly. This mode is necessarily
more verbose but should you prefer to not use docker-compose it can also illustrate how to establish
a OpenZiti Network piece by piece.

## Prerequisites

### Bash

All of these quickstarts will use bash. On MacOS/linux this will be natural however on Windows you'll want
to ensure you have a suitable shell. There are numerous shells available but perhaps the simplest will be
to use [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10). You
might also use git-bash, cygwin, or any other bash shell you fancy.

### Docker/Docker Compose

If you are interested in using the quickstarts which use docker/docker-compose you will clearly need to
have one or both installed and be moderately familiar with whichever you are using.

### Review All Scripts

Remember - it's always a good idea to review any scripts before you run them. We encourage you to review
the scripts in these folders before running them.

## Express

By far the easiest way to establish an environment quickly is to simply run the express install script
found at [./quickstart/docker/image/ziti-cli-functions.sh]().

### What It Does

The express install script will do quite a few things to get you bootstrapped. It will:

1. create a full suite of configuration files located by default at ~/.ziti/quickstart/$(hostname)
1. create a full suite of PKI
1. create a config file for the controller
1. create a config file for an edge router
1. download the latest distribution of ziti from github.com/openziti/ziti/releases
1. unzip the distribution
1. start the `ziti-controller` and `ziti-router` executables
1. the `ziti-controller` should now be exposed on https://$(hostname):1280

## Docker - Compose

The [docker-compose](https://docs.docker.com/compose/) based example will create numerous `ziti-router`s
as well as spooling up a `ziti-controller` and expose the controller on port 1280. This configuration is intended to
look and feel like the following image:
![image info](./docker-compose-nw.svg)

Here, a simple OpenZiti Network is shown which contains two public OpenZiti Edge Routers, one router without the "edge" enabled
and usable only for transit, and two private edge routers: one blue, one red. The goal with this setup is to attempt to
have a single isolated service that is not accessible from outside of the blue network (as best as possible with
only docker).

## Docker - No Compose

You can still startup a dev environment easily with [docker](https://docs.docker.com/get-started/) only. In this example
you will start a OpenZiti Controller as well as a single OpenZiti Edge Router.

### Prerequisite

Since the openziti project is all about creating overlay networks - it's important for the docker containers to be
able to communicate to one another. This is accomplished using a docker network and setting the alias of the container
on that docker network.

Before running the commands below please do the following:

#declare a variable that defines the 'network'
zitinw="myZitiNetwork"
#declare a fully qualified path to the location you want your shared files to go and create it
zitinw_shared="${HOME}/.ziti/dockerenvs/${zitinw}"
mkdir -p "${zitinw_shared}"

#make a docker network for isolation while allowing the parts to be able to interact
docker network create "$zitinw"

### Starting the Containers

To start the containers you can simply run these two commands in two different shells. (or choose to daemonize them
once you're ready to do so). Take special note of the initial variables used in these commands. The ${zitinw} variable
is expected to be set. See the Prerequisite section above:

OpenZiti Controller:

docker run -d --name "${zitinw}-controller" --volume "${zitinw_shared}":/openziti/shared -it --network="${zitinw}" --network-alias=ziti-controller --network-alias=ziti-edge-controller --rm openziti/quickstart /openziti/scripts/run-controller.sh

OpenZiti Edge Router:

routerName=edge-router; docker run -d --name "${zitinw}-${routerName}" --rm -e ZITI_ROUTER_NAME="${routerName}" --volume "${zitinw_shared}":/openziti/shared -it --network="${zitinw}" --hostname "${routerName}" --network-alias="${routerName}" --rm openziti/quickstart /openziti/scripts/run-router.sh edge
The Ziti quickstart documentation is here: [Ziti Network Quickstarts](https://openziti.io/docs/category/network).

## Releasing a new version of the Quickstart

Expand Down

0 comments on commit c78ab3d

Please sign in to comment.