{"id":13468859,"url":"https://github.com/doitintl/zorya","last_synced_at":"2025-09-09T18:16:04.778Z","repository":{"id":38322373,"uuid":"120788502","full_name":"doitintl/zorya","owner":"doitintl","description":"Google Cloud Instance Scheduler helping to reduce costs by 60% on average for non-production environments.","archived":false,"fork":false,"pushed_at":"2024-01-09T18:05:12.000Z","size":2379,"stargazers_count":142,"open_issues_count":15,"forks_count":35,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-30T08:50:43.701Z","etag":null,"topics":["gcp","google-appengine","google-cloud","google-cloud-platform"],"latest_commit_sha":null,"homepage":"https://www.doit-intl.com/labs","language":"JavaScript","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/doitintl.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-02-08T16:42:40.000Z","updated_at":"2025-01-10T12:41:18.000Z","dependencies_parsed_at":"2024-01-17T00:18:55.888Z","dependency_job_id":"31cf3c43-b887-4ea8-bee6-1639952a3d04","html_url":"https://github.com/doitintl/zorya","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doitintl/zorya","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fzorya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fzorya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fzorya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fzorya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doitintl","download_url":"https://codeload.github.com/doitintl/zorya/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doitintl%2Fzorya/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274340767,"owners_count":25267295,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gcp","google-appengine","google-cloud","google-cloud-platform"],"created_at":"2024-07-31T15:01:20.658Z","updated_at":"2025-09-09T18:16:04.747Z","avatar_url":"https://github.com/doitintl.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# zorya\n\nSchedule GCE Instances, Cloud SQL and GKE node pools\n\n[Blog Post](http://bit.ly/zorya_blog)\n\n[![License](https://img.shields.io/github/license/doitintl/zorya.svg)](LICENSE) [![GitHub stars](https://img.shields.io/github/stars/doitintl/zorya.svg?style=social\u0026label=Stars\u0026style=for-the-badge)](https://github.com/doitintl/zorya)\n\nIn Slavic mythology, [Zoryas](https://www.wikiwand.com/en/Zorya) are two guardian goddesses. The Zoryas represent the morning star and the evening star, — if you have read or watched Neil Gaiman’s American Gods, you will probably remember these sisters).\n\n## Installation\n\n```shell\npip install -r requirements.txt -t lib\n```\n\nNext step: Download and install [Yarn](https://yarnpkg.com/).\n\n### Known Issues for Installation\n\n* Deployment from Google Cloud Shell fails with an error [#25](https://github.com/doitintl/zorya/issues/25).\n\n* Building on macOS running on Apple Silicon (arm M1) may fail due to issues building grpcio. Use the following workaround:\n\n\u003e```shell\n\u003eGRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \\\n\u003e  GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 \\\n\u003e  pip install -r requirements.txt -t lib\n\u003e```\n\n## Enable required GCP APIs:\n\n* Cloud Tasks\n* App Engine\n* Cloud Storage\n* Datastore\n* IAP\n* Cloud Build\n* Cloud Scheduler\n* Compute Engine\n* Cloud SQL Admin API\n\n## Deploy Backend and GUI:\n```shell\n./deploy.sh project-id\n```\n\n\n#### Access the app\n```shell\ngcloud app browse\n```\n\n**WARNING**: By default this application is public; ensure you turn on IAP, as follows:\n\nTo sign into the app, we are using [Cloud Identity-Aware Proxy (Cloud IAP)](https://cloud.google.com/iap/). Cloud IAP works by verifying a user’s identity and determining if that user should be allowed to access the application. The setup is as simple as heading over to [GCP console](https://console.cloud.google.com/iam-admin/iap), enabling IAP on your GAE app and adding the users who should have access to it.\n\n#### Authorization\n\nFor Zorya to work, its service account requires the folling roles:\n\n* Cloud Tasks Enqueuer\n* Cloud Datastore User\n* Logs Writer\n\nFor any project that Zorya is supposed to be managing resources for, Zorya's service account requires the following additional roles:\n\n* Compute Instance Admin (v1)\n* Kubernetes Engine Cluster Admin\n* Cloud SQL Editor\n\n![](iam.png)\n\nThe name of the service account you will need to assign permissions to is as following:`\u003cYOUR_PROJECT_ID\u003e@appspot.gserviceaccount.com` and will have been automatically created by Google App Engine. *NOTE:* this is done under *IAM*, selecting the account, choosing *Permissions* and then adding the roles above to it; not under *Service Accounts*.\n\n## Flow\n\n* Every hour on the hour a cron job calls `/tasks/schedule` which loop over all the policies\n* We are checking the desired state vs the previous hour desired state of \u003cb\u003eZorya states\u003c/b\u003e. If they are not the same we will apply the change.\n\n[API Documentation](http://bit.ly/zorya_api_docs)\n\n### Creating a Schedule\n\n![](Zorya_schedule.png)\n\n### Creating a Policy\n\n![](Zorya_policies.png)\n\nApp Engine Flex is now supported - in order to add an App engine flex to the policy please look at [Adding GAE Flex to Zorya policy](./App%20Engine%20Flex%20Tagging.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fzorya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoitintl%2Fzorya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoitintl%2Fzorya/lists"}