HACKING.md: troubleshooting and cleanup sections

Some more help if stuff goes wrong and some cleanup instructions.
This commit is contained in:
Christian Kellner 2020-09-25 18:51:11 +02:00 committed by Tom Gundersen
parent add4f77e68
commit b2a62d4dcf

View file

@ -5,7 +5,7 @@
To support local development an container `test/Dockerfile` contains
the environment to test all three plugins. It can be built and run
via `./run-test.sh`. This will execute the unit tests as well as
run pylint and ShellCheck on the source code.
run `pylint` and ShellCheck on the source code.
## Local integration testing
@ -37,7 +37,7 @@ the koji builder to authorize itself to koji hub.
sudo ./run-koji-container.sh start
```
Koji web will now be running at: http://localhost/koji/
Koji web will now be running at: http://localhost:8080/koji/
Copy the credentials: The TLS certificates for the koji builder plugin
@ -59,6 +59,16 @@ the container stopped via `ctrl+c`.
sudo ./run-builder.sh fg
```
Verify we can talk to koji hub via the koji command line client:
```
$ koji --server=http://localhost:8080/kojihub --user=osbuild --password=osbuildpass --authtype=password hello
grüezi, osbuild!
You are using the hub at http://localhost:8080/kojihub
Authenticated via password
```
### Setup the tags
In order to build an image, a series of tags needs to be created.
@ -92,7 +102,7 @@ ln -s plugins/cli/osbuild.py \
Now that all is setup a build can be created via:
```
koji --server=http://localhost/kojihub \
koji --server=http://localhost:8080/kojihub \
--user=kojiadmin \
--password=kojipass \
--authtype=password \
@ -107,6 +117,38 @@ koji --server=http://localhost/kojihub \
--release 1
```
### Troubleshooting
Check logs:
```
sudo podman logs org.osbuild.koji.koji # koji hub
sudo podman logs org.osbuild.koji.kdc # kerberos kdc
```
Execute into the container:
```
sudo podman exec -it org.osbuild.koji.koji /bin/bash
sudo podman exec -it org.osbuild.koji.kdc /bin/bash
sudo podman exec -it org.osbuild.koji.kojid /bin/bash
```
### Cleanup
Stopping the container:
```
sudo ./run-koji-container.sh stop
```
Cleanup of kerberos tickets:
```
sudo kdestroy -A
sudo -u _osbuild-composer kdestroy -A
```
## Useful links
- [koji source](https://pagure.io/koji/tree/master)