{"id":26088726,"url":"https://github.com/cybozu-go/placemat","last_synced_at":"2025-10-25T14:09:58.931Z","repository":{"id":30088454,"uuid":"123366851","full_name":"cybozu-go/placemat","owner":"cybozu-go","description":"Virtual data center construction tool","archived":false,"fork":false,"pushed_at":"2025-03-26T04:19:23.000Z","size":6705,"stargazers_count":84,"open_issues_count":2,"forks_count":7,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-30T11:06:21.278Z","etag":null,"topics":["automation","golang","qemu"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybozu-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-01T01:49:18.000Z","updated_at":"2025-03-26T04:17:44.000Z","dependencies_parsed_at":"2024-03-14T03:26:37.659Z","dependency_job_id":"eadda270-20e0-4d4a-a852-374a0f542dbc","html_url":"https://github.com/cybozu-go/placemat","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybozu-go%2Fplacemat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybozu-go%2Fplacemat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybozu-go%2Fplacemat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybozu-go%2Fplacemat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybozu-go","download_url":"https://codeload.github.com/cybozu-go/placemat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478318,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","golang","qemu"],"created_at":"2025-03-09T08:12:58.183Z","updated_at":"2025-10-25T14:09:53.868Z","avatar_url":"https://github.com/cybozu-go.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub release](https://img.shields.io/github/release/cybozu-go/placemat.svg?maxAge=60)][releases]\n[![CI](https://github.com/cybozu-go/placemat/actions/workflows/ci.yaml/badge.svg)](https://github.com/cybozu-go/placemat/actions/workflows/ci.yaml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/cybozu-go/placemat/v2.svg)](https://pkg.go.dev/github.com/cybozu-go/placemat/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/cybozu-go/placemat)](https://goreportcard.com/report/github.com/cybozu-go/placemat)\n\nPlacemat\n========\n\nPlacemat is a tool to simulate data center networks and servers using\nQEMU/KVM virtual machines, and Linux networking stacks.  Placemat can simulate\nvirtually *any* kind of network topologies to help tests and experiments for software\nusually used in data centers.\n\nFeatures\n--------\n\n* No daemons\n\n    Placemat is a single binary executable.  It just builds networks and\n    virtual machines when it starts, and destroys them when it terminates.\n    This simplicity makes placemat great for a continuous testing tool.\n\n* Declarative YAML\n\n    Networks, virtual machines, and other kind of resources are defined\n    in YAML files in a declarative fashion.  Users need not mind the order\n    of creation and/or destruction of resources.\n\n* Virtual BMC\n\n    Power on/off/reset of VMs can be done by [IPMI][] commands and [Redfish][] API.\n    See [virtual BMC](docs/virtual_bmc.md) for details.\n\n* Automation\n\n    Placemat supports [cloud-init][] and [ignition][] to automate\n    virtual machine initialization.  Files on the host machine can be\n    exported to guests as a [9pfs](https://wiki.qemu.org/Documentation/9psetup).\n    QEMU disk images can be downloaded from remote HTTP servers.\n\n    All of these help implementation of fully-automated tests.\n\n* UEFI\n\n    Not only traditional BIOS, but placemat VMs can be booted in UEFI\n    mode if [OVMF][] is available.\n\nUsage\n-----\n\nThis project provides these commands:\n\n* `placemat2` is the main tool to build networks and virtual machines.\n* `pmctl2` is a utility tool to control VMs and Pods.\n\n### placemat2 command\n\n`placemat2` reads all YAML files specified in command-line arguments,\nthen creates resources defined in YAML.  To destroy, just kill the\nprocess (by sending a signal or Control-C).\n\n```console\n$ placemat2 [OPTIONS] YAML [YAML ...]\n\nOptions:\n  --cache-dir string\n        directory for cache data\n  --data-dir string\n        directory to store data (default \"/var/scratch/placemat\")\n  --debug\n        show QEMU's stdout and stderr\n  --force\n        force run with removal of garbage\n  --graphic\n        run QEMU with graphical console\n  --listen-addr string\n        listen address (default \"127.0.0.1:10808\")\n  --run-dir string\n        run directory (default \"/tmp\")\n```\n\nIf `--cache-dir` is not specified, the default will be `/home/${SUDO_USER}/placemat_data`\nif `sudo` is used for `placemat`.  If `sudo` is not used, cache directory will be\nthe same as `--data-dir`.\n`--force` is used for forced run. Remaining garbage, for example virtual networks, mounts, socket files will be removed.\n\n### pmctl2 command\n\n`pmctl2` is a command line tool to control VMs and Networks.\n\nSee [pmctl](docs/pmctl.md)\n\nGetting started\n---------------\n\n### Prerequisites\n\n- [QEMU][]\n- [OVMF][] for UEFI.\n- [picocom](https://github.com/npat-efault/picocom) for `pmctl2`.\n- [socat](http://www.dest-unreach.org/socat/) for `pmctl2`.\n- *(Optional)* [swtpm](https://github.com/stefanberger/swtpm) for providing TPM of `Node` resource.\n\nFor Ubuntu or Debian, you can install them as follows:\n\n```console\n$ sudo apt-get update\n$ sudo apt-get install qemu-system-x86 qemu-utils ovmf picocom socat cloud-utils\n```\n\n### Install placemat\n\nYou can choose `go get` or debian package for installation.\n\nInstall `placemat2` and `pmctl2`:\n\n```console\n$ go install github.com/cybozu-go/placemat/v2/cmd/placemat2@latest\n$ go install github.com/cybozu-go/placemat/v2/cmd/pmctl2@latest\n```\n\nor\n\n```console\n$ wget https://github.com/cybozu-go/placemat/releases/download/v${VERSION}/placemat2_${VERSION}_amd64.deb\n$ sudo dpkg -i placemat2_${VERSION}_amd64.deb\n```\n\n### Run examples\n\nSee [examples](examples) how to write YAML files.\n\nTo launch placemat from YAML files, run it with `sudo` as follows:\n\n```console\n$ sudo $GOPATH/bin/placemat2 cluster.yml\n```\n\nTo connect to a serial console of a VM, use `pmctl2 node enter`:\n\n```console\n$ sudo $GOPATH/bin/pmctl2 node enter VM\n```\n\nThis will launch `picocom`.  To exit, type `Ctrl-Q`, then `Ctrl-X`.\n\nSpecification\n-------------\n\nSee specifications under [docs directory](docs/).\n\nLicense\n-------\n\nplacemat is licensed under the Apache License, Version 2.0.\n\n[releases]: https://github.com/cybozu-go/placemat/releases\n[godoc]: https://godoc.org/github.com/cybozu-go/placemat\n[cloud-init]: http://cloudinit.readthedocs.io/en/latest/index.html\n[ignition]: https://coreos.com/ignition/docs/latest/\n[QEMU]: https://www.qemu.org/\n[OVMF]: https://github.com/tianocore/tianocore.github.io/wiki/OVMF\n[IPMI]: https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface\n[Redfish]: https://www.dmtf.org/standards/redfish\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybozu-go%2Fplacemat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybozu-go%2Fplacemat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybozu-go%2Fplacemat/lists"}