2022-05-18 13:08:31 -04:00
|
|
|
# debug daemon (debugd)
|
|
|
|
|
2022-05-23 06:13:23 -04:00
|
|
|
## Build cdbg
|
2022-05-18 13:08:31 -04:00
|
|
|
|
2022-06-10 09:05:09 -04:00
|
|
|
```shell
|
2022-05-18 13:08:31 -04:00
|
|
|
mkdir -p build
|
2022-05-23 06:13:23 -04:00
|
|
|
cmake ..
|
|
|
|
make cdbg
|
2022-05-18 13:08:31 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## debugd & cdbg usage
|
|
|
|
|
|
|
|
With `cdbg` and `yq` installed in your path:
|
|
|
|
|
|
|
|
0. Write the configuration file for cdbg `cdbg-conf.yaml`:
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
```yaml
|
|
|
|
cdbg:
|
|
|
|
authorizedKeys:
|
|
|
|
- username: my-username
|
|
|
|
publicKey: ssh-rsa AAAAB…LJuM=
|
2022-06-29 09:26:29 -04:00
|
|
|
bootstrapperPath: "./bootstrapper"
|
2022-05-18 13:08:31 -04:00
|
|
|
systemdUnits:
|
|
|
|
- name: some-custom.service
|
|
|
|
contents: |-
|
|
|
|
[Unit]
|
|
|
|
Description=…
|
|
|
|
```
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
1. Run `constellation config generate` to create a new default configuration
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
2. Locate the latest debugd images for [GCP](#debugd-gcp-image) and [Azure](#debugd-azure-image)
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
3. Modify the `constellation-conf.yaml` to use an image with the debugd already included and add required firewall rules:
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
```shell-session
|
2022-08-05 06:28:57 -04:00
|
|
|
# Set full reference of cloud provider image name
|
|
|
|
export IMAGE_URI=
|
|
|
|
```
|
2022-05-18 13:08:31 -04:00
|
|
|
|
2022-08-05 06:28:57 -04:00
|
|
|
```shell-session
|
2022-05-18 13:08:31 -04:00
|
|
|
yq -i \
|
2022-08-05 06:28:57 -04:00
|
|
|
"(.provider | select(. | has(\"azure\")).azure.image) = \"${IMAGE_URI}\"" \
|
|
|
|
constellation-conf.yaml
|
2022-05-18 13:08:31 -04:00
|
|
|
yq -i \
|
2022-08-05 06:28:57 -04:00
|
|
|
"(.provider | select(. | has(\"gcp\")).gcp.image) = \"${IMAGE_URI}\"" \
|
2022-05-18 13:08:31 -04:00
|
|
|
constellation-conf.yaml
|
|
|
|
|
|
|
|
yq -i \
|
|
|
|
".ingressFirewall += {
|
|
|
|
\"name\": \"debugd\",
|
|
|
|
\"description\": \"debugd default port\",
|
|
|
|
\"protocol\": \"tcp\",
|
|
|
|
\"iprange\": \"0.0.0.0/0\",
|
|
|
|
\"fromport\": 4000,
|
|
|
|
\"toport\": 0
|
|
|
|
}" \
|
|
|
|
constellation-conf.yaml
|
|
|
|
```
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-18 13:08:31 -04:00
|
|
|
4. Run `constellation create […]`
|
2022-06-10 09:05:09 -04:00
|
|
|
|
2022-05-23 06:13:23 -04:00
|
|
|
5. Run `./cdbg deploy`
|
2022-05-18 13:08:31 -04:00
|
|
|
|
2022-06-10 09:05:09 -04:00
|
|
|
6. Run `constellation init […]` as usual
|
2022-05-18 13:08:31 -04:00
|
|
|
|
2022-08-15 05:09:10 -04:00
|
|
|
### debugd images
|
2022-05-18 13:08:31 -04:00
|
|
|
|
2022-08-15 05:09:10 -04:00
|
|
|
For a full list of image naming conventions and how to retreive them check [image version documentation](/.github/docs/README.md#image-versions)
|