{"id":15903102,"url":"https://github.com/erikh/spin","last_synced_at":"2025-04-02T20:15:03.575Z","repository":{"id":57561413,"uuid":"328026971","full_name":"erikh/spin","owner":"erikh","description":"VM orchestration platform","archived":false,"fork":false,"pushed_at":"2021-01-12T08:54:30.000Z","size":2012,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-08T10:43:33.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-08T22:33:52.000Z","updated_at":"2021-07-08T21:53:36.000Z","dependencies_parsed_at":"2022-09-10T06:13:34.186Z","dependency_job_id":null,"html_url":"https://github.com/erikh/spin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fspin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fspin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fspin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikh%2Fspin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikh","download_url":"https://codeload.github.com/erikh/spin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246884766,"owners_count":20849554,"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":[],"created_at":"2024-10-06T12:00:58.558Z","updated_at":"2025-04-02T20:15:03.550Z","avatar_url":"https://github.com/erikh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spin: a framework/tools for managing VM configurations\n\nspin allows you to manage VMs on your linux bare metal host with ease. Powered\nby [qemu](https://www.qemu.org) and\n[systemd](https://www.freedesktop.org/wiki/Software/systemd/), it stands upon\nreliable technology providing its own framework for applying configuration in a\nsafely concurrent, idempotent way, allowing you to perform many small\noperations on VMs in a quick and efficient way.\n\nIn short, we do the high level stuff and leave the big iron tools doing what\nthey do best.\n\nspin is fully backed by a [openapi specification](gen/http/openapi3.yaml)\nfor its API calls, from the high level to the blow-your-foot-off calls.\nGenerate your own, or check out our [clients](clients) directory for a good\nset of golang ones.\n\n## Installation and Usage\n\nFor installations, we only support \"development mode\" at the moment. For a\nquick start, try this script on for size. You will need the following tools to\nbuild the binaries:\n\n- [golang](golang.org)\n- [yarn](https://yarnpkg.com/)\n\nMost other things will be installed by the `make install-deps` task automatically.\n\n```bash\n#!/usr/bin/env bash\n\ngo get -d github.com/erikh/spin\ncd $GOPATH/github.com/erikh/spin\nmake install-deps\nmake servers\nmake install-local\n```\n\nBinaries will be in `bin/`.\n\nTo interact with the `spin` tool (which has help; try `spin help`), try the\nfollowing ideas:\n\n(please note the servers must be running, provided by `make servers`)\n\n```bash\n# these first few steps are necessary to create vms for now, soon this will not be\nmkdir -p ~/.config/spin/images/test\n\n# first argument is the name of the volume, second is the path to the volume's files\nspin-registry message storage volume create test ~/.config/spin/images/test\n\n# the second argument (`test`) here is the volume name provided above. the\n# machine's image will be put in this directory under the name `my_cool_image`.\nspin vm create --cdrom ~/path/to/some.iso my_cool_image test\n1\n\n# the id above is the id of the vm newly created; it can be started like so:\nspin start 1\n\n# to access it, you can get a console by starting the console server and\n# viewing a specific console (will open a link in your browser):\nspin serve \u0026\nspin view 1\n\n# stop and shutdown have a distinction; stop will force terminate through\n# systemd if shutdown doesn't succeed; shutdown will merely try to stop it\n# through normal ACPI shutdown signals.\nspin shutdown 1\nspin stop 1\n\n##\n# some other commands:\n##\nspin vm list              # lists all vms by id\nspin vm image list 1      # lists attached devices to my_cool_image\nspin vm image detach 1 1  # detaches cdrom, index 1 on my_cool_image\n```\n\nRun `make stop-servers` to stop the servers when you are done playing! :D\n\n### Development\n\nJust some notes:\n\ngoa gen is done on each `make test` run, that includes the autotester, so you\ncan use it to refactor designs fairly quick.\n\ngolangci-lint is required to run the tests. `make install-deps` to install it\nand reflex.\n\n`make autotest` will start an autotester using\n[reflex](https://github.com/cespare/reflex). It's very handy!\n\nThe tests are currently pretty safe to run, they don't generate in any place\nother than `/tmp` and the project directory. `.gitignore` is programmed\nproperly, too. `test` and autotest leverage the golang test cache for faster\nresponse time, but you can `make test-all` to force a run of all tests.\n\n## Architecture\n\nThe architecture is a mix of the following technologies:\n\n- [golang](https://golang.org) is ... you know what golang is.\n- [goa](https://goa.design) is a framework for designing REST and GRPC APIs.\n- [bbolt](https://pkg.go.dev/go.etcd.io/bbolt/) is a key/value database system similar to LMDB, just for Golang.\n\nAnd it contains the following sub-components:\n\n- [spin-broker](cmd/spin-broker) arranges messages so that they are processed\n  in queues monitored by agents. These agents carry out the work of the\n  instructions carried in the queue.\n- [spin-registry](cmd/spin-registry) holds the values of entities. Soon, this\n  will include journalling the changes of entities.\n- [spin-apiserver](cmd/spin-apiserver) is the front API (the \"brains\") that\n  orchestrates the interaction between the registry, broker and the user.\n\n## Author\n\nErik Hollensbe \u003cgithub@hollensbe.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fspin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikh%2Fspin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikh%2Fspin/lists"}