{"id":20936218,"url":"https://github.com/adzerk/ah","last_synced_at":"2026-03-15T19:02:33.019Z","repository":{"id":49205233,"uuid":"79200186","full_name":"adzerk/ah","owner":"adzerk","description":"Simple, service-oriented management of AWS resources.","archived":false,"fork":false,"pushed_at":"2021-08-13T15:37:10.000Z","size":989,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-02T08:11:13.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adzerk.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}},"created_at":"2017-01-17T07:19:36.000Z","updated_at":"2021-08-13T15:37:13.000Z","dependencies_parsed_at":"2022-09-03T08:01:03.605Z","dependency_job_id":null,"html_url":"https://github.com/adzerk/ah","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adzerk","download_url":"https://codeload.github.com/adzerk/ah/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254030899,"owners_count":22002670,"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":[],"created_at":"2024-11-18T22:18:24.814Z","updated_at":"2026-03-15T19:02:27.977Z","avatar_url":"https://github.com/adzerk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ah ![it's good](https://img.shields.io/badge/is%20it%20good-yes-brightgreen.svg)\n\nDeployment automation tool.\n\n## Install\n\n`Ah` requires the following packages:\n\n1. GNU coreutils\n1. GNU make\n1. `git`\n1. `aws` command line tool\n1. `ronn` (`gem install ronn`)\n1. `rs` (`sudo apt install rs`)\n\n\n## For MacOS\n\n```bash\nbrew install coreutils\nbrew install aws-cli\ngem install ronn\n# rs already installed\nbrew install gettext\nbrew link --force gettext # overwrites mac builtins\nbrew install json-table\n```\n\nTo install in `/usr/local` do:\n\n```bash\nsudo make install\n```\n\nTo install in a different location:\n\n```bash\nsudo make PREFIX=/foo/bar install\n```\n\n## Getting Help\n\n[The `ah` manual][manpage] contains complete descriptions of the various\ncommands and features of the program:\n\n```bash\nman ah\n```\n\n## Config\n\nGlobal config for `ah` is stored at `$HOME/.ah/config`\n\n### Extensions\n\n`ah` extensions should be installed to `$HOME/.ah/extensions`. A convenience\nfunction for installing ah extensions is provided. For example:\n\n```bash\nload_ah_extension git@github.com:yourorg/cool-ah-extensions 2.0\n```\n\n## Getting Started\n\nThe following sections will take you thorough some basic setup and create a\nnew `ah` application and environments.\n\n### Create the Master Bucket\n\nThe first thing to do after installing the program is to create a S3 bucket\nfor `ah` to store things. You only need to do this once.\n\n\u003e **Note:** you want to make sure this bucket is only accessible by users who\n\u003e will be authorized to manage and deploy `ah` applications.\n\nAfter the bucket is created add an environment to your config file:\n\n```bash\necho AH_BUCKET=your-bucket-name \u003e\u003e $HOME/.ah/config\n```\n\n### Create a Default Org\n\n\"Orgs\" contain basic settings that span multiple applications. They are used\nas templates to configure default values at the application and environment\nlevels. You can create as many orgs as you like, but you need at least one.\n\n```bash\nah putorg default\n```\n\nYou will be asked a number of questions:\n\n* **AWS region** \u0026mdash; the AWS region (eg. `us-east-1`).\n* **SGs for default ingress rules** \u0026mdash; these security groups will be added\n  as ingress rules allowing full access to instances in ASGs created by `ah`.\n  Multiple SGs can be separated by spaces or commas, eg. `sg-a0a1c9b7,sg-a0a1c9b8`\n  or `sg-a0a1c9b7 sg-a0a1c9b8`.\n* **Availability zones** \u0026mdash; availability zones in which ASGs created by\n  `ah` will launch instances. Multiple AZs can be separated with spaces or\n  commas, eg. `a,b,e` or `a b e`.\n\nIt's okay if you leave things blank or make a mistake, you can fix it later or\noverride the org settings when you create applications and environments.\n\n\u003e You can use `ah getorg default` to download the org settings, or `ah orgs`\n\u003e to see a list of org names.\n\n### Create an Application\n\nApplications represent some service that will run on instances in AWS. An `ah`\napplication must be associated with a git repository, and will contain settings\nthat will be used as default values for environments that are created for it.\n\n#### Prepare the Git Repo\n\nFirst create the new application's project directory. We'll name this one\n`hello-ah`:\n\n```bash\nmkdir hello-ah \u0026\u0026 cd hello-ah\n```\n\nHere is a good start for a `.gitignore` file for `ah` application repos:\n\n```\n/.ah/env\n/target/\n```\n\nThose two directories have special meaning to `ah`:\n\n* `.ah` \u0026mdash; this is where `ah` will store application configuration info.\n  There won't be anything secret in there.\n* `target` \u0026mdash; this is where compiled artifacts will go if you will not be\n  building your application on the instance. You can also put anything in here\n  that you want to have shipped to instances but don't want to commit to your\n  application's git repo.\n\nAnd the project Makefile (every `ah` application must have a Makefile):\n\n```make\n.PHONY: provision deploy\n\nprovision:\n    echo \"i am an instance, and i am being provisioned now\"\n\ndeploy:\n    echo \"i am an instance, and i am being deployed to now\"\n```\n\nThis Makefile comprises the minimum viable `ah` application. `Ah` expects the\nfollowing targets to be defined:\n\n* `provision` \u0026mdash; used to configure newly launched instances (install\n  software, configure operating system). This target is run on new instances\n  launched in an ASG automatically by the ASGs launch configuration user data\n  script.\n* `deploy` \u0026mdash; used to prepare the application for service, start or\n  restart it, and do any other things that might need to be done to get it\n  going and fully operational. This target is run automatically (after the\n  `provision` task) on new instances launched in an ASG. Also run when\n  performing a \"hot deploy\" to an existing instance via `ah-client deploy`.\n\nNow that we have a workable `ah` application let's commit our code to git:\n\n```bash\ngit init \u0026\u0026 git add . \u0026\u0026 git commit -m \"first commit ever\"\n```\n\n#### Initialize the `Ah` Application\n\nThe `init` command configures some application defaults and allocates the AWS\nresources that are shared by all of the environments for this application:\n\n```bash\nah init\n```\n\nAgain, there will be questions. This time they are mostly related to tags that\nwill be created on AWS resources associated with the application:\n\n* **App name** \u0026mdash; recommend something alphanumeric, plus dashes and/or\n  underscores. Resources will be tagged with `AhApplication` set to this.\n* **Billing group** \u0026mdash; resources will be tagged with `BillingGroup` set\n  to this.\n* **Billing project** \u0026mdash; resources will be tagged with `BillingProject`\n  set to this.\n\nThe application name is the only really important information, so make sure you\nat least fill that one in properly.\n\n#### Push a Version to `Ah` S3 Bucket\n\nIn order to deploy this application to instances on AWS we must push the\ndesired commit to `ah`'s S3 bucket:\n\n```bash\nah push\n```\n\nThis will upload a tarball of `HEAD` \u0026mdash; you can configure `ah` ASGs to\ndeploy this SHA to instances later.\n\n\u003e **Note:** you can use `ah shas` to see which commits have been pushed to S3.\n\n### Create an Environment\n\n[manpage]: http://htmlpreview.github.io/?https://raw.githubusercontent.com/adzerk/ah/master/doc/ah.1.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzerk%2Fah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadzerk%2Fah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzerk%2Fah/lists"}