Go to file
2023-09-04 11:18:48 +10:00
inv Initial load 2023-08-28 14:44:38 +10:00
koji-setup missed gencert rename in deploy hub 2023-09-04 11:18:48 +10:00
install-koji-farm.sh missing koji-bootstrap-build.sh 2023-09-04 11:01:52 +10:00
koji.yaml Initial load 2023-08-28 14:44:38 +10:00
LICENSE Initial commit 2023-08-28 06:37:57 +02:00
README.md README tidyup 2023-09-02 17:37:59 +10:00

smeserver-koji

Koji Setup Scripts

The purpose of these scripts it to enable setting up a koji environment quickly with reasonable configurations.

These scripts have been borrowed from Clear Linux and modified to suit the smeserver (Koozali.org) setup. Thanks to George T Kramer for doing a lot of the prework for these over at ClearLinux.

Assumptions

  • All scripts are run as the root user
  • The root user has a password set
  • These are run on a bare Rocky 8 minimal install
  • Basic configurations (e.g. network, time, etc.) have been applied
  • servers are reachable by their FQDNs (DNS or you've added them into the appropriate /etc/hosts files)
  • Koji builder can exist on the hub or multiple build servers

Getting Going

The install script will install all required components on the hub and build servers.

You will need to fill in some information on the way through.

  • info for your ssl certs (Country, State, City, Org, Org Unit)
  • enter the FQDN for each build server
  • accept the ECDSA key fingerprint for each build server
  • enter the root password for each build server

If you add debug on the install-koji-farm.sh line it will print each command executed and be very noisy (still noisy without)

On your koji hub server:

curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/install-koji-farm.sh > install-koji-farm.sh
chmod o+x install-koji-farm.sh
./install-koji-farm.sh

Using the scripts yourself

The install script now does all of this, but, if you want to do individual components, or understand the process better...

  1. On the koji hub, copy these scripts into your ~/bin directory and make sure they are executeable

    mkdir -p ~/bin curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/gencert.sh > ~/bin/gencert.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/globals.sh > ~/bin/globals.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/parameters.sh > ~/bin/parameters.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/deploy-koji.sh > ~/bin/deploy-koji.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/bootstrap-build.sh > ~/bin/bootstrap-build.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/deploy-koji-nfs-server.sh > ~/bin/deploy-koji-nfs-server.sh chmod a+x ~/bin/*.sh

  2. Edit ~/bin/parameters.sh as needed. If running in a production environment, be sure to supply reasonable SSL certificate field values.

  3. start the deploy

    deploy-koji.sh

If koji builder machine is not the same as koji master machine:

  1. On the koji master, run

    deploy-koji-nfs-server.sh

  2. On the koji builder, copy over keys and parameters from the Hub

    mkdir -p /etc/pki/koji scp root@:/etc/pki/koji/.pem /etc/pki/koji/. scp root@:/etc/pki/koji/koji_ca_cert.crt /etc/pki/koji/. mkdir -p ~/bin scp root@:/root/bin/globals.sh ~/bin/. scp root@:/root/bin/parameters.sh ~/bin/. You will need to edir ~/bin/parameters.sh and change the KOJI_HUB_FQN to the correct value (NOT $(hostname -f))

  3. On the koji builder, copy down the scripts needed and run

    curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/deploy-koji-nfs-client.sh > ~/bin/deploy-koji-nfs-client.sh curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/deploy-koji-builder.sh > ~/bin/deploy-koji-builder.sh chmod a+x ~/bin/*.sh deploy-koji-nfs-client.sh deploy-koji-builder.sh

  4. Return to the hub and run (this isn't right yet....)

    bootstrap-build.sh