kickstart-builder/README.md

74 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2017-05-28 16:38:17 -07:00
kickstart-builder
=================
2017-05-28 15:41:02 -07:00
2017-05-28 16:38:17 -07:00
Automated ISO builder for kickstart-based installation CDs
2017-05-28 15:41:02 -07:00
2019-04-07 15:04:15 -07:00
2017-05-28 16:38:17 -07:00
Setup:
-----
2017-05-28 15:41:02 -07:00
2017-05-28 16:38:17 -07:00
* Clone the repo
* Install requirements:
* `pip3 install -r requirements.txt`
* `apt-get install -y bsdtar genisoimage`
2019-04-07 15:04:15 -07:00
* `python3 setup.py install`
* (you could use the Dockerfile instead)
2017-05-28 16:38:17 -07:00
* Prepare at least one ISO (see below)
* Start it
2019-04-07 15:04:15 -07:00
* `PORT=8087 DATADIR=./isos isoserverd`
2017-05-28 16:38:17 -07:00
* In your browser, visit http://127.0.0.1:8087/
2017-05-28 15:41:02 -07:00
2019-04-07 15:04:15 -07:00
2017-05-28 16:38:17 -07:00
Adding ISOs
-----------
For each ISO you want to make available, create a subdirectory under iso_raws with a name matching you want to see in
the UI. Unpack the contents of an ISO into this directory. Some files and directories will need to be chmodded so they
can be written to. Refer to the example commands below:
```
2019-04-07 15:04:15 -07:00
cd isos
2017-05-28 15:41:02 -07:00
mkdir ubuntu-16.04.1-server-amd64
2017-05-28 16:38:17 -07:00
cd ubuntu-16.04.1-server-amd64
bsdtar xfp ~/Downloads/ubuntu-16.04.1-server-amd64.iso
2017-05-28 15:41:02 -07:00
chmod 644 isolinux/txt.cfg isolinux/isolinux.bin
chmod 755 preseed/ .
2017-05-28 16:38:17 -07:00
```
Alternatively, the script `add-iso.sh` can be used to add an ISO:
```
./add-iso.sh ~/Downloads/ubuntu-16.04.1-server-amd64.iso
```
2019-04-07 15:04:15 -07:00
2017-05-28 16:38:17 -07:00
Development Tips
----------------
In normal operation, the application loads templates and configs once on startup. If the `REFRESH` environmental
variable is set, it will reload the templates and configs on every page load:
```
2019-04-07 15:04:15 -07:00
python3 setup.py develop
REFRESH=1 PORT=8080 DATADIR=./isos isoserverd
2017-05-28 16:38:17 -07:00
```
Additional config templates can be added under the "samples" directory.
Installing the `system-config-kickstart` provides a tool for generating Kickstart configs:
```
apt-get install system-config-kickstart
system-config-kickstart
```
2019-04-07 14:46:47 -07:00
Docker
------
Run the image like:
* `docker run -it --rm -e PORT=8080 -v /host/iso_raws:/data kickstart`