{"id":20155273,"url":"https://github.com/redhat-cop/agnostics","last_synced_at":"2025-05-06T23:30:55.514Z","repository":{"id":55379977,"uuid":"271556842","full_name":"redhat-cop/agnostics","owner":"redhat-cop","description":"A multi-cloud scheduler","archived":true,"fork":false,"pushed_at":"2023-12-27T15:07:34.000Z","size":2570,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-07T13:38:00.880Z","etag":null,"topics":["aws","azure","babylon","cloud","gcp","gpte","openstack","scheduler"],"latest_commit_sha":null,"homepage":"https://redhat-cop.github.io/agnostics/api-reference","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/redhat-cop.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2020-06-11T13:42:57.000Z","updated_at":"2024-12-06T21:00:45.000Z","dependencies_parsed_at":"2024-01-16T10:50:24.772Z","dependency_job_id":null,"html_url":"https://github.com/redhat-cop/agnostics","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":"0.16129032258064513","last_synced_commit":"b44411472f50190c56652615ccc63cc45c2f178e"},"previous_names":["redhat-gpe/scheduler","redhat-gpe/agnostics"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fagnostics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fagnostics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fagnostics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fagnostics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-cop","download_url":"https://codeload.github.com/redhat-cop/agnostics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252787221,"owners_count":21804219,"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":["aws","azure","babylon","cloud","gcp","gpte","openstack","scheduler"],"created_at":"2024-11-13T23:31:12.949Z","updated_at":"2025-05-06T23:30:51.281Z","avatar_url":"https://github.com/redhat-cop.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Agnostic Scheduler\n\nimage:https://github.com/redhat-gpe/agnostics/workflows/Go/badge.svg[Go] image:https://quay.io/repository/redhat-gpte/scheduler/status[\"Docker Repository on Quay\", link=\"https://quay.io/repository/redhat-gpte/scheduler\"]\n\nimage::https://gpte-public.s3.amazonaws.com/agnostics/scheduler.png[width=100%]\n\n=== link:https://redhat-gpe.github.io/agnostics/api-reference[API Reference]\n\n=== Usage (server)\n\n[source,subs=\"+quotes,verbatim,macros\"]\n----\nUsage of ./scheduler:\n  -api-addr string\n        The address API listens to.\n        Environment variable: *API_ADDR*\n         (default \":8080\")\n  -api-auth\n        Enable authentication for the API.\n        Environment variable: *API_AUTH*  ('true' or 'false')\n         (default true)\n  -api-htpasswd string\n        The path of the htpasswd file to use for authentication for the API.\n        Environment variable: *API_HTPASSWD*\n         (default \"api-htpasswd\")\n  -console-addr string\n        The address the Console listens to.\n        Environment variable: *CONSOLE_ADDR*\n         (default \":8081\")\n  -debug\n        Debug mode.\n        Environment variable: *DEBUG*\n\n  -git-ssh-private-key string\n        The path of the SSH private key used to authenticate to the git repository. Used only when 'git-url' is an SSH URL.\n        Environment variable: *GIT_SSH_PRIVATE_KEY*\n\n  -git-url string\n        The URL of the git repository where the scheduler will find its configuration. SSH is assumed, unless the URL starts with 'http'.\n        Environment variable: *GIT_URL*\n         (default \"\\git@github.com:redhat-gpe/scheduler-config.git\")\n  -redis-url string\n        The URL to access redis. The format is described by the IANA specification for the scheme, see https://www.iana.org/assignments/uri-schemes/prov/redis\n        Environment variable: *REDIS_URL*\n         (default \"redis://localhost:6379\")\n  -template-dir string\n        The directory containing the golang templates for the Console.\n        Environment variable: *TEMPLATE_DIR*\n         (default \"templates\")\n----\n\n== Config Git repository ==\n\nThe Git repository must contain the following:\n\n- `/policy.yaml` - describing the policy.\n- `/clouds` - directory containting the definition of the resources (clouds) to be scheduled.\n\n.example `policy.yaml`\n[source,yaml]\n----\n---\npredicates:\n  - name: LabelPredicates\n  - name: TaintPredicates\n\npriorities:\n  - name: LabelPriorities\n    weight: 1 # \u003c1\u003e\n  - name: TaintPriorities\n    weight: 1 # \u003c2\u003e\n----\n\u003c1\u003e The weight that will be used to increase the priority of Clouds that match the preferences provided in the Schedule request\n\u003c2\u003e The weight that will be used to decrease the priority of Clouds if they have Taints of type \"PreferNoSchedule\"\n\n.example `clouds/openstack-blue.yml`\n[source,yaml]\n----\n---\nname: openstack-blue\nlabels:\n  type: osp\n  region: na\n  datacenter: wdc\n  purpose: ilt\n----\n\n== Example using the scheduler (client)\n\nHere is an example how the scheduler can be used from ansible.\n\n.Input variables\n[source,yaml]\n----\nagnosticv_meta:\n  scheduler:\n    enable: true\n    data:\n      cloud_preference:\n        purpose: development\n        region: '{{ region }}'\n      uuid: '{{ uuid }}'\n    endpoint: /api/v1/schedule\n    url: https://scheduler.example.com\n\n----\n\n.Playbook to schedule or retrieve a placement using UUID\n[source,yaml]\n----\n- name: Schedule or retrieve a placement using UUID\n  hosts: localhost\n  gather_facts: false\n  vars:\n    output: /tmp/placement.json\n  tasks:\n    - name: Schedule a placement\n      uri:\n        url: \"{{ agnosticv_meta.scheduler.url + agnosticv_meta.scheduler.endpoint }}\"\n        validate_certs: \"{{ agnosticv_meta.scheduler.validate_certs | default(false) }}\"\n        return_content: true\n        method: POST\n        body_format: json\n        body: \"{{ agnosticv_meta.scheduler.data }}\"\n        status_code: [200, 400]\n        dest: \"{{ output }}\"\n      register: r_placement\n      retries: 10\n      delay: 30\n      until: r_placement is succeeded\n\n    - when: \u003e-\n        r_placement.status == 400\n        and 'service uuid already has a placement' in r_placement.json.message\n      name: Get placement using uuid\n      uri:\n        url: \"{{ agnosticv_meta.scheduler.url }}/api/v1/placements/{{ uuid }}\"\n        validate_certs: \"{{ agnosticv_meta.scheduler.validate_certs | default(false) }}\"\n        return_content: true\n        method: GET\n        dest: \"{{ output }}\"\n      register: g_placement\n      retries: 10\n      delay: 30\n      until: g_placement is succeeded\n\n    - debug:\n        msg: \u003e-\n          {% if r_placement.json.cloud is defined %}\n          {{ r_placement.json.cloud.name }}\n          {% else %}\n          {{ r_placement.json.message }}: {{ g_placement.json.cloud.name }}\n          {% endif %}\n----\n\n. Playbook to delete placement using UUID\n[source,yaml]\n----\n- name: Delete placement using UUID\n  hosts: localhost\n  gather_facts: false\n  tasks:\n    - name: Delete placement using uuid\n      uri:\n        url: \"{{ agnosticv_meta.scheduler.url }}/api/v1/placements/{{ uuid }}\"\n        validate_certs: \"{{ agnosticv_meta.scheduler.validate_certs | default(false) }}\"\n        return_content: true\n        method: DELETE\n      register: r_placement\n      retries: 10\n      delay: 30\n      until: r_placement is succeeded\n----\n\n== License\n\nThe scripts and documentation in this project are released under the\nlink:LICENSE[MIT License]\n\n== Contributions\n\nContributions are welcome! See link:docs/contributors.md[Contributor’s\nGuide]\n\n=== Code of Conduct\n\nBe nice :wave:\n\nlink:http://docs.ansible.com/ansible/community.html#community-code-of-conduct[Ansible Code of Conduct] applies here.\n\n\n=== See Also\n\n- https://github.com/redhat-cop/agnosticd\n- https://github.com/redhat-cop/agnosticv\n- https://github.com/redhat-cop/babylon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cop%2Fagnostics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-cop%2Fagnostics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cop%2Fagnostics/lists"}