{"id":21298761,"url":"https://github.com/mohammadmrd/heat-vertical-scaling","last_synced_at":"2025-03-15T17:44:10.343Z","repository":{"id":77325352,"uuid":"338350480","full_name":"MohammadMRD/heat-vertical-scaling","owner":"MohammadMRD","description":"Auto-scaling service using OpenStack heat and aodh","archived":false,"fork":false,"pushed_at":"2021-03-22T08:06:59.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-22T07:37:10.928Z","etag":null,"topics":["aodh","heat","openstack","openstack-aodh","openstack-heat","vertical-scaling"],"latest_commit_sha":null,"homepage":"","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/MohammadMRD.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}},"created_at":"2021-02-12T15:03:43.000Z","updated_at":"2021-03-22T11:56:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc6e74d8-35b0-43b0-8e5e-a2aaedb1b871","html_url":"https://github.com/MohammadMRD/heat-vertical-scaling","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"9e3f996f0214d51e200551d7d889e43886e4ac8a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadMRD%2Fheat-vertical-scaling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadMRD%2Fheat-vertical-scaling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadMRD%2Fheat-vertical-scaling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohammadMRD%2Fheat-vertical-scaling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohammadMRD","download_url":"https://codeload.github.com/MohammadMRD/heat-vertical-scaling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769947,"owners_count":20345215,"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":["aodh","heat","openstack","openstack-aodh","openstack-heat","vertical-scaling"],"created_at":"2024-11-21T14:57:18.205Z","updated_at":"2025-03-15T17:44:10.314Z","avatar_url":"https://github.com/MohammadMRD.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heat - Vertical Scaling\n\n## Getting started\n1. Clone project\n2. Go to the project directory\n3. Create `.env` file\n\u003e * PORT\n\u003e * OPENSTACK_USERNAME\n\u003e * OPENSTACK_PASSWORD\n\u003e * OPENSTACK_USER_DOMAIN_ID\n\u003e * OPENSTACK_PROJECT_NAME\n\u003e * OPENSTACK_PROJECT_DOMAIN_ID\n\n5. Run `npm start`\n6. Create a heat template\n7. Define a scaling resource using `OS::Heat::AutoScalingGroup`\n8. Define an alarm and set the URL of this service to alarm's actions(alarm_action, ok_action, ...)\n\n## Request parameters\n- **action**: `up` or `down`\n- **flavors**: List of flavors id or name\n- **group**: Scaling resource's name\n- **cooldown**: Cooldown period, in seconds (default: 0)\n\n## HOT example\n\n```yaml\nheat_template_version: 2018-08-31\ndescription: A simple stack\n\nparameters:\n  flavor_type:\n    type: string\n  image_id:\n    type: string\n  network_id:\n    type: string\n\nresources:\n  scale_group:\n    type: OS::Heat::AutoScalingGroup\n    properties:\n      min_size: 1\n      max_size: 3\n      resource:\n        type: OS::Nova::Server\n        properties:\n          flavor: { get_param: flavor_type }\n          image: { get_param: image_id }\n          metadata: {\"metering.server_group\": {get_param: \"OS::stack_id\"}}\n          networks:\n            - network: { get_param: network_id }\n\n  cpu_alarm_high:\n    type: OS::Aodh::GnocchiAggregationByResourcesAlarm\n    properties:\n      description: Scale up if CPU \u003e 80% for 5 minutes\n      metric: cpu_util\n      aggregation_method: mean\n      granularity: 300\n      evaluation_periods: 1\n      threshold: 80\n      resource_type: instance\n      comparison_operator: gt\n      alarm_actions:\n        - http://SERVICE_URL?action=up\u0026flavors=c1\u0026flavors=c2\u0026flavors=c3\u0026group=scale_group\n      query:\n        list_join:\n          - ''\n          - - {'=': {server_group: {get_param: \"OS::stack_id\"}}}\n  cpu_alarm_low:\n    type: OS::Aodh::GnocchiAggregationByResourcesAlarm\n    properties:\n      description: Scale down if CPU \u003c 5% for 5 minutes\n      metric: cpu_util\n      aggregation_method: mean\n      granularity: 300\n      evaluation_periods: 1\n      threshold: 5\n      resource_type: instance\n      comparison_operator: lt\n      alarm_actions:\n        - http://SERVICE_URL?action=down\u0026flavors=c1\u0026flavors=c2\u0026flavors=c3\u0026group=scale_group\n      query:\n        list_join:\n          - ''\n          - - {'=': {server_group: {get_param: \"OS::stack_id\"}}}\noutputs:\n  # refs or scale_group_refs\n  scale_group_refs:\n    value: { get_attr: [scale_group, refs] }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadmrd%2Fheat-vertical-scaling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadmrd%2Fheat-vertical-scaling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadmrd%2Fheat-vertical-scaling/lists"}