Skip to content

Commit c234391

Browse files
authored
docs: merge Threeport user docs into Qleet docs (#35)
* docs: merge Threeport user docs into Qleet docs Signed-off-by: Rich Lander <[email protected]> * docs: add getting started guide Signed-off-by: Rich Lander <[email protected]> * docs: fix typos Signed-off-by: Rich Lander <[email protected]> --------- Signed-off-by: Rich Lander <[email protected]>
1 parent a13762a commit c234391

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2419
-48
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
site/
2-
.cache/
2+
.cache/
3+
threeport-merge/bin

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "threeport-user-docs"]
2+
path = threeport-user-docs
3+
url = [email protected]:threeport/user-docs.git

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help:
1111

1212
#deps: @ Install dependencies
1313
deps:
14-
@pip install mkdocs mkdocs-material mkdocs-material-extensions mike
14+
@pip install mkdocs mkdocs-material mkdocs-material-extensions mike
1515

1616
#run: @ Run mkdocs
1717
run:
@@ -33,3 +33,12 @@ release:
3333
#version: @ Print current version(tag)
3434
version:
3535
@echo $(shell git describe --tags --abbrev=0)
36+
37+
#build-threeport-merge: @ Build theeport-merge binary
38+
build-threeport-merge:
39+
go build -o threeport-merge/bin/threeport-merge ./threeport-merge
40+
41+
#threeport-merge: @ Build and run threeport-merge to update qleet user docs with threeport user docs
42+
threeport-merge: build-threeport-merge
43+
./threeport-merge/bin/threeport-merge -config-file threeport-merge/merge-config.yaml
44+

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,64 @@ stop - Stop mkdocs
3838
release - Create and push a new tag
3939
version - Print current version(tag)
4040
```
41+
42+
## Merge Threeport Docs
43+
44+
In order to have the open source Threeport user docs nested in the Qleet docs we
45+
do the following:
46+
47+
* Keep the upstream Threeport docs as a git submodule of Qleet docs
48+
* Use a merge tool to add the Threeport docs into the Qleet docs. The source
49+
code for this tool is in the `threeport-merge` directory.
50+
51+
The `threeport-merge` tool does the following:
52+
53+
* Copies all Threeport markdown docs into the `docs/threeport` directory.
54+
* Copies all images from Threeport docs into the `docs/img/threeport` directory.
55+
* Updates all instances of `tptctl` in markdown docs with `qleetctl`.
56+
* Updates all paths to images in markdown docs to point to its new home in Qleet
57+
docs.
58+
* Updates the `.nav` in Qleet's `mkdocs.yml` config to include the Threeport
59+
docs `.nav` with updated paths to markdown docs.
60+
* Removes any files found in the threeport-merge config file under `.exclude`.
61+
62+
### threeport-merge Config
63+
64+
Sample config:
65+
66+
```yaml
67+
exclude:
68+
- docs/threeport/guides/getting-started.md
69+
- docs/threeport/guides/install-tptctl.md
70+
- docs/threeport/guides/install-threeport-local.md
71+
- docs/threeport/guides/install-threeport-aws.md
72+
- docs/threeport/guides/deploy-workload-local.md
73+
```
74+
75+
If there are any documents in the Threeport user docs that aren't appropriate in
76+
Qleet user docs and should be excluded, add the path to the `.exclude` list and
77+
they will be omitted. The path provided must be the path to the Threeport
78+
document in the Qleet docs where it is found post-merge, i.e. the path to the
79+
document in the `docs/threeport` directory after `threeport-merge` is run.
80+
81+
### Run Merge
82+
83+
If there are changes in Threeport docs that need to be pulled into the Threeport
84+
user-docs submodule, first pull those changes.
85+
86+
```bash
87+
git submodule update --remote
88+
```
89+
90+
Then run `threeport-merge` with a make target.
91+
92+
```bash
93+
make threeport-merge
94+
```
95+
96+
This make target will:
97+
98+
* Build threeport-merge from source.
99+
* Run threeport-merge and reference the `threeport-merge/merge-config.yaml`
100+
config.
101+

docs/faq.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Frequently Asked Questions
2+
3+
## Should I use separate Threeport control planes for dev, staging and prod?
4+
5+
In most cases, we don't recommend this. It makes promoting changes through the
6+
tiers to production more troublesome. Managing each tier through a single
7+
control plane provides a smoother experience.
8+
9+
If your organization has different departments or lines of business that you'd
10+
like to segregate and that don't overlap in the workloads they manage, separate
11+
Threeport control planes makes more sense in that case.
12+
13+
## Can I add Extensions to my Qleet-managed Threeport control plane?
14+
15+
For security reasons, we cannot allow our users to run Threeport extensions that
16+
they build on Qleet. However, we can build extensions for you and install them
17+
on your existing control plane/s. Shoot us an email at <[email protected]> if
18+
you want to explore that option.
19+
20+
Your other option is to use Qleet Enterprise. This product involves running the
21+
entire Qleet service on your AWS account with full support from Qleet. In that
22+
case, you are free to internally develop Threeport extensions and add them to
23+
your control plane. To find out more, email us at <[email protected]>.
24+
25+
More information about Threeport extensions can be found in our [SDK
26+
Introduction document](../threeport/sdk/sdk-intro).
27+

docs/getting-started.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Getting Started
2+
3+
Follow these steps to get up and running with Qleet:
4+
5+
1. First, [install qleetctl](/guides/install-qleetctl), the Qleet command line tool.
6+
1. Next, create a new account with Qleet. (Coming soon.)
7+
1. Register and configure your AWS account in Qleet using our [Add AWS Account
8+
guide](/guides/add-aws-account).
9+
1. Create a Kubernetes Runtime in your AWS account for your workloads by
10+
following the [Remote Kubernetes Runtime
11+
guide](/threeport/kubernetes-runtime/remote-kubernetes-runtime).
12+
1. Optional: Add another user on your team by following the [Add User
13+
guide](/guides/add-user).
14+

docs/guides/add-aws-account.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Add AWS Account
2+
3+
## Prerequisites
4+
5+
If you haven't already, [install qleetctl](/guides/install-qleetctl), the Qleet
6+
command line tool.
7+
8+
## Add Account
9+
10+
The following steps register and configure your AWS account in Qleet. Once
11+
registered, you can spin up Kubernetes Runtimes and Workloads in your AWS account
12+
using Qleet.
13+
14+
1. Set user environment variables by creating a file called `config-env-var`
15+
16+
```bash
17+
export region=<region> # your default AWS region
18+
export email=<email> # your user email
19+
export profile=<profile> # your AWS profile name
20+
export accountName=<account> # your Qleet account name
21+
22+
# provided by Qleet
23+
export controlPlaneName=dev
24+
```
25+
26+
27+
1. Register your account and configure AWS:
28+
29+
```bash
30+
qleetctl config aws-account \
31+
--aws-account-name default-account \
32+
--aws-region $region \
33+
--aws-profile $profile \
34+
--aws-account-id 983530947477 \
35+
--external-runtime-manager-role-name resource-manager-threeport-$controlPlaneName-$accountName
36+
```
37+

docs/guides/add-user.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Add User to Qleet Account
2+
3+
Follow these steps to add a new user to your Qleet account.
4+
5+
## Prerequisites
6+
7+
If you haven't already, [install qleetctl](/guides/install-qleetctl), the Qleet
8+
command line tool.
9+
10+
## Add User
11+
12+
1. Set user password by creating a file called `/tmp/qleet-password-env`:
13+
14+
```bash
15+
echo "export password=<password>" > /tmp/qleet-password-env
16+
```
17+
18+
1. Source password by running `source` on the above file
19+
20+
```bash
21+
source /tmp/qleet-password-env
22+
```
23+
24+
1. Set user environment variables by creating a file called `config-env-var`
25+
26+
```bash
27+
export region=<region> # your default AWS region
28+
export email=<email> # your user email
29+
30+
# provided by Qleet
31+
export controlPlaneName=dev
32+
export accountName=pos-tech
33+
```
34+
35+
1. Source config by running `source` on the above file
36+
37+
```bash
38+
source config-env-var
39+
```
40+
41+
1. Register Qleet user
42+
43+
```bash
44+
qleetctl register user --account $accountName --username $email --password $password
45+
```
46+
47+
1. Check your email (and potentially spam folder) for an email from `[email protected]` that looks like this
48+
49+
```bash
50+
Hi, please verify your account by using the following code: 894367, URL: http://localhost:31500/kratos/self-service/verification?code=894367&flow=b7182149-5f2a-40e2-b7e9-be59ce608171
51+
```
52+
53+
1. Add second user to account. Second user repeats steps to register above for onboarding.
54+
55+
```jsx
56+
qleetctl invite user --userid <userEmail>
57+
```
58+
59+
1. Update your environment variables with the `code` and `flow` values from the email
60+
61+
```bash
62+
export code=894367
63+
export flowId=b7182149-5f2a-40e2-b7e9-be59ce608171
64+
```
65+
66+
1. Verify Qleet account
67+
68+
```bash
69+
qleetctl verify user --account $accountName --code $code --flow $flowId
70+
```
71+
72+
1. Log in to Qleet account
73+
74+
```bash
75+
qleetctl login user --account $accountName --username $email --password $password
76+
```
77+
78+
1. Set current control plane instance
79+
80+
```bash
81+
qleetctl config current-control-plane --name=$controlPlaneName
82+
```
83+

docs/guides/install.md renamed to docs/guides/install-qleetctl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use the following instructions to install the `qleetctl` command line tool for
44
using Qleet.
55

66
1. Visit the [releases page](https://github.com/qleet/resources/releases) on
7-
github and download:
7+
GitHub and download:
88

99
1. `checksums.txt`
1010

35.9 KB
Loading
Loading
Loading

docs/img/threeport/GitOpsDelivery.png

39.2 KB
Loading
Loading
Loading
Loading
14.9 KB
Loading
43.9 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
57 KB
Loading

docs/img/threeport/ThreeportStack.png

208 KB
Loading
55.6 KB
Loading
9.9 KB
Loading
24.8 KB
Loading
8.99 KB
Loading

docs/img/threeport/favicon-16x16.png

574 Bytes
Loading

docs/img/threeport/favicon-32x32.png

1.14 KB
Loading

docs/img/threeport/favicon.ico

15 KB
Binary file not shown.

docs/img/threeport/threeport-logo.png

12.3 KB
Loading
56.3 KB
Loading

docs/index.md

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
# Qleet
22

3-
Qleet is a managed [Threeport](https://threeport.io/) offering.
4-
5-
This site provides user documentation specific to the Qleet platform. Since it
6-
provides fully managed Threeport control planes, the [Threeport
7-
Documentation](https://docs.threeport.io/) is still applicable and should be
8-
referenced for using it.
9-
10-
### Note
11-
12-
The open source Threeport project provides the `tptctl` command line tool for
13-
interacting with Threeport. Qleet uses an extension of `tptctl` called `qleetctl`
14-
which includes all the functionality of `tptctl` with added features specific to
15-
the Qleet platform.
16-
17-
Qleet users should always use `qleetctl` instead of `tptctl`. Any command examples
18-
in the Threeport docs that provide commands for `tptctl`, just substitute qleetctl
19-
and use the same subcommands.
20-
21-
For example...
22-
23-
```bash
24-
tptctl create workload -c my-workload.yaml`
25-
```
26-
27-
simply becomes...
28-
29-
```bash
30-
qleetctl create workload -c my-workload.yaml
31-
```
3+
Welcome to Qleet, the managed [Threeport](https://threeport.io/) service
4+
provided by the creators of the Threeport project.
5+
6+
Qleet provides all the functionality of open source Threeport, plus the
7+
following:
8+
9+
* Managed Threeport Control Planes: Qleet users do not have to install, upgrade
10+
or manage Threeport control planes. The Qleet service provides them for its
11+
users.
12+
* Role Based Access Control (RBAC): Open source Threeport does not implement access
13+
control - all users are super-users. Qleet users can apply RBAC rules to
14+
users on their account to provide appropriate access based on roles.
15+
* 3rd Party Identity Provider Integration (Coming Soon): Qleet currently offers
16+
secure authentication to Qleet services and will soon offer integrations with
17+
3rd party services to authenticate users.
18+
* Graphical User Interface (Coming Soon): Qleet currently offers command line
19+
access to the system with the `qleetctl` CLI tool. Soon, we will release a
20+
portal so Qleet users can view and manage their resources with a GUI as well.
21+
22+
This site provides user documentation specific to the Qleet platform. It
23+
includes documentation for using the managed Threeport control planes. If you
24+
are using open source Threeport, see the [Threeport
25+
Documentation](https://docs.threeport.io/).
3226

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Kubernetes Federation
2+
3+
This document describes the Threeport approach to managing a fleet of Kubernetes
4+
clusters.
5+
6+
There have been many attempts at federating Kubernetes using Kubernetes itself,
7+
i.e. Kubernetes Operators that install and keep an inventory of clusters as well
8+
as manage multi-cluster app deployments. Kubernetes was designed to be a
9+
datacenter-level abstraction and it performs this function very well. It was
10+
not designed to be a global software fleet abstraction and it has inherent
11+
scaling and availability constraints that prevent it from providing the ideal
12+
solution to this concern.
13+
14+
A global federation layer must be highly scalable and have geo-redundant
15+
availability. A control plane for all your software deployments must have the
16+
appropriate capacity and resilience for the task.
17+
18+
## Kubernetes Controllers
19+
20+
[Kubernetes controllers](https://kubernetes.io/docs/concepts/architecture/controller/)
21+
are not horizontally scalable. When deployed in a highly
22+
available configuration, only one controller is active at any given time and
23+
they use leader election to determine which of a set of identical controllers
24+
manage operations at any given time. In many use-cases, many thousands of
25+
clusters must be managed coherently, not to mention the software in those
26+
clusters. This is a tremendous amount of state reconcilation to be performed by
27+
controllers that do not share load across multiple instances.
28+
29+
## Kubernetes Datastore
30+
31+
Kubernetes uses [etcd](https://etcd.io/) which is an excellent distributed
32+
key-value store. It has served Kubernetes very well in its purpose. However,
33+
etcd works best in a single region. Tuning for the increased latency of
34+
cross-region etcd clusters is possible, but treacherous. Furthermore, it is not
35+
a relational database which means if you need transactional capabilities that
36+
allow a database to make changes to multiple objects with ACID guarantees, etcd
37+
is not the best choice.
38+
39+
![Federating Kubernetes with Kubernetes](../../../img/threeport/KubernetesFederationWithKubernetes.png)
40+
41+
## Threeport Controllers
42+
43+
Threeport controllers inherit a lot of design principles from Kubernetes. They
44+
are level-triggered state reconciliation workloads that operate on a non-terminating
45+
loop to ensure your desired state is realized in the system. One thing that
46+
Threeport controllers add is horizontal scalability. Any number of Threeport
47+
Controllers can operate simultaneously to manage the same set of object types.
48+
They use NATS Jetstream to broker notifications to help achieve this. In
49+
Threeport, the message broker helps ensure a notification of a particular change
50+
is delivered to just one of a set of identical Threeport controllers. Threeport
51+
controllers use the message broker to place distributed locks on specific objects while they are
52+
being reconciled so that race conditions between controllers don't develop in making
53+
changes to the system.
54+
55+
## Threeport Datastore
56+
57+
Threeport uses CockroachDB, a purpose-built geo-redundant relational database. The
58+
geo-redundancy is essential for a purpose that is this critical. And the
59+
transactional capabilities allow changes to multiple related objects to happen
60+
safely. When you are dealing with remote clusters and the workloads therein,
61+
changes that affect multiple objects are common. Being able to apply a change
62+
to all the affected objects _or_ none at all if a problem occurs, is an
63+
important guarantee to have for stability.
64+
65+
![Federating Kubernetes with Threeport](../../../img/threeport/KubernetesFederationWithThreeport.png)
66+

0 commit comments

Comments
 (0)