Skip to content

Commit bdc9478

Browse files
authored
update demo for 1.1.0 (#15)
Signed-off-by: Caleb Lloyd <[email protected]>
1 parent 87535e8 commit bdc9478

File tree

16 files changed

+84
-1687
lines changed

16 files changed

+84
-1687
lines changed

.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 5 additions & 338 deletions
Original file line numberDiff line numberDiff line change
@@ -1,341 +1,8 @@
11
# Synadia Control Plane
22

3-
Synadia Control Plane requires a registry credentials. If you are interested in demoing Synadia Control Plane, please contact `[email protected]`
3+
Synadia Control Plane is distributed as a Docker image and requires a registry credentials. If you are interested in demoing Synadia Control Plane, please contact `[email protected]`
44

5-
Deployment Methods:
6-
- [Kubernetes via Helm](#helm)
7-
- [Docker Compose](#docker-compose)
8-
9-
## Config Generation
10-
11-
The `generate-config.sh` script can do much of the heavy lifting to populate values for your Control Plane deployment.
12-
13-
This script is intended to be run in a provisioned NSC environment. It can assist in setting up NSC from scratch, but always first attempts to pull creds and signing keys from an existing configuration.
14-
15-
Most prompts will provide a default value in parenthesis. Empty input will select the default value.
16-
17-
The `Encryption Key URL` supports AWS KMS, Azure KeyVault, GCP Cloud KMS, Hashicorp Vault, and base64 formatted URLs.
18-
19-
## Helm
20-
21-
### Generate Control Plane Configuration
22-
23-
The `--helm` flag will prompt the script to generate two Helm values files
24-
25-
`syn-cp.json` will contain the Control Plane configuration file, formatted as Helm values
26-
27-
`syn-cp-secrets.json` will contain sensitive Helm values for populating Kubernetes secrets
28-
29-
```
30-
./generate-config.sh --helm
31-
___ _ _
32-
/ __|_ _ _ _ __ _ __| (_)__ _
33-
\__ \ || | ' \/ _` / _` | / _` |
34-
|___/\_, |_||_\__,_\__,_|_\__,_|
35-
___|__/ _ _ ___ _
36-
/ __|___ _ _| |_ _ _ ___| | | _ \ |__ _ _ _ ___
37-
| (__/ _ \ ' \ _| '_/ _ \ | | _/ / _` | ' \/ -_)
38-
\___\___/_||_\__|_| \___/_| |_| |_\__,_|_||_\___|
39-
40-
Control-Plane Public URL (http://localhost:8080): https://control-plane.example.com
41-
Synadia Registry Username: synadia
42-
Synadia Registry Password:
43-
44-
45-
Login Successful
46-
Use Kubernetes Ingress? (No): y
47-
Ingress Hostname (control-plane.example.com):
48-
Ingress Class (Optional): nginx
49-
Kubernetes Secret Name for TLS Certs (Optional): syn-cp-tls
50-
Enable HTTPS? (No):
51-
Encryption Key URL (Empty to generate local key):
52-
Would you like the Helm chart to manage NATS System Credentials? (Yes):
53-
Use external PostgreSQL? (No):
54-
Use external Prometheus? (No):
55-
Add NATS System
56-
NATS System Name (Empty to proceed): nats
57-
NATS System URLs (Comma delimited): nats://nats-00.example.com,nats://nats-01.example.com
58-
Configure with nsc? (Yes):
59-
Use existing operator? (Yes):
60-
+------------------------------------------------------------------------+
61-
| Operators |
62-
+-------------+----------------------------------------------------------+
63-
| Name | Public Key |
64-
+-------------+----------------------------------------------------------+
65-
| my-operator | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
66-
+-------------+----------------------------------------------------------+
67-
68-
Choose Operator (my-operator):
69-
Use existing system user? (Yes):
70-
+-----------------------------------------------------------------+
71-
| Users |
72-
+------+----------------------------------------------------------+
73-
| Name | Public Key |
74-
+------+----------------------------------------------------------+
75-
| sys | UBEWHIVNTXOYG4JBIJOFA4Y3FFV7ZVS57N4EEYN2LTPTXRRZ7EF3HVNF |
76-
+------+----------------------------------------------------------+
77-
78-
Choose System User (sys):
79-
Use existing operator signing key? (Yes):
80-
+----------------------------------------------------------------------------------------+
81-
| Operator Details |
82-
+-----------------------+----------------------------------------------------------------+
83-
| Name | my-operator |
84-
| Operator ID | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
85-
| Issuer ID | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
86-
| Issued | 2023-05-09 01:41:29 UTC |
87-
| Expires | |
88-
| Operator Service URLs | nats://localhost:4222 |
89-
| | nats://nats-00.example.com |
90-
| | nats://nats-01.example.com |
91-
| System Account | ADVSR6BN47WGWHU7L5FZ3XDJIG2PJ4B3W34HYFAMY64S5ZM7UAJRK3IA / SYS |
92-
| Require Signing Keys | false |
93-
+-----------------------+----------------------------------------------------------------+
94-
| Signing Keys | OB3Z22HD3GQM4WJZDDULKC4FIC37ULCXP2JQSWIBRJ2O6BH463WSOCFN |
95-
+-----------------------+----------------------------------------------------------------+
96-
97-
Choose Operator Signing Key (OB3Z22HD3GQM4WJZDDULKC4FIC37ULCXP2JQSWIBRJ2O6BH463WSOCFN):
98-
Using existing operator signing key
99-
Using existing user credentials
100-
Setup NATS mTLS? (No):
101-
Add NATS System
102-
NATS System Name (Empty to proceed):
103-
{
104-
"config": {
105-
"server": {
106-
"url": "https://control-plane.example.com"
107-
},
108-
"dataSources": {},
109-
"systems": {
110-
"nats": {
111-
"url": "nats://nats-00.example.com,nats://nats-01.example.com"
112-
}
113-
}
114-
},
115-
"ingress": {
116-
"enabled": true,
117-
"hosts": [
118-
"control-plane.example.com"
119-
],
120-
"className": "nginx",
121-
"tlsSecretName": "syn-cp-tls"
122-
}
123-
}
124-
Write config to file? (Yes):
125-
Config File Path (/syn-cp.json):
126-
Write Helm secrets to file? (Yes):
127-
Config File Path (/syn-cp-secrets.json):
128-
___ _ _ _
129-
|_ _|_ _ __| |_ __ _| | |
130-
| || ' \(_-< _/ _` | | |
131-
|___|_||_/__/\__\__,_|_|_|
132-
___ _ _ ___ _
133-
/ __|___ _ _| |_ _ _ ___| | | _ \ |__ _ _ _ ___
134-
| (__/ _ \ ' \ _| '_/ _ \ | | _/ / _` | ' \/ -_)
135-
\___\___/_||_\__|_| \___/_| |_| |_\__,_|_||_\___|
136-
137-
helm repo add synadia https://synadia-io.github.io/helm-charts
138-
helm repo update
139-
helm upgrade --install --create-namespace control-plane \
140-
-n syn-cp \
141-
-f syn-cp.json \
142-
-f syn-cp-secrets.json \
143-
synadia/control-plane
144-
```
145-
146-
### Chart Values
147-
148-
Details in the [values.yaml](https://github.com/synadia-io/helm-charts/blob/main/charts/control-plane/values.yaml)
149-
150-
### Deploy the Helm Chart
151-
152-
```bash
153-
helm repo add synadia https://synadia-io.github.io/helm-charts
154-
helm repo update
155-
helm upgrade --install --create-namespace control-plane \
156-
-n syn-cp \
157-
-f syn-cp.json \
158-
-f syn-cp-secrets.json \
159-
synadia/control-plane
160-
```
161-
162-
### Login Details
163-
164-
On first run, login credentials will be visible in the logs
165-
```
166-
kubectl logs -n syn-cp deployment/control-plane
167-
```
168-
169-
#### Run Helm upgrade
170-
171-
```
172-
helm upgrade --install --create-namespace control-plane \
173-
-n syn-cp \
174-
-f syn-cp.json \
175-
-f syn-cp-secrets.json \
176-
synadia/control-plane
177-
```
178-
179-
### Uninstall Chart and Purge Data
180-
```
181-
helm uninstall -n syn-cp control-plane
182-
```
183-
184-
## Docker Compose
185-
186-
### Generate Control Plane Configuration
187-
188-
This process will create and populate the `conf` directory with the Control Plane config and NATS system credentials and signing keys.
189-
190-
```
191-
./generate-config.sh
192-
193-
___ _ _
194-
/ __|_ _ _ _ __ _ __| (_)__ _
195-
\__ \ || | ' \/ _` / _` | / _` |
196-
|___/\_, |_||_\__,_\__,_|_\__,_|
197-
___|__/ _ _ ___ _
198-
/ __|___ _ _| |_ _ _ ___| | | _ \ |__ _ _ _ ___
199-
| (__/ _ \ ' \ _| '_/ _ \ | | _/ / _` | ' \/ -_)
200-
\___\___/_||_\__|_| \___/_| |_| |_\__,_|_||_\___|
201-
202-
Control-Plane Public URL (http://localhost:8080): https://control-plane.example.com
203-
Enable HTTPS? (No): yes
204-
Certificate File Path: tls/cert.pem
205-
Key File Path: tls/key.pem
206-
Encryption Key URL (Empty to generate local key):
207-
Use external PostgreSQL? (No): yes
208-
PostgreSQL DSN: postgresql://username:[email protected]:5432/mydatabase?sslmode=require
209-
Use external Prometheus? (No): yes
210-
Prometheus URL: https://prometheus.example.com
211-
Bearer Token (Optional):
212-
Username (Optional): user
213-
Password (Optional):
214-
Setup Prometheus mTLS? (No):
215-
Add NATS System
216-
NATS System Name (Empty to proceed): nats
217-
NATS System URLs (Comma delimited): nats://nats-00.example.com,nats://nats-01.example.com
218-
Configure with nsc? (Yes):
219-
Use existing operator? (Yes):
220-
+------------------------------------------------------------------------+
221-
| Operators |
222-
+-------------+----------------------------------------------------------+
223-
| Name | Public Key |
224-
+-------------+----------------------------------------------------------+
225-
| my-operator | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
226-
+-------------+----------------------------------------------------------+
227-
228-
Choose Operator (my-operator):
229-
Use existing system user? (Yes):
230-
+-----------------------------------------------------------------+
231-
| Users |
232-
+------+----------------------------------------------------------+
233-
| Name | Public Key |
234-
+------+----------------------------------------------------------+
235-
| sys | UBEWHIVNTXOYG4JBIJOFA4Y3FFV7ZVS57N4EEYN2LTPTXRRZ7EF3HVNF |
236-
+------+----------------------------------------------------------+
237-
238-
Choose System User (sys):
239-
Use existing operator signing key? (Yes):
240-
+----------------------------------------------------------------------------------------+
241-
| Operator Details |
242-
+-----------------------+----------------------------------------------------------------+
243-
| Name | my-operator |
244-
| Operator ID | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
245-
| Issuer ID | OBCU3CMNCDDEQOI2E7WCILQPERFQLZ4HBPWIAGASJWQCLIJ7XCEJVCTM |
246-
| Issued | 2023-05-09 01:41:29 UTC |
247-
| Expires | |
248-
| Operator Service URLs | nats://localhost:4222 |
249-
| | nats://nats-00.example.com |
250-
| | nats://nats-01.example.com |
251-
| System Account | ADVSR6BN47WGWHU7L5FZ3XDJIG2PJ4B3W34HYFAMY64S5ZM7UAJRK3IA / SYS |
252-
| Require Signing Keys | false |
253-
+-----------------------+----------------------------------------------------------------+
254-
| Signing Keys | OB3Z22HD3GQM4WJZDDULKC4FIC37ULCXP2JQSWIBRJ2O6BH463WSOCFN |
255-
+-----------------------+----------------------------------------------------------------+
256-
257-
Choose Operator Signing Key (OB3Z22HD3GQM4WJZDDULKC4FIC37ULCXP2JQSWIBRJ2O6BH463WSOCFN):
258-
Using existing operator signing key
259-
Using existing user credentials
260-
Setup NATS mTLS? (No):
261-
Add NATS System
262-
NATS System Name (Empty to proceed):
263-
{
264-
"server": {
265-
"url": "https://control-plane.example.com",
266-
"tls": {
267-
"cert_file": "/etc/syn-cp/certs/server/server.crt",
268-
"key_file": "/etc/syn-cp/certs/server/server.key"
269-
}
270-
},
271-
"data_sources": {
272-
"postgres": {
273-
"dsn": "postgresql://username:[email protected]:5432/mydatabase?sslmode=require
274-
},
275-
"prometheus": {
276-
"url": "https://prometheus.example.com",
277-
"basic_auth": {
278-
"username": "user",
279-
"password": "password"
280-
}
281-
}
282-
},
283-
"systems": {
284-
"nats": {
285-
"url": "nats://nats-00.example.com,nats://nats-01.example.com",
286-
"system_user_creds_file": "/etc/syn-cp/systems/nats/sys-user-creds/sys-user.creds",
287-
"operator_signing_key_file": "/etc/syn-cp/systems/nats/operator-sk/operator-sk.nk"
288-
}
289-
}
290-
}
291-
Write config to file? (Yes):
292-
Config File Path (/conf/syn-cp/syn-cp.json):
293-
```
294-
295-
#### Bring up the stack
296-
297-
```bash
298-
docker compose up -d
299-
```
300-
301-
#### Connect to the Control Plane UI
302-
303-
The web UI will default to port `8080`
304-
305-
If you wish to change this, you can update the host port in the `docker-compose.yaml`
306-
307-
Navigate to `http://localhost:8080` or `http://<your_docker_host>:8080`
308-
309-
The first time that Control Plane runs, the admin username/password will be visible in the logs:
310-
311-
```bash
312-
docker compose logs control-plane
313-
```
314-
315-
#### Upgrade to a new image version
316-
317-
```bash
318-
docker compose pull
319-
docker compose up -d
320-
```
321-
322-
## Cleanup
323-
324-
#### To stop the environment
325-
```bash
326-
docker compose down
327-
```
328-
329-
#### To stop and delete the associated containers and persistent volume
330-
```bash
331-
docker compose down -v
332-
```
333-
334-
#### To purge all configuration and data
335-
336-
This will necessitate a re-run of the `generate-config.sh` script if you wish to start a fresh environment
337-
338-
```
339-
docker compose down -v
340-
rm -rf conf
341-
```
5+
- [Documentation Website](https://docs.synadia.com/control-plane)
6+
- [SBOM for Latest Release](https://github.com/synadia-io/synadia-server/releases/latest)
7+
- [SBOM for All Releases](https://github.com/synadia-io/synadia-server/releases)
8+
- [Demo Instructions](demo)

0 commit comments

Comments
 (0)