From 1d1b410654b79ee68526072aa3ea3a576182e93a Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Sun, 4 Feb 2024 17:03:46 +0100 Subject: [PATCH] HACKING/DEPLOYING.md: Markdown syntax fixes --- DEPLOYING.md | 10 +++++++--- HACKING.md | 34 +++++++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/DEPLOYING.md b/DEPLOYING.md index aa2646acb..9725a02ca 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -5,7 +5,9 @@ `deploy-`) to deploy it into cloud-init-enabled environemnts. These scripts all take the form: - $ ./tools/deploy- +``` + ./tools/deploy- +``` `` depends on the target (see below). `` is either a cloud-init [cloud-config file][cloud-config], or a directory containing @@ -24,7 +26,7 @@ changes to the virtual machine are lost after stopping qemu. Two ports are forwarded to the host via qemu's [user networking][qemu-network]: 22 → 2222 and 443 → 4430. -See [HACKING.md][./HACKING.md] for how to use this target for running +See [HACKING.md](./HACKING.md) for how to use this target for running integration tests locally. [qemu-network]: https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29 @@ -36,7 +38,9 @@ integration tests locally. to deploy a machine in an OpenStack cluster. It expects that an [OpenStack RC file][openstackrc] was sourced into the running shell: - . openstackrc.sh +``` +. openstackrc.sh +``` `` has to be a JSON-file containing configuration about what kind of machine to create. For example: diff --git a/HACKING.md b/HACKING.md index d5f52fbd6..c81ff88fa 100644 --- a/HACKING.md +++ b/HACKING.md @@ -5,7 +5,9 @@ *osbuild-composer* cannot be run from the source tree, but has to be installed onto a system. We recommend doing this by building rpms, with: - make rpm +``` +make rpm +``` This will build rpms from the latest git HEAD (remember to commit changes), for the current operating system, with a version that contains the commit hash. The @@ -14,12 +16,16 @@ packages end up in `./rpmbuild/RPMS/$arch`. RPMS are easiest to deal with when they're in a dnf repository. To turn this directory into a dnf repository and serve it on localhost:8000, run: - createrepo_c ./rpmbuild/RPMS/x86_64 - python3 -m http.server --directory ./rpmbuild/RPMS/x86_64 8000 +``` +createrepo_c ./rpmbuild/RPMS/x86_64 +python3 -m http.server --directory ./rpmbuild/RPMS/x86_64 8000 +``` To start a ephemeral virtual machine using this repository, run: - tools/deploy-qemu IMAGE tools/deploy/test +``` +tools/deploy-qemu IMAGE tools/deploy/test +``` `IMAGE` has to be a path to an cloud-init-enabled image matching the host operating system, because that's what the packages were built for above. @@ -36,7 +42,9 @@ service. The virtual machine uses qemu's [user networking][1], forwarding port 22 to the host's 2222 and 443 to 4430. You can log into the running machine with - ssh admin@localhost -p 2222 +``` +ssh admin@localhost -p 2222 +``` The password is `foobar`. Stopping the machine loses all data. @@ -67,17 +75,25 @@ the [Virtual Machine](#virtual-machine) setup described above. To build the containers run: - docker-compose build +``` +docker-compose build +``` To start the containers run: - docker-compose up +``` +docker-compose up +``` You can send requests to the *osbuild-composer* container by entering the devel container and running: - curl -k --cert /etc/osbuild-composer/client-crt.pem --key /etc/osbuild-composer/client-key.pem https://172.30.0.10:8080/api/composer-koji/v1/status +``` +curl -k --cert /etc/osbuild-composer/client-crt.pem --key /etc/osbuild-composer/client-key.pem https://172.30.0.10:8080/api/composer-koji/v1/status +``` To rebuild the containers after a change, add the `--build` flag to the `docker-compose` command: - docker-compose up --build +``` +docker-compose up --build +``` \ No newline at end of file