Blame DEPLOYING.md

Packit Service 509fd4
# Deploying osbuild-composer
Packit Service 509fd4
Packit Service 509fd4
*osbuild-composer* has currently has to be deployed in a virtual machine. The
Packit Service 509fd4
[tools](./tools) subdirectory contains various scripts (those starting with
Packit Service 509fd4
`deploy-`) to deploy it into cloud-init-enabled environemnts. These scripts all
Packit Service 509fd4
take the form:
Packit Service 509fd4
Packit Service 509fd4
    $ ./tools/deploy-<target> <config> <userdata>
Packit Service 509fd4
Packit Service 509fd4
`<config>` depends on the target (see below). `<userdata>` is either a
Packit Service 509fd4
cloud-init [cloud-config file][cloud-config], or a directory containing
Packit Service 509fd4
this configuration, as documented by [./tools/gen-user-data][gen-user-data].
Packit Service 509fd4
Packit Service 509fd4
[gen-user-data]: ./tools/gen-user-data
Packit Service 509fd4
[cloud-config]: https://cloudinit.readthedocs.io/en/latest/topics/format.html#cloud-config-data
Packit Service 509fd4
Packit Service 509fd4
Packit Service 509fd4
## Target: QEMU
Packit Service 509fd4
Packit Service 509fd4
`tools/deploy-qemu` takes as `<config>` the path to a qcow2 image and starts a
Packit Service 509fd4
ephemeral virtual machine using qemu. The qcow2 file is not changed and all
Packit Service 509fd4
changes to the virtual machine are lost after stopping qemu.
Packit Service 509fd4
Packit Service 509fd4
Two ports are forwarded to the host via qemu's [user networking][qemu-network]:
Packit Service 509fd4
22 → 2222 and 443 → 4430.
Packit Service 509fd4
Packit Service 509fd4
See [HACKING.md][./HACKING.md] for how to use this target for running
Packit Service 509fd4
integration tests locally.
Packit Service 509fd4
Packit Service 509fd4
[qemu-network]: https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29
Packit Service 509fd4
Packit Service 509fd4
Packit Service 509fd4
## Target: OpenStack
Packit Service 509fd4
Packit Service 509fd4
`tools/deploy-openstack` uses the `openstack` tool (from `python3-openstack`)
Packit Service 509fd4
to deploy a machine in an OpenStack cluster. It expects that an [OpenStack RC
Packit Service 509fd4
file][openstackrc] was sourced into the running shell:
Packit Service 509fd4
Packit Service 509fd4
    . openstackrc.sh
Packit Service 509fd4
Packit Service 509fd4
`<config>` has to be a JSON-file containing configuration about what kind of
Packit Service 509fd4
machine to create. For example:
Packit Service 509fd4
Packit Service 509fd4
```json
Packit Service 509fd4
{
Packit Service 509fd4
  "name": "composer-instance",
Packit Service 509fd4
  "image": "fedora-32-x86_64",
Packit Service 509fd4
  "flavor": "m1.small",
Packit Service 509fd4
  "network": "my-network-id"
Packit Service 509fd4
}
Packit Service 509fd4
```
Packit Service 509fd4
Packit Service 509fd4
[openstackrc]: https://docs.openstack.org/newton/admin-guide/common/cli-set-environment-variables-using-openstack-rc.html