Merge pull request #924 from openziti/release-next

Release v0.27.0
This commit is contained in:
Paul Lorenz
2022-12-12 18:21:15 -05:00
committed by GitHub
321 changed files with 3111 additions and 4820 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# see:
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners
* @openziti/sig-core
* @openziti/maintainers
@@ -0,0 +1,49 @@
name: mattermost-ziti-webhook
on:
issues:
issue_comment:
pull_request_review:
types: [ submitted ]
pull_request_review_comment:
pull_request:
types: [ opened, reopened, ready_for_review, closed ]
fork:
push:
tags:
- '*'
release:
types: [ released ]
workflow_dispatch:
watch:
types: [ started ]
jobs:
send-notifications:
runs-on: ubuntu-latest
name: POST Webhook
if: github.actor != 'dependabot[bot]'
steps:
- uses: openziti/ziti-mattermost-action-py@main
if: |
github.repository_owner == 'openziti'
&& ((github.event_name != 'pull_request_review')
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
with:
zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
webhookUrl: ${{ secrets.ZHOOK_URL }}
eventJson: ${{ toJson(github.event) }}
senderUsername: "GitHubZ"
destChannel: "dev-notifications"
- uses: openziti/ziti-mattermost-action-py@main
if: |
github.repository_owner == 'openziti'
&& ((github.event_name != 'pull_request_review')
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
with:
zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
webhookUrl: ${{ secrets.ZHOOK_URL }}
eventJson: ${{ toJson(github.event) }}
senderUsername: "GitHubZ"
destChannel: "github-sig-core"
+28
View File
@@ -0,0 +1,28 @@
name: mattermost-ziti-webhook
on:
create:
delete:
issues:
issue_comment:
pull_request_review:
pull_request_review_comment:
pull_request:
push:
fork:
release:
jobs:
mattermost-ziti-webhook:
runs-on: ubuntu-latest
name: POST Webhook
if: github.actor != 'dependabot[bot]'
env:
ZITI_LOG: 99
ZITI_NODEJS_LOG: 99
steps:
- uses: openziti/ziti-webhook-action@main
with:
ziti-id: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
webhook-url: ${{ secrets.ZITI_MATTERMOST_WEBHOOK_URL }}
webhook-secret: ${{ secrets.ZITI_MATTERMOSTI_WEBHOOK_SECRET }}
@@ -1,34 +0,0 @@
name: mattermost-ziti-webhook
on:
issues:
issue_comment:
pull_request_review:
types: [submitted]
pull_request_review_comment:
pull_request:
types: [opened, reopened]
push:
fork:
release:
types: [released]
workflow_dispatch:
watch:
types: [started]
jobs:
mattermost-ziti-webhook:
runs-on: ubuntu-latest
name: POST Webhook
steps:
- uses: openziti/ziti-mattermost-action-py@main
if: |
github.repository_owner == 'openziti'
&& ((github.event_name != 'pull_request_review')
|| (github.event_name == 'pull_request_review' && github.event.review.state == 'approved'))
with:
zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
webhookUrl: ${{ secrets.ZHOOK_URL }}
eventJson: ${{ toJson(github.event) }}
senderUsername: "GitHubZ"
destChannel: "dev-notifications"
+2
View File
@@ -29,3 +29,5 @@ linux-build
go.work
go.work.sum
.github/workflows/localtest.yml
doc/ha/pki
doc/ha/data
+57
View File
@@ -1,3 +1,60 @@
# Release 0.27.0
## What's New
* Ziti CLI
* The CLI has been cleaned up and unused, unusable and underused components have been removed or hidden
* Add create/delete transit-router CLI commands
* [Issue-706](https://github.com/openziti/ziti/issues/706) - Add port check to quickstart
## Ziti CLI
* The update command has been removed. It was non-functional, so this should not affect anyone
* The adhoc, ping and playbook commands have been removed. These were ansible and vagrant commands that were not widely used.
* Make the art command hidden, doesn't need to be removed, leave it as an easter egg
* Move ziti ps command under ziti agent. Remove all ziti ps subcommands, as they already exist as ziti agent subcommands
* Add `ziti controller` and `ziti router` commands
* They should work exactly the same as `ziti-controller` and `ziti router`
* The standalone binaries for `ziti-controller` and `ziti-router` are deprecated and will be removed in a future release
* Add hidden `ziti tunnel` command
* Should work exactly the same as `ziti-tunnel`
* Is hidden as `ziti-edge-tunnel` is the preferred tunnelling application
* The standalone binary `ziti-tunnel` is deprecated and will be removed in a future release
* The db, log-format and unwrap commands have been moved under a new ops command
* ziti executable download management has been deprecated
* The init and uninstall commands have been removed
* The install, upgrade, use and version commands have been hidden and will be hidden once tests using them are updated or replaced
* The demo and tutorial commands have been moved under the new learn subcommand
* `ziti edge enroll` now has a verbose option for additional debugging
* The `ziti edge` CLI now support create/delete transit-router. This allows transit/fabric routers to be provisioned using an enrollment process, rather than requiring certs to be created externally. Note that this requires that the fabric router config file has a `csr` section.
## Component Updates and Bug Fixes
* github.com/openziti/agent: [v1.0.5 -> v1.0.7](https://github.com/openziti/agent/compare/v1.0.5...v1.0.7)
* github.com/openziti/channel/v2: [v2.0.12 -> v2.0.24](https://github.com/openziti/channel/compare/v2.0.12...v2.0.24)
* github.com/openziti/edge: [v0.24.36 -> v0.24.75](https://github.com/openziti/edge/compare/v0.24.36...v0.24.75)
* [Issue #1253](https://github.com/openziti/edge/issues/1253) - Panic in controller getting hello from edge router
* [Issue #1233](https://github.com/openziti/edge/issues/1233) - edge-routers ref link in identities endpoint is incorrectly keyed
* [Issue #1234](https://github.com/openziti/edge/issues/1234) - identities missing service-config link ref
* [Issue #1232](https://github.com/openziti/edge/issues/1232) - edge management api identity-types endpoint produces incorrect links
* github.com/openziti/fabric: [v0.21.17 -> v0.21.36](https://github.com/openziti/fabric/compare/v0.21.17...v0.21.36)
* [Issue #525](https://github.com/openziti/fabric/issues/525) - Update metrics message propagation from router to controller for HA
* github.com/openziti/foundation/v2: [v2.0.7 -> v2.0.9](https://github.com/openziti/foundation/compare/v2.0.7...v2.0.9)
* github.com/openziti/identity: [v1.0.20 -> v1.0.28](https://github.com/openziti/identity/compare/v1.0.20...v1.0.28)
* github.com/openziti/runzmd: [v1.0.3 -> v1.0.7](https://github.com/openziti/runzmd/compare/v1.0.3...v1.0.7)
* github.com/openziti/sdk-golang: [v0.16.146 -> v0.18.19](https://github.com/openziti/sdk-golang/compare/v0.16.146...v0.18.19)
* github.com/openziti/storage: [v0.1.26 -> v0.1.30](https://github.com/openziti/storage/compare/v0.1.26...v0.1.30)
* github.com/openziti/transport/v2: [v2.0.38 -> v2.0.48](https://github.com/openziti/transport/compare/v2.0.38...v2.0.48)
* github.com/openziti/metrics: [v1.1.5 -> v1.2.2](https://github.com/openziti/metrics/compare/v1.1.5...v1.2.2)
* github.com/openziti/ziti: [v0.26.11 -> v0.26.12](https://github.com/openziti/ziti/compare/v0.26.11...v0.26.12)
* [Issue #892](https://github.com/openziti/ziti/issues/892) - Add timeout to ziti agent controller snapshot-db command
* [Issue #917](https://github.com/openziti/ziti/issues/917) - ZITI_BIN_ROOT is incorrect in docker env
* [Issue #912](https://github.com/openziti/ziti/issues/912) - Binaries not updated in docker-compose env with new image
* [Issue #897](https://github.com/openziti/ziti/issues/897) - Add CLI options to manage /edge/v1/transit-routers
* [Issue #706](https://github.com/openziti/ziti/issues/706) - Add port check to quickstart
# Release 0.26.11
## What's New
+4 -2
View File
@@ -19,16 +19,16 @@ package enrollment
import (
"encoding/json"
"fmt"
"github.com/openziti/ziti/ziti/cmd/common"
"io/ioutil"
"os"
"strings"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/identity/certtools"
"github.com/openziti/foundation/v2/term"
"github.com/openziti/identity/certtools"
"github.com/openziti/sdk-golang/ziti/config"
"github.com/openziti/sdk-golang/ziti/enroll"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -111,6 +111,7 @@ func NewEnrollCommand(p common.OptionsProvider) *cobra.Command {
enrollSubCmd.Flags().StringVarP(&action.Username, "username", "u", "", "Username for updb enrollment, prompted if not provided and necessary")
enrollSubCmd.Flags().StringVarP(&action.Password, "password", "p", "", "Password for updb enrollment, prompted if not provided and necessary")
enrollSubCmd.Flags().BoolVar(&action.RemoveJwt, "rm", false, "Remove the JWT on success")
enrollSubCmd.Flags().BoolVarP(&action.Verbose, "verbose", "v", false, "Enable verbose logging")
action.KeyAlg.Set("RSA") // set default
enrollSubCmd.Flags().VarP(&action.KeyAlg, "keyAlg", "a", "Crypto algorithm to use when generating private key")
@@ -170,6 +171,7 @@ func (e *EnrollAction) Run() error {
AdditionalCAs: e.CaOverride,
Username: e.Username,
Password: e.Password,
Verbose: e.Verbose,
}
if tkn.EnrollmentMethod == "updb" {
+10 -5
View File
@@ -1,6 +1,8 @@
# Overview
This local deployment README guides you to set up a running local Ziti stack. If you have not already built the apps in this repo you may go back to [the previous tutorial about getting set up for local development](./002-local-dev.md) for build instructions. The remainder of the tutorial will assume you have installed all the apps so they can be found in your shell's executable search `PATH`.
This local deployment README guides you to set up a running local Ziti stack. If you have not already built the apps in this repo you may go back
to [the previous tutorial about getting set up for local development](./002-local-dev.md) for build instructions. The remainder of the tutorial will assume you have installed all the apps so they can
be found in your shell's executable search `PATH`.
You will configure and run:
@@ -9,13 +11,15 @@ You will configure and run:
## A Note About Windows
These commands require a running BASH shell. Windows users will need to use WSL, [cygwin](https://www.cygwin.com/), a Linux virtual machine, or some other environment that supports BASH. The easiest thing might just be to use the shell that comes with [git bashfor windows](https://gitforwindows.org/). WSL is maturing more and more: [Mintty and WSL](https://github.com/mintty/wsltty).
These commands require a running BASH shell. Windows users will need to use WSL, [cygwin](https://www.cygwin.com/), a Linux virtual machine, or some other environment that supports BASH. The easiest
thing might just be to use the shell that comes with [git bashfor windows](https://gitforwindows.org/). WSL is maturing more and more: [Mintty and WSL](https://github.com/mintty/wsltty).
Also note that commands for `ziti`, `ziti-controller`, and `ziti-router` may need to have the `.exe` suffix appended to the example commands.
## Initialize the Environment
The remainder of this local development tutorital will instruct you to run terminal commands with current working directory of the top-level of this checked-out repo. The generated configuration files will use filesystem paths that are relative to this directory.
The remainder of this local development tutorital will instruct you to run terminal commands with current working directory of the top-level of this checked-out repo. The generated configuration files
will use filesystem paths that are relative to this directory.
Go ahead and create a `./db` directory. Git is configured to ignore this directory and it will house the tutorial files. You may delete this directory to reset the tutorial.
@@ -93,7 +97,8 @@ ziti-router enroll --jwt /tmp/router01.jwt ./db/router01-config.yml
## Run the Edge Router
Edge SDKs will connect to the running edge router to connect to services. Leave the router process running in a terminal so you can monitor the log messages while you continue the tutorial in a new terminal.
Edge SDKs will connect to the running edge router to connect to services. Leave the router process running in a terminal so you can monitor the log messages while you continue the tutorial in a new
terminal.
```bash
ziti-router run ./db/router01-config.yml
@@ -109,7 +114,7 @@ When prompted, select your running edge router `router01`.
ziti edge tutorial first-service
```
If you prefer, you may read [the first-service tutorial as a web site](../ziti/cmd/ziti/cmd/tutorial/tutorials/first-service.md)
If you prefer, you may read [the first-service tutorial as a web site](../ziti/cmd/tutorial/tutorials/first-service.md)
## Further Exploration
+20
View File
@@ -0,0 +1,20 @@
# Create the trust root, a self-signed CA
ziti pki create ca --trust-domain ha.test --pki-root ./pki --ca-file ca --ca-name 'HA Example Trust Root'
# Create the controller 1 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl1 --intermediate-name 'Controller One Signing Cert'
# Create the controller 1 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl1 --dns localhost --ip 127.0.0.1 --server-name ctrl1 --spiffe-id 'controller/ctrl1'
# Create the controller 2 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl2 --intermediate-name 'Controller Two Signing Cert'
# Create the controller 2 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl2 --dns localhost --ip 127.0.0.1 --server-name ctrl2 --spiffe-id 'controller/ctrl2'
# Create the controller 3 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl3 --intermediate-name 'Controller Three Signing Cert'
# Create the controller 3 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl3 --dns localhost --ip 127.0.0.1 --server-name ctrl3 --spiffe-id 'controller/ctrl3'
+10 -8
View File
@@ -1,15 +1,17 @@
v: 3
raft:
minClusterSize: 1
minClusterSize: 3
advertiseAddress: tls:localhost:6262
dataDir: ${ZITI_DATA}/ctrl1
dataDir: ./data/ctrl1
bootstrapMembers:
- tls:127.0.0.1:6363
- tls:127.0.0.1:6464
identity:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-client.cert.pem
server_cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-server.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/ctrl.key.pem
ca: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ca-chain.cert.pem
cert: ./pki/ctrl1/certs/server.cert
key: ./pki/ctrl1/keys/server.key
ca: ./pki/ctrl1/certs/server.chain.pem
ctrl:
listener: tls:127.0.0.1:6262
@@ -22,8 +24,8 @@ edge:
address: 127.0.0.1:1280
enrollment:
signingCert:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/intermediate.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/intermediate.key.decrypted.pem
cert: ./pki/ctrl1/certs/ctrl1.cert
key: ./pki/ctrl1/keys/ctrl1.key
edgeIdentity:
duration: 5m
edgeRouter:
+6 -7
View File
@@ -3,13 +3,12 @@ v: 3
raft:
minClusterSize: 3
advertiseAddress: tls:localhost:6363
dataDir: ${ZITI_DATA}/ctrl2
dataDir: ./data/ctrl2
identity:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-client.cert.pem
server_cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-server.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/ctrl.key.pem
ca: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ca-chain.cert.pem
cert: ./pki/ctrl2/certs/server.cert
key: ./pki/ctrl2/keys/server.key
ca: ./pki/ctrl2/certs/server.chain.pem
ctrl:
listener: tls:127.0.0.1:6363
@@ -22,8 +21,8 @@ edge:
address: 127.0.0.1:1380
enrollment:
signingCert:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/intermediate.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/intermediate.key.decrypted.pem
cert: ./pki/ctrl2/certs/ctrl2.cert
key: ./pki/ctrl2/keys/ctrl2.key
edgeIdentity:
duration: 5m
edgeRouter:
+6 -7
View File
@@ -3,13 +3,12 @@ v: 3
raft:
minClusterSize: 3
advertiseAddress: tls:localhost:6464
dataDir: ${ZITI_DATA}/ctrl3
dataDir: ./data/ctrl3
identity:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-client.cert.pem
server_cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ctrl-server.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/ctrl.key.pem
ca: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/ca-chain.cert.pem
cert: ./pki/ctrl3/certs/server.cert
key: ./pki/ctrl3/keys/server.key
ca: ./pki/ctrl3/certs/server.chain.pem
ctrl:
listener: tls:127.0.0.1:6464
@@ -22,8 +21,8 @@ edge:
address: 127.0.0.1:1480
enrollment:
signingCert:
cert: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/certs/intermediate.cert.pem
key: ${ZITI_SOURCE}/ziti/etc/ca/intermediate/private/intermediate.key.decrypted.pem
cert: ./pki/ctrl3/certs/ctrl3.cert
key: ./pki/ctrl3/keys/ctrl3.key
edgeIdentity:
duration: 5m
edgeRouter:
+102
View File
@@ -0,0 +1,102 @@
# HA Setup for Development
**NOTE: HA is a work in progress and not yet usable for anything other than developing HA**
To set up a local three node HA cluster, do the following.
## Create a CA
Create a self-signed certificate authority (CA) for the trust-root of your cluster
```
ziti pki create ca --trust-domain ha.test --pki-root ./pki --ca-file ca --ca-name 'HA Example Trust Root'
```
## Create Controller Certs
We are going to create an intermediate CA for each controller. We'll use this intermediate CA
for the following purposes:
1. To create a cert which will represent the controller. It will be used
1. On the client side when dialing other controllers in the cluster
2. On the server side when receiving connections from other controllers
3. On the server side when receiving connections from routers
4. On the server when handling REST API requests
2. To create identity certs as part of the identity enrollment process
3. To create router certs as part of the router enrollment process
### Notes
#### Client vs Server Certs
You may use separate certs and keys for client and server connections, but it's not necessary.
When you use a server cert on the client side it exposes information about what IPs and DNS entries
the cert is valid for, but since we're only connecting to other controllers, this should not be
a concern. However, the option to use separate certs is available, should you wish to use it.
#### REST Endpoint Certs
You may also use a different set of certs for the REST endpoint.
#### Sharing Signing Certs
You could use the same signing cert for all controllers in a cluster. However, if a signing
cert is ever compromised, all certs signed by the signing cert would need to be revoked. By
using a separate cert for each controller we limit the fallout from an individual controller
or cert being compromised.
### Create the Controller 1 signing and server certs
```shell
# Create the controller 1 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl1 --intermediate-name 'Controller One Signing Cert'
# Create the controller 1 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl1 --dns localhost --ip 127.0.0.1 --server-name ctrl1 --spiffe-id 'controller/ctrl1'
# Create the controller 2 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl2 --intermediate-name 'Controller Two Signing Cert'
# Create the controller 2 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl2 --dns localhost --ip 127.0.0.1 --server-name ctrl2 --spiffe-id 'controller/ctrl2'
# Create the controller 3 intermediate/signing cert
ziti pki create intermediate --pki-root ./pki --ca-name ca --intermediate-file ctrl3 --intermediate-name 'Controller Three Signing Cert'
# Create the controller 3 server cert
ziti pki create server --pki-root ./pki --ca-name ctrl3 --dns localhost --ip 127.0.0.1 --server-name ctrl3 --spiffe-id 'controller/ctrl3'
```
## Running the Controllers
1. The controller configuration files have relative paths, so make sure you're running things from this directory.
2. Start all three controllers
1. `ziti controller run ctrl1.yml`
2. `ziti controller run ctrl2.yml`
3. `ziti controller run ctrl3.yml`
4. All three are configured with `minClusterSize` of 3, so they will wait to be joined to a raft cluster
5. The ctrl1.yml config file has the other two controllers as bootstrap members, so when it starts the first controller will start trying form the raft cluster.
3. Initialize the edge using the agent
1. `ziti agent controller init <pid of any controller> admin admin 'Default Admin'`
2. You can of course use different values if you desire
You should now have a three node cluster running. You can log into each controller individually.
1. `ziti edge login localhost:1280`
2. `ziti edge -i ctrl2 login localhost:1380`
3. `ziti edge -i ctrl3 login localhost:1480`
You could then create some model data on any controller:
```
ziti learn demo setup echo client
ziti learn demo setup echo single-sdk-hosted
```
Any view the results on any controller
```
ziti edge ls services
ziti edge -i ctrl2 ls services
ziti edge -i ctrl3 ls services
```
+268 -30
View File
@@ -1,42 +1,280 @@
# HA Setup for Development
# OpenZiti HA
**NOTE: HA is a work in progress and not yet usable for anything other than developing HA**
This document gives a brief overview of how OpenZiti HA works and how it differs from running
OpenZiti in non-HA mode.
To set up a local three node HA cluster, do the following.
## Operational Considerations
1. Ensure ZITI_SOURCE is set to the directory under which you have ziti checked out
1. Ex: if you have ziti checked out to ~/work/ziti, then set ZITI_SOURCE to ~/work
1. Create a directory where you want to store controller databases and raft data.
1. Set ZITI_DATA to this directory
1. Run `ziti-controller run ctrl1.yml` with the ctrl1.yml in this directory.
1. This first controller is going to start a 1 node cluster, because raft/minClusterSize is set to 1
1. Initialize the edge by doing `ziti agent controller init admin admin 'Default Admin'`
1. You can of course use different values if you desire
1. Start the second and third controllers
1. These are both configured with `minClusterSize` of 3, so they will wait to be joined to a raft cluster
1. Find the pid of the first ziti-controller instance
1. Add the first controller
1. `ziti agent controller raft-join <pid of first controller> $(cat $ZITI_DATA/ctrl1/id) tls:localhost:6363`
1. Join the second controller
1. `ziti agent controller raft-join <pid of first controller> $(cat $ZITI_DATA/ctrl2/id) tls:localhost:6464`
### System of Record
You should now have a three node cluster running. You can log into each controller individually.
In controller that's not configured for HA, the bolt database is the system of record. In
an HA setup, the raft journal is the system of record. The raft journal is stored in two places,
a snapshot directory and a bolt database of raft journal entries.
1. `ziti edge login localhost:1280`
1. `ziti edge -i ctrl2 login localhost:1380`
1. `ziti edge -i ctrl3 login localhost:1480`
So a non-HA setup will have:
You could then create some model data on any controller:
* ctrl.db
```
ziti demo setup echo client
ziti demo setup echo single-sdk-hosted
An HA setup will have:
* raft.db - the bolt database containing raft journal entries
* snapshots/ - a directory containing raft snapshots. Each snapshot is snapshot of the controller bolt db
* ctrl.db - the controller bolt db, with the current state of the model
The location of all three is controlled by the raft/dataDir config property.
```yaml
raft:
dataDir: /var/ziti/data/
```
Any view the results on any controller
When an HA controller starts up, it will first apply the newest snapshot, then any newer journal entries
that aren't yet contained in a snapshot. This means that an HA controller should start with a
blank DB that can be overwritten by snapshot and/or have journal entries applied to it. So an HA
controller will delete or rename the existing controller database and start with a fresh bolt db.
### Bootstrapping
#### Cluster Initialization
Initial cluster setup can be configured either in the config file or via agent commands.
The controller will not fully start until the raft cluster has bootstrapped. The minimum
number of cluster members is set in the config file. Recommended cluster sizes are
3, 5 or 7. A cluster size of 1 is mostly useful for testing and development.
**Config File Example**
```yaml
raft:
dataDir: /var/ziti/data/
minClusterSize: 3
bootstrapMembers:
- tls:192.168.1.100
- tls:192.168.1.101
```
**Agent Comands**
There are now three new agent commands specific to the controller.
**Adding Members**
```shell
# Adding Members
ziti agent controller raft-join <other controller raft address>
# Listing Members
ziti agent controller raft-list
# Removing Members
ziti agent controller raft-remove <controller id>
```
#### Edge Admin Initialization
Because RAFT is now the system of record, the previous pattern for configuring the default
admin won't work. In a non-HA system you initialized the controller raft DB with an admin
user directly. If you do this with an HA system, the changes you made directly to the DB
will be lost and replaced by whatever is in raft. To initialize an HA controller cluster
use the new agent command.
```shell
ziti agent controller init <admin username> <admin password> <admin name>
```
The controller will not fully start until the edge admin has been initialized.
### Snapshot Application and Restarts
If a controller receives a snapshot to apply after starting up, it will apply the snapshot and
then terminate. This assumes that there is a restart script which will bring the controller
back up after it terminates.
This should only happen if a controller is connected to the cluster and then gets disconnected
for long enough that a snapshot is created while it's disconnected. Because applying a snapshot
requires replacing the underlying controller bolt DB, the easiest way to do that is restart.
That way we don't have to worry about replacing the bolt DB underneath a running system.
### Metrics
In an HA system, routers will send metrics to all controllers to which they are connected.
There is a new `doNotPropagate` flag in the metrics message, which will be set to false
until the router has successfully delivered the metrics message to a controller. The flag
will then be set to true. So the first controller to get the metrics message is expected
to deliver the metrics message to the events system for external integrators. The other
controllers will have `doNotPropage` set to true, and will only use the metrics message
internally, to update routing data.
### Certificates
There are many ways to set up certificates, so this will just cover a recommended configuration.
The primary thing to ensure is that controllers have a shared root of trust. A configuration
that works would be as follows:
1. Create a self-signed root CA
2. Create an intermediate signing cert for each controller
3. Create a server cert using the signing cert for each controller
4. Make sure that the CA bundle for each server includes both the root CA and the intermediate CA for that server
Note that controller server certs must contain a SPIFFE id of the form
```
ziti edge ls services
ziti edge -i ctrl2 ls services
ziti edge -i ctrl3 ls services
spiffe://<trust domain>/controller/<controller id>
```
So if your trust domain is `example.com` and your controller id is `ctrl1`, then your SPIFFE id
would be:
```
spiffe://example.com/controller/ctrl1
```
**SPIFFE ID Notes:**
* This ID must be set as the only URI in the `X509v3 Subject Alternative Name` field in the certificate.
* These IDs are used to allow the controllers to identify each during the mTLS negotiation.
* The OpenZiti CLI supports creating SPIFFE IDs in your certs
* Use the `--trust-domain` flag when creating CAs
* Use the `--spiffe-id` flag when creating server or client certificates
See [Developer Setup](./dev-setup.md) for the commands to make this happen and a bit more discussion
of certs.
### Open Ports
Controllers now establish connections with each other, for two purposes.
1. Forwarding model updates to the leader, so they can be applied to the raft cluster
2. raft communication
Both kinds of traffic flow over the same connection.
These connections do not require any extra open ports as we are using the control
channel listener to listen to both router and controller connections. As part of
the connection process the connection type is provided and the appropriate
authentication and connection setup happens based on the connection type. If no
connection type is provided, it's assumed to be a router.
## Distributed Model
When looking at how to make the OpenZiti controller model distributed, we first looked at
what characteristics we needed for the model data.
Model data is the information the controller needs to figure out what it can do. This
includes things like:
* Services
* Routers
* Terminator
* Identities
* Policies
* Configs
### Model Data Characteristics
* All data required on every controller
* Read characteristics
* Reads happen all the time, from every client and as well as admins
* Speed is very important. They affect how every client perceives the system.
* Availability is very important. Without reading definitions, can’t create new connections
* Can be against stale data, if we get consistency within a reasonable timeframe (seconds to minutes)
* Write characteristics
* Writes only happen from administrators
* Speed needs to be reasonable, but doesn't need to be blazing fast
* Write availability can be interrupted, since it primarily affects management operations
* Must be consistent. Write validation can’t happen with stale data. Don’t want to have to deal with reconciling concurrent, contradictory write operations.
* Generally involves controller to controller coordination
Of the distribution mechanisms we looked at, RAFT had the best fit.
### RAFT Characteristics
* Writes
* Consistency over availability
* Good but not stellar performance
* Reads
* Every node has full state
* Local state is always internally consistent, but maybe slightly behind the leader
* No coordination required for reads
* Fast reads
* Reads work even when other nodes are unavailable
* If latest data is desired, reads can be forwarded to the current leader
So the OpenZiti controller uses RAFT to distribute the data model. Specifically it uses the
[HashiCorp Raft Library](https://github.com/hashicorp/raft/).
### Updates
The basic flow for model updates is as follows:
1. A client requests a model update via the REST API.
2. The controller checks if it is the raft cluster leader. If it is not, it forwards the request to the leader.
3. Once the request is on the leader, it applies the model update to the raft log. This involves getting a quorum of the controllers to accept the update.
4. One the update has been accepted, it will be executed on each node of the cluster. This will generate create one or more changes to the bolt database.
5. The results of the operation (success or failure) are returned to the controller which received the original REST request.
6. The controller waits until the operation has been applied locally.
7. The result is returned to the REST client.
### Reads
Reads are always done to the local bolt database for performance. The assumption is that if something
like a policy change is delayed, it may temporarily allow a circuit to be created, but as soon as
the policy update is applied, it will make changes to circuits as necessary.
## Runtime Data
In addition to model data, the controller also manages some amount of runtime data. This data is
for running OpenZiti's core functions, i.e. managing the flow of data across the mesh, along with
related authentication data. So this includes things like:
* Links
* Circuits
* API Sessions
* Sessions
* Posture Data
### Runtime Data Characteristics
Runtime data has different characteristics than the model data does.
* Not necessarily shared across controllers
* Reads **and** writes must be very fast
* Generally involves sdk to controller or controller to router coordination
Because writes must also be fast, RAFT is not a good candidate for storing this data.
Good performance is critical for these components, so they are each evaluated individually.
### Links
Each controller currently needs to know about links so that it can make routing decisions.
However, links exist on routers. So, routers are the source of record for links.
When a router connects to a controller, the router will tell the controller about any
links that it already has. The controller will ask to fill in any missing links and
the controller will ensure that it doesn't create duplicate links if multiple
controllers request the same link be created. If there are duplicates, the router
will inform the controller of the existing link.
The allows the routers to properly handle link dials from multiple routers and keep
controllers up to date with the current known links.
### Circuits
Circuits were and continue to be stored in memory for both standalone and HA mode
controllers.Circuits are not distributed. Rather, each controller remains responsible
for any circuits that it created.
When a router needs to initiate circuit creation it will pick the one with the lowest
response time and send a circuit creation request to that router. The controller
will establish a route. Route tables as well as the xgress endpoints now track
which controller is responsible for the associated circuit. This way when failures
or other notifications need to be sent, the router knows which controller to talk to.
This gets routing working with multiple controllers without a major refactor. Future
work will likely delegate more routing control to the routers, so routing should
get more robust and distributed over time.
### Api Sessions, Sessions, Posture Data
API Sessions and Sessions are moving to bearer tokens. Posture Data is TBD.
+46 -29
View File
@@ -7,10 +7,11 @@ require (
github.com/Jeffail/gabs/v2 v2.6.1
github.com/MakeNowJust/heredoc v1.0.0
github.com/blang/semver v3.5.1+incompatible
github.com/docker/docker v20.10.21+incompatible
github.com/fatih/color v1.13.0
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa
github.com/go-acme/lego/v4 v4.2.0
github.com/go-openapi/runtime v0.24.2
github.com/go-openapi/runtime v0.25.0
github.com/go-openapi/strfmt v0.21.3
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.5.2
@@ -19,30 +20,30 @@ require (
github.com/jedib0t/go-pretty/v6 v6.4.0
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/michaelquigley/pfxlog v0.6.9
github.com/openziti/agent v1.0.5
github.com/openziti/channel/v2 v2.0.12
github.com/openziti/edge v0.24.36
github.com/openziti/fabric v0.21.17
github.com/openziti/foundation/v2 v2.0.7
github.com/openziti/identity v1.0.20
github.com/openziti/runzmd v1.0.3
github.com/openziti/sdk-golang v0.16.146
github.com/openziti/storage v0.1.26
github.com/openziti/transport/v2 v2.0.38
github.com/openziti/agent v1.0.7
github.com/openziti/channel/v2 v2.0.24
github.com/openziti/edge v0.24.75
github.com/openziti/fabric v0.21.36
github.com/openziti/foundation/v2 v2.0.9
github.com/openziti/identity v1.0.28
github.com/openziti/runzmd v1.0.7
github.com/openziti/sdk-golang v0.18.19
github.com/openziti/storage v0.1.30
github.com/openziti/transport/v2 v2.0.48
github.com/openziti/xweb/v2 v2.0.2
github.com/openziti/ziti-db-explorer v1.1.1
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.9.1
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/russross/blackfriday v1.5.2
github.com/shirou/gopsutil/v3 v3.22.10
github.com/shirou/gopsutil/v3 v3.22.11
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.10.0
github.com/stretchr/testify v1.8.1
go.etcd.io/bbolt v1.3.6
golang.org/x/net v0.2.0
golang.org/x/net v0.4.0
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.28.1
gopkg.in/AlecAivazis/survey.v1 v1.8.7
@@ -56,6 +57,7 @@ require (
github.com/AppsFlyer/go-sundheit v0.5.0 // indirect
github.com/MichaelMure/go-term-markdown v0.1.4 // indirect
github.com/MichaelMure/go-term-text v0.3.1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/alecthomas/chroma v0.10.0 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20211106181442-e4c1a74c66bd // indirect
@@ -64,19 +66,24 @@ require (
github.com/biogo/store v0.0.0-20200525035639-8c94ae1e7c9c // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/c-bata/go-prompt v0.2.6 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/coreos/go-iptables v0.6.0 // indirect
github.com/creack/pty v1.1.11 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 // indirect
github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.3 // indirect
@@ -87,6 +94,7 @@ require (
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.22.0 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c // indirect
github.com/google/uuid v1.3.0 // indirect
@@ -95,7 +103,8 @@ require (
github.com/hashicorp/go-hclog v1.3.1 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack v0.5.5 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/raft v1.3.11 // indirect
github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0 // indirect
@@ -107,7 +116,7 @@ require (
github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/kyokomi/emoji/v2 v2.2.10 // indirect
github.com/kyokomi/emoji/v2 v2.2.11 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lucsky/cuid v1.2.1 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
@@ -117,28 +126,32 @@ require (
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
github.com/mdlayher/netlink v1.6.2 // indirect
github.com/mdlayher/socket v0.2.3 // indirect
github.com/mdlayher/netlink v1.7.0 // indirect
github.com/mdlayher/socket v0.4.0 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/miekg/dns v1.1.50 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20221120202655-abb19827d345 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
github.com/netfoundry/secretstream v0.1.2 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openziti/dilithium v0.3.3 // indirect
github.com/openziti/jwks v1.0.2 // indirect
github.com/openziti/metrics v1.1.5 // indirect
github.com/openziti/metrics v1.2.2 // indirect
github.com/openziti/x509-claims v1.0.3 // indirect
github.com/orcaman/concurrent-map/v2 v2.0.0 // indirect
github.com/orcaman/concurrent-map/v2 v2.0.1 // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/term v1.2.0-beta.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rodaine/table v1.0.1 // indirect
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
github.com/speps/go-hashids v2.0.0+incompatible // indirect
@@ -157,15 +170,19 @@ require (
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.mongodb.org/mongo-driver v1.10.0 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/image v0.1.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/term v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.1.12 // indirect
go.opentelemetry.io/otel v1.11.1 // indirect
go.opentelemetry.io/otel/trace v1.11.1 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 // indirect
golang.org/x/image v0.2.0 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/tools v0.2.0 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gotest.tools/v3 v3.4.0 // indirect
)
+95 -73
View File
@@ -48,6 +48,7 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGy
github.com/AppsFlyer/go-sundheit v0.5.0 h1:/VxpyigCfJrq1r97mn9HPiAB2qrhcTFHwNIIDr15CZM=
github.com/AppsFlyer/go-sundheit v0.5.0/go.mod h1:2ZM0BnfqT/mljBQO224VbL5XH06TgWuQ6Cn+cTtCpTY=
github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg=
github.com/Azure/go-autorest/autorest v0.5.0/go.mod h1:9HLKlQjVBH6U3oDfsXOeVc56THsLPw1L03yban4xThw=
github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E=
@@ -75,6 +76,8 @@ github.com/MichaelMure/go-term-markdown v0.1.4 h1:Ir3kBXDUtOX7dEv0EaQV8CNPpH+T7A
github.com/MichaelMure/go-term-markdown v0.1.4/go.mod h1:EhcA3+pKYnlUsxYKBJ5Sn1cTQmmBMjeNlpV8nRb+JxA=
github.com/MichaelMure/go-term-text v0.3.1 h1:Kw9kZanyZWiCHOYu9v/8pWEgDQ6UVN9/ix2Vd2zzWf0=
github.com/MichaelMure/go-term-text v0.3.1/go.mod h1:QgVjAEDUnRMlzpS6ky5CGblux7ebeiLnuy9dAaFZu8o=
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -132,8 +135,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7
github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI=
github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY=
github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
@@ -168,8 +171,9 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -190,6 +194,12 @@ github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55k
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog=
github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -245,6 +255,11 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY=
@@ -264,15 +279,14 @@ github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXym
github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g=
github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro=
github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw=
github.com/go-openapi/runtime v0.24.2 h1:yX9HMGQbz32M87ECaAhGpJjBmErO3QLcgdZj9BzGx7c=
github.com/go-openapi/runtime v0.24.2/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk=
github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc=
github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs=
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI=
github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg=
github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k=
github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k=
github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o=
github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
@@ -280,7 +294,6 @@ github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/
github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y=
github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8=
@@ -288,7 +301,6 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
@@ -318,6 +330,7 @@ github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
@@ -376,7 +389,6 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
@@ -455,8 +467,10 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4=
github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4=
github.com/hashicorp/golang-lru/v2 v2.0.1/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
@@ -532,8 +546,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
github.com/kyokomi/emoji/v2 v2.2.10 h1:1z5eMVcxFifsmEoNpdeq4UahbcicgQ4FEHuzrCVwmiI=
github.com/kyokomi/emoji/v2 v2.2.10/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
github.com/kyokomi/emoji/v2 v2.2.11 h1:Pf/ZWVTbnAVkHOLJLWjPxM/FmgyPe+d85cv/OLP5Yus=
github.com/kyokomi/emoji/v2 v2.2.11/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA=
github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w=
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
@@ -598,10 +612,10 @@ github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a/go.mod h1:XPvLUNfbS4f
github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI=
github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mdlayher/netlink v1.6.2 h1:D2zGSkvYsJ6NreeED3JiVTu1lj2sIYATqSaZlhPzUgQ=
github.com/mdlayher/netlink v1.6.2/go.mod h1:O1HXX2sIWSMJ3Qn1BYZk1yZM+7iMki/uYGGiwGyq/iU=
github.com/mdlayher/socket v0.2.3 h1:XZA2X2TjdOwNoNPVPclRCURoX/hokBY8nkTmRZFEheM=
github.com/mdlayher/socket v0.2.3/go.mod h1:bz12/FozYNH/VbvC3q7TRIK/Y6dH1kCKsXaUeXi/FmY=
github.com/mdlayher/netlink v1.7.0 h1:ZNGI4V7i1fJ94DPYtWhI/R85i/Q7ZxnuhUJQcJMoodI=
github.com/mdlayher/netlink v1.7.0/go.mod h1:nKO5CSjE/DJjVhk/TNp6vCE1ktVxEA8VEh8drhZzxsQ=
github.com/mdlayher/socket v0.4.0 h1:280wsy40IC9M9q1uPGcLBwXpcTQDtoGwVt+BNoITxIw=
github.com/mdlayher/socket v0.4.0/go.mod h1:xxFqz5GRCUN3UEOm9CZqEJsAbe1C8OwSK46NlmWuVoc=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
@@ -628,14 +642,17 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/moby/term v0.0.0-20221120202655-abb19827d345 h1:J9c53/kxIH+2nTKBEfZYFMlhghtHpIHSXpm5VRGHSnU=
github.com/moby/term v0.0.0-20221120202655-abb19827d345/go.mod h1:15ce4BGCFxt7I5NQKT+HV0yEDxmf6fSysfEDiVo3zFM=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY4wsPvgQH/jsuJi4XO2ssZbdsIizr4CVC8=
github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM=
@@ -667,36 +684,40 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48=
github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openziti/agent v1.0.5 h1:wZUcMYqvwspOjDSaejMtczSXnJoqK0edI9HcEIFsTIs=
github.com/openziti/agent v1.0.5/go.mod h1:6APWgkPP6Uxf1/VyirdTVLAJxwam2vVyakrVw6yvs40=
github.com/openziti/channel/v2 v2.0.12 h1:0/qQ3qCSt70gpUuxQk8MRD3+iGKqS4wuYZpbcOzS+tc=
github.com/openziti/channel/v2 v2.0.12/go.mod h1:mESOWBphvr2/P6j3FDIiQF+Z6z3E3Vjv6GaCoGWY6eM=
github.com/openziti/agent v1.0.7 h1:tEZlYQ5/y7oeuYUAdqN6AAayQAloL8Ms6prSddaUDVY=
github.com/openziti/agent v1.0.7/go.mod h1:6APWgkPP6Uxf1/VyirdTVLAJxwam2vVyakrVw6yvs40=
github.com/openziti/channel/v2 v2.0.24 h1:mg9/+VMyXKXfbTZ06quwjRcTQAqU/MEMm+KxAboRLEo=
github.com/openziti/channel/v2 v2.0.24/go.mod h1:Y75U/q7l2U+Iib+rfSXO0IscYvksfwWjgdGDXcM/WwY=
github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k=
github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo=
github.com/openziti/edge v0.24.36 h1:3ywHRL5XXYtA4+y12WptofLhkndshePuy/MyKT3A2xo=
github.com/openziti/edge v0.24.36/go.mod h1:3I6GZTcb3j57Y9IlBrnpceklfzdR10ejp4D7+11B6BM=
github.com/openziti/fabric v0.21.17 h1:oT32L0Lu64Jd7CkHrQZdOwG0Mew8bMBEUowtRyhERvs=
github.com/openziti/fabric v0.21.17/go.mod h1:VsRUi2wdA3k4bOXxfrohaoUuhcjf8ZdpPPN0NzD8my4=
github.com/openziti/foundation/v2 v2.0.7 h1:QtpP0ntUhr/7uLR1iM7eEkrusQ2b2ZqTblgdq8cac9Y=
github.com/openziti/foundation/v2 v2.0.7/go.mod h1:Z0gnQsGJb/H/B+pixLtmCIpw1dBllD4QoT6LeD35WzA=
github.com/openziti/identity v1.0.20 h1:8nsQFHpqKS1ByD8QuPDxQWfS8CQEidyn5jFXWnXguX0=
github.com/openziti/identity v1.0.20/go.mod h1:X0WLWEgnM1iL8asNbuu7vUW0kZq8nnWKepMW214C9Mk=
github.com/openziti/edge v0.24.75 h1:siioCtoR1ZgiLO1NRqyUT+cEO9UtN6jNTKzs/978ZOk=
github.com/openziti/edge v0.24.75/go.mod h1:UYTO4JPv8Wud7rWbrA5XImyGUZIMdliSTRCXe3ZYXN0=
github.com/openziti/fabric v0.21.36 h1:AIqNFL+W0uPhItroVcr7+9uJB4fd9S46y0c9I/7P2bk=
github.com/openziti/fabric v0.21.36/go.mod h1:HBtR0TQ7kLWjp08ynloTV2CaJNRdFbybsEUlJQ0xjwo=
github.com/openziti/foundation/v2 v2.0.9 h1:4Z53AzfCcI8XK46eeoSDabroVk1GS2An04WDjNfwmio=
github.com/openziti/foundation/v2 v2.0.9/go.mod h1:Z0gnQsGJb/H/B+pixLtmCIpw1dBllD4QoT6LeD35WzA=
github.com/openziti/identity v1.0.28 h1:0Rjss3aBT4a2iC8IEXxzj2kfld5LTSD3eEUQkx8Uy+E=
github.com/openziti/identity v1.0.28/go.mod h1:5eDB+JOGuvu6XsA8dAkVDMdoyiylQBS5UqLLMAbiV9Y=
github.com/openziti/jwks v1.0.2 h1:32BGXIAnefS+v7uXKPb1x8/cQ7srek6Ai06dsrMTY4E=
github.com/openziti/jwks v1.0.2/go.mod h1:KwO0x9FBG0aoJS5f6nH5xeHoplyR1H143SMI9kF0mC8=
github.com/openziti/metrics v1.1.5 h1:qhsGsYWdp7LxPCYi9WMGHGbjiHvsT1DtjM44JNHLZWk=
github.com/openziti/metrics v1.1.5/go.mod h1:B6RCuVRTpI3kEIhQlCvsHj3Pqi6bSnqFmRPgfgv9ico=
github.com/openziti/runzmd v1.0.3 h1:g+JyJS66ykMIidLTzroKBLwbsSF9S1hDvolj2PpD8lE=
github.com/openziti/runzmd v1.0.3/go.mod h1:2YuoQl5zZ6edfb+k1MjglW2cwfZvXwug2WldvBIUNrU=
github.com/openziti/sdk-golang v0.16.146 h1:5R7ZOSh+Q0pmZdzEv3l2Q03KQgiUrpaj3ymD8DjBT5k=
github.com/openziti/sdk-golang v0.16.146/go.mod h1:yOgsofdEd82pph97N4DX0xYlfgjJ2LCgC/mHkMw+5hU=
github.com/openziti/storage v0.1.26 h1:1tV4czY/TNmzX3raUZjbR8jVl5L92pdD0SjmdzCzUmE=
github.com/openziti/storage v0.1.26/go.mod h1:Zkm+4d2gckkIbuuCw/sKFWKKhPROZak3gLFzdII0KWQ=
github.com/openziti/transport/v2 v2.0.38 h1:9+EtBF052TtGvT5isuPj/SUTXNHg8RbkGBcEKfiUPd8=
github.com/openziti/transport/v2 v2.0.38/go.mod h1:FB/pqmA8RdUsoWtpTc6E/it6lLdA7GOugy9no3JDU/4=
github.com/openziti/metrics v1.2.2 h1:L2V1yc+eIp8ARn74Pv4jL8YSJaMskaGW3DJdmWt+hi8=
github.com/openziti/metrics v1.2.2/go.mod h1:I9s/rq19W7XPNMgR/zLQr1Yz9rAXzajuf9hneWM2JIE=
github.com/openziti/runzmd v1.0.7 h1:2EC3bVjjAuFsECaZbwTOJdDbSk3I8JpfaI2ruGdEGiA=
github.com/openziti/runzmd v1.0.7/go.mod h1:0AlunP33eJ/S21az+ACP9/INVeUSR80pELXYXs2hK0I=
github.com/openziti/sdk-golang v0.18.19 h1:mtoSdGLgCabo/wLTpafMY7aqWZ7hU3YrwKduTRvYrL4=
github.com/openziti/sdk-golang v0.18.19/go.mod h1:AVmYqSCfUQ1pQQKfhgCqO+Bkc2sYzzn7W6KoHO7TZsM=
github.com/openziti/storage v0.1.30 h1:ZrX3SYNrElSrZ0fDbU1F9bPz4a+aghD+9h1qXAbJfIg=
github.com/openziti/storage v0.1.30/go.mod h1:mvjbhHA9nAE0tTCG2ywwvaZnuLYnqejxyFbtmK9ErJw=
github.com/openziti/transport/v2 v2.0.48 h1:9j8UcJ+4qXEUS9jvf3AbnajEbJwh+hZe6D4dbzD8tUc=
github.com/openziti/transport/v2 v2.0.48/go.mod h1:665EJFwx9/gbr6u/25j1CoxvV17X0TttQv0Pb0YK0DU=
github.com/openziti/x509-claims v1.0.3 h1:HNdQ8Nf1agB3lBs1gahcO6zfkeS4S5xoQ2/PkY4HRX0=
github.com/openziti/x509-claims v1.0.3/go.mod h1:Z0WIpBm6c4ecrpRKrou6Gk2wrLWxJO/+tuUwKh8VewE=
github.com/openziti/xweb/v2 v2.0.2 h1:XYlVFriTq/U1wcUrc+XPnWJGhXh9NJPhtQ7+r3aC0cU=
@@ -704,8 +725,8 @@ github.com/openziti/xweb/v2 v2.0.2/go.mod h1:KQOOlnJk08EZT3TWkvDj/pbIUEVbgG0IrrN
github.com/openziti/ziti-db-explorer v1.1.1 h1:G0eoTby+aIjjt5TxEfR+FMI2CWd4RvZFjzaIMX2lEBw=
github.com/openziti/ziti-db-explorer v1.1.1/go.mod h1:h76h7Tsb+khb0v+CqYKL6ifUfJbUMjGBFU2IvupfBE4=
github.com/oracle/oci-go-sdk v24.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/orcaman/concurrent-map/v2 v2.0.0 h1:iSMwuBQvQ1nX5i9gYuGMiSy0fjWHmazdjF+NdSO9JzI=
github.com/orcaman/concurrent-map/v2 v2.0.0/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM=
github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c=
github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM=
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 h1:mOvehYivJ4Aqu2CPe3D3lv8jhqOI9/1o0THxJHBE0qw=
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9/go.mod h1:gLH27qo/dvMhLTVVyMELpe3Tut7sOfkiDg7ZpeqKwsw=
@@ -773,8 +794,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8=
github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rodaine/table v1.0.1 h1:U/VwCnUxlVYxw8+NJiLIuCxA/xa6jL38MY3FYysVWWQ=
github.com/rodaine/table v1.0.1/go.mod h1:UVEtfBsflpeEcD56nF4F5AocNFta0ZuolpSVdPtlmP4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@@ -790,8 +811,8 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb
github.com/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shirou/gopsutil/v3 v3.22.10 h1:4KMHdfBRYXGF9skjDWiL4RA2N+E8dRdodU/bOZpPoVg=
github.com/shirou/gopsutil/v3 v3.22.10/go.mod h1:QNza6r4YQoydyCfo6rH0blGfKahgibh4dQmV5xdFkQk=
github.com/shirou/gopsutil/v3 v3.22.11 h1:kxsPKS+Eeo+VnEQ2XCaGJepeP6KY53QoRTETx3+1ndM=
github.com/shirou/gopsutil/v3 v3.22.11/go.mod h1:xl0EeL4vXJ+hQMAGN8B9VFpxukEMA0XdevQOe5MZ1oY=
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=
@@ -883,10 +904,8 @@ github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
@@ -932,7 +951,6 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg=
go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 h1:CCriYyAfq1Br1aIYettdHZTy8mBTIPo7We18TuO/bak=
@@ -947,6 +965,11 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4=
go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE=
go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs=
go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ=
go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -981,12 +1004,11 @@ golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE=
golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -997,12 +1019,14 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 h1:T8EldfGCcveFMewH5xAYxxoX3PSQMrsechlUGVFlQBU=
golang.org/x/exp v0.0.0-20221211140036-ad323defaf05/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191206065243-da761ea9ff43/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.1.0 h1:r8Oj8ZA2Xy12/b5KZYj3tuv7NG/fBz3TwQVvpJ9l8Rk=
golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c=
golang.org/x/image v0.2.0 h1:/DcQ0w3VHKCC5p0/P2B0JpAZ9Z++V2KOo2fyU89CXBQ=
golang.org/x/image v0.2.0/go.mod h1:la7oBXb9w3YFjBqaAwtynVioc1ZvOnNteUNrifGNmAI=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@@ -1027,8 +1051,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1083,11 +1108,9 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220923203811-8be639271d50/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -1116,9 +1139,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 h1:cu5kTvlzcw1Q5S9f5ip1/cpiB4nXvw1XYzFPGgzLUOY=
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1198,23 +1220,19 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1224,12 +1242,13 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -1293,8 +1312,9 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1468,6 +1488,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+17
View File
@@ -0,0 +1,17 @@
# Ziti AMI
This folder shows how to use [Packer](https://www.packer.io/) to create an [Amazon Machine
Image (AMI)](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) that has the necessary prerequisites for running fablab based OpenZiti smoketests installed on top of Ubuntu 22.04.
## Quick start
To build the Ziti AMI:
1. `git clone` this repo to your computer.
1. Install [Packer](https://www.packer.io/).
1. Configure your AWS credentials using one of the [options supported by the AWS
SDK](http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html). Usually, the easiest option is to
set the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
1. Run `packer build ziti-ami.pkr.hcl`.
When the build finishes, it will output the ID of the new AMI.
+10
View File
@@ -0,0 +1,10 @@
regions=(
"us-east-1"
"us-west-2"
)
for region in ${regions[@]};
do
aws ec2 describe-images --region ${region} --owners self --filters Name="name",Values="ziti-tests-*" | jq '[.Images[] | { Id: .ImageId, Date: .CreationDate}] | sort_by(.Date)' | jq -r '.[] | .Id ' | head -n -1 | xargs -t -r -n 1 aws ec2 deregister-image --region ${region} --image-id
done
@@ -0,0 +1,2 @@
Binary::apt::APT::Color "0";
Binary::apt::DPkg::Progress-Fancy "0";
@@ -0,0 +1,9 @@
# adjust the socket buffer sizes
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_mem = 8388608 8388608 16777216
net.ipv4.udp_mem = 8388608 8388608 16777216
+11
View File
@@ -0,0 +1,11 @@
regions=(
"us-east-1"
"us-west-2"
)
for region in ${regions[@]};
do
echo "Region: ${region}"
aws ec2 describe-images --region ${region} --owners self --filters Name="name",Values="ziti-tests-*" | jq '[.Images[] | { Id: .ImageId, Date: .CreationDate}] | sort_by(.Date)' | jq -r '.[] | (.Id + " " + .Date) '
done
+68
View File
@@ -0,0 +1,68 @@
packer {
required_version = ">= 1.6.0"
required_plugins {
amazon = {
version = ">= 1.1.1"
source = "github.com/hashicorp/amazon"
}
}
}
source "amazon-ebs" "ziti-tests-ubuntu-ami" {
ami_description = "An Ubuntu AMI that has everything needed for running fablab smoketests."
ami_name = "ziti-tests-{{ timestamp }}"
ami_regions = ["us-east-1", "us-west-2"]
instance_type = "t2.micro"
region = "us-east-1"
source_ami_filter {
filters = {
architecture = "x86_64"
name = "ubuntu/images/*/ubuntu-jammy-22.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
}
ssh_username = "ubuntu"
}
build {
sources = ["source.amazon-ebs.ziti-tests-ubuntu-ami"]
provisioner "file" {
source = "etc/apt/apt.conf.d/99remote-not-fancy"
destination = "/home/ubuntu/99remote-not-fancy"
}
provisioner "file" {
source = "etc/sysctl.d/51-network-tuning.conf"
destination = "/home/ubuntu/51-network-tuning.conf"
}
provisioner "shell" {
inline = [
"sudo mv /home/ubuntu/99remote-not-fancy /etc/apt/apt.conf.d/",
"sudo mv /home/ubuntu/51-network-tuning.conf /etc/sysctl.d/",
"cloud-init status --wait",
# add metricsbeat sources
"curl --fail --silent --show-error --location https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor | sudo dd of=/usr/share/keyrings/elasticsearch-archive-keyring.gpg",
"echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/elasticsearch-archive-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list",
# add consul sources
"curl --fail --silent --show-error --location https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo dd of=/usr/share/keyrings/hashicorp-archive-keyring.gpg",
"echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main\" | sudo tee -a /etc/apt/sources.list.d/hashicorp.list",
"sudo apt update",
"sudo apt upgrade -y",
"sudo apt install -y iperf3 tcpdump sysstat",
"sudo apt install -y metricbeat=8.3.2",
"sudo apt install -y consul",
"sudo bash -c \"echo 'ubuntu soft nofile 40960' >> /etc/security/limits.conf\"",
"sudo sed -i 's/ENABLED=\"false\"/ENABLED=\"true\"/g' /etc/default/sysstat",
]
}
}
+22 -20
View File
@@ -3,8 +3,8 @@ module github.com/openziti/ziti/network-tests
go 1.19
require (
github.com/openziti/fablab v0.4.14
github.com/openziti/sdk-golang v0.16.146
github.com/openziti/fablab v0.4.15
github.com/openziti/sdk-golang v0.18.2
github.com/openziti/zitilab v0.1.9
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
@@ -27,12 +27,12 @@ require (
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/c-bata/go-prompt v0.2.6 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 // indirect
github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect
@@ -57,7 +57,7 @@ require (
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect
github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
@@ -80,8 +80,8 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kyokomi/emoji/v2 v2.2.8 // indirect
github.com/lucasb-eyer/go-colorful v1.0.3 // indirect
github.com/kyokomi/emoji/v2 v2.2.10 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/lucsky/cuid v1.2.1 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
github.com/magiconair/properties v1.8.5 // indirect
@@ -104,18 +104,19 @@ require (
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openziti/agent v1.0.5 // indirect
github.com/openziti/channel/v2 v2.0.12 // indirect
github.com/openziti/edge v0.24.36 // indirect
github.com/openziti/fabric v0.21.17 // indirect
github.com/openziti/channel/v2 v2.0.15 // indirect
github.com/openziti/edge v0.24.50 // indirect
github.com/openziti/fabric v0.21.21 // indirect
github.com/openziti/foundation/v2 v2.0.7 // indirect
github.com/openziti/identity v1.0.20 // indirect
github.com/openziti/identity v1.0.23 // indirect
github.com/openziti/jwks v1.0.2 // indirect
github.com/openziti/metrics v1.1.5 // indirect
github.com/openziti/metrics v1.1.6 // indirect
github.com/openziti/runzmd v1.0.3 // indirect
github.com/openziti/storage v0.1.26 // indirect
github.com/openziti/transport/v2 v2.0.38 // indirect
github.com/openziti/transport/v2 v2.0.41 // indirect
github.com/openziti/x509-claims v1.0.3 // indirect
github.com/openziti/xweb/v2 v2.0.2 // indirect
github.com/openziti/ziti v0.26.10 // indirect
github.com/openziti/ziti v0.26.11 // indirect
github.com/openziti/ziti-db-explorer v1.1.1 // indirect
github.com/orcaman/concurrent-map/v2 v2.0.0 // indirect
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
@@ -140,7 +141,7 @@ require (
github.com/stretchr/testify v1.8.1 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
@@ -151,15 +152,16 @@ require (
go.etcd.io/bbolt v1.3.6 // indirect
go.mongodb.org/mongo-driver v1.10.0 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 // indirect
golang.org/x/image v0.1.0 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/term v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/tools v0.2.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/AlecAivazis/survey.v1 v1.8.7 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
+49 -32
View File
@@ -122,8 +122,8 @@ github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBW
github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI=
github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY=
github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -158,8 +158,9 @@ github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663/go.mod h1:Kad2
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo=
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
@@ -316,8 +317,9 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8GTcKMxYOSXm0jx6j0de8XUtb/fsP3GZ0I=
github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c h1:iyaGYbCmcYK0Ja9a3OUa2Fo+EaN0cbLu0eKpBwPFzc8=
github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -471,14 +473,16 @@ github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kyokomi/emoji/v2 v2.2.8 h1:jcofPxjHWEkJtkIbcLHvZhxKgCPl6C7MyjTrD4KDqUE=
github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
github.com/kyokomi/emoji/v2 v2.2.10 h1:1z5eMVcxFifsmEoNpdeq4UahbcicgQ4FEHuzrCVwmiI=
github.com/kyokomi/emoji/v2 v2.2.10/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA=
github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w=
github.com/linode/linodego v0.21.0/go.mod h1:UTpq1JUZD0CZsJ8rt+0CRkqbzrp1MbGakVPt2DXY5Mk=
github.com/liquidweb/liquidweb-go v1.6.1/go.mod h1:UDcVnAMDkZxpw4Y7NOHkqoeiGacVLEIG/i5J9cyixzQ=
github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucsky/cuid v1.2.1 h1:MtJrL2OFhvYufUIn48d35QGXyeTC8tn0upumW9WwTHg=
github.com/lucsky/cuid v1.2.1/go.mod h1:QaaJqckboimOmhRSJXSx/+IT+VTfxfPGSo/6mfgUfmE=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
@@ -595,34 +599,36 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openziti/agent v1.0.5 h1:wZUcMYqvwspOjDSaejMtczSXnJoqK0edI9HcEIFsTIs=
github.com/openziti/agent v1.0.5/go.mod h1:6APWgkPP6Uxf1/VyirdTVLAJxwam2vVyakrVw6yvs40=
github.com/openziti/channel/v2 v2.0.12 h1:0/qQ3qCSt70gpUuxQk8MRD3+iGKqS4wuYZpbcOzS+tc=
github.com/openziti/channel/v2 v2.0.12/go.mod h1:mESOWBphvr2/P6j3FDIiQF+Z6z3E3Vjv6GaCoGWY6eM=
github.com/openziti/edge v0.24.36 h1:3ywHRL5XXYtA4+y12WptofLhkndshePuy/MyKT3A2xo=
github.com/openziti/edge v0.24.36/go.mod h1:3I6GZTcb3j57Y9IlBrnpceklfzdR10ejp4D7+11B6BM=
github.com/openziti/fablab v0.4.14 h1:765ha5lu3TEznhQP1LVAyLYfPJsVLYFLoP8tIvrfCtc=
github.com/openziti/fablab v0.4.14/go.mod h1:FmnlfLEQUa/Gdf82wnkQLFe44lGexoIxGd+JOtRIMHs=
github.com/openziti/fabric v0.21.17 h1:oT32L0Lu64Jd7CkHrQZdOwG0Mew8bMBEUowtRyhERvs=
github.com/openziti/fabric v0.21.17/go.mod h1:VsRUi2wdA3k4bOXxfrohaoUuhcjf8ZdpPPN0NzD8my4=
github.com/openziti/channel/v2 v2.0.15 h1:y1YwewnZTPTPtE3YVjaVpOWGoqJ3+I8+7KqQB4D3poQ=
github.com/openziti/channel/v2 v2.0.15/go.mod h1:LdoKRnefknW4WllUyHJtvKDtKK716lYdHqApKbBy3rk=
github.com/openziti/edge v0.24.50 h1:gmtjAJISV1mLXWSJmyRunVcZ6gk7WPS2aPkFaWh34uo=
github.com/openziti/edge v0.24.50/go.mod h1:71Cp8bypuFbJpt7FPsETZrmLdmHagFcWKDD+SzsIL0s=
github.com/openziti/fablab v0.4.15 h1:4sLJ9UC4rmpYOaxjTmwtfA2h/uwmVifwdpVJUBW6eQ4=
github.com/openziti/fablab v0.4.15/go.mod h1:FmnlfLEQUa/Gdf82wnkQLFe44lGexoIxGd+JOtRIMHs=
github.com/openziti/fabric v0.21.21 h1:vswdjm4xvZuCps62S4JjZZyA43YYLgc0uOCx6tdXWUY=
github.com/openziti/fabric v0.21.21/go.mod h1:F6L8c4AnNOACdx2IJqSW2JLG6J3Gm798BLL58sBYtZY=
github.com/openziti/foundation/v2 v2.0.7 h1:QtpP0ntUhr/7uLR1iM7eEkrusQ2b2ZqTblgdq8cac9Y=
github.com/openziti/foundation/v2 v2.0.7/go.mod h1:Z0gnQsGJb/H/B+pixLtmCIpw1dBllD4QoT6LeD35WzA=
github.com/openziti/identity v1.0.20 h1:8nsQFHpqKS1ByD8QuPDxQWfS8CQEidyn5jFXWnXguX0=
github.com/openziti/identity v1.0.20/go.mod h1:X0WLWEgnM1iL8asNbuu7vUW0kZq8nnWKepMW214C9Mk=
github.com/openziti/identity v1.0.23 h1:SJ2UN3qCiUKwuwFc0dr3nuHyKvhOr5aN5bEJa2wY9Sw=
github.com/openziti/identity v1.0.23/go.mod h1:uVqZEC4Lr7pEud9b5g0h/cH0Ir5K0egCjUrEVup4ERc=
github.com/openziti/jwks v1.0.2 h1:32BGXIAnefS+v7uXKPb1x8/cQ7srek6Ai06dsrMTY4E=
github.com/openziti/jwks v1.0.2/go.mod h1:KwO0x9FBG0aoJS5f6nH5xeHoplyR1H143SMI9kF0mC8=
github.com/openziti/metrics v1.1.5 h1:qhsGsYWdp7LxPCYi9WMGHGbjiHvsT1DtjM44JNHLZWk=
github.com/openziti/metrics v1.1.5/go.mod h1:B6RCuVRTpI3kEIhQlCvsHj3Pqi6bSnqFmRPgfgv9ico=
github.com/openziti/sdk-golang v0.16.146 h1:5R7ZOSh+Q0pmZdzEv3l2Q03KQgiUrpaj3ymD8DjBT5k=
github.com/openziti/sdk-golang v0.16.146/go.mod h1:yOgsofdEd82pph97N4DX0xYlfgjJ2LCgC/mHkMw+5hU=
github.com/openziti/metrics v1.1.6 h1:fc4t5JEuYYr4gr+tF3qNpbvQ55QhoLyeOG+hiDfKLF8=
github.com/openziti/metrics v1.1.6/go.mod h1:07aMMS1VNzZvz0246fX73SFfuuoRz2nKcvDJumrVlZ0=
github.com/openziti/runzmd v1.0.3 h1:g+JyJS66ykMIidLTzroKBLwbsSF9S1hDvolj2PpD8lE=
github.com/openziti/runzmd v1.0.3/go.mod h1:2YuoQl5zZ6edfb+k1MjglW2cwfZvXwug2WldvBIUNrU=
github.com/openziti/sdk-golang v0.18.2 h1:RA+47vGtPwzqrgWlgTyqKurttvzhG25bu9qnhEU1Ghw=
github.com/openziti/sdk-golang v0.18.2/go.mod h1:79XTAIkizuRq5NpAex3Yg7oDH/fcNSlcrVeSiYEf2q0=
github.com/openziti/storage v0.1.26 h1:1tV4czY/TNmzX3raUZjbR8jVl5L92pdD0SjmdzCzUmE=
github.com/openziti/storage v0.1.26/go.mod h1:Zkm+4d2gckkIbuuCw/sKFWKKhPROZak3gLFzdII0KWQ=
github.com/openziti/transport/v2 v2.0.38 h1:9+EtBF052TtGvT5isuPj/SUTXNHg8RbkGBcEKfiUPd8=
github.com/openziti/transport/v2 v2.0.38/go.mod h1:FB/pqmA8RdUsoWtpTc6E/it6lLdA7GOugy9no3JDU/4=
github.com/openziti/transport/v2 v2.0.41 h1:T9RPXsJ0wbDgIx6mjKY1YDOg6ncRDmLPq8xU52B0mvU=
github.com/openziti/transport/v2 v2.0.41/go.mod h1:YM4hnHjHK1gQZuWgmDoPGSDP+8l7uT8kT8oBGM1u6nk=
github.com/openziti/x509-claims v1.0.3 h1:HNdQ8Nf1agB3lBs1gahcO6zfkeS4S5xoQ2/PkY4HRX0=
github.com/openziti/x509-claims v1.0.3/go.mod h1:Z0WIpBm6c4ecrpRKrou6Gk2wrLWxJO/+tuUwKh8VewE=
github.com/openziti/xweb/v2 v2.0.2 h1:XYlVFriTq/U1wcUrc+XPnWJGhXh9NJPhtQ7+r3aC0cU=
github.com/openziti/xweb/v2 v2.0.2/go.mod h1:KQOOlnJk08EZT3TWkvDj/pbIUEVbgG0IrrNzl8gsi40=
github.com/openziti/ziti v0.26.10 h1:aPikHYJa/KvzgTiRW2hGw8f2L/+NsFgy8sbHXcuxwbU=
github.com/openziti/ziti v0.26.10/go.mod h1:hbl02rbQ8l6+kF/vXolNPCdZLQ3WKkSGEc7xeRPEl4c=
github.com/openziti/ziti v0.26.11 h1:umXrmrBnbQeSV/hsKTdor/hWx/tJ5Hs/Xv/k5GXitL0=
github.com/openziti/ziti v0.26.11/go.mod h1:GJ6thwbiuCRf5rRO2/lalmvZVdWCQkLgiX7i8zAhuUo=
github.com/openziti/ziti-db-explorer v1.1.1 h1:G0eoTby+aIjjt5TxEfR+FMI2CWd4RvZFjzaIMX2lEBw=
github.com/openziti/ziti-db-explorer v1.1.1/go.mod h1:h76h7Tsb+khb0v+CqYKL6ifUfJbUMjGBFU2IvupfBE4=
github.com/openziti/zitilab v0.1.9 h1:NWUgq4ZyZIhXlH9HVL19JK6ArDnTNLnlKOteE6PLa8E=
@@ -765,8 +771,9 @@ github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
@@ -796,6 +803,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
@@ -842,10 +850,11 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -856,11 +865,14 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 h1:yZNXmy+j/JpX19vZkVktWqAo7Gny4PBWYYK3zskGpx4=
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 h1:gQ6GUSD102fPgli+Yb4cR/cGaHF7tNBt+GYoRCpGC7s=
golang.org/x/image v0.0.0-20191206065243-da761ea9ff43/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.1.0 h1:r8Oj8ZA2Xy12/b5KZYj3tuv7NG/fBz3TwQVvpJ9l8Rk=
golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -884,8 +896,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -937,8 +950,9 @@ golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -963,6 +977,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1043,6 +1058,7 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
@@ -1127,8 +1143,9 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+15 -18
View File
@@ -3,14 +3,11 @@ package main
import (
"embed"
"fmt"
"os"
"time"
"github.com/openziti/fablab"
"github.com/openziti/fablab/kernel/lib/actions/component"
"github.com/openziti/fablab/kernel/lib/binding"
"github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/aws_ssh_key"
semaphore_0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/semaphore"
semaphore0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/semaphore"
terraform_0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/terraform"
"github.com/openziti/fablab/kernel/lib/runlevel/1_configuration/config"
"github.com/openziti/fablab/kernel/lib/runlevel/2_kitting/devkit"
@@ -21,11 +18,13 @@ import (
"github.com/openziti/fablab/kernel/model"
"github.com/openziti/fablab/resources"
"github.com/openziti/ziti/network-tests/simple-transfer/actions"
runlevel_0_infrastructure "github.com/openziti/ziti/network-tests/simple-transfer/stages/0_infrastructure"
"github.com/openziti/ziti/network-tests/test_resources"
"github.com/openziti/zitilab"
zitilib_runlevel_0_infrastructure "github.com/openziti/zitilab/runlevel/0_infrastructure"
"github.com/openziti/zitilab/actions/edge"
zitilib_runlevel_1_configuration "github.com/openziti/zitilab/runlevel/1_configuration"
"github.com/sirupsen/logrus"
"os"
"time"
)
//go:embed configs
@@ -79,7 +78,7 @@ var m = &model.Model{
Resources: model.Resources{
resources.Configs: resources.SubFolder(configResource, "configs"),
resources.Terraform: resources.DefaultTerraformResources(),
resources.Terraform: test_resources.TerraformResources(),
},
Regions: model.Regions{
@@ -92,7 +91,7 @@ var m = &model.Model{
Components: model.Components{
"ctrl": {
Scope: model.Scope{Tags: model.Tags{"ctrl"}},
BinaryName: "ziti-controller",
BinaryName: "ziti controller",
ConfigSrc: "ctrl.yml",
ConfigName: "ctrl.yml",
PublicIdentity: "ctrl",
@@ -107,14 +106,14 @@ var m = &model.Model{
Components: model.Components{
"router-east": {
Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator"}},
BinaryName: "ziti-router",
BinaryName: "ziti router",
ConfigSrc: "router.yml",
ConfigName: "router-east.yml",
PublicIdentity: "router-east",
RunWithSudo: true,
},
"echo-server": {
Scope: model.Scope{Tags: model.Tags{"sdk-app", "service"}},
BinaryName: "echo-server",
PublicIdentity: "echo-server",
},
"consul": {
@@ -134,14 +133,14 @@ var m = &model.Model{
Components: model.Components{
"router-west": {
Scope: model.Scope{Tags: model.Tags{"edge-router", "terminator"}},
BinaryName: "ziti-router",
BinaryName: "ziti router",
ConfigSrc: "router.yml",
ConfigName: "router-west.yml",
PublicIdentity: "router-west",
RunWithSudo: true,
},
"echo-client": {
Scope: model.Scope{Tags: model.Tags{"sdk-app", "client"}},
BinaryName: "echo-client",
PublicIdentity: "echo-client",
},
"consul": {
@@ -166,15 +165,14 @@ var m = &model.Model{
DataPath: "consul/data",
LogPath: "consul/log.out",
}),
"stop": model.Bind(component.StopInParallel("*", 15)),
"stop": model.Bind(component.StopInParallel("*", 15)),
"login": model.Bind(edge.Login("#ctrl")),
},
Infrastructure: model.InfrastructureStages{
aws_ssh_key.Express(),
terraform_0.Express(),
runlevel_0_infrastructure.RetryInfra(zitilib_runlevel_0_infrastructure.InstallMetricbeat("*", zitilib_runlevel_0_infrastructure.RECCOMENDED_METRICBEAT_VERSION), 5),
runlevel_0_infrastructure.RetryInfra(zitilib_runlevel_0_infrastructure.InstallConsul("*"), 5),
semaphore_0.Restart(90 * time.Second),
semaphore0.Ready(time.Minute),
},
Configuration: model.ConfigurationStages{
@@ -183,8 +181,7 @@ var m = &model.Model{
zitilib_runlevel_1_configuration.DotZiti(),
),
config.Component(),
zitilab.DefaultZitiBinaries(),
devkit.DevKitF(zitilab.ZitiRoot, []string{"ziti-echo"}),
devkit.DevKitF(zitilab.ZitiRoot, []string{"ziti", "ziti-echo"}),
},
Distribution: model.DistributionStages{
+1 -4
View File
@@ -4,7 +4,6 @@ import (
"crypto/rand"
"net/url"
fablib_5_operation "github.com/openziti/fablab/kernel/lib/runlevel/5_operation"
"github.com/openziti/fablab/kernel/model"
runlevel_5_operation "github.com/openziti/ziti/network-tests/simple-transfer/stages/5_operation"
)
@@ -16,13 +15,11 @@ func newStageFactory() model.Factory {
}
func (sf *stageFactory) Build(m *model.Model) error {
runPhase := fablib_5_operation.NewPhase()
//generate 10k random bytes
data := make([]byte, 10000)
rand.Read(data)
m.AddOperatingStage(runlevel_5_operation.AssertEcho("#echo-client", url.QueryEscape(string(data))))
m.AddOperatingStage(runPhase)
return nil
}
@@ -1,33 +0,0 @@
package runlevel_0_infrastructure
import (
"fmt"
"github.com/openziti/fablab/kernel/model"
"github.com/sirupsen/logrus"
)
type retry struct {
stage model.InfrastructureStage
retries int
}
func RetryInfra(stage model.InfrastructureStage, retries int) model.InfrastructureStage {
return &retry{
stage: stage,
retries: retries,
}
}
func (r *retry) Express(run model.Run) error {
var err error
for i := 0; i < r.retries; i++ {
if e := r.stage.Express(run); e == nil {
continue
} else {
err = fmt.Errorf("%w", e)
}
}
logrus.Warn("Infra stage successful after retries. Earlier errors: [%w]", err)
return nil
}
+14
View File
@@ -0,0 +1,14 @@
package test_resources
import (
"embed"
"github.com/openziti/fablab/resources"
"io/fs"
)
//go:embed terraform
var terraformResource embed.FS
func TerraformResources() fs.FS {
return resources.SubFolder(terraformResource, resources.Terraform)
}
@@ -0,0 +1,42 @@
variable "environment_tag" { default = "{{ .Model.MustVariable "environment" }}" }
variable "aws_access_key" { default = "{{ .Model.MustVariable "credentials.aws.access_key" }}" }
variable "aws_secret_key" { default = "{{ .Model.MustVariable "credentials.aws.secret_key" }}" }
variable "aws_key_name" { default = "{{ .Model.MustVariable "credentials.aws.ssh_key_name" }}" }
variable "aws_key_path" { default = "{{ .Model.MustVariable "credentials.ssh.key_path" }}" }
variable "vpc_cidr" { default = "10.0.0.0/16" }
variable "public_cidr" { default = "10.0.0.0/24" }
{{ range $regionId, $region := .Model.Regions }}
module "{{ $regionId }}_region" {
source = "{{ $.TerraformLib }}/vpc"
access_key = var.aws_access_key
secret_key = var.aws_secret_key
region = "{{ $region.Region }}"
vpc_cidr = var.vpc_cidr
public_cidr = var.public_cidr
az = "{{ $region.Site }}"
environment_tag = var.environment_tag
}
{{ range $hostId, $host := $region.Hosts }}
module "{{ $regionId }}_host_{{ $hostId }}" {
source = "{{ $.TerraformLib }}/{{ instanceTemplate $host }}_instance"
access_key = var.aws_access_key
secret_key = var.aws_secret_key
environment_tag = var.environment_tag
instance_type = "{{ $host.InstanceType }}"
key_name = var.aws_key_name
key_path = var.aws_key_path
region = "{{ $region.Region }}"
security_group_id = module.{{ $regionId }}_region.security_group_id
subnet_id = module.{{ $regionId }}_region.subnet_id
spot_price = "{{ $host.SpotPrice }}"
spot_type = "{{ $host.SpotType }}"
name = "{{ $region.Model.MustVariable "environment" }}.{{ $host.Id }}"
}
output "{{ $regionId }}_host_{{ $hostId }}_public_ip" { value = module.{{ $regionId }}_host_{{ $hostId }}.public_ip }
output "{{ $regionId }}_host_{{ $hostId }}_private_ip" { value = module.{{ $regionId }}_host_{{ $hostId }}.private_ip }
{{ end }}
{{ end }}
@@ -0,0 +1,45 @@
variable "name" {}
variable "access_key" {}
variable "secret_key" {}
variable "environment_tag" { default = "" }
variable "instance_type" {}
variable "key_name" {}
variable "key_path" {}
variable "region" {}
variable "security_group_id" {}
variable "ssh_user" { default = "ubuntu" }
variable "subnet_id" {}
variable "spot_price" {}
variable "spot_type" {}
output "public_ip" { value = aws_instance.fablab.public_ip }
output "private_ip" { value = aws_instance.fablab.private_ip }
provider "aws" {
access_key = var.access_key
secret_key = var.secret_key
region = var.region
}
data "aws_ami" "ami" {
most_recent = true
owners = ["self"]
filter {
name = "name"
values = ["ziti-tests-*"]
}
}
resource "aws_instance" "fablab" {
ami = data.aws_ami.ami.id
instance_type = var.instance_type
key_name = var.key_name
vpc_security_group_ids = [var.security_group_id]
subnet_id = var.subnet_id
associate_public_ip_address = true
tags = {
Name = var.name
}
}
@@ -0,0 +1,129 @@
variable "access_key" {}
variable "secret_key" {}
variable "region" {}
variable "vpc_cidr" {}
variable "public_cidr" {}
variable "az" {}
variable "environment_tag" {}
output "security_group_id" { value = aws_security_group.fablab.id }
output "subnet_id" { value = aws_subnet.fablab.id }
provider "aws" {
access_key = var.access_key
secret_key = var.secret_key
region = var.region
}
resource "aws_vpc" "fablab" {
cidr_block = var.vpc_cidr
enable_dns_hostnames = true
tags = {
Name = var.environment_tag
}
}
resource "aws_internet_gateway" "fablab" {
vpc_id = aws_vpc.fablab.id
}
resource "aws_subnet" "fablab" {
vpc_id = aws_vpc.fablab.id
cidr_block = var.public_cidr
availability_zone = var.az
tags = {
Name = var.environment_tag
}
}
resource "aws_route_table" "fablab" {
vpc_id = aws_vpc.fablab.id
route {
cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.fablab.id
}
tags = {
Name = var.environment_tag
}
}
resource "aws_route_table_association" "fablab" {
subnet_id = aws_subnet.fablab.id
route_table_id = aws_route_table.fablab.id
}
resource "aws_security_group" "fablab" {
name = var.environment_tag
vpc_id = aws_vpc.fablab.id
ingress {
from_port = 10000
to_port = 10000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 8171
to_port = 8171
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 7001
to_port = 7005
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 7001
to_port = 7001
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 6262
to_port = 6262
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 6262
to_port = 6262
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 6000
to_port = 6009
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 6000
to_port = 6009
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 1280
to_port = 1280
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = var.environment_tag
}
}
+2 -2
View File
@@ -23,14 +23,14 @@ func (esi *echoServerStart) Execute(m *model.Model) error {
ssh := lib.NewSshConfigFactory(c.GetHost())
remoteConfigFile := "/home/ubuntu/fablab/cfg/" + c.PublicIdentity + ".json"
echoServerCmd := fmt.Sprintf("screen -d -m nohup /home/%s/fablab/bin/ziti-echo server --identity %s 2>&1 &",
echoServerCmd := fmt.Sprintf("nohup /home/%s/fablab/bin/ziti-echo server --identity %s > /home/ubuntu/logs/ziti-echo.log 2>&1 &",
ssh.User(), remoteConfigFile)
if output, err := lib.RemoteExec(ssh, echoServerCmd); err != nil {
logrus.Errorf("error starting echo server [%s] (%v)", output, err)
return err
}
logrus.Error("After remote starting echo server")
logrus.Info("echo server started")
return nil
})
}
+1 -1
View File
@@ -41,7 +41,7 @@ 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/local/express/express-dev-env.sh]().
found at [./quickstart/docker/image/ziti-cli-functions.sh]().
### What It Does
+6 -3
View File
@@ -7,6 +7,9 @@ Build Docker Image for Local Dev (probably for docker-compose testing)
2. run the script `./buildLocalDev.sh` which will create a `openziti/quickstart:dev` tag
3. update `.env` and change the value for `ZITI_VERSION` to `dev`
4. run `docker-compose` as normal
5. If you encounter any strange errors, it's probably best to prune docker
and try again. Issue `docker system prune -a` and allow it to clear/cleanup
the entire docker world
Build Docker Image For Publication
------------------
@@ -17,10 +20,10 @@ Build Docker Image For Publication
1. issue this function to pull the latest ziti binaries: `getLatestZiti`
1. move the ziti binaries: `mv ziti-bin/ziti image/ziti.ignore/`
1. build the docker image: `docker build image -t openziti/quickstart`
1. exec into a container and make sure it's the version you expect: `docker run --rm -it openziti/quickstart ziti version`
1. exec into a container and make sure it's the version you expect: `docker run --rm -it openziti/quickstart ziti --version`
1. cleanup: `rm ziti-*tar.gz; rm -rf ziti-bin`
2.
Push Docker Image to dockerhub
------------------
1. `source ./image/ziti-cli-functions.sh`
1. just run `./pushLatestDocker.sh`
1. just run `./pushLatestDocker.sh`
@@ -1 +1 @@
docker run -v docker_ziti-fs:/openziti --network docker_zitiblue --rm -it openziti/quickstart /bin/bash
docker run -v docker_ziti-fs:/persistent --network docker_zitiblue --rm -it openziti/quickstart /bin/bash
+1 -1
View File
@@ -1 +1 @@
docker run --cap-add=NET_ADMIN --device /dev/net/tun --name ziti-tunneler-blue --user root --network docker_zitiblue -v docker_ziti-fs:/openziti --rm -it openziti/quickstart /bin/bash
docker run --cap-add=NET_ADMIN --device /dev/net/tun --name ziti-tunneler-blue --user root --network docker_zitiblue -v docker_ziti-fs:/persistent --rm -it openziti/quickstart /bin/bash
+1 -1
View File
@@ -54,7 +54,7 @@ if [ -d "${ZITI_DOCKER_ROOT}/image/ziti.ignore" ]; then
rm -rf "${ZITI_DOCKER_ROOT}/image/ziti.ignore"
fi
docker run --rm -it openziti/quickstart:dev /openziti/ziti-bin/ziti version
echo "Ziti Version: $(docker run --rm -it openziti/quickstart:dev /var/openziti/ziti-bin/ziti --version)"
vers="$(echo "${ZITI_BINARIES_VERSION}" | cut -c 2-100)"
docker tag "openziti/quickstart:dev" "openziti/quickstart:dev"
+18 -18
View File
@@ -17,9 +17,9 @@ services:
aliases:
- ziti-edge-controller
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint:
- "/openziti/scripts/run-controller.sh"
- "/var/openziti/scripts/run-controller.sh"
ziti-controller-init-container:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -38,11 +38,11 @@ services:
aliases:
- ziti-edge-controller-init-container
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint:
- "/openziti/scripts/run-with-ziti-cli.sh"
- "/var/openziti/scripts/run-with-ziti-cli.sh"
command:
- "/openziti/scripts/access-control.sh"
- "/var/openziti/scripts/access-control.sh"
ziti-edge-router:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -59,9 +59,9 @@ services:
- zitiblue
- zitired
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh edge"
command: "/var/openziti/scripts/run-router.sh edge"
ziti-edge-router-wss:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -79,9 +79,9 @@ services:
- zitiblue
- zitired
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh wss"
command: "/var/openziti/scripts/run-router.sh wss"
ziti-fabric-router-br:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -97,9 +97,9 @@ services:
- zitiblue
- zitired
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh fabric"
command: "/var/openziti/scripts/run-router.sh fabric"
ziti-private-red:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -114,9 +114,9 @@ services:
networks:
- zitired
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh private"
command: "/var/openziti/scripts/run-router.sh private"
ziti-private-blue:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -131,9 +131,9 @@ services:
networks:
- zitiblue
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh private"
command: "/var/openziti/scripts/run-router.sh private"
web-test-blue:
image: crccheck/hello-world
@@ -149,14 +149,14 @@ services:
ziti-console:
image: openziti/zac
environment:
- ZAC_SERVER_CERT_CHAIN=/openziti/pki/ziti-controller-intermediate/certs/ziti-controller-server.cert
- ZAC_SERVER_KEY=/openziti/pki/ziti-controller-intermediate/keys/ziti-controller-server.key
- ZAC_SERVER_CERT_CHAIN=/persistent/pki/ziti-controller-intermediate/certs/ziti-controller-server.cert
- ZAC_SERVER_KEY=/persistent/pki/ziti-controller-intermediate/keys/ziti-controller-server.key
ports:
- "1408:1408"
- "8443:8443"
working_dir: /usr/src/app
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
networks:
- zitiblue
+9 -10
View File
@@ -1,24 +1,23 @@
FROM ubuntu:rolling
RUN apt update && \
apt install jq curl netcat-openbsd vim inetutils-ping net-tools -y
apt install jq curl netcat-openbsd vim inetutils-ping net-tools lsof -y
RUN useradd -ms /bin/bash ziti && \
mkdir /openziti && chown ziti:ziti /openziti && \
mkdir /openziti/scripts && chown ziti:ziti /openziti/scripts && \
mkdir /openziti/shared && chown ziti:ziti /openziti/shared
mkdir /persistent && chown ziti:ziti /persistent && \
mkdir /persistent/scripts && chown ziti:ziti /persistent/scripts
USER ziti
WORKDIR /openziti
WORKDIR /persistent
ENV ZITI_HOME=/openziti
ENV ZITI_BIN_DIR="${ZITI_HOME}/ziti-bin"
ENV ZITI_HOME=/persistent
ENV ZITI_SHARED="${ZITI_HOME}/shared"
ENV ZITI_SCRIPTS="${ZITI_HOME}/scripts"
ENV ENV_FILE="${ZITI_HOME}/ziti.env"
ENV ZITI_NETWORK=ziti
RUN mkdir -p "${ZITI_SCRIPTS}"
# Don't put these paths on shared volume in docker-compose deployment (https://github.com/openziti/ziti/issues/912)
ENV ZITI_BIN_DIR=/var/openziti/ziti-bin
ENV ZITI_BIN_ROOT="${ZITI_BIN_DIR}"
ENV ZITI_SCRIPTS=/var/openziti/scripts
# copy the ziti binaries to a directory already on the path
COPY --chown=ziti ziti.ignore "${ZITI_BIN_DIR}"
+9 -10
View File
@@ -4,20 +4,19 @@ RUN apt update && \
apt install jq curl vim psmisc -y
RUN useradd -ms /bin/bash ziti && \
mkdir /openziti && chown ziti:ziti /openziti && \
mkdir /openziti/scripts && chown ziti:ziti /openziti/scripts && \
mkdir /openziti/shared && chown ziti:ziti /openziti/shared
mkdir /persistent && chown ziti:ziti /persistent && \
mkdir /persistent/scripts && chown ziti:ziti /persistent/scripts
USER ziti
WORKDIR /openziti
WORKDIR /persistent
ENV ZITI_HOME=/openziti
ENV ZITI_BIN_DIR="${ZITI_HOME}/ziti-bin"
ENV ZITI_SCRIPTS="${ZITI_HOME}/scripts"
ENV ZITI_HOME=/persistent
ENV ZITI_SHARED="${ZITI_HOME}/shared"
ENV ENV_FILE="${ZITI_HOME}/ziti.env"
ENV ZITI_NETWORK=localhost
RUN mkdir -p "${ZITI_SCRIPTS}"
ENV ZITI_NETWORK=ziti
# Don't put these paths on shared volume in docker-compose deployment (https://github.com/openziti/ziti/issues/912)
ENV ZITI_BIN_DIR=/var/openziti/ziti-bin
ENV ZITI_SCRIPTS=/var/openziti/scripts
COPY --chown=ziti ziti.ignore "${ZITI_BIN_DIR}"
COPY --chown=ziti ziti-cli-functions.sh "${ZITI_SCRIPTS}/"
@@ -6,4 +6,6 @@ fi
touch runonce
source "${ZITI_SCRIPTS}/ziti-cli-functions.sh"
expressInstall "${ZITI_NETWORK}"
# Set the default password to be a specific value, if not set the password will be a random string and tests will fail
export ZITI_PWD=admin
expressInstall "localhost"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
ziti_controller_cfg='/openziti/ziti-edge-controller.yaml'
ziti_controller_cfg="${ZITI_HOME}/ziti-edge-controller.yaml"
export ZITI_CONTROLLER_RAWNAME=ziti-controller
export ZITI_EDGE_CONTROLLER_RAWNAME=ziti-edge-controller
+9 -6
View File
@@ -15,15 +15,15 @@ if [[ ! -f $1 ]]; then
fi
# Should we execute?
initFile="/openziti/access-control.init"
initFile="${ZITI_HOME}/access-control.init"
if [[ -f "${initFile}" ]]; then
echo " "
echo "*****************************************************"
echo " docker-compose init file has been detected"
echo " the initialization of the docker-compose environment has already happened"
echo " if you wish to allow this volume to be re-initialized, delete the file"
echo "*****************************************************************"
echo " docker-compose init file has been detected, the initialization "
echo " of the docker-compose environment has already happened. If you "
echo " wish to allow this volume to be re-initialized, delete the file "
echo " located at ${initFile}"
echo "*****************************************************"
echo "*****************************************************************"
echo " "
exit 0
fi
@@ -31,6 +31,9 @@ fi
# give the controller scripts time to start and create the ziti environment file if running in docker compose
until $(test -f "${ZITI_HOME}/ziti.env"); do echo "waiting for ziti.env..."; sleep 1; done
# Pause shortly to avoid the intermittent error of reading the file before it's completely done being written to.
sleep 1
. "${ZITI_SCRIPTS}/ziti-cli-functions.sh"
if [[ "${ZITI_CONTROLLER_RAWNAME-}" == "" ]]; then export export ZITI_CONTROLLER_RAWNAME="ziti-controller"; fi
+118 -40
View File
@@ -2,8 +2,11 @@
set -uo pipefail
# the default ZITI_NETWORK (network name) is the short hostname
: "${DEFAULT_ZITI_NETWORK:="$(hostname -s)"}"
# shellcheck disable=SC2155
export DEFAULT_ZITI_HOME_LOCATION="${HOME}/.ziti/quickstart/$(hostname)"
export DEFAULT_ZITI_HOME_LOCATION="${HOME}/.ziti/quickstart/${DEFAULT_ZITI_NETWORK}"
export ZITI_QUICKSTART_ENVROOT="${HOME}/.ziti/quickstart"
@@ -59,33 +62,49 @@ function initializeController {
"${ZITI_BIN_DIR-}/ziti-controller" edge init "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml" -u "${ZITI_USER-}" -p "${ZITI_PWD}" &> "${log_file}"
echo -e "ziti-controller initialized. see $(BLUE "${log_file}") for details"
}
function startZitiController {
function startController {
log_file="${ZITI_HOME-}/${ZITI_EDGE_CONTROLLER_RAWNAME}.log"
# shellcheck disable=SC2034
("${ZITI_BIN_DIR-}/ziti-controller" run "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml" > "${log_file}" 2>&1 &)
pid=$!
echo -e "ziti-controller started as process id: $pid. log located at: $(BLUE "${log_file}")"
return $pid
"${ZITI_BIN_DIR-}/ziti-controller" run "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_CONTROLLER_RAWNAME}.yaml" &> "${log_file}" &
ZITI_EXPRESS_CONTROLLER_PID=$!
echo -e "ziti-controller started as process id: $ZITI_EXPRESS_CONTROLLER_PID. log located at: $(BLUE "${log_file}")"
}
function stopZitiController {
killall ziti-controller
# shellcheck disable=SC2181
if [[ $? == 0 ]]; then echo "Controller stopped."; fi
function stopController {
if [[ -n ${ZITI_EXPRESS_CONTROLLER_PID:-} ]]; then
kill "$ZITI_EXPRESS_CONTROLLER_PID"
# shellcheck disable=SC2181
if [[ $? == 0 ]]; then
echo "Controller stopped."
return 0
fi
else
echo "ERROR: you can only stop a controller process that was started with startController" >&2
return 1
fi
}
function startExpressEdgeRouter {
function startRouter {
log_file="${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_ROUTER_RAWNAME}.log"
"${ZITI_BIN_DIR}/ziti-router" run "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_ROUTER_RAWNAME}.yaml" > "${log_file}" 2>&1 &
pid=$!
echo -e "Express Edge Router started as process id: $pid. log located at: $(BLUE "${log_file}")"
return $pid
ZITI_EXPRESS_EDGE_ROUTER_PID=$!
echo -e "Express Edge Router started as process id: $ZITI_EXPRESS_EDGE_ROUTER_PID. log located at: $(BLUE "${log_file}")"
}
function stopAllEdgeRouters {
killall ziti-router
# shellcheck disable=SC2181
if [[ $? == 0 ]]; then echo "Router(s) stopped."; fi
function stopRouter {
if [[ -n ${ZITI_EXPRESS_EDGE_ROUTER_PID:-} ]]; then
# shellcheck disable=SC2015
kill "${ZITI_EXPRESS_EDGE_ROUTER_PID}" && {
echo "INFO: stopped router"
} || {
echo "ERROR: something went wrong with stopping the router(s)" >&2
return 1
}
else
echo "ERROR: you can only stop a router process that was started with startRouter" >&2
return 1
fi
}
function checkHostsFile {
@@ -138,7 +157,7 @@ function verifyZitiVersionExists {
unset ZITI_BINARIES_VERSION
ziticurl="$(curl -s https://api.github.com/repos/openziti/ziti/releases/tags/"${ZITI_VERSION_OVERRIDE}")"
ziticurl="$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/openziti/ziti/releases/tags/"${ZITI_VERSION_OVERRIDE}")"
# shellcheck disable=SC2155
export ZITI_BINARIES_FILE=$(echo "${ziticurl}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}"'")) | .name')
# shellcheck disable=SC2155
@@ -146,6 +165,7 @@ function verifyZitiVersionExists {
# Check if there was an error while trying to get the requested version
if [[ "${ZITI_BINARIES_VERSION-}" == "null" ]]; then
echo "ERROR: response missing '.tag_name': ${ziticurl}" >&2
return 1
fi
@@ -178,7 +198,7 @@ function getLatestZitiVersion {
unset ZITI_BINARIES_VERSION
if [[ "${ZITI_BINARIES_VERSION-}" == "" ]]; then
zitilatest=$(curl -s https://api.github.com/repos/openziti/ziti/releases/latest)
zitilatest=$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/openziti/ziti/releases/latest)
# shellcheck disable=SC2155
export ZITI_BINARIES_FILE=$(echo "${zitilatest}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}"'")) | .name')
# shellcheck disable=SC2155
@@ -279,6 +299,37 @@ function checkPrereqs {
fi
}
function _portCheck {
if [[ "${1-}" == "" ]] || [[ "${2-}" == "" ]]; then
echo -e "_portCheck Usage: _portCheck <port> <portName>"
return 0
fi
envVar="${1-}"
if [[ -n "$ZSH_VERSION" ]]; then
envVarValue="${(P)envVar}"
elif [[ -n "$BASH_VERSION" ]]; then
envVarValue="${!envVar}"
else
echo -e "$(YELLOW "Unknown/Unsupported shell, cannot verify availability of ${2-}'s intended port, proceed with caution")"
return 0
fi
echo -e "Checking if ${2-}'s port (${envVarValue}) is available"
portCheckResult=$(lsof -w -i :"${envVarValue}" 2> /dev/null)
if [[ "${portCheckResult}" != "" ]]; then # Controller management plane
echo -e "$(RED " ")"
echo -e "$(RED "The intended ${2-} port (${envVarValue}) is currently being used, the process using this port should be closed or the port value should be changed.")"
echo -e "$(RED "To use a different port, set the port value in ${envVar}")"
echo -e "$(RED " ")"
echo -e "$(RED "Example:")"
echo -e "$(RED "export ${envVar}=1234")"
echo -e "$(RED " ")"
return 1
fi
return 0
}
function checkControllerName {
if [[ "${ZITI_EDGE_CONTROLLER_HOSTNAME}" == *['!'@#\$%^\&*\(\)_+]* ]]; then
echo -e "$(RED " - The provided Network name contains an invalid character: '!'@#\$%^\&*()_+")"
@@ -323,15 +374,15 @@ function setupZitiNetwork {
echo "Creating a controller is effectively creating a network. The name of the network will be used when writing"
echo "configuration files locally. Choose the name of your network now. The format of the network name should resemble"
echo -n "what a hostname looks like. A good choice is to actually use your system's hostname: "
echo -e "$(BLUE "$(hostname)")"
echo -e "$(BLUE "${DEFAULT_ZITI_NETWORK}")"
echo " "
echo -en "$(echo -ne "Network Name [$(BLUE "$(hostname)")]: ")"
echo -en "$(echo -ne "Network Name [$(BLUE "${DEFAULT_ZITI_NETWORK}")]: ")"
read -r ZITI_NETWORK
echo " "
if checkControllerName; then
: #clear to continue
if [[ "${ZITI_NETWORK-}" == "" ]]; then
ZITI_NETWORK="$(hostname)"
ZITI_NETWORK="${DEFAULT_ZITI_NETWORK}"
fi
echo "name: ${ZITI_NETWORK-}"
else
@@ -359,6 +410,7 @@ function generateEnvFile {
if [[ "${ZITI_CONTROLLER_RAWNAME-}" == "" ]]; then export ZITI_CONTROLLER_RAWNAME="${ZITI_NETWORK-}"; fi
if [[ "${ZITI_CONTROLLER_HOSTNAME-}" == "" ]]; then export export ZITI_CONTROLLER_HOSTNAME="${ZITI_CONTROLLER_RAWNAME}"; fi
if [[ "${ZITI_CTRL_PORT-}" == "" ]]; then export ZITI_CTRL_PORT="6262"; fi
if [[ "${ZITI_EDGE_ROUTER_PORT-}" == "" ]]; then export ZITI_EDGE_ROUTER_PORT="3022"; fi
if [[ "${ZITI_EDGE_CONTROLLER_RAWNAME-}" == "" ]]; then export export ZITI_EDGE_CONTROLLER_RAWNAME="${ZITI_NETWORK-}"; fi
if [[ "${ZITI_EDGE_CONTROLLER_HOSTNAME-}" == "" ]]; then export export ZITI_EDGE_CONTROLLER_HOSTNAME="${ZITI_EDGE_CONTROLLER_RAWNAME}"; fi
@@ -419,8 +471,8 @@ function ziti_expressConfiguration {
fi
# Stop any devices currently running to avoid port collisions
stopAllEdgeRouters
stopZitiController
stopRouter
stopController
else
echo -e "$(RED " --- Exiting express install ---")"
return 1
@@ -451,7 +503,7 @@ function ziti_expressConfiguration {
echo " "
echo -e "******** Setting Up Environment ********"
if [[ "${1-}" == "" ]]; then
nw="$(hostname)"
nw="${DEFAULT_ZITI_NETWORK}"
else
nw="${1-}"
fi
@@ -468,6 +520,24 @@ function ziti_expressConfiguration {
echo "Exiting as env file was not generated"
return 1
fi
# Check Ports
returnCnt=0
_portCheck "ZITI_CTRL_PORT" "Controller"
returnCnt=$((returnCnt + $?))
_portCheck "ZITI_EDGE_ROUTER_PORT" "Edge Router"
returnCnt=$((returnCnt + $?))
_portCheck "ZITI_EDGE_CONTROLLER_PORT" "Edge Controller"
returnCnt=$((returnCnt + $?))
_portCheck "ZITI_CTRL_MGMT_PORT" "Controller Management Plane"
returnCnt=$((returnCnt + $?))
if [[ "${ZITI_EDGE_ROUTER_LISTENER_BIND_PORT-}" != "" ]]; then
# This port can be explicitly set but is not always, only check if set
_portCheck "ZITI_EDGE_ROUTER_LISTENER_BIND_PORT" "Router Listener Bind Port"
returnCnt=$((returnCnt + $?))
fi
if [[ "returnCnt" -gt "0" ]]; then return 1; fi
#checkHostsFile
echo " "
@@ -481,7 +551,7 @@ function ziti_expressConfiguration {
createControllerConfig
#createControllerSystemdFile
initializeController
startZitiController
startController
echo "waiting for the controller to come online to allow the edge router to enroll"
waitForController
@@ -515,13 +585,13 @@ function ziti_expressConfiguration {
"${ZITI_BIN_DIR-}/ziti-router" enroll "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_ROUTER_RAWNAME}.yaml" --jwt "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_ROUTER_RAWNAME}.jwt" &> "${ZITI_HOME_OS_SPECIFIC}/${ZITI_EDGE_ROUTER_RAWNAME}.enrollment.log"
echo ""
stopZitiController
stopController
echo "Edge Router enrolled. Controller stopped."
echo ""
echo -e "$(GREEN "Congratulations. Express setup complete!")"
echo -e "Start your Ziti Controller by running the function: $(BLUE "startZitiController")"
echo -e "Start your Ziti Edge Router by running : $(BLUE 'startExpressEdgeRouter')"
echo -e "Start your Ziti Controller by running the function: $(BLUE "startController")"
echo -e "Start your Ziti Edge Router by running : $(BLUE 'startRouter')"
echo ""
}
@@ -718,7 +788,7 @@ function createRouterPki {
export ZITI_ROUTER_IDENTITY_SERVER_CERT="${ZITI_PKI_OS_SPECIFIC}/routers/${router_name}/server.cert"
export ZITI_ROUTER_IDENTITY_KEY="${ZITI_PKI_OS_SPECIFIC}/routers/${router_name}/server.key"
export ZITI_ROUTER_IDENTITY_CA="${ZITI_PKI_OS_SPECIFIC}/routers/${router_name}/cas.cert"
pki_client_server "${router_name},localhost,127.0.0.1,$(hostname)" "${ZITI_CONTROLLER_INTERMEDIATE_NAME}" "${ZITI_EDGE_ROUTER_IP_OVERRIDE-}" "${router_name}"
pki_client_server "${router_name},localhost,127.0.0.1,${ZITI_NETWORK}" "${ZITI_CONTROLLER_INTERMEDIATE_NAME}" "${ZITI_EDGE_ROUTER_IP_OVERRIDE-}" "${router_name}"
}
function createPrivateRouterConfig {
@@ -781,7 +851,7 @@ function createPki {
pki_create_intermediate "${ZITI_SPURIOUS_INTERMEDIATE}" "${ZITI_SIGNING_INTERMEDIATE_NAME}" 1
echo " "
pki_allow_list_dns="${ZITI_CONTROLLER_HOSTNAME},localhost,$(hostname)"
pki_allow_list_dns="${ZITI_CONTROLLER_HOSTNAME},localhost,${ZITI_NETWORK}"
if [[ "${ZITI_EDGE_CONTROLLER_HOSTNAME}" != "" ]]; then pki_allow_list_dns="${pki_allow_list_dns},${ZITI_EDGE_CONTROLLER_HOSTNAME}"; fi
if [[ "${EXTERNAL_DNS}" != "" ]]; then pki_allow_list_dns="${pki_allow_list_dns},${EXTERNAL_DNS}"; fi
pki_allow_list_ip="127.0.0.1"
@@ -965,8 +1035,6 @@ function ziti_createEnvFile {
retVal=$?
if [[ "${retVal}" != 0 ]]; then
if decideToUseDefaultZitiHome; then
# shellcheck disable=SC2155
export ZITI_NETWORK="$(hostname)"
ZITI_HOME="${DEFAULT_ZITI_HOME_LOCATION}"
else
return 1
@@ -998,16 +1066,27 @@ function ziti_createEnvFile {
export ZITI_NETWORK="${1-}"
fi
if [[ "${ZITI_NETWORK-}" = "" ]]; then
echo -e "$(YELLOW "WARN: ZITI_NETWORK HAS NOT BEEN DECLARED! USING hostname: $(hostname)")"
echo -e "$(YELLOW "WARN: ZITI_NETWORK HAS NOT BEEN DECLARED! USING hostname: ${DEFAULT_ZITI_NETWORK}")"
# shellcheck disable=SC2155
export ZITI_NETWORK="$(hostname)"
export ZITI_NETWORK="${DEFAULT_ZITI_NETWORK}"
fi
fi
echo "ZITI_NETWORK set to: ${ZITI_NETWORK}"
if [[ "${ZITI_USER-}" == "" ]]; then export ZITI_USER="admin"; fi
if [[ "${ZITI_PWD-}" == "" ]]; then export ZITI_PWD="admin"; fi
if [[ "${ZITI_PWD-}" == "" ]]; then
ZITI_PWD="$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32)"
echo -en "Do you want to keep the generated admin password '$ZITI_PWD'? (Y/n)"
# shellcheck disable=SC2162
read -r pwd_reply
if [[ -z "${pwd_reply}" || ${pwd_reply} =~ [yY] ]]; then
echo "INFO: using ZITI_PWD=${ZITI_PWD}"
else
echo -en "Type the preferred admin password and press <enter>"
read -r ZITI_PWD
fi
fi
if [[ "${ZITI_DOMAIN_SUFFIX-}" == "" ]]; then export ZITI_DOMAIN_SUFFIX=""; fi
if [[ "${ZITI_ID-}" == "" ]]; then export ZITI_ID="${ZITI_HOME}/identities.yaml"; fi
@@ -1037,9 +1116,8 @@ function ziti_createEnvFile {
export ZITI_SIGNING_ROOTCA_NAME="${ZITI_SIGNING_CERT_NAME}-root-ca"
export ZITI_SIGNING_INTERMEDIATE_NAME="${ZITI_SIGNING_CERT_NAME}-intermediate"
export ZITI_BIN_ROOT="${ZITI_HOME}/ziti-bin"
if [[ "${ZITI_CTRL_MGMT_HOST_PORT-}" == "" ]]; then export ZITI_CTRL_MGMT_HOST_PORT="${ZITI_CONTROLLER_HOSTNAME}:10000"; fi
if [[ "${ZITI_CTRL_MGMT_PORT-}" == "" ]]; then export ZITI_CTRL_MGMT_PORT="10000"; fi
if [[ "${ZITI_CTRL_MGMT_HOST_PORT-}" == "" ]]; then export ZITI_CTRL_MGMT_HOST_PORT="${ZITI_CONTROLLER_HOSTNAME}:${ZITI_CTRL_MGMT_PORT}"; fi
if [[ "${ZITI_CTRL_IDENTITY_CERT-}" == "" ]]; then export ZITI_CTRL_IDENTITY_CERT="${ZITI_PKI_OS_SPECIFIC}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_CONTROLLER_HOSTNAME}-client.cert"; fi
if [[ "${ZITI_CTRL_IDENTITY_SERVER_CERT-}" == "" ]]; then export ZITI_CTRL_IDENTITY_SERVER_CERT="${ZITI_PKI_OS_SPECIFIC}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_CONTROLLER_HOSTNAME}-server.chain.pem"; fi
if [[ "${ZITI_CTRL_IDENTITY_KEY-}" == "" ]]; then export ZITI_CTRL_IDENTITY_KEY="${ZITI_PKI_OS_SPECIFIC}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/keys/${ZITI_CONTROLLER_HOSTNAME}-server.key"; fi
+1 -1
View File
@@ -1 +1 @@
docker run --cap-add=NET_ADMIN --device /dev/net/tun --name ziti-tunneler-red --user root --network docker_zitired -v docker_ziti-fs:/openziti --rm -it openziti/quickstart /bin/bash
docker run --cap-add=NET_ADMIN --device /dev/net/tun --name ziti-tunneler-red --user root --network docker_zitired -v docker_ziti-fs:/persistent --rm -it openziti/quickstart /bin/bash
+10 -10
View File
@@ -14,9 +14,9 @@ services:
aliases:
- ziti-edge-controller
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint:
- "/openziti/scripts/run-controller.sh"
- "/var/openziti/scripts/run-controller.sh"
ziti-controller-init-container:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -35,11 +35,11 @@ services:
aliases:
- ziti-edge-controller-init-container
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint:
- "/openziti/scripts/run-with-ziti-cli.sh"
- "/var/openziti/scripts/run-with-ziti-cli.sh"
command:
- "/openziti/scripts/access-control.sh"
- "/var/openziti/scripts/access-control.sh"
ziti-edge-router:
image: "${ZITI_IMAGE}:${ZITI_VERSION}"
@@ -54,22 +54,22 @@ services:
- zitiblue
- zitired
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
entrypoint: /bin/bash
command: "/openziti/scripts/run-router.sh edge"
command: "/var/openziti/scripts/run-router.sh edge"
ziti-console:
image: openziti/zac
environment:
- ZAC_SERVER_CERT_CHAIN=/openziti/pki/ziti-controller-intermediate/certs/ziti-controller-server.cert
- ZAC_SERVER_KEY=/openziti/pki/ziti-controller-intermediate/keys/ziti-controller-server.key
- ZAC_SERVER_CERT_CHAIN=/persistent/pki/ziti-controller-intermediate/certs/ziti-controller-server.cert
- ZAC_SERVER_KEY=/persistent/pki/ziti-controller-intermediate/keys/ziti-controller-server.key
depends_on:
- ziti-controller
ports:
- "1408:1408"
- "8443:8443"
volumes:
- ziti-fs:/openziti
- ziti-fs:/persistent
networks:
- zitiblue
+30 -11
View File
@@ -78,6 +78,7 @@ func buildDockerQuickstartTestImage() {
defer tw.Close()
dockerFile := "TestDockerfile"
imageNameAndTag := "openziti/quickstart:test"
filePaths := iterateDir(dir)
@@ -99,7 +100,7 @@ func buildDockerQuickstartTestImage() {
Context: dockerFileTarReader,
Dockerfile: dockerFile,
Remove: true,
Tags: []string{"openziti/quickstart:test"},
Tags: []string{imageNameAndTag},
})
if err != nil {
fmt.Println(err)
@@ -107,6 +108,20 @@ func buildDockerQuickstartTestImage() {
}
defer imageBuildResponse.Body.Close()
// Wait until the image finishes building (builds in a background thread)
for {
fmt.Println("Waiting for image build...")
output, err := exec.Command("docker", "images", "-q", imageNameAndTag).Output()
if err != nil {
fmt.Println(err)
}
if string(output) != "" {
fmt.Println("Build complete, continuing with test")
break
}
time.Sleep(5 * time.Second)
}
danglers := filters.NewArgs()
danglers.Add("dangling", "true")
results, err := cli.ImageList(ctx, types.ImageListOptions{
@@ -205,13 +220,13 @@ func TestQuickStartEnvFile(t *testing.T) {
expectedValues := []string{
"export ZITI_EDGE_ROUTER_RAWNAME=\"localhost-edge-router\"",
"export ZITI_EDGE_CONTROLLER_RAWNAME=\"localhost\"",
"export ZITI_HOME_OS_SPECIFIC=\"/openziti\"",
"export ZITI_HOME=\"/openziti\"",
"export ZITI_BIN_DIR=\"/openziti/ziti-bin\"",
"export ZITI_HOME_OS_SPECIFIC=\"/persistent\"",
"export ZITI_HOME=\"/persistent\"",
"export ZITI_BIN_DIR=\"/var/openziti/ziti-bin\"",
"export ZITI_EDGE_CTRL_ADVERTISED=\"localhost:1280\"",
"export ZITI_USER=\"admin\"",
"export ZITI_PWD=\"admin\"",
"export ZITI_PKI_OS_SPECIFIC=\"/openziti/pki\"",
"export ZITI_PKI_OS_SPECIFIC=\"/persistent/pki\"",
"export ZITI_EDGE_CONTROLLER_ROOTCA_NAME=\"localhost-root-ca\"",
"export ZITI_EDGE_CONTROLLER_INTERMEDIATE_NAME=\"localhost-intermediate\"",
}
@@ -224,7 +239,7 @@ func TestQuickStartEnvFile(t *testing.T) {
// Wait until it finishes
for {
time.Sleep(1)
time.Sleep(1 * time.Second)
output, _ := exec.Command("docker", "inspect", "-f", "{{.State.Running}}", containerId).Output()
if string(output) == "false\n" {
break
@@ -236,7 +251,7 @@ func TestQuickStartEnvFile(t *testing.T) {
if err != nil {
fmt.Printf("Error: %s\n", output)
}
cpString := containerId + ":/openziti/localhost.env"
cpString := containerId + ":/persistent/localhost.env"
cmd := exec.Command("docker", "cp", cpString, ".")
err = cmd.Run()
if err != nil {
@@ -285,12 +300,15 @@ func TestQuickStartEnvFile(t *testing.T) {
}
/*
This is a manually run test that will, with the default values, confirm the docker-compose ziti network is running as
expected. The values can be edited to confirm other ziti networks but will require an http server on the back end.
This is a manually run test that will, with the default values except the admin password, confirm the docker-compose
ziti network is running as expected. The values can be edited to confirm other ziti networks but will require an http
server on the back end.
*/
func TestSimpleWebService(t *testing.T) {
// Wait for the controller to become available
zitiAdminUsername := "admin"
zitiAdminPassword := "admin"
testerUsername := "gotester"
ctrlAddress := "https://ziti-edge-controller:1280"
hostingRouterName := "ziti-edge-router"
@@ -299,6 +317,7 @@ func TestSimpleWebService(t *testing.T) {
bindHostAddress := "web-test-blue"
bindHostPort := 8000
serviceName := "basic.web.smoke.test.service"
wd, _ := os.Getwd()
waitForController(ctrlAddress)
// Give routers time to enroll themselves
time.Sleep(5 * time.Second)
@@ -312,7 +331,7 @@ func TestSimpleWebService(t *testing.T) {
for _, ca := range caCerts {
caPool.AddCert(ca)
}
client, err := rest_util.NewEdgeManagementClientWithUpdb("admin", "admin", ctrlAddress, caPool)
client, err := rest_util.NewEdgeManagementClientWithUpdb(zitiAdminUsername, zitiAdminPassword, ctrlAddress, caPool)
if err != nil {
log.Fatal(err)
}
@@ -376,7 +395,7 @@ func TestSimpleWebService(t *testing.T) {
fmt.Println("Unable to detect a terminator for the edge router")
}
helloUrl := fmt.Sprintf("http://%s:%d", serviceName, dialPort)
httpClient := createZitifiedHttpClient("/Users/geoffberl/git/NetFoundry/ziti/quickstart/" + testerUsername + ".json")
httpClient := createZitifiedHttpClient(wd + "/" + testerUsername + ".json")
resp, e := httpClient.Get(helloUrl)
if e != nil {
panic(e)
+1 -1
View File
@@ -1 +1 @@
0.26
0.27
+2 -2
View File
@@ -26,7 +26,7 @@ import (
"github.com/openziti/transport/v2/transwarptls"
"github.com/openziti/transport/v2/wss"
"github.com/openziti/ziti/common/version"
"github.com/openziti/ziti/ziti-controller/subcmd"
"github.com/openziti/ziti/ziti/controller"
"github.com/sirupsen/logrus"
)
@@ -44,5 +44,5 @@ func init() {
}
func main() {
subcmd.Execute()
controller.Execute()
}
-73
View File
@@ -1,73 +0,0 @@
/*
Copyright 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
https://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.
*/
package subcmd
import (
"fmt"
"github.com/michaelquigley/pfxlog"
edgeSubCmd "github.com/openziti/edge/controller/subcmd"
"github.com/openziti/ziti/common/version"
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func init() {
root.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enable verbose logging")
root.PersistentFlags().BoolVarP(&cliAgentEnabled, "cliagent", "a", true, "Enable/disabled CLI Agent (enabled by default)")
root.PersistentFlags().StringVar(&cliAgentAddr, "cli-agent-addr", "", "Specify where CLI Agent should list (ex: unix:/tmp/myfile.sock or tcp:127.0.0.1:10001)")
root.PersistentFlags().StringVar(&logFormatter, "log-formatter", "", "Specify log formatter [json|pfxlog|text]")
root.PersistentFlags().BoolVar(&syncRaftToDb, "sync-raft-to-db", false, "Sync the current database state to raft as a snapshot. Use when moving an existing controller to run in HA/Raft")
edgeSubCmd.AddCommands(root, version.GetCmdBuildInfo())
}
var root = &cobra.Command{
Use: "ziti-controller",
Short: "Ziti Fabric Controller",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if verbose {
logrus.SetLevel(logrus.DebugLevel)
}
switch logFormatter {
case "pfxlog":
pfxlog.SetFormatter(pfxlog.NewFormatter(pfxlog.DefaultOptions().SetTrimPrefix("github.com/openziti/").StartingToday()))
case "json":
pfxlog.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
pfxlog.SetFormatter(&logrus.TextFormatter{})
default:
// let logrus do its own thing
}
util.LogReleaseVersionCheck(constants.ZITI_CONTROLLER)
},
}
var verbose bool
var cliAgentEnabled bool
var cliAgentAddr string
var logFormatter string
var syncRaftToDb bool
func Execute() {
if err := root.Execute(); err != nil {
fmt.Printf("error: %s\n", err)
}
}
+2 -2
View File
@@ -28,7 +28,7 @@ import (
"github.com/openziti/transport/v2/ws"
"github.com/openziti/transport/v2/wss"
"github.com/openziti/ziti/common/version"
"github.com/openziti/ziti/ziti-router/subcmd"
"github.com/openziti/ziti/ziti/router"
"github.com/sirupsen/logrus"
)
@@ -48,5 +48,5 @@ func init() {
}
func main() {
subcmd.Execute()
router.Execute()
}
-69
View File
@@ -1,69 +0,0 @@
/*
Copyright 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
https://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.
*/
package subcmd
import (
"fmt"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func init() {
root.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enable verbose logging")
root.PersistentFlags().StringVar(&logFormatter, "log-formatter", "", "Specify log formatter [json|pfxlog|text]")
root.PersistentFlags().BoolVar(&cliAgentEnabled, "cli-agent", true, "Enable/disable CLI Agent (enabled by default)")
root.PersistentFlags().StringVar(&cliAgentAddr, "cli-agent-addr", "", "Specify where CLI Agent should list (ex: unix:/tmp/myfile.sock or tcp:127.0.0.1:10001)")
root.PersistentFlags().BoolVar(&enableDebugOps, "debug-ops", false, "Enable/disable debug agent operations (disabled by default)")
}
var root = &cobra.Command{
Use: "ziti-router",
Short: "Ziti Fabric Router",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if verbose {
logrus.SetLevel(logrus.DebugLevel)
}
switch logFormatter {
case "pfxlog":
pfxlog.SetFormatter(pfxlog.NewFormatter(pfxlog.DefaultOptions().SetTrimPrefix("github.com/openziti/").StartingToday()))
case "json":
pfxlog.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
pfxlog.SetFormatter(&logrus.TextFormatter{})
default:
// let logrus do its own thing
}
util.LogReleaseVersionCheck(constants.ZITI_ROUTER)
},
}
var verbose bool
var logFormatter string
var cliAgentEnabled bool
var enableDebugOps bool
var cliAgentAddr string
func Execute() {
if err := root.Execute(); err != nil {
fmt.Printf("error: %s\n", err)
}
}
+2 -2
View File
@@ -19,7 +19,7 @@ package main
import (
"github.com/michaelquigley/pfxlog"
"github.com/openziti/foundation/v2/debugz"
"github.com/openziti/ziti/ziti-tunnel/cmd/ziti-tunnel/subcmd"
"github.com/openziti/ziti/ziti/tunnel"
"github.com/sirupsen/logrus"
)
@@ -29,5 +29,5 @@ func init() {
func main() {
debugz.AddStackDumpHandler()
subcmd.Execute()
tunnel.Execute()
}
-144
View File
@@ -1,144 +0,0 @@
/*
Copyright 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
https://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.
*/
package ansible
import (
"fmt"
"os"
"path/filepath"
)
// Options for installing ansible
type InstallOptions struct {
RequirementsTXT string
VirtualEnv string
Path string
}
func InstallViaPip(options *InstallOptions) error {
// TODO
var (
virtualenvBinary string
virtualEnv string
pipBinary string
requirementsTXT string
err error
)
if options.Path != "" {
if _, err = os.Stat(options.Path); os.IsNotExist(err) {
return fmt.Errorf("The specified Path (%s) does not exist", options.Path)
}
}
cwd, _ := os.Getwd()
// if no requirements.txt is set we should check to see if we have one in
// dir in provided path or the current working dir, if so we can use that.
if options.RequirementsTXT == "" {
if options.Path != "" {
requirementsTXT = filepath.Join(options.Path, "requirements.txt")
} else {
requirementsTXT = filepath.Join(cwd, "requirements.txt")
}
if requirementsTXT != "" {
fmt.Printf("checking if %s exists... ", requirementsTXT)
if _, err = os.Stat(requirementsTXT); err == nil {
options.RequirementsTXT = requirementsTXT
fmt.Println("yes")
} else {
fmt.Println("no")
}
}
} else {
fmt.Printf("checking if %s exists... ", options.RequirementsTXT)
if _, err = os.Stat(options.RequirementsTXT); err == nil {
fmt.Println("yes")
} else {
fmt.Println("no")
return fmt.Errorf("(%s) does not exist", options.RequirementsTXT)
}
}
// if requesting virtualenv we need to make sure virtualenv binary exists
if options.VirtualEnv != "" {
virtualenvBinary = checkBinInPath("virtualenv")
if virtualenvBinary == "" {
return fmt.Errorf("unable to find virtualenv in path")
}
}
// if no virtualenv is set we should check to see if we have a virtualenv
// dir in provided path or the current working dir, if so we can use that.
if options.VirtualEnv == "" {
//fmt.Printf("you specified path %s\n", options.Path)
if options.Path != "" {
virtualEnv = filepath.Join(options.Path, "virtualenv")
options.VirtualEnv = virtualEnv
} else {
virtualEnv = filepath.Join(cwd, "virtualenv")
fmt.Printf("checking if %s exists... ", virtualEnv)
if _, err = os.Stat(virtualEnv); err == nil {
options.VirtualEnv = virtualEnv
fmt.Println("yes")
} else {
fmt.Println("no")
}
}
}
// if requesting virtualenv we need to make sure virtualenv binary exists
if options.VirtualEnv != "" {
virtualenvBinary = checkBinInPath("virtualenv")
if virtualenvBinary == "" {
return fmt.Errorf("unable to find virtualenv in path")
}
}
// if a virtualenv is specified make sure that pip is installed
// in it and use that, otherwise make sure its in path.
if options.VirtualEnv != "" {
fmt.Printf("Using VirtualEnv: %s\n", options.VirtualEnv)
pipBinary = filepath.Join(options.VirtualEnv, "bin", "pip")
if _, err = os.Stat(pipBinary); os.IsNotExist(err) {
err = runCmd(virtualenvBinary, []string{options.VirtualEnv})
if err != nil {
return err
}
}
} else {
pipBinary = checkBinInPath("pip")
}
if pipBinary == "" {
return fmt.Errorf("unable to find pip in path")
}
fmt.Printf("Using Pip: %s\n", pipBinary)
if options.RequirementsTXT != "" {
err = runCmd(pipBinary, []string{"install", "-r", options.RequirementsTXT})
if err != nil {
return err
}
} else {
err = runCmd(pipBinary, []string{"install", "ansible"})
if err != nil {
return err
}
}
return nil
}
-187
View File
@@ -1,187 +0,0 @@
/*
Copyright 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
https://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.
*/
package ansible
import (
"bufio"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
)
// Options for running ansible
type Options struct {
SSHConfigFile string
SSHForwardAgent bool
Provisioner string
Environment string
Inventory string
KnownHostsFile string
ModuleOptions
PlaybookOptions
}
// sets an environment variable
func setEnvironmentVariables(variable, value string) {
os.Setenv(variable, value)
}
// appends a string to an existing environment variable
func appendEnvironmentVariable(variable, value string) {
old := os.Getenv(variable)
new := []string{old, value}
os.Setenv(variable, strings.Join(new, " "))
}
// Checks if specified ssh config file exists, if not it
// checks if there is an ssh_config in the specified environment
// otherwise defaults to no ssh config.
// appends result to env var ANSIBLE_SSH_ARGS
func sshConfigFile(options *Options) error {
if options.SSHConfigFile == "" {
sshConfigFile := filepath.Join(options.Environment, "ssh_config")
if _, err := os.Stat(sshConfigFile); !os.IsNotExist(err) {
options.SSHConfigFile = sshConfigFile
}
} else {
if _, err := os.Stat(options.SSHConfigFile); os.IsNotExist(err) {
return fmt.Errorf("ssh_config file %s does not exist", options.SSHConfigFile)
}
}
if options.SSHConfigFile != "" {
appendEnvironmentVariable("ANSIBLE_SSH_ARGS",
fmt.Sprintf("-F %s", options.SSHConfigFile))
}
return nil
}
// isEnvironment checks if a given directory is a suitable environment
func isEnvironment(path string) bool {
fi, err := os.Stat(path)
switch {
case err != nil:
return false
case fi.IsDir():
testInventory := filepath.Join(path, "hosts")
if _, err := os.Stat(testInventory); os.IsNotExist(err) {
return false
}
return true
default:
return false
}
}
// if the user specifies an environment we will attempt to ensure that
// it exists, we will also set the inventory arg to be passed onto ansible.
func configureEnvironment(options *Options) error {
if options.Environment != "" {
if isEnvironment(options.Environment) {
options.Inventory = filepath.Join(options.Environment, "hosts")
} else {
return fmt.Errorf("%s is not a valid environment path", options.Environment)
}
} else {
cwd, _ := os.Getwd()
fmt.Printf("--environment not set. Trying your working directory (%s)\n", cwd)
if isEnvironment(cwd) {
options.Environment = cwd
options.Inventory = filepath.Join(cwd, "hosts")
} else {
return fmt.Errorf("%s is not a valid environment path", cwd)
}
}
if options.Inventory != "" {
if _, err := os.Stat(options.Inventory); os.IsNotExist(err) {
return fmt.Errorf("inventory file %s does not exist", options.Inventory)
}
}
return nil
}
// checks if the user specifies an alternative known hosts file, if not
// looks for one in the specified environment or just defaults to none.
func configureKnownHostsFile(options *Options) error {
if options.KnownHostsFile != "" {
if _, err := os.Stat(options.KnownHostsFile); os.IsNotExist(err) {
return fmt.Errorf("known hosts file %s does not exist", options.KnownHostsFile)
}
} else {
maybeKnownHostsFile := filepath.Join(options.Environment, "ssh_known_hosts")
if _, err := os.Stat(maybeKnownHostsFile); !os.IsNotExist(err) {
options.KnownHostsFile = maybeKnownHostsFile
}
}
if options.KnownHostsFile != "" {
appendEnvironmentVariable("ANSIBLE_SSH_ARGS",
fmt.Sprintf("-o UserKnownHostsFile=%s", options.KnownHostsFile))
}
return nil
}
// enables ssh agent forwarding
func configureSSHForwardAgent(options *Options) {
if options.SSHForwardAgent {
appendEnvironmentVariable("ANSIBLE_SSH_ARGS", "-o ForwardAgent=yes")
}
}
func init() {
// setEnvironmentVariables("ANSIBLE_STDOUT_CALLBACK","json")
}
func checkBinInPath(binary string) string {
fmt.Printf("==> checkBinInPath: %s\n", binary)
location, err := exec.LookPath(binary)
if err != nil {
fmt.Printf("==> checkBinInPath: err: %s\n", err)
return ""
}
return location
}
// runCmd takes a command and args and runs it, streaming output to stdout
func runCmd(cmdName string, cmdArgs []string) error {
fmt.Printf("==> Running: %s %s\n", cmdName, strings.Join(cmdArgs, " "))
//return fmt.Errorf("bye")
cmd := exec.Command(cmdName, cmdArgs...)
cmdReader, err := cmd.StdoutPipe()
if err != nil {
return err
}
scanner := bufio.NewScanner(cmdReader)
go func() {
for scanner.Scan() {
fmt.Printf("%s\n", scanner.Text())
}
}()
err = cmd.Start()
if err != nil {
return err
}
err = cmd.Wait()
if err != nil {
return err
}
return nil
}
-74
View File
@@ -1,74 +0,0 @@
/*
Copyright 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
https://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.
*/
package ansible
import (
"fmt"
)
// ModuleOptions for running ansible
type ModuleOptions struct {
ModuleHosts string
Module string
ModulePath string
ModuleArgs string
}
// Module ansible playbook
func Module(options *Options, ansibleArgs []string) error {
var (
err error
zitiArgs []string
)
err = configureEnvironment(options)
if err != nil {
return err
}
err = sshConfigFile(options)
if err != nil {
return err
}
err = configureKnownHostsFile(options)
if err != nil {
return err
}
configureSSHForwardAgent(options)
zitiArgs = []string{options.ModuleHosts, "--module-name", options.Module}
if options.ModulePath != "" {
zitiArgs = append(zitiArgs,
[]string{"--module-path", options.ModulePath}...)
}
if options.ModuleArgs != "" {
zitiArgs = append(zitiArgs,
[]string{"--args", fmt.Sprintf("'%s'", options.ModuleArgs)}...)
}
if options.Inventory != "" {
zitiArgs = append(zitiArgs,
[]string{"--inventory", options.Inventory}...)
}
cmdName := "ansible"
cmdArgs := append(zitiArgs, ansibleArgs...)
return runCmd(cmdName, cmdArgs)
}
-59
View File
@@ -1,59 +0,0 @@
/*
Copyright 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
https://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.
*/
package ansible
import (
// "fmt"
// "strings"
)
// PlaybookOptions for running ansible
type PlaybookOptions struct {
}
// PlaybookRun ansible playbook
func PlaybookRun(options *Options, ansibleArgs []string) error {
var (
err error
zitiArgs []string
)
err = configureEnvironment(options)
if err != nil {
return err
}
err = sshConfigFile(options)
if err != nil {
return err
}
err = configureKnownHostsFile(options)
if err != nil {
return err
}
configureSSHForwardAgent(options)
if options.Inventory != "" {
zitiArgs = append(zitiArgs,
[]string{"--inventory", options.Inventory}...)
}
cmdName := "ansible-playbook"
cmdArgs := append(zitiArgs, ansibleArgs...)
// fmt.Println("running: ansible_playbook", strings.Join(cmdArgs, " "))
return runCmd(cmdName, cmdArgs)
}
@@ -1,30 +1,18 @@
/*
Copyright 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
https://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.
*/
package cmd
package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/channel/v2"
"github.com/openziti/edge/router/debugops"
"github.com/openziti/fabric/controller"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/fabric/router"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type AgentAppId byte
@@ -35,7 +23,27 @@ const (
)
func NewAgentCmd(p common.OptionsProvider) *cobra.Command {
agentCmd := agentcli.NewAgentCmd(p)
agentCmd := &cobra.Command{
Use: "agent",
Short: "Interact with ziti processes using the the IPC agent",
Run: func(cmd *cobra.Command, args []string) {
cmdhelper.CheckErr(cmd.Help())
},
}
agentCmd.AddCommand(NewPsCmd(p))
agentCmd.AddCommand(NewGoVersionCmd(p))
agentCmd.AddCommand(NewGcCmd(p))
agentCmd.AddCommand(NewSetGcCmd(p))
agentCmd.AddCommand(NewStackCmd(p))
agentCmd.AddCommand(NewMemstatsCmd(p))
agentCmd.AddCommand(NewStatsCmd(p))
agentCmd.AddCommand(NewPprofHeapCmd(p))
agentCmd.AddCommand(NewPprofCpuCmd(p))
agentCmd.AddCommand(NewTraceCmd(p))
agentCmd.AddCommand(NewSetLogLevelCmd(p))
agentCmd.AddCommand(NewSetChannelLogLevelCmd(p))
agentCmd.AddCommand(NewClearChannelLogLevelCmd(p))
ctrlCmd := &cobra.Command{
Use: "controller",
@@ -73,3 +81,25 @@ func NewAgentCmd(p common.OptionsProvider) *cobra.Command {
return agentCmd
}
// AgentOptions contains the command line options
type AgentOptions struct {
common.CommonOptions
}
func NewAgentChannel(conn net.Conn) (channel.Channel, error) {
options := channel.DefaultOptions()
options.ConnectTimeout = time.Second
dialer := channel.NewExistingConnDialer(&identity.TokenId{Token: "agent"}, conn, nil)
return channel.NewChannel("agent", dialer, nil, options)
}
func MakeAgentChannelRequest(addr string, signal byte, params []byte, f func(ch channel.Channel) error) error {
return agent.MakeRequestF(addr, signal, params, func(conn net.Conn) error {
ch, err := NewAgentChannel(conn)
if err != nil {
return err
}
return f(ch)
})
}
@@ -14,29 +14,29 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"fmt"
"github.com/openziti/channel/v2"
"github.com/openziti/agent"
"github.com/openziti/channel/v2"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type SimpleChAgentCmdOptions struct {
agentcli.AgentOptions
AgentOptions
requestType int32
timeout time.Duration
}
func NewSimpleChAgentCustomCmd(name string, appId AgentAppId, op int32, p common.OptionsProvider) *cobra.Command {
options := &SimpleChAgentCmdOptions{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
requestType: op,
@@ -53,6 +53,8 @@ func NewSimpleChAgentCustomCmd(name string, appId AgentAppId, op int32, p common
},
}
cmd.Flags().DurationVarP(&options.timeout, "timeout", "t", 5*time.Second, "How long to wait for operation to complete")
return cmd
}
@@ -76,7 +78,7 @@ func (o *SimpleChAgentCmdOptions) makeRequest(conn net.Conn) error {
}
msg := channel.NewMessage(o.requestType, nil)
reply, err := msg.WithTimeout(5 * time.Second).SendForReply(ch)
reply, err := msg.WithTimeout(o.timeout).SendForReply(ch)
if err != nil {
return err
}
@@ -20,8 +20,8 @@ import (
"bytes"
"encoding/binary"
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -14,7 +14,7 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"fmt"
@@ -23,21 +23,20 @@ import (
"github.com/openziti/channel/v2/protobufs"
"github.com/openziti/edge/pb/edge_mgmt_pb"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type AgentCtrlInitOptions struct {
agentcli.AgentOptions
AgentOptions
}
func NewAgentCtrlInit(p common.OptionsProvider) *cobra.Command {
options := &AgentCtrlInitOptions{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -14,7 +14,7 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"fmt"
@@ -23,23 +23,22 @@ import (
"github.com/openziti/fabric/controller"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type AgentCtrlRaftJoinOptions struct {
agentcli.AgentOptions
AgentOptions
Voter bool
MemberId string
}
func NewAgentCtrlRaftJoin(p common.OptionsProvider) *cobra.Command {
options := &AgentCtrlRaftJoinOptions{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -14,30 +14,29 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/openziti/agent"
"github.com/openziti/channel/v2"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/agent"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type AgentCtrlRaftListOptions struct {
agentcli.AgentOptions
AgentOptions
}
func NewAgentCtrlRaftList(p common.OptionsProvider) *cobra.Command {
options := &AgentCtrlRaftListOptions{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -18,14 +18,13 @@ package agentcli
import (
"fmt"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/internal/log"
"strconv"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
"github.com/shirou/gopsutil/v3/process"
"github.com/spf13/cobra"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/ziti/internal/log"
)
type AgentGetOptionsAction struct {
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"io"
"os"
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"io"
"os"
+261
View File
@@ -0,0 +1,261 @@
/*
Copyright 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
https://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.
*/
package agentcli
import (
"bytes"
"fmt"
"github.com/keybase/go-ps"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"os"
"os/user"
"path/filepath"
"regexp"
goversion "rsc.io/goversion/version"
"runtime"
"strconv"
"strings"
"sync"
)
type AgentPsAction struct {
AgentOptions
}
// NewPsCmd Pss a command object for the "Ps" command
func NewPsCmd(p common.OptionsProvider) *cobra.Command {
action := &AgentPsAction{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
cmd := &cobra.Command{
Use: "ps",
Short: "Show Ziti process info",
Long: "Show information about currently running Ziti processes",
Run: func(cmd *cobra.Command, args []string) {
action.Cmd = cmd
action.Args = args
err := action.Run()
cmdhelper.CheckErr(err)
},
}
return cmd
}
// Run implements this command
func (self *AgentPsAction) Run() error {
fmt.Println("ps is running")
ps := FindAll()
var maxPID, maxPPID, maxExec, maxVersion int
for i, p := range ps {
fmt.Println("p.Path is: " + p.Path)
ps[i].BuildVersion = shortenVersion(p.BuildVersion)
maxPID = max(maxPID, len(strconv.Itoa(p.PID)))
maxPPID = max(maxPPID, len(strconv.Itoa(p.PPID)))
maxExec = max(maxExec, len(p.Exec))
maxVersion = max(maxVersion, len(ps[i].BuildVersion))
}
for _, p := range ps {
buf := bytes.NewBuffer(nil)
pid := strconv.Itoa(p.PID)
fmt.Fprint(buf, pad(pid, maxPID))
fmt.Fprint(buf, " ")
ppid := strconv.Itoa(p.PPID)
fmt.Fprint(buf, pad(ppid, maxPPID))
fmt.Fprint(buf, " ")
fmt.Fprint(buf, pad(p.Exec, maxExec))
if p.Agent {
fmt.Fprint(buf, "*")
} else {
fmt.Fprint(buf, " ")
}
fmt.Fprint(buf, " ")
fmt.Fprint(buf, pad(p.BuildVersion, maxVersion))
fmt.Fprint(buf, " ")
fmt.Fprint(buf, p.Path)
fmt.Fprintln(buf)
buf.WriteTo(os.Stdout)
}
return nil
}
var develRe = regexp.MustCompile(`devel\s+\+\w+`)
func shortenVersion(v string) string {
if !strings.HasPrefix(v, "devel") {
return v
}
results := develRe.FindAllString(v, 1)
if len(results) == 0 {
return v
}
return results[0]
}
func pad(s string, total int) string {
if len(s) >= total {
return s
}
return s + strings.Repeat(" ", total-len(s))
}
func max(i, j int) int {
if i > j {
return i
}
return j
}
// P represents a Go process.
type P struct {
PID int
PPID int
Exec string
Path string
BuildVersion string
Agent bool
}
// FindAll returns all the Ziti processes currently running on this host.
func FindAll() []P {
pss, err := ps.Processes()
// fmt.Println("FindAll, err is: %s", err)
if err != nil {
return nil
}
var wg sync.WaitGroup
wg.Add(len(pss))
found := make(chan P)
for _, pr := range pss {
pr := pr
go func() {
defer wg.Done()
path, version, agent, ok, err := isGo(pr)
if err != nil {
// TODO(jbd): Return a list of errors.
}
if !ok {
return
}
if isZiti(pr) {
found <- P{
PID: pr.Pid(),
PPID: pr.PPid(),
Exec: pr.Executable(),
Path: path,
BuildVersion: version,
Agent: agent,
}
}
}()
}
go func() {
wg.Wait()
close(found)
}()
var results []P
for p := range found {
results = append(results, p)
}
return results
}
// isGo looks up the runtime.buildVersion symbol
// in the process' binary and determines if the process
// if a Go process or not. If the process is a Go process,
// it reports PID, binary name and full path of the binary.
func isGo(pr ps.Process) (path, version string, agent, ok bool, err error) {
if pr.Pid() == 0 {
// ignore system process
return
}
path, err = pr.Path()
if err != nil {
return
}
var versionInfo goversion.Version
versionInfo, err = goversion.ReadExe(path)
if err != nil {
return
}
ok = true
version = versionInfo.Release
pidfile, err := PIDFile(pr.Pid())
if err == nil {
_, err := os.Stat(pidfile)
agent = err == nil
}
return path, version, agent, ok, nil
}
const gopsConfigDirEnvKey = "GOPS_CONFIG_DIR"
func ConfigDir() (string, error) {
if configDir := os.Getenv(gopsConfigDirEnvKey); configDir != "" {
return configDir, nil
}
if runtime.GOOS == "windows" {
return filepath.Join(os.Getenv("APPDATA"), "gops"), nil
}
homeDir := guessUnixHomeDir()
if homeDir == "" {
return "", errors.New("unable to get current user home directory: os/user lookup failed; $HOME is empty")
}
return filepath.Join(homeDir, ".config", "gops"), nil
}
func guessUnixHomeDir() string {
usr, err := user.Current()
if err == nil {
return usr.HomeDir
}
return os.Getenv("HOME")
}
func PIDFile(pid int) (string, error) {
gopsdir, err := ConfigDir()
if err != nil {
return "", err
}
return fmt.Sprintf("%s/%d", gopsdir, pid), nil
}
func isZiti(pr ps.Process) (ok bool) {
return strings.HasPrefix(pr.Executable(), "ziti")
}
@@ -14,29 +14,28 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"encoding/binary"
"google.golang.org/protobuf/proto"
"github.com/openziti/agent"
"github.com/openziti/fabric/pb/ctrl_pb"
"github.com/openziti/fabric/router"
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"google.golang.org/protobuf/proto"
"os"
)
type AgentRouteAction struct {
agentcli.AgentOptions
AgentOptions
CtrlListener string
}
func NewRouteCmd(p common.OptionsProvider) *cobra.Command {
options := &AgentRouteAction{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -14,30 +14,29 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"fmt"
"github.com/openziti/agent"
"github.com/openziti/channel/v2"
"github.com/openziti/fabric/pb/mgmt_pb"
"github.com/openziti/fabric/router"
"github.com/openziti/agent"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"net"
"time"
)
type ForgetLinkAgentAction struct {
agentcli.AgentOptions
AgentOptions
}
func NewForgetLinkAgentCmd(p common.OptionsProvider) *cobra.Command {
options := &ForgetLinkAgentAction{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -20,8 +20,8 @@ import (
"bytes"
"encoding/binary"
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -19,8 +19,8 @@ package agentcli
import (
"encoding/binary"
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
"strconv"
@@ -14,24 +14,23 @@
limitations under the License.
*/
package cmd
package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
type SimpleAgentAction struct {
agentcli.AgentOptions
AgentOptions
}
func NewSimpleAgentCustomCmd(name string, appId AgentAppId, op byte, p common.OptionsProvider) *cobra.Command {
action := &SimpleAgentAction{
AgentOptions: agentcli.AgentOptions{
AgentOptions: AgentOptions{
CommonOptions: p(),
},
}
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
"time"
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -18,8 +18,8 @@ package agentcli
import (
"github.com/openziti/agent"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/spf13/cobra"
"os"
)
@@ -19,7 +19,7 @@ package api
import (
"github.com/fatih/color"
"github.com/openziti/storage/boltz"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/openziti/ziti/ziti/util"
"net/url"
"strings"
)
@@ -21,7 +21,7 @@ import (
"github.com/Jeffail/gabs"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/openziti/foundation/v2/errorz"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/openziti/ziti/ziti/util"
"github.com/pkg/errors"
"io"
"net/url"
@@ -19,7 +19,7 @@ package api
import (
"fmt"
"github.com/Jeffail/gabs"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
"github.com/openziti/ziti/ziti/cmd/common"
"github.com/spf13/cobra"
"io"
)
@@ -23,7 +23,7 @@ import (
"github.com/openziti/channel/v2"
"github.com/openziti/channel/v2/websockets"
"github.com/openziti/identity"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/openziti/ziti/ziti/util"
"io"
"net/http"
"strings"
+5 -5
View File
@@ -17,11 +17,10 @@
package cmd
import (
"github.com/openziti/ziti/ziti/cmd/ziti/internal/log"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/internal/log"
"io"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/spf13/cobra"
)
@@ -40,8 +39,9 @@ func NewCmdArt(out io.Writer, errOut io.Writer) *cobra.Command {
}
cmd := &cobra.Command{
Use: "art",
Short: "Print the Ziti logo as ascii art :)",
Use: "art",
Short: "Print the Ziti logo as ascii art :)",
Hidden: true,
Run: func(cmd *cobra.Command, args []string) {
options.Cmd = cmd
options.Args = args
+45 -38
View File
@@ -19,25 +19,27 @@ package cmd
import (
goflag "flag"
"fmt"
"github.com/openziti/ziti/ziti/cmd/agentcli"
"github.com/openziti/ziti/ziti/cmd/common"
"github.com/openziti/ziti/ziti/cmd/database"
"github.com/openziti/ziti/ziti/cmd/demo"
"github.com/openziti/ziti/ziti/cmd/edge"
"github.com/openziti/ziti/ziti/cmd/fabric"
"github.com/openziti/ziti/ziti/cmd/install"
"github.com/openziti/ziti/ziti/cmd/templates"
"github.com/openziti/ziti/ziti/cmd/tutorial"
c "github.com/openziti/ziti/ziti/constants"
"github.com/openziti/ziti/ziti/controller"
"github.com/openziti/ziti/ziti/internal/log"
"github.com/openziti/ziti/ziti/router"
"github.com/openziti/ziti/ziti/tunnel"
"github.com/openziti/ziti/ziti/util"
"io"
"os"
"path/filepath"
"strings"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/database"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/demo"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/fabric"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/tutorial"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/edge"
c "github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/openziti/ziti/ziti/cmd/ziti/internal/log"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/openziti/ziti/common/version"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/templates"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@@ -121,25 +123,39 @@ func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Com
p := common.NewOptionsProvider(out, err)
initCommands := NewCmdInit(out, err)
createCommands := NewCmdCreate(out, err)
updateCommands := NewCmdUpdate(out, err)
executeCommands := NewCmdExecute(out, err)
agentCommands := NewAgentCmd(p)
psCommands := NewCmdPs(p)
controllerCmd := controller.NewControllerCmd()
tunnelCmd := tunnel.NewTunnelCmd(false)
routerCmd := router.NewRouterCmd()
agentCommands := agentcli.NewAgentCmd(p)
pkiCommands := NewCmdPKI(out, err)
fabricCommand := fabric.NewFabricCmd(p)
edgeCommand := edge.NewCmdEdge(out, err)
tutorialCmd := tutorial.NewTutorialCmd(p)
demoCmd := demo.NewDemoCmd(p)
logFilter := NewCmdLogFormat(out, err)
unwrapIdentityFileCommand := NewUnwrapIdentityFileCommand(out, err)
dbCommand := database.NewCmdDb(out, err)
opsCommands := &cobra.Command{
Use: "ops ",
Short: "Various utilities useful when operating a Ziti network",
}
opsCommands.AddCommand(database.NewCmdDb(out, err))
opsCommands.AddCommand(NewCmdLogFormat(out, err))
opsCommands.AddCommand(NewUnwrapIdentityFileCommand(out, err))
learnCommands := &cobra.Command{
Use: "learn ",
Short: "Tutorials and demos to help you learn about Ziti",
}
learnCommands.AddCommand(demoCmd)
learnCommands.AddCommand(tutorialCmd)
installCommands := []*cobra.Command{
NewCmdInstall(out, err),
NewCmdUnInstall(out, err),
NewCmdUpgrade(out, err),
install.NewCmdInstall(out, err),
install.NewCmdUpgrade(out, err),
install.NewCmdUse(out, err),
install.NewCmdVersion(out, err),
}
groups := templates.CommandGroups{
@@ -150,19 +166,17 @@ func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Com
{
Message: "Working with Ziti resources:",
Commands: []*cobra.Command{
initCommands,
createCommands,
updateCommands,
},
},
{
Message: "Executing Ziti components:",
Commands: []*cobra.Command{
executeCommands,
agentCommands,
psCommands,
controllerCmd,
routerCmd,
tunnelCmd,
pkiCommands,
unwrapIdentityFileCommand,
},
},
{
@@ -175,29 +189,22 @@ func NewCmdRoot(in io.Reader, out, err io.Writer, cmd *cobra.Command) *cobra.Com
{
Message: "Utilities",
Commands: []*cobra.Command{
logFilter,
dbCommand,
opsCommands,
},
},
{
Message: "Learning Ziti",
Commands: []*cobra.Command{
demoCmd,
tutorialCmd,
learnCommands,
},
},
}
groups.Add(cmd)
cmd.AddCommand(NewCmdVersion(out, err))
cmd.Version = version.GetVersion()
cmd.SetVersionTemplate("{{printf .Version}}\n")
cmd.AddCommand(NewCmdArt(out, err))
cmd.AddCommand(NewCmdPlaybook(out, err))
cmd.AddCommand(NewCmdPing(out, err))
cmd.AddCommand(NewCmdAdhoc(out, err))
cmd.AddCommand(NewCmdUse(out, err))
return cmd
}
@@ -17,8 +17,8 @@
package color
import (
"github.com/openziti/ziti/ziti/cmd/ziti/util"
"github.com/fatih/color"
"github.com/openziti/ziti/ziti/util"
"sort"
)
@@ -54,6 +54,15 @@ type CommonOptions struct {
Identity string
}
func (options *CommonOptions) AddCommonFlags(cmd *cobra.Command) {
cmd.Flags().BoolVarP(&options.BatchMode, "batch-mode", "b", false, "In batch mode the command never prompts for user input")
cmd.Flags().BoolVarP(&options.Verbose, "verbose", "", false, "Enable verbose logging")
cmd.Flags().BoolVarP(&options.Staging, "staging", "", false, "Install/Upgrade components from the ziti-staging repo")
cmd.Flags().StringVarP(&options.ConfigIdentity, "configIdentity", "i", "", "Which configIdentity to use")
cmd.Flags().IntVarP(&options.Timeout, "timeout", "t", 5, "Timeout for REST operations (specified in seconds)")
options.Cmd = cmd
}
func (options *CommonOptions) TimeoutContext() (context.Context, context.CancelFunc) {
timeout := time.Duration(options.Timeout) * time.Second
@@ -18,13 +18,12 @@ package cmd
import (
"fmt"
"github.com/openziti/ziti/ziti/internal/log"
"github.com/openziti/ziti/ziti/util"
"io/ioutil"
"os"
"os/exec"
"strings"
"github.com/openziti/ziti/ziti/cmd/ziti/internal/log"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
)
var cliAgentEnabled bool
@@ -18,8 +18,8 @@ package cmd
import (
"fmt"
c "github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/openziti/ziti/ziti/cmd/ziti/util"
c "github.com/openziti/ziti/ziti/constants"
"github.com/openziti/ziti/ziti/util"
"github.com/spf13/viper"
"gopkg.in/AlecAivazis/survey.v1"
"os"
@@ -17,7 +17,7 @@
package cmd
import (
c "github.com/openziti/ziti/ziti/cmd/ziti/constants"
c "github.com/openziti/ziti/ziti/constants"
"github.com/pborman/uuid"
"github.com/stretchr/testify/assert"
"os"
@@ -20,8 +20,8 @@ link:
- binding: transport
{{ if .Router.IsPrivate }}#{{ end }} listeners:
{{ if .Router.IsPrivate }}#{{ end }} - binding: transport
{{ if .Router.IsPrivate }}#{{ end }} bind: tls:0.0.0.0:{{ .Router.Listener.BindPort }}
{{ if .Router.IsPrivate }}#{{ end }} advertise: tls:{{ .Router.Edge.AdvertisedHost }}:{{ .Router.Listener.BindPort }}
{{ if .Router.IsPrivate }}#{{ end }} bind: tls:0.0.0.0:{{ .Router.Edge.ListenerBindPort }}
{{ if .Router.IsPrivate }}#{{ end }} advertise: tls:{{ .Router.Edge.AdvertisedHost }}:{{ .Router.Edge.ListenerBindPort }}
{{ if .Router.IsPrivate }}#{{ end }} options:
{{ if .Router.IsPrivate }}#{{ end }} outQueueSize: {{ .Router.Listener.OutQueueSize }}
@@ -17,11 +17,10 @@
package cmd
import (
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/templates"
"github.com/spf13/cobra"
"io"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/templates"
)
var (
@@ -43,7 +42,6 @@ func NewCmdCreate(out io.Writer, errOut io.Writer) *cobra.Command {
}
cmd.AddCommand(NewCmdCreateConfig())
cmd.AddCommand(NewCmdCreateEnvironment(out, errOut))
cmd.AddCommand(NewCmdPKICreateCA(out, errOut))
cmd.AddCommand(NewCmdPKICreateIntermediate(out, errOut))
@@ -17,6 +17,9 @@
package cmd
import (
"github.com/openziti/ziti/ziti/cmd/common"
cmdHelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/constants"
"os"
"time"
@@ -26,9 +29,6 @@ import (
fabForwarder "github.com/openziti/fabric/router/forwarder"
foundation "github.com/openziti/transport/v2"
fabXweb "github.com/openziti/xweb/v2"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/common"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -132,11 +132,12 @@ type RouterTemplateValues struct {
}
type EdgeRouterTemplateValues struct {
Hostname string
Port string
IPOverride string
AdvertisedHost string
LanInterface string
Hostname string
Port string
IPOverride string
AdvertisedHost string
LanInterface string
ListenerBindPort string
}
type WSSRouterTemplateValues struct {
@@ -162,7 +163,6 @@ type RouterForwarderTemplateValues struct {
type RouterListenerTemplateValues struct {
ConnectTimeout time.Duration
GetSessionTimeout time.Duration
BindPort int
OutQueueSize int
}
@@ -179,7 +179,7 @@ func init() {
}
}
workingDir = cmdhelper.NormalizePath(zh)
workingDir = cmdHelper.NormalizePath(zh)
}
// NewCmdCreateConfig creates a command object for the "config" command
@@ -189,7 +189,7 @@ func NewCmdCreateConfig() *cobra.Command {
Short: "Creates a config file for specified Ziti component using environment variables",
Aliases: []string{"cfg"},
Run: func(cmd *cobra.Command, args []string) {
cmdhelper.CheckErr(cmd.Help())
cmdHelper.CheckErr(cmd.Help())
},
}
@@ -213,49 +213,52 @@ func (data *ConfigTemplateValues) populateEnvVars() {
handleVariableError(err, "hostname")
// Get and add ziti home to the params
zitiHome, err := cmdhelper.GetZitiHome()
zitiHome, err := cmdHelper.GetZitiHome()
handleVariableError(err, constants.ZitiHomeVarName)
// Get Ziti Controller Name
zitiCtrlHostname, err := cmdhelper.GetZitiCtrlName()
zitiCtrlHostname, err := cmdHelper.GetZitiCtrlName()
handleVariableError(err, constants.ZitiCtrlNameVarName)
// Get Ziti Edge Router Port
zitiEdgeRouterPort, err := cmdhelper.GetZitiEdgeRouterPort()
zitiEdgeRouterPort, err := cmdHelper.GetZitiEdgeRouterPort()
handleVariableError(err, constants.ZitiEdgeRouterPortVarName)
// Get Ziti Controller Listener Address
zitiCtrlListenerAddress, err := cmdhelper.GetZitiCtrlListenerAddress()
zitiCtrlListenerAddress, err := cmdHelper.GetZitiCtrlListenerAddress()
handleVariableError(err, constants.ZitiCtrlListenerAddressVarName)
// Get Ziti Controller Advertised Address
zitiCtrlAdvertisedAddress, err := cmdhelper.GetZitiCtrlAdvertisedAddress()
zitiCtrlAdvertisedAddress, err := cmdHelper.GetZitiCtrlAdvertisedAddress()
handleVariableError(err, constants.ZitiCtrlAdvertisedAddressVarName)
// Get Ziti Controller Port
zitiCtrlPort, err := cmdhelper.GetZitiCtrlPort()
zitiCtrlPort, err := cmdHelper.GetZitiCtrlPort()
handleVariableError(err, constants.ZitiCtrlPortVarName)
// Get Ziti Edge Controller Listener Host and Port
zitiEdgeCtrlListenerHostPort, err := cmdhelper.GetZitiEdgeCtrlListenerHostPort()
zitiEdgeCtrlListenerHostPort, err := cmdHelper.GetZitiEdgeCtrlListenerHostPort()
handleVariableError(err, constants.ZitiEdgeCtrlListenerHostPortVarName)
// Get Ziti Edge Controller Advertised Host and Port
zitiEdgeCtrlAdvertisedHostPort, err := cmdhelper.GetZitiEdgeCtrlAdvertisedHostPort()
zitiEdgeCtrlAdvertisedHostPort, err := cmdHelper.GetZitiEdgeCtrlAdvertisedHostPort()
handleVariableError(err, constants.ZitiEdgeCtrlAdvertisedHostPortVarName)
// Get Ziti Edge Controller Advertised Port
zitiEdgeCtrlAdvertisedPort, err := cmdhelper.GetZitiEdgeCtrlAdvertisedPort()
zitiEdgeCtrlAdvertisedPort, err := cmdHelper.GetZitiEdgeCtrlAdvertisedPort()
handleVariableError(err, constants.ZitiEdgeCtrlAdvertisedPortVarName)
// Get Ziti edge Identity enrollment duration
zitiEdgeIdentityEnrollmentDuration, err := cmdhelper.GetZitiEdgeIdentityEnrollmentDuration()
zitiEdgeIdentityEnrollmentDuration, err := cmdHelper.GetZitiEdgeIdentityEnrollmentDuration()
handleVariableError(err, constants.ZitiEdgeIdentityEnrollmentDurationVarName)
// Get Ziti edge Router enrollment duration
zitiEdgeRouterEnrollmentDuration, err := cmdhelper.GetZitiEdgeRouterEnrollmentDuration()
zitiEdgeRouterEnrollmentDuration, err := cmdHelper.GetZitiEdgeRouterEnrollmentDuration()
handleVariableError(err, constants.ZitiEdgeRouterEnrollmentDurationVarName)
zitiEdgeRouterListenerBindPort, err := cmdHelper.GetZitiEdgeRouterListenerBindPort()
handleVariableError(err, constants.ZitiEdgeRouterListenerBindPortVarName)
data.ZitiHome = zitiHome
data.Hostname = hostname
data.Controller.Name = zitiCtrlHostname
@@ -265,6 +268,7 @@ func (data *ConfigTemplateValues) populateEnvVars() {
data.Controller.Edge.ListenerHostPort = zitiEdgeCtrlListenerHostPort
data.Controller.Edge.AdvertisedHostPort = zitiEdgeCtrlAdvertisedHostPort
data.Router.Edge.Port = zitiEdgeRouterPort
data.Router.Edge.ListenerBindPort = zitiEdgeRouterListenerBindPort
data.Controller.Edge.AdvertisedPort = zitiEdgeCtrlAdvertisedPort
data.Controller.EdgeIdentityDuration = zitiEdgeIdentityEnrollmentDuration
data.Controller.EdgeRouterDuration = zitiEdgeRouterEnrollmentDuration
@@ -273,7 +277,6 @@ func (data *ConfigTemplateValues) populateEnvVars() {
}
func (data *ConfigTemplateValues) populateDefaults() {
data.Router.Listener.BindPort = constants.DefaultListenerBindPort
data.Router.Listener.GetSessionTimeout = constants.DefaultGetSessionTimeout
data.Controller.MinQueuedConnects = channel.MinQueuedConnects
@@ -19,9 +19,9 @@ package cmd
import (
_ "embed"
edge "github.com/openziti/edge/controller/config"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/templates"
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
helpers2 "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/templates"
"github.com/openziti/ziti/ziti/constants"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -126,7 +126,7 @@ func NewCmdCreateConfigController() *cobra.Command {
controllerOptions.Cmd = cmd
controllerOptions.Args = args
err := controllerOptions.run(data)
cmdhelper.CheckErr(err)
helpers2.CheckErr(err)
},
PostRun: func(cmd *cobra.Command, args []string) {
// Reset log output after run completes
@@ -204,28 +204,28 @@ func SetControllerIdentityCert(c *ControllerTemplateValues) {
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".cert" // default
}
c.IdentityCert = cmdhelper.NormalizePath(val)
c.IdentityCert = helpers2.NormalizePath(val)
}
func SetControllerIdentityServerCert(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiCtrlIdentityServerCertVarName)
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".server.chain.cert" // default
}
c.IdentityServerCert = cmdhelper.NormalizePath(val)
c.IdentityServerCert = helpers2.NormalizePath(val)
}
func SetControllerIdentityKey(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiCtrlIdentityKeyVarName)
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".key" // default
}
c.IdentityKey = cmdhelper.NormalizePath(val)
c.IdentityKey = helpers2.NormalizePath(val)
}
func SetControllerIdentityCA(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiCtrlIdentityCAVarName)
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".ca" // default
}
c.IdentityCA = cmdhelper.NormalizePath(val)
c.IdentityCA = helpers2.NormalizePath(val)
}
func SetEdgeConfig(data *ControllerTemplateValues) {
@@ -237,14 +237,14 @@ func SetEdgeSigningCert(c *ControllerTemplateValues) {
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".signing.cert" // default
}
c.Edge.ZitiSigningCert = cmdhelper.NormalizePath(val)
c.Edge.ZitiSigningCert = helpers2.NormalizePath(val)
}
func SetEdgeSigningKey(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiSigningKeyVarName)
if val == "" {
val = workingDir + "/" + hostnameOrNetworkName() + ".signing.key" // default
}
c.Edge.ZitiSigningKey = cmdhelper.NormalizePath(val)
c.Edge.ZitiSigningKey = helpers2.NormalizePath(val)
}
func SetWebConfig(data *ControllerTemplateValues) {
@@ -258,26 +258,26 @@ func SetWebIdentityCert(c *ControllerTemplateValues) {
if val == "" {
val = c.IdentityCert //default
}
c.Edge.IdentityCert = cmdhelper.NormalizePath(val)
c.Edge.IdentityCert = helpers2.NormalizePath(val)
}
func SetWebIdentityServerCert(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiEdgeCtrlIdentityServerCertVarName)
if val == "" {
val = c.IdentityServerCert //default
}
c.Edge.IdentityServerCert = cmdhelper.NormalizePath(val)
c.Edge.IdentityServerCert = helpers2.NormalizePath(val)
}
func SetWebIdentityKey(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiEdgeCtrlIdentityKeyVarName)
if val == "" {
val = c.IdentityKey //default
}
c.Edge.IdentityKey = cmdhelper.NormalizePath(val)
c.Edge.IdentityKey = helpers2.NormalizePath(val)
}
func SetWebIdentityCA(c *ControllerTemplateValues) {
val := os.Getenv(constants.ZitiEdgeCtrlIdentityCAVarName)
if val == "" {
val = c.IdentityCA //default
}
c.Edge.IdentityCA = cmdhelper.NormalizePath(val)
c.Edge.IdentityCA = helpers2.NormalizePath(val)
}
@@ -19,15 +19,15 @@ package cmd
import (
_ "embed"
"fmt"
cmdhelper "github.com/openziti/ziti/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/templates"
"github.com/openziti/ziti/ziti/constants"
"os"
"path/filepath"
"runtime"
"strings"
"text/template"
cmdhelper "github.com/openziti/ziti/ziti/cmd/ziti/cmd/helpers"
"github.com/openziti/ziti/ziti/cmd/ziti/cmd/templates"
"github.com/openziti/ziti/ziti/cmd/ziti/constants"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -98,6 +98,7 @@ func NewCmdCreateConfigEnvironment() *cobra.Command {
{constants.ZitiCtrlPortVarName, constants.ZitiCtrlPortVarDescription, data.Controller.Port},
{constants.ZitiEdgeRouterRawNameVarName, constants.ZitiEdgeRouterRawNameVarDescription, data.Router.Edge.Hostname},
{constants.ZitiEdgeRouterPortVarName, constants.ZitiEdgeRouterPortVarDescription, data.Router.Edge.Port},
{constants.ZitiEdgeRouterListenerBindPortVarName, constants.ZitiEdgeRouterListenerBindPortVarDescription, data.Router.Edge.ListenerBindPort},
{constants.ZitiEdgeCtrlIdentityCertVarName, constants.ZitiEdgeCtrlIdentityCertVarDescription, data.Controller.Edge.IdentityCert},
{constants.ZitiEdgeCtrlIdentityServerCertVarName, constants.ZitiEdgeCtrlIdentityServerCertVarDescription, data.Controller.Edge.IdentityServerCert},
{constants.ZitiEdgeCtrlIdentityKeyVarName, constants.ZitiEdgeCtrlIdentityKeyVarDescription, data.Controller.Edge.IdentityKey},
@@ -185,6 +186,7 @@ func NewCmdCreateConfigEnvironment() *cobra.Command {
"%-40s %-50s %s\n"+
"%-40s %-50s %s\n"+
"%-40s %-50s %s\n"+
"%-40s %-50s %s\n"+
"%-40s %-50s %s",
constants.ZitiHomeVarName, constants.ZitiHomeVarDescription, data.ZitiHome,
constants.ZitiCtrlPortVarName, constants.ZitiCtrlPortVarDescription, data.Controller.Port,
@@ -196,6 +198,7 @@ func NewCmdCreateConfigEnvironment() *cobra.Command {
constants.ZitiEdgeCtrlAdvertisedPortVarName, constants.ZitiEdgeCtrlAdvertisedPortVarDescription, data.Controller.Edge.AdvertisedPort,
constants.ZitiEdgeRouterRawNameVarName, constants.ZitiEdgeRouterRawNameVarDescription, data.Router.Edge.Hostname,
constants.ZitiEdgeRouterPortVarName, constants.ZitiEdgeRouterPortVarDescription, data.Router.Edge.Port,
constants.ZitiEdgeRouterListenerBindPortVarName, constants.ZitiEdgeRouterListenerBindPortVarDescription, data.Router.Edge.ListenerBindPort,
constants.ZitiRouterIdentityCertVarName, constants.ZitiRouterIdentityCertVarDescription, data.Router.IdentityCert,
constants.ZitiRouterIdentityServerCertVarName, constants.ZitiRouterIdentityServerCertVarDescription, data.Router.IdentityServerCert,
constants.ZitiRouterIdentityKeyVarName, constants.ZitiRouterIdentityKeyVarDescription, data.Router.IdentityKey,

Some files were not shown because too many files have changed in this diff Show More