No description
Find a file
Christian Kellner 6087e2d90e run-builder: inspect network to get gateway IP
Instead of inferring the gateway ip via the the network device for
the podman bridge, where the name can change, use podman network
inspect.

```js
The json looks like this:
[
  {
    "cniVersion": "0.4.0",
    "name": "org.osbuild.koji",
    "plugins": [
      {
        "bridge": "cni-podman1",
        "hairpinMode": true,
        "ipMasq": true,
        "ipam": {
          "ranges": [
            [
              {
                "gateway": "10.89.0.1",
                "subnet": "10.89.0.0/24"
              }
            ]
          ],
          "routes": [
            {
              "dst": "0.0.0.0/0"
            }
          ],
          "type": "host-local"
        },
        "isGateway": true,
        "type": "bridge"
      },
      {
        "capabilities": {
          "portMappings": true
        },
        "type": "portmap"
      },
      {
        "backend": "",
        "type": "firewall"
      },
      {
        "domainName": "dns.podman",
        "type": "dnsname"
      }
    ]
  }
]
```

So the podman format for this is very obviously:

  {{ (index (index (index .plugins 0).ipam.ranges 0) 0).gateway }}
2020-09-09 14:35:58 +02:00
container container: support for koji web 2020-09-07 20:38:12 +02:00
plugins plugin/osbuild: adapt for composer API changes 2020-09-09 14:12:25 +02:00
.editorconfig .editorconfig: added 2020-09-05 16:34:41 +02:00
.gitignore initial import 2020-09-02 19:15:25 +02:00
compose.py Make image_type and distro required arguments 2020-09-08 16:13:48 +02:00
koji-osbuild.spec.in spec: package koji client plugin 2020-09-08 17:51:35 +02:00
LICENSE LICENSE: add ASL 2.0 2020-09-06 16:02:54 +02:00
make-tags.sh make-tags: remove i686 from build tag 2020-09-05 19:27:55 +02:00
meson.build Support for generating rpms via meson 2020-09-08 16:58:06 +02:00
meson_options.txt Support for generating rpms via meson 2020-09-08 16:58:06 +02:00
osbuild-local.conf kerberos: add osbuild-local.conf 2020-09-05 16:32:50 +02:00
README.md README.md: add development links 2020-09-05 19:38:30 +02:00
run-builder.sh run-builder: inspect network to get gateway IP 2020-09-09 14:35:58 +02:00
run-koji-container.sh container: support for koji web 2020-09-07 20:38:12 +02:00

Building the containers

# container for the hub
sudo podman build -t koji.hub -f container/hub/Dockerfile .

# container for the builder
sudo podman build -t koji.builder -f container/builder/Dockerfile .

Running

Run the database server, the kerberos kdc, and koji hub:

sudo ./run-koji-container.sh start

Run the koji builder:

sudo ./run-builder.sh

Create the tag infrastructure:

./make-tags.sh

Verify installation

Try connecting to koji hub locally via the koji command line client:

koji --server=http://localhost:80/kojihub --user=osbuild --password=osbuildpass --authtype=password hello
grüezi, osbuild!

You are using the hub at http://localhost:80/kojihub
Authenticated via password

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

Creating a compose

The compose.py client can be used to create a compose via the koji plugins:

./compose.py --plain fedora 32 f32-candidate x86_64 --repo 'http://download.fedoraproject.org/pub/fedora/linux/releases/32/Everything/$arch/os/'

Development