{"id":33136375,"url":"https://github.com/Azure/draft/","last_synced_at":"2025-11-15T11:01:32.609Z","repository":{"id":37269836,"uuid":"429509802","full_name":"Azure/draft","owner":"Azure","description":"A day 0 tool for getting your app on k8s fast","archived":false,"fork":false,"pushed_at":"2025-10-20T13:09:37.000Z","size":28076,"stargazers_count":624,"open_issues_count":41,"forks_count":70,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-10-27T00:40:24.983Z","etag":null,"topics":[],"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":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-18T16:54:22.000Z","updated_at":"2025-10-11T06:12:01.000Z","dependencies_parsed_at":"2023-10-19T23:22:12.988Z","dependency_job_id":"af489fd1-627d-4499-baad-f6a57df0386d","html_url":"https://github.com/Azure/draft","commit_stats":{"total_commits":366,"total_committers":31,"mean_commits":"11.806451612903226","dds":0.7540983606557377,"last_synced_commit":"a5607c625c11134af117467bbb90c46d23bac559"},"previous_names":["imiller31/draftv2"],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/Azure/draft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/draft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fdraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284545264,"owners_count":27023524,"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-11-15T02:00:06.050Z","response_time":57,"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":[],"created_at":"2025-11-15T11:00:30.555Z","updated_at":"2025-11-15T11:01:32.594Z","avatar_url":"https://github.com/Azure.png","language":"Go","readme":"![Draft logo](./ghAssets/Draft-Gradient@3x.png)\n\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eDraft\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    A tool to help developers hit the ground running with Kubernetes.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Azure/draft/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Azure/draft/issues\"\u003eRequest Feature\u003c/a\u003e\n  \n  [![Draft Unit Tests](https://github.com/Azure/draft/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/Azure/draft/actions/workflows/unit-tests.yml?query=branch:main)\n  [![GoDoc](https://godoc.org/github.com/Azure/draft?status.svg)](https://godoc.org/github.com/Azure/draft)\n  [![Go Report Card](https://goreportcard.com/badge/github.com/Azure/draft?branch=main)](https://goreportcard.com/report/github.com/Azure/draft)\n  [![CodeQL](https://github.com/Azure/draft/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/Azure/draft/actions/workflows/codeql-analysis.yml?query=branch:main)\n  [![Draft Linux Integrations](https://github.com/Azure/draft/actions/workflows/integration-linux.yml/badge.svg?branch=main)](https://github.com/Azure/draft/actions/workflows/integration-linux.yml?query=branch:main)\n  [![Draft Release \u0026 Publish](https://github.com/Azure/draft/actions/workflows/release-and-publish.yml/badge.svg?branch=main)](https://github.com/Azure/draft/actions/workflows/release-and-publish.yml?query=branch:main)\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Installation\n### Homebrew\n\n1. Run the following commands\n\n```sh\nbrew install draft\n```\n\n### Shell Script\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/Azure/draft/main/scripts/install.sh | bash\n```\n\n* Windows is supported via WSL Ubuntu\n\n## Getting Started\n\nDraft is a tool made for users who are just getting started with Kubernetes or want to simplify their experience with Kubernetes. This readme will give you a quick run down on Draft’s commands and what they do.\n\n### `draft create`\n\nIn our directory that holds our application, we can run the CLI command ‘draft create’. Draft create will walk you through a series of questions prompting you on your application specification. At the end of it, you will have a Dockerfile as well as Kubernetes manifests to deploy your application. Below is a picture of running the Draft create command on our [Contoso Air repository](https://github.com/microsoft/ContosoAir).\n\n![example of draft create command showing the prompt \"select k8s deployment type\" with three options \"helm\", \"kustomize\", and \"manifests\"](./ghAssets/draft-create.png)\n\n### `generate-workflow`\n\nNext up, we can run the ‘draft generate-workflow’ command.\nThis command will automatically build out a GitHub Action for us.\n![screenshot of command line executing \"draft generate-workflow\" printing \"Draft has successfully genereated a Github workflow for your project\"](./ghAssets/generate-workflow.png)\n\n### `setup-gh`\n\nIf you are using Azure, you can also run the ‘draft setup-gh’ command to automate the GitHub OIDC setup process. This process is needed to make sure your Azure account and your GitHub repository can talk to each other. If you plan on using the GitHub Action to deploy your application, this step must be completed.\n\n![screenshot of command line executing \"draft setup-gh\" showing the prompt \"Which account do you want to log into?\" with two options \"Github.com\" and \"Github Enterprise Server\"](./ghAssets/setup-gh.png)\n\nAt this point, you have all the files needed to deploy your application onto a Kubernetes cluster!\n\nIf you don’t plan on using the GitHub Action, you can directly apply your deployment files by using the `kubectl apply -f` command.\n\nIf you plan on deploying your application through your GitHub Action, commit all the files to your repository and watch your application get deployed!\n\n### `draft validate`\n\nDraft validate scans your manifests and populates warnings messages in your code terminal if your manifests are not following best practices. All best practices are sourced from AKS’s deployment safeguards feature. To learn more about deployment safeguards, visit the [offical documentation](https://learn.microsoft.com/azure/aks/deployment-safeguards). To view the best practices that are used in Draft, view the [safeguards package](https://github.com/Azure/draft/tree/main/pkg/safeguards/lib/v1.0.0).\n\n![screenshot of draft-validate](./ghAssets/draft-validate.png)\n\n### `draft info`\nThe `draft info` command prints information about supported languages and deployment types.\n\nExample output (for brevity, only the first supported language is shown):\n```\n{\n  \"supportedLanguages\": [\n    {\n      \"name\": \"clojure\",\n      \"displayName\": \"Clojure\",\n      \"variableExampleValues\": {\n        \"VERSION\": [\n          \"8-jdk-alpine\",\n          \"11-jdk-alpine\"\n        ]\n      }\n    }\n  ]\n  ...,\n  \"supportedDeploymentTypes\": [\n    \"helm\",\n    \"kustomize\",\n    \"manifests\"\n  ]\n}\n```\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\nDraft makes it easier for developers to get started building apps that run on Kubernetes by taking a non-containerized application and generating the Dockerfiles, Kubernetes manifests, Helm charts, Kustomize configuration, and other artifacts associated with a containerized application. Draft can also generate a GitHub Actions workflow file to quickly build and deploy applications onto any Kubernetes cluster.\n\n### Commands\n\n- `draft create` adds the minimum required Dockerfile and manifest files for your deployment to the project directory.\n  - Supported deployment types: Helm, Kustomize, Kubernetes manifest.\n- `draft setup-gh` automates the GitHub OIDC setup process for your project.\n- `draft generate-workflow` generates a GitHub Actions workflow for automatic build and deploy to a Kubernetes cluster.\n- `draft update` automatically make your application to be internet accessible.\n- `draft validate` scan your manifests to see if they are following Kubernetes best practices.\n- `draft info` print supported language and field information in json format.\n\nUse `draft [command] --help` for more information about a command.\n\n### Dry Run\nThe following flags can be used for enabling dry running, which is currently supported by the following commands: `create`\n- ` --dry-run` enables dry run mode in which no files are written to disk\n-  `--dry-run-file` specifies a file to write the dry run summary in json format into\n\n```json\n// Example dry run output\n{\n  \"variables\": {\n    \"APPNAME\": \"testapp\",\n    \"BUILDERVERSION\": \"null\",\n    \"IMAGENAME\": \"testapp\",\n    \"LANGUAGE\": \"gomodule\",  // Note that this variable is in addition to the draft config variables\n    \"NAMESPACE\": \"default\",\n    \"PORT\": \"1323\",\n    \"SERVICEPORT\": \"80\",\n  },\n  \"filesToWrite\": [\n    \"langtest/.dockerignore\",\n    \"langtest/Dockerfile\",\n    \"langtest/charts/.helmignore\",\n    \"langtest/charts/Chart.yaml\",\n    \"langtest/charts/production.yaml\",\n    \"langtest/charts/templates/_helpers.tpl\",\n    \"langtest/charts/templates/deployment.yaml\",\n    \"langtest/charts/templates/namespace.yaml\",\n    \"langtest/charts/templates/service.yaml\",\n    \"langtest/charts/values.yaml\"\n  ]\n}\n```\n## Install from Source\n\n### Prerequisites\n\nDraft requires Go version 1.21.x. or above\n\nCheck your go version.\n\n```sh\ngo version\n```\n\n1. Clone the repo\n\n   ```sh\n   git clone https://github.com/Azure/draft.git\n   ```\n\n2. Change to the `draft` directory and build the binary\n\n   ```sh\n   cd draft/\n   make\n   ```\n\n3. Add the binary to your path (we use the same directory as [go install](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies))\n\n   ```sh\n   mv draft $HOME/go/bin/\n   ```\n\n\n## Draft as a Dependency\n\nIf you are looking to leverage Draft's file generation capabilities and templating within another project instead of using the CLI, you have two options: importing the Draft go packages, and wrapping the binary\n\n### Importing Draft Go Packages\nThis option will provide the cleanest integration, as it directly builds Draft into your project. However, it requires that your project is written in Go.\n\nDockerfiles can be generated following the example in [examples/dockerfile.go](https://github.com/Azure/draft/blob/main/example/dockerfile.go) \n\nDeployment files can be generated following the example in [examples/deployment.go](https://github.com/Azure/draft/blob/main/example/deployment.go)\n\n### Wrapping the Binary\nFor projects written in languages other than Go, or for projects that prefer to not import the packages directly, you can wrap the Draft binary.\n\nSeveral features have been implemented to make consuming draft as easy as possible:\n- `draft info` prints supported language and field information in json format for easy parsing\n- `--dry-run` and `--dry-run-file` flags can be used on the `create` and `update` commands to generate a summary of the files that would be written to disk, and the variables that would be used in the templates\n- `draft update` and `draft create` accept a repeatable `--variable` flag that can be used to set template variables\n- `draft create` takes a `--create-config` flag that can be used to input variables through a yaml file instead of interactively\n\n## Introduction Videos\n\n[![Day Zero Draft](./ghAssets/videoasset1.png)](https://www.youtube.com/watch?v=K1VYLSm32wg\u0026list=PLlrxD0HtieHg8On6t1l5_kj--7PMmyfGi)\n\n[![Get your app \u0026 APIs on Kubernetes fast with Draft](./ghAssets/videoasset2.png)](https://www.youtube.com/watch?v=f98NDqKQRbs)\n\n## Contributing\n\nDraft is fully compatible with [Azure Kubernetes Service](https://docs.microsoft.com/azure/aks/draft). We strongly encourage contributions to make Draft available to other cloud providers 😊!\n\n## Issues/Discussions\n\nThe Draft team will be monitoring both the [issues](https://github.com/Azure/draft/issues) and [discussions](https://github.com/Azure/draft/discussions) board. Please feel free to create issues for any problems you run into and the Draft team will be quick to respond. The discussions board will be used for community engagement. We look forward to see you there!\n\n## License\n\nDraft is under the MIT License. See [LICENSE](https://github.com/Azure/draft/blob/main/LICENSE) for more information.\n\n## Trademark Notice\n\nAuthorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark \u0026 Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.\n","funding_links":[],"categories":["DevOps"],"sub_categories":["Winetricks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure%2Fdraft%2F","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzure%2Fdraft%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure%2Fdraft%2F/lists"}