smeserver-koji/README.md

82 lines
3.7 KiB
Markdown
Raw Normal View History

2023-09-01 08:45:16 +02:00
# ![smeserver-koji](https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png)
2023-08-28 06:37:57 +02:00
2023-09-01 07:47:09 +02:00
## Koji Setup Scripts
2023-08-28 06:44:38 +02:00
The purpose of these scripts it to enable setting up a koji environment quickly
with reasonable configurations.
2023-08-29 03:00:22 +02:00
These scripts have been borrowed from Clear Linux and modified to suit the smeserver (Koozali.org) setup.
2023-08-29 08:08:48 +02:00
Thanks to George T Kramer for doing a lot of the prework for these over at ClearLinux.
2023-08-28 06:48:40 +02:00
2023-09-01 07:47:09 +02:00
### Assumptions
2023-08-28 06:44:38 +02:00
* All scripts are run as the root user
* The root user has a password set
2023-08-28 07:44:59 +02:00
* These are run on a bare Rocky 8 minimal install
2023-08-28 06:44:38 +02:00
* Basic configurations (e.g. network, time, etc.) have been applied
2023-09-01 07:47:09 +02:00
* servers are reachable by their FQDNs (DNS or you've added them into the appropriate /etc/hosts files)
2023-08-28 06:44:38 +02:00
* Only one koji builder is required
2023-09-01 07:47:09 +02:00
### Getting Going
The install script will install all required components on the hub and build servers.
2023-09-01 08:41:59 +02:00
You will need to fill in some information on the way through.
2023-09-01 07:52:30 +02:00
If you add debug on the install-koji-farm.sh line it will print each command executed (still noisy without)
2023-09-01 07:47:09 +02:00
2023-09-01 08:41:59 +02:00
On your koji hub server:
2023-09-01 07:47:09 +02:00
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
### 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...
2023-08-28 06:44:38 +02:00
2023-08-31 07:46:31 +02:00
1. On the koji hub, copy these scripts into your ~/bin directory and make sure they are executeable
2023-08-28 06:44:38 +02:00
2023-08-29 03:00:22 +02:00
mkdir -p ~/bin
2023-08-29 08:08:48 +02:00
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
2023-08-31 02:08:49 +02:00
curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/bootstrap-build.sh > ~/bin/bootstrap-build.sh
2023-08-29 08:08:48 +02:00
curl https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup/deploy-koji-nfs-server.sh > ~/bin/deploy-koji-nfs-server.sh
2023-08-29 03:00:22 +02:00
chmod a+x ~/bin/*.sh
2023-08-28 06:44:38 +02:00
2023-08-29 08:08:48 +02:00
1. Edit parameters.sh as needed. If running in a production environment, be sure to supply reasonable SSL certificate field values.
2023-08-28 06:44:38 +02:00
1. Run the required following scripts
deploy-koji.sh
2023-09-01 07:47:09 +02:00
2023-08-28 06:44:38 +02:00
If koji builder machine is not the same as koji master machine:
2023-08-31 07:46:31 +02:00
1. On the koji master, run
2023-08-28 06:44:38 +02:00
deploy-koji-nfs-server.sh
2023-09-01 07:47:09 +02:00
1. On the koji builder, copy over keys and parameters from the Hub
2023-08-28 06:44:38 +02:00
2023-08-31 07:46:31 +02:00
mkdir -p /etc/pki/koji
scp root@<FQDN of koji hub>:/etc/pki/koji/<FQDN of builder>.pem /etc/pki/koji/.
scp root@<FQDN of koji hub>:/etc/pki/koji/koji_ca_cert.crt /etc/pki/koji/.
mkdir -p ~/bin
scp root@<FQDN of koji hub>:/root/bin/globals.sh ~/bin/.
scp root@<FQDN of koji hub>:/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))
2023-08-28 06:44:38 +02:00
2023-08-31 07:46:31 +02:00
1. On the koji builder, copy down the scripts needed and run
2023-08-28 06:44:38 +02:00
2023-08-29 08:08:48 +02:00
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
2023-08-28 06:44:38 +02:00
deploy-koji-nfs-client.sh
deploy-koji-builder.sh
2023-09-01 06:41:59 +02:00
1. Return to the hub and run (this isn't right yet....)
2023-09-01 07:47:09 +02:00
bootstrap-build.sh