{"id":15291762,"url":"https://github.com/azure/agentbaker","last_synced_at":"2026-02-27T00:10:59.643Z","repository":{"id":36970680,"uuid":"239001792","full_name":"Azure/AgentBaker","owner":"Azure","description":"Agent Baker is aiming to provide a centralized, portable k8s agent node provisioning lib as well as rich support on different OS image with optimized k8s binaries.","archived":false,"fork":false,"pushed_at":"2025-01-28T21:37:15.000Z","size":278377,"stargazers_count":112,"open_issues_count":151,"forks_count":211,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-01-28T21:41:51.715Z","etag":null,"topics":["agent","cloud-init","k8s","os","vhd"],"latest_commit_sha":null,"homepage":"","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/Azure.png","metadata":{"files":{"readme":".github/README-RENOVATE.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-07T18:57:33.000Z","updated_at":"2025-01-28T21:35:33.000Z","dependencies_parsed_at":"2023-09-26T21:27:48.723Z","dependency_job_id":"7d06a1ee-9387-41da-9cd0-09d550c576ab","html_url":"https://github.com/Azure/AgentBaker","commit_stats":null,"previous_names":[],"tags_count":1073,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2FAgentBaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2FAgentBaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2FAgentBaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2FAgentBaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/AgentBaker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261275,"owners_count":19281192,"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":["agent","cloud-init","k8s","os","vhd"],"created_at":"2024-09-30T16:14:17.886Z","updated_at":"2025-10-20T03:32:28.103Z","avatar_url":"https://github.com/Azure.png","language":"Go","readme":"# Agentbaker\r\n\r\n[![Coverage Status](https://coveralls.io/repos/github/Azure/AgentBaker/badge.svg?branch=master)](https://coveralls.io/github/Azure/AgentBaker?branch=master)\r\n\r\nAgentbaker is a collection of components used to provision Kubernetes nodes in Azure.\r\n\r\nAgentbaker has a few pieces\r\n\r\n- Packer templates and scripts to build VM images.\r\n- A set of templates and a public API to render those templates given input config.\r\n- An API to retrieve the latest VM image version for new clusters.\r\n\r\nThe primary consumer of Agentbaker is Azure Kubernetes Service (AKS).\r\n\r\nAKS uses Agentbaker to provision Linux and Windows Kubernetes nodes.\r\n\r\n## Contributing\r\n\r\nDeveloping agentbaker requires a few basic requisites:\r\n\r\n- Go (at least version 1.19)\r\n- Make\r\n\r\nRun `make -C hack/tools install` to install all development tools.\r\n\r\nIf you change code or artifacts used to generate custom data or custom script extension payloads, you should run `make`.\r\n\r\nThis re-runs code to embed static files in Go code, which is what will actually be used at runtime.\r\n\r\nThis additionally runs unit tests (equivalent of `go test ./...`) and regenerates snapshot testdata.\r\n\r\n## Style\r\n\r\nWe use [golangci-lint](https://golangci-lint.run/) to enforce style.\r\n\r\nRun `make -C hack/tools install` to install the linter.\r\n\r\nRun `./hack/tools/bin/golangci-lint run` to run the linter.\r\n\r\nWe currently have many failures we hope to eliminate.\r\n\r\nWe have [job to run golangci-lint on pull requests]().\r\n\r\nThis job uses the linters \"no-new-issues\" feature.\r\n\r\nAs long as PRs don't introduce net new issues, they should pass.\r\n\r\nWe also have a linting job to enforce commit message style.\r\n\r\nWe adhere to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).\r\n\r\nPrefer pull requests with single commits.\r\n\r\nTo clean up in-progress commits, you can use `git rebase -i` to fixup commits.\r\n\r\nSee the [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) for more details.\r\n\r\n## Testing\r\n\r\nMost code may be tested with vanilla Go unit tests.\r\n\r\n## shell scripts unit tests\r\n\r\nPlease visit the official [GitHub link](https://github.com/shellspec/shellspec) for more details. Below is a brief use case.\r\n\r\n### Installation \r\n\r\n`Shellspec` is used as a framework for unit test. There are 2 options to install it.\r\n\r\n#### Option 1 - recommended, using makefile to install in project\r\n`Shellspec` is already included in the makefile. You can install it simply by running `make tools-install` or `make generate` in root (/AgentBaker) directory. \r\n\r\nNote: `make generate` will install and run the shellspec tests.\r\n\r\n#### Option 2 - install in your local machine\r\nIf you want to install it in your local machine, please run `curl -fsSL https://git.io/shellspec | sh`.\r\n\r\nBy default, it should be installed in `~/.local/lib/shellspec`. Please append it to the $PATH for your convenience. Example command `export PATH=$PATH:~/.local/lib/shellspec`.\r\n\r\n### Authoring tests\r\n\r\nYou will need to write `xxx_spec.sh` file for the test.\r\n\r\nFor example, `AgentBaker/spec/parts/linux/cloud-init/artifacts/cse_install_spec.sh` is a test file for `AgentBaker/parts/linux/cloud-init/artifacts/cse_install.sh`\r\n\r\n### Running tests locally\r\n\r\nTo run all tests, in AgentBaker folder, simply run `bash ./hack/tools/bin/shellspec` in root (/AgentBaker) directory. \r\n\r\n#### Useful commands for debugging\r\n\r\n- `bash ./hack/tools/bin/shellspec -x` =\u003e with `-x`, it will show verbose trace for debugging.\r\n- `bash ./hack/tools/bin/shellspec -E \"\u003ctest name\u003e\"` =\u003e you can run a single test case by using `-E` and the test name. For example, `bash ./hack/tools/bin/shellspec -E \"returns downloadURIs.ubuntu.\\\"r2004\\\".downloadURL of package runc for UBUNTU 20.04\"`. You can also do `-xE` for verbose trace for a single test case.\r\n- `bash ./hack/tools/bin/shellspec \"path to xxx_spec.sh\"` =\u003e by providing a full path a particular spec file, you can run only that spec file instead of all spec files in AgentBaker project. \r\nFor example, `bash ./hack/tools/bin/shellspec \"spec/parts/linux/cloud-init/artifacts/cse_install_spec.sh\"`\r\n\r\n\r\n## Snapshot\r\n\r\nWe also have snapshot data tests, which store the output of key APIs as files on disk.\r\n\r\nWe can manually verify the snapshot content looks correct.\r\n\r\nWe now have unit tests which can directly validate the content without leaving generated files on disk.\r\n\r\nSee `./pkg/agent/baker_test.go` for examples (search for `dynamic-config-dir` to see a validation sample.).\r\n\r\n### E2E\r\n\r\nCheckout the [e2e directory](e2e/).\r\n\r\n## Contributor License Agreement (CLA)\r\n\r\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\r\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\r\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\r\n\r\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\r\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\r\nprovided by the bot. You will only need to do this once across all repos using our CLA.\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\r\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\r\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n\r\n# CGManifest File\r\n\r\nA cgmanifest file is a json file used to register components manually when the component type is not supported by\r\ngovernance. The file name is \"cgmanifest.json\" and you can have as many as you need and can be anywhere in your\r\nrepository.\r\n\r\nFile path: `./vhdbuilder/cgmanifest.json`\r\n\r\nReference: https://docs.opensource.microsoft.com/tools/cg/cgmanifest.html\r\n\r\nPackage:\r\n\r\n- Calico Windows: https://docs.projectcalico.org/release-notes/\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fagentbaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fagentbaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fagentbaker/lists"}