{"id":21965528,"url":"https://github.com/perfectsense/gyro","last_synced_at":"2025-04-05T02:11:59.218Z","repository":{"id":39997346,"uuid":"157413720","full_name":"perfectsense/gyro","owner":"perfectsense","description":"Gyro is a command-line tool for creating, updating, and maintaining cloud infrastructure. Gyro makes infrastructure-as-code possible.","archived":false,"fork":false,"pushed_at":"2025-02-13T22:03:59.000Z","size":6100,"stargazers_count":134,"open_issues_count":33,"forks_count":7,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-03-29T01:14:47.414Z","etag":null,"topics":["devops","infrastructure-as-code"],"latest_commit_sha":null,"homepage":"https://gyro.dev","language":"Java","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/perfectsense.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-11-13T16:46:53.000Z","updated_at":"2024-10-19T10:23:06.000Z","dependencies_parsed_at":"2024-11-19T21:18:27.138Z","dependency_job_id":"905c2360-ae3c-40c7-96c0-03033b7b24a4","html_url":"https://github.com/perfectsense/gyro","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectsense%2Fgyro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectsense%2Fgyro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectsense%2Fgyro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectsense%2Fgyro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perfectsense","download_url":"https://codeload.github.com/perfectsense/gyro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"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":["devops","infrastructure-as-code"],"created_at":"2024-11-29T12:48:06.930Z","updated_at":"2025-04-05T02:11:59.204Z","avatar_url":"https://github.com/perfectsense.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"etc/gyro.png\" height=\"200\"/\u003e\n\n[![Gitter](https://img.shields.io/gitter/room/perfectsense/gyro)](https://gitter.im/perfectsense/gyro)\n[![TravisCI](https://api.travis-ci.com/perfectsense/gyro.svg?branch=master)](https://travis-ci.com/perfectsense/gyro)\n[![Apache License 2.0](https://img.shields.io/github/license/perfectsense/gyro)](https://github.com/perfectsense/gyro/blob/master/LICENSE)\n\nGyro is command-line tool for creating, updating, and maintaining cloud infrastructure. Gyro makes\ninfrastructure-as-code possible.\n\nGyro is open source under the Apache 2.0 license.\n\nUsing Gyro allows you to describe your infrastructure using the Gyro configuration language and then\ncreate, update, and maintain that infrastructure using the gyro command-line tool.\n\n### Name\n\nWhy the name Gyro? It's short for Gyroscope which is an essential device that allows airplanes to\nnavigate in the clouds. Also, if you read \"gyro\" and thought of a greek sandwich, you're not the\nfirst, definitely won't be the last, haha. That's ok though, gyro sandwiches are yummy. :)\n\n### Background\n\nGyro was built by [Brightspot](https://www.brightspot.com) to automate the creation and\nmanagement of the cloud infrastructure we use to run **Brightspot CMS** for\nour clients. We integrated several tools that are part of our DevOps lifecycle such as Chef to\ninstall and configure software on our hosts, ssh to log into hosts, and service discovery to drain\ntraffic during maintenance. We use workflows to deploy our code using with the blue/green model. We\nfound this \"one tool for your day-to-day operations activities\" to be extremely valuable.  After six\nyears of using this tool internally, we decided to refactor the code, make it more flexible, and\nopen source it so others can benefit just as we have.\n\n## Gyro Language\n\nThe Gyro language is designed specifically for defining cloud infrastructure. It was built with\nreadability and organizational flexibility in mind. The language provides the ability to concisely\ndefine cloud infrastructure resources along with language constructs such a `@for` loops, `@if`\nconditionals, and `@virtual` definitions for packaging resources into reusable components.\n\n### What Makes It Different?\n\nThere are a few things that make Gyro different from similar tools. We'll try to highlight those here\nbut encourage you to read the [developer documentation](https://gyro.dev).\n\n#### Gyro Configuration Language\n\nWe know, Yet Another DSL. Originally we wrote this using YAML but we wanted clean\n(and limited) logic in our configuration and YAML didn't really fit the bill. We tried a few\ndifferent language based internal DSLs such as Kotlin, Groovy, and even TCL (don't hate) but the\nlanguage always bled through and didn't feel right.\n\nWe decided to design our own simplified, but powerful, language that allowed us to have\ngreater control over scoping rules, control structures, and runtime execution. Building a tool that\ngenerates an internal graph of resources is extremely complex and not having complete control over\nwhat is happening during execution makes it much more complex.\n\nMore information on the configuration syntax can be found in the [Language Guide](https://gyro.dev/guides/language/). There are also lots of working examples in each [provider](https://github.com/perfectsense/gyro-aws-provider/tree/master/examples).\n\n\u003cimg src=\"etc/terminal-create.png\" height=\"400\"/\u003e\n\nWhen you run Gyro it'll tell you exactly what it's going to do.\n\n\u003cimg src=\"etc/gyro-create.svg\" height=\"400\"/\u003e\n\nEnable verbose mode to get a more detailed view. In this example we've made a small modification\nto the original configuration to add a new security group:\n\n\u003cimg src=\"etc/gyro-update.svg\" height=\"400\"/\u003e\n\n#### Control Structures\n\nWe're aware of the debate about whether allowing logic (control structures) in a configuration is a\ngood thing or not. We believe it is, as long as you provide reasonable limits. With Gyro we tried to\nstrike a balance between no logic and too much logic (aka full programming language). To start with\nwe've implemented two control structures we think are most important for configuration logic, \"if\"\nand \"for\".\n\nControl structures are actually an extension of Gyro rather than baked into the language parser.\n\nMore information on control structures can be found in the [control structures](https://gyro.dev/guides/language/control-structures.html) documentation. For a real world example see our [EC2 subnet](https://github.com/perfectsense/gyro-aws-provider/blob/master/examples/ec2/subnet.gyro#L26-L37) example.\n\n\u003cimg src=\"etc/terminal-logic.png\" height=\"400\"/\u003e\n\n#### Workflows\n\nWe think this is huge. Workflows provide the ability to define transition stages for complex cloud\ninfrastructure updates. Blue/green deployments are a good example of this. With Gyro you can define\na stage to create a new load balancer and new virtual machines with your updated code. After this\nstage executes you can either prompt the user to continue, allowing them to validate the new\ndeployment, or you can automate it. Then you can define a stage to either drop those new machines\ninto the load balancer taking traffic or flip DNS depending on how you like to do blue/green. If at\nany point things don't look right Gyro can roll back to a previous stage.\n\nThis functionality has been extremely important for us to be able to allow anyone to do deployments\nand still be able to quickly roll back should anything go wrong.\n\nMore information on workflows can be found in the [workflow guide](https://gyro.dev/guides/workflows/).\n\n\u003cimg src=\"etc/terminal-workflow.png\" height=\"400\"/\u003e\n\n#### Extensibility\n\nWe've included a number of ways you can extend Gyro with plugins.\n\n- Add [new commands](https://gyro.dev/extending/commands)\n- Add [new language functionality](https://gyro.dev/extending/directive/), aka Directives \n- Add [custom variable resolvers](https://gyro.dev/extending/resolver/)\n- Add custom event hooks (undocumented) to trigger custom logic when various things happen such as a\nresource is created or updated\n\nThe power of extensions allow you to integrate Gyro with your other DevOps tools and extend Gyro with\nnew features we haven't thought of.\n\nTo get you started we've put together a [plugin template project](https://github.com/perfectsense/gyro-sample-plugin). You can also check out the [ssh plugin](https://github.com/perfectsense/gyro-ssh-plugin).\n\n## Getting Started\n\n[Install](https://gyro.dev/guides/getting-started/installing.html#installing-gyro) Gyro.\n\nSee [Getting Started](https://gyro.dev/guides/getting-started/index.html) if you're new to Gyro. This is a quick tutorial that will teach you the basics of Gyro.\n\nAfter the Getting Started tutorial there are plenty of examples for each provider:\n\n- [AWS](https://github.com/perfectsense/gyro-aws-provider/tree/master/examples)\n- [Azure](https://github.com/perfectsense/gyro-azure-provider/tree/master/examples)\n- [Pingdom](https://github.com/perfectsense/gyro-pingdom-provider/tree/master/examples)\n\nJoin the [community](https://gyro.dev/guides/contribute/#chat) and [contribute](https://gyro.dev/guides/contribute/#contribute) to Gyro!\n\n## Developing\n\nGyro is written in Java using Gradle as the build tool. \n\nWe recommend installing [AdoptOpenJDK](https://adoptopenjdk.net/) 11 or higher if you're going to contribute to Gyro or one of its cloud\nprovider implementations.\n\nThe Gyro project is broken into several subprojects:\n\n- **cli** - The Gyro CLI executable JAR. After building Gyro you'll find the executable binary in ``cli/dist/`` as well as the packaged Java runtime distribution.\n\n- **core** - The core Gyro runtime. The bulk of Gyro lives in the package. Specifically, this package contains the diff engine, workflow implementation, virtual resource implementation, @if and @for implementation, and more.\n\n- **lang** - The Gyro language AST.\n\n- **parser** - The Gyro language parser. We use ANTLR4.\n\n- **util** - Various util classes. \n\n### Building Gyro\n\nGyro uses the Gradle build tool. Once you have a JDK installed building is easy, just run `./gradlew` at the root of the Gyro project. This wrapper script will automatically download and install Gradle for you, then build Gyro.\n\n```shell\n$ ./gradlew\nDownloading https://services.gradle.org/distributions/gradle-5.2.1-all.zip\n..............................................................................................................................\n\nWelcome to Gradle 5.2.1!\n\nHere are the highlights of this release:\n - Define sets of dependencies that work together with Java Platform plugin\n - New C++ plugins with dependency management built-in\n - New C++ project types for gradle init\n - Service injection into plugins and project extensions\n\nFor more details see https://docs.gradle.org/5.2.1/release-notes.html\n\nStarting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details\n\n.\n.\n.\n\nBUILD SUCCESSFUL in 17s\n38 actionable tasks: 28 executed, 10 from cache\n$\n```\n\n## License\n\nGyro is open source under the [Apache License 2.0](https://github.com/perfectsense/gyro/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectsense%2Fgyro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperfectsense%2Fgyro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectsense%2Fgyro/lists"}