diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cb3f11..21701fd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # RELEASE NOTES +## [0.6.6] - 2020-10-13 + +- Add support for homebrew installation + +- See operational changes + [here](https://microsoft.github.io/bedrock-cli/commands/#change_rel_0_6_6). + ## [0.6.5] - 2020-05-08 - Fixed bugs diff --git a/docs/commands/data0.6.6.json b/docs/commands/data0.6.6.json new file mode 100644 index 00000000..5c9ad6dd --- /dev/null +++ b/docs/commands/data0.6.6.json @@ -0,0 +1,755 @@ +{ + "init": { + "command": "init", + "alias": "i", + "description": "Initialize the bedrock tool for the first time.", + "options": [ + { + "arg": "-f, --file ", + "description": "Path to the config file." + }, + { + "arg": "-i, --interactive", + "description": "Interactive mode. Creates a config file (config.yaml) in a folder .bedrock under your home directory", + "defaultValue": false + } + ], + "markdown": "This command creates a configuration file, `config.yaml` in a folder `.bedrock`\nunder your home directory. There are two options for creating this file\n\n1. an interactive mode where you have to answer a few questions; and\n2. you provide a `yaml` file and this `yaml` will be copied to the target\n location.\n\n## Interactive mode\n\nThe command line tool attempts to read `config.yaml` in a folder `.bedrock`\nunder your home directory. Configuration values shall be read from it if it\nexists. And these values shall be default values for the questions. Otherwise,\nthere shall be no default values. These are the questions\n\n1. Organization Name of Azure dev-op account\n2. Project Name of Azure dev-op account\n3. Personal Access Token (guides)\n4. Would like to have introspection configuration setup? If yes\n 1. Storage Account Name\n 1. Storage Table Name\n 1. Storage Partition Key\n 1. Storage Access Key\n\nThis tool shall verify these values by making an API call to Azure dev-op. They\nshall be written to `config.yaml` regardless the verification is successful or\nnot.\n\n> Note: In the event that you do not have internet connection, this verification\n> shall not be possible\n\n## Example\n\n```\nbedrock init --interactive\n```\n\nor\n\n```\nbedrock init --file myConfig.yaml\n```\n" + }, + "setup": { + "command": "setup", + "alias": "s", + "description": "An interactive command to setup resources in azure and azure dev-ops", + "options": [ + { + "arg": "-f, --file ", + "description": "Path to the file that contains answers to the questions." + } + ], + "markdown": "## Description\n\nThis command assists in creating resources in Azure DevOps so that you can get\nstarted with using Bedrock. It creates\n\n1. An Azure DevOps project.\n\nBy Default, it runs in an interactive mode where you are prompted for answers\nfor a few questions\n\n1. Azure DevOps Organization Name\n2. Azure DevOps Project Name, the project to be created.\n3. Azure DevOps Personal Access Token. The token needs to have these permissions\n 1. Read and write projects.\n 2. Read and write codes.\n4. To create a sample application Repo\n 1. If Yes, a Azure Service Principal is needed. You have 2 options\n 1. have the command line tool to create it. Azure command line tool shall\n be used. You will be prompted to select a subscription identifier.\n 2. Provide the Service Principal Id, Password, and Tenant Id. From this\n information, the tool will retrieve the subscription identifier.\n\nIt can also run in a non interactive mode by providing a file that contains\nanswers to the above questions.\n\nAfter this command is successfully executed, you can launch the introspection\ndashboard to view the status of pipelines.\n\n```\nbedrock setup --file \n```\n\nContent of this file is as follow\n\n```\nazdo_org_name=\nazdo_project_name=\nazdo_pat=\naz_create_app=\naz_create_sp=\naz_sp_id=\naz_sp_password=\naz_sp_tenant=\naz_subscription_id=\naz_acr_name=\n```\n\n`azdo_project_name` is optional and default value is `BedrockRocks`.\n\nThe followings shall be created\n\n1. A working directory, `quick-start-env`\n2. Project shall not be created if it already exists.\n3. A Git Repo, `quick-start-hld`, it shall be deleted and recreated if it\n already exists.\n 1. And initial commit shall be made to this repo\n4. A Git Repo, `quick-start-manifest`, it shall be deleted and recreated if it\n already exists.\n 1. And initial commit shall be made to this repo\n5. A High Level Definition (HLD) to Manifest pipeline.\n6. If user chose to create sample app repo\n 1. A Service Principal (if requested)\n 1. A resource group, `quick-start-rg` if it does not exist.\n 1. A storage account if it does not exist. Storage Account name has to be\n unqiue acess Azure.\n 1. A storage table in the storage account.\n 1. A Azure Container Registry, `quickStartACR` in resource group,\n `quick-start-rg` if it does not exist.\n 1. A Git Repo, `quick-start-helm`, it shall be deleted and recreated if is\n already exists.\n 1. A Git Repo, `quick-start-app`, it shall be deleted and recreated if is\n already exists.\n 1. A Lifecycle pipeline.\n 1. A Build pipeline.\n\n## Pre-requisite\n\n1. azure cli needs to be installed so that pull request can be automatically\n approved. type `az version` to check if you have version 2.0.x installed.\n2. install `azure-devops` extension. To check if you have the extension, type\n `az extension list`\n\n## Setup log\n\nA `setup.log` file is created after running this command. This file contains\ninformation about what are created and the execution status (completed or\nincomplete). This file will not be created if input validation failed.\n\n## Note\n\nTo remove the service principal that it is created by the tool, you can do the\nfollowings:\n\n1. Get the identifier from `setup.log` (look for `az_sp_id`)\n2. run on terminal `az ad sp delete --id `\n" + }, + "deployment create": { + "command": "create", + "alias": "c", + "description": "Insert the deployment in storage from pipelines", + "options": [ + { + "arg": "-k, --access-key ", + "description": "Access key of the storage account" + }, + { + "arg": "-n, --name ", + "description": "Name of the storage account" + }, + { + "arg": "-p, --partition-key ", + "description": "Partition key for the storage account" + }, + { + "arg": "-t, --table-name ", + "description": "Name of table in storage account" + }, + { + "arg": "--p1 ", + "description": "Identifier for the first pipeline" + }, + { + "arg": "--image-tag ", + "description": "Image tag" + }, + { + "arg": "--commit-id ", + "description": "Commit Id in source repository" + }, + { + "arg": "--service ", + "description": "Service name" + }, + { + "arg": "--p2 ", + "description": "Identifier for the second pipeline" + }, + { + "arg": "--hld-commit-id ", + "description": "Commit id in HLD repository" + }, + { + "arg": "--env ", + "description": "Release environment name", + "defaultValue": "" + }, + { + "arg": "--p3 ", + "description": "Identifier for the third pipeline" + }, + { + "arg": "--pr ", + "description": "Pull request identifier for a PR opened/closed in the HLD" + }, + { + "arg": "--manifest-commit-id ", + "description": "Commit Id in the manifest repository" + }, + { + "arg": "--repository ", + "description": "URL of the repository (SRC, HLD, Manifest)" + } + ], + "markdown": "## Description\n\nThis command inserts data about pipeline runs into Azure Table storage.\n\n## Example\n\nThe following command has parameters for Azure Table storage credential and\nvarious pipelines run details. It's used by the source build pipeline, the\nrelease stage and the manifest generation pipeline, and each of them pass in\nparameters depending on the information for that pipeline. Here are three\nexamples:\n\n```\nbedrock deployment create -n $AZURE_STORAGE_ACCOUNT_NAME \\\n -k $AZURE_ACCOUNT_KEY \\\n -t $AZURE_TABLE_NAME \\\n -p $AZURE_TABLE_PARTITION_KEY \\\n --p1 $(Build.BuildId) \\\n --image-tag $tag_name \\\n --commit-id $commitId \\\n --service $service \\\n --repository $repourl\n```\n\n```\nbedrock deployment create -n $AZURE_STORAGE_ACCOUNT_NAME \\\n -k $AZURE_ACCOUNT_KEY \\\n -t $AZURE_TABLE_NAME \\\n -p $AZURE_TABLE_PARTITION_KEY \\\n --p2 $(Build.BuildId) \\\n --hld-commit-id $latest_commit \\\n --env $(Build.SourceBranchName) \\\n --image-tag $tag_name \\\n --pr $pr_id \\\n --repository $repourl\n```\n\n```\nbedrock deployment create -n $AZURE_STORAGE_ACCOUNT_NAME \\\n -k $AZURE_ACCOUNT_KEY \\\n -t $AZURE_TABLE_NAME \\\n -p $AZURE_TABLE_PARTITION_KEY \\\n --p3 $(Build.BuildId) \\\n --hld-commit-id $commitId \\\n --pr $pr_id \\\n --repository $repourl\n```\n" + }, + "deployment dashboard": { + "command": "dashboard", + "alias": "d", + "description": "Launch the service introspection dashboard", + "options": [ + { + "arg": "-p, --port ", + "description": "Port to launch the dashboard on", + "defaultValue": "4040" + }, + { + "arg": "-r, --remove-all", + "description": "Removes previously launched instances of the dashboard", + "defaultValue": false + } + ], + "markdown": "## Description\n\nThis command launches the Service Introspection Dashboard for your current\nconfiguration. It requires `docker` to be installed on your machine in order to\nwork.\n" + }, + "deployment get": { + "command": "get", + "alias": "g", + "description": "Get the list of deployments and filter with these options: service name, environment, build ID, commit ID, container image tag.", + "options": [ + { + "arg": "-b, --build-id ", + "description": "Filter by the build ID of the source repository", + "defaultValue": "" + }, + { + "arg": "-c, --commit-id ", + "description": "Filter by a commit ID from the source repository", + "defaultValue": "" + }, + { + "arg": "-d, --deployment-id ", + "description": "Filter by the deployment ID of the source repository", + "defaultValue": "" + }, + { + "arg": "-i, --image-tag ", + "description": "Filter by a container image tag", + "defaultValue": "" + }, + { + "arg": "-r, --ring ", + "description": "Filter by ring name", + "defaultValue": "" + }, + { + "arg": "-s, --service ", + "description": "Filter by service name", + "defaultValue": "" + }, + { + "arg": "-t, --top ", + "description": "Return only top N most recent deployments", + "defaultValue": "50" + }, + { + "arg": "-o, --output ", + "description": "Output the information one of the following: normal, wide, JSON", + "defaultValue": "normal" + }, + { + "arg": "-w, --watch", + "description": "Watch the deployments for a live view", + "defaultValue": false + }, + { + "arg": "-h, --hide-separators", + "description": "Display the table without separators between columns", + "defaultValue": false + } + ], + "markdown": "## Description\n\nThis commands retrieves the list of deployments by service name, release\nenvironment, build ID, commit ID, or container image tag.\n" + }, + "deployment onboard": { + "command": "onboard", + "alias": "o", + "description": "Onboard to use the service introspection tool. This will create a storage account if it does not exist in your Azure subscription in the give resource group.", + "options": [ + { + "arg": "-s, --storage-account-name ", + "description": "Azure storage account name", + "inherit": "introspection.azure.account_name", + "required": true + }, + { + "arg": "-t, --storage-table-name ", + "description": "Azure storage table name", + "inherit": "introspection.azure.table_name", + "required": true + }, + { + "arg": "-l, --storage-location ", + "description": "Azure location to create new storage account when it does not exist" + }, + { + "arg": "-r, --storage-resource-group-name ", + "description": "Name of the resource group to create new storage account when it does not exist", + "required": true + }, + { + "arg": "--service-principal-id ", + "description": "Azure service principal id with `contributor` role in Azure Resource Group", + "inherit": "introspection.azure.service_principal_id", + "required": true + }, + { + "arg": "--service-principal-password ", + "description": "The Azure service principal password", + "inherit": "introspection.azure.service_principal_secret", + "required": true + }, + { + "arg": "--tenant-id ", + "description": "The Azure AD tenant id of service principal", + "inherit": "introspection.azure.tenant_id", + "required": true + }, + { + "arg": "--subscription-id ", + "description": "The Azure subscription id", + "inherit": "introspection.azure.subscription_id", + "required": true + } + ], + "markdown": "## Description\n\nPrepare storage for the service introspection tool. This will create a storage\naccount if it does not already exist in your subscription in the given\n`resource-group`. The storage table will also be created in a newly created or\nin an existing storage account if it does not exist already. When the Azure Key\nVault argument is specified, a secret with Azure storage access key will be\ncreated. Otherwise, the storage access key will need to be specified in\nenvironment variables manually.\n\nSee\n[Prerequisites](https://github.com/microsoft/bedrock-cli/blob/master/guides/service-introspection.md#prerequisites)\n" + }, + "deployment validate": { + "command": "validate", + "alias": "v", + "description": "Validate the configuration and storage account are correct.", + "options": [ + { + "arg": "-s, --self-test", + "description": "Run a test for the configured storage account. This will write test data and delete the test data. For more information on the behavior, please check the online documentation.", + "defaultValue": false + } + ], + "markdown": "## Description\n\nThis command validates the\n[requirements](https://github.com/microsoft/bedrock-cli/blob/master/guides/service-introspection.md#requirements)\nand the onboard\n[prerequisites](https://github.com/microsoft/bedrock-cli/blob/master/guides/service-introspection.md#prerequisites)\n\n## Note\n\nThe purpose of `--self-test` option is to make sure that `bedrock` is able to\nwrite data to the provided storage account. Once the test ends, it will remove\nthe test data that was added.\n" + }, + "hld append-variable-group": { + "command": "append-variable-group ", + "alias": "avg", + "description": "Appends the name of an existing variable group to the current manifest-generation.yaml file.", + "markdown": "## Description\n\nAppend a variable group name to the current `manifest-generation.yaml` of an\ninitialized hld repository.\n\n## Example\n\nWhen an HLD repository is first initialized with `bedrock hld init`, the top\nportion of the `manifest-generation.yaml` looks like this:\n\n```yaml\ntrigger:\n branches:\n include:\n - master\nvariables: []\npool:\n vmImage: ubuntu-latest\nsteps:\n.\n.\n.\n```\n\nrunning `bedrock hld append-variable-group my-vg` with a variable group name, in\nthis case `my-vg`, will add it under the `variables` section if it does not\nalready exist:\n\n```yaml\ntrigger:\n branches:\n include:\n - master\nvariables:\n - group: my-variable-group\npool:\n vmImage: ubuntu-latest\nsteps:\n.\n.\n.\n```\n" + }, + "hld init": { + "command": "init", + "alias": "i", + "description": "Initialize High Level Definition repository. Add manifest-generation.yaml file to working directory/repository if it does not already exist.", + "options": [ + { + "arg": "--git-push", + "description": "Bedrock will try to commit and push these changes to a new origin/branch.", + "required": false, + "defaultValue": false + }, + { + "arg": "--default-component-git ", + "description": "The default hld repository's component's git repository url.", + "required": false, + "defaultValue": "https://github.com/microsoft/fabrikate-definitions.git" + }, + { + "arg": "--default-component-name ", + "description": "The default hld repository's component's name.", + "required": false, + "defaultValue": "traefik2" + }, + { + "arg": "--default-component-path ", + "description": "The default hld repository's component's path.", + "required": false, + "defaultValue": "definitions/traefik2" + } + ], + "markdown": "## Description\n\nInitializes the HLD repository by creating the pipeline\n`manifest-generation.yaml` file, and the default `component.yaml` for\n[fabrikate](https://github.com/microsoft/fabrikate) to consume, if each does not\nalready exist.\n\nThe created `component.yaml` will be populated with a traefik2 definition by\ndefault:\n\n```\nname: default-component\nsubcomponents:\n - name: traefik2\n method: git\n source: 'https://github.com/microsoft/fabrikate-definitions.git'\n path: definitions/traefik2\n```\n\nHowever, you can set a another fabrikate definition to be added instead via the\n`--default-component-*` flags.\n" + }, + "hld install-manifest-pipeline": { + "command": "install-manifest-pipeline", + "alias": "p", + "description": "Install the manifest generation pipeline to your Azure DevOps instance. Default values are set in bedrock-config.yaml and can be loaded via bedrock init or overriden via option flags.", + "options": [ + { + "arg": "-n, --pipeline-name ", + "description": "Name of the pipeline to be created", + "defaultValue": "" + }, + { + "arg": "-a, --personal-access-token ", + "description": "Personal Access Token", + "defaultValue": "", + "inherit": "azure_devops.access_token", + "required": true + }, + { + "arg": "-o, --org-name ", + "description": "Organization Name for Azure DevOps", + "defaultValue": "", + "inherit": "azure_devops.org", + "required": true + }, + { + "arg": "-u, --hld-url ", + "description": "HLD Repository URL", + "defaultValue": "", + "inherit": "azure_devops.hld_repository", + "required": true + }, + { + "arg": "-m, --manifest-url ", + "description": "Manifest Repository URL", + "defaultValue": "", + "inherit": "azure_devops.manifest_repository", + "required": true + }, + { + "arg": "-d, --devops-project ", + "description": "Azure DevOps Project", + "defaultValue": "", + "inherit": "azure_devops.project", + "required": true + }, + { + "arg": "-b, --build-script-url ", + "description": "Build Script URL. By default it is 'https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh'.", + "defaultValue": "https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh" + }, + { + "arg": "--yaml-file-branch ", + "description": "The git branch where the pipeline definition yaml file is located.", + "required": false, + "defaultValue": "master" + } + ], + "markdown": "## Description\n\nAfter merging the azure-pipelines yaml file generated by the init step above\ninto the `master` branch, run the following command to install the HLD to\nManifest pipeline. This pipeline will be triggered on commits to master and\ninvoke \"manifest generation\"\n[(via fabrikate)](https://github.com/microsoft/fabrikate), rendering helm charts\nand configuration into Kubernetes yaml.\n" + }, + "hld reconcile": { + "command": "reconcile ", + "alias": "r", + "description": "Reconcile a HLD with the services tracked in bedrock.yaml.", + "options": [], + "markdown": "## Description\n\nThe reconcile feature scaffolds a HLD with the services in the `bedrock.yaml`\nfile at the root level of the application repository. Recall that in a\nmono-repo, `bedrock service create` will add an entry into the `bedrock.yaml`\ncorresponding to all tracked services. When the service has been merged into\n`master` of the application repository, a pipeline (see `hld-lifecycle.yaml`,\ncreated by `bedrock project init`) runs `bedrock hld reconcile` to add any _new_\nservices tracked in `bedrock.yaml` to the HLD.\n\nAs of version v0.6.0 and the addition of `bedrock ring` commands,\n`bedrock hld reconcile` will add rings to the corresponding application\nrepository directory in the HLD repository. Additionally, as of v0.6.1, the\nreconcile command will also remove rings from the corresponding application\nrepository directory in the HLD repository.\n\nThis command is _intended_ to be run in a pipeline (see the generated\n`hld-lifecycle.yaml` created from `bedrock project init`), but can be run by the\nuser in a CLI for verification.\n\nFor a `bedrock.yaml` file that contained within the\n`https://dev.azure.com/foo/bar/_git` repository, that has the following\nstructure:\n\n```yaml\nrings:\n master:\n isDefault: true\nservices:\n - path: ./services/fabrikam\n displayName: \"fabrikam\"\n k8sBackendPort: 8001\n k8sBackend: \"fabrikam-k8s-svc\"\n pathPrefix: \"fabrikam-service\"\n pathPrefixMajorVersion: \"v1\"\n helm:\n chart:\n branch: master\n git: \"https://dev.azure.com/foo/bar/_git\"\n path: stable/fabrikam-application\n middlewares:\n - \"\"\nvariableGroups:\n - fabrikam-vg\n```\n\nA HLD is produced that resembles the following:\n\n```\n├── component.yaml\n└── fabrikam\n ├── access.yaml\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── fabrikam\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── master\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── static\n ├── ingress-route.yaml\n └── middlewares.yaml\n```\n\nWith the `ingress-route.yaml` representing a\n[Traefik2 Ingress Route](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-ingressroute)\nbacked by a Kubernetes Service, and the `middlewares.yaml` representing a\n[Traefik2 Middleware](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-middleware)\nthat strips path prefixes.\n\nFor the `bedrock.yaml` shown above, the `ingress-route.yaml` produced is:\n\n```yaml\napiVersion: traefik.containo.us/v1alpha1\nkind: IngressRoute\nmetadata:\n name: fabrikam-master\nspec:\n routes:\n - kind: Rule\n match: \"PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)\"\n middlewares:\n - name: fabrikam-master\n services:\n - name: fabrikam-k8s-svc-master\n port: 8001\n```\n\nAnd the `middlewares.yaml` produced is:\n\n```yaml\napiVersion: traefik.containo.us/v1alpha1\nkind: Middleware\nmetadata:\n name: fabrikam-master\nspec:\n stripPrefix:\n forceSlash: false\n prefixes:\n - /v1/fabrikam-service\n```\n\nNote that there exists a third generated file, `access.yaml`. For the above\n`bedrock.yaml`, `access.yaml` contains a single line, which represents a\n[Fabrikate access.yaml definition](https://github.com/microsoft/fabrikate/blob/master/docs/auth.md#accessyaml),\nallowing Fabrikate to pull Helm Charts that are contained within the same\napplication repository:\n\n```yaml\n\"https://dev.azure.com/foo/bar/_git\": ACCESS_TOKEN_SECRET\n```\n\nWhen `fabrikate` is invoked in the HLD to Manifest pipeline, it will utilize the\n`ACCESS_TOKEN_SECRET` environment variable injected at pipeline run-time as a\nPersonal Access Token to pull any referenced helm charts from the application\nrepository.\n" + }, + "infra generate": { + "command": "generate", + "alias": "g", + "description": "Generate scaffold for terraform cluster deployment.", + "options": [ + { + "arg": "-p, --project ", + "description": "Location of the definition.yaml file that will be generated", + "required": false + }, + { + "arg": "-O, --output ", + "description": "Location of the generated directory that will be generated", + "required": false + } + ], + "markdown": "## Description\n\nCreates a \"generated\" deployment folder with the completed Terraform files based\non definitions provided from a scaffolded project.\n\nIt will do the following:\n\n- Check if a provided project folder contains a `definition.yaml`\n- Verify the configuration of parent and leaf definitions.\n- Check if the terraform template `source` provided has a valid remote\n repository.\n- Clone and cache the master version of the provided `source` repository locally\n in `~/.bedrock/templates`\n > Cached repositories will be converted through regex for bedrock to hash.\n > (i.e. a `source` template of `https://github.com/microsoft/bedrock` will be\n > cached into a folder called `_microsoft_bedrock_git`)\n- Create a \"generated\" directory for Terrform deployments (alongside the\n scaffolded project directory)\n- Copy the appropriate Terraform templates to the \"generated\" directory\n- Check the Terraform module source values and convert them into a generic git\n url based on the `definition.yaml`'s `source`, `version` and `template` path.\n- Create a `bedrock.tfvars` in the generated directory based on the variables\n provided in `definition.yaml` files of the parent and leaf directories.\n\n## Example\n\nAssuming you have the following setup:\n\n```\nfabrikam\n |- definition.yaml\n |- east/\n |- definition.yaml\n |- central/\n |- definition.yaml\n```\n\nWhen executing the following command **in the `fabrikam` directory**:\n\n```\nbedrock infra generate --project east\n```\n\nThe following hiearchy of directories will be generated _alongside_ the targeted\ndirectory. In addition, the appropriate versioned Terraform templates will be\ncopied over to the leaf directory with a `bedrock.tfvars`, which contains the\nvariables accumulated from parent **and** leaf definition.yaml files, where if a\nvariable exists in both parent and leaf definition, the **leaf definitions will\ntake precedence**.\n\n```\nfabrikam\n |- definition.yaml\n |- east/\n |- definition.yaml\n |- central/\n |- definition.yaml\nfabrikam-generated\n |- east\n |- main.tf\n |- variables.tf\n |- bedrock.tfvars (concatenation of variables from fabrikam/definition.yaml (parent) and fabrikam/east/definition.yaml (leaf))\n```\n\nYou can also have a \"single-tree\" generation by executing\n`bedrock infra generate` inside a directory without specifying a project folder.\nFor example, if you had the following tree structure:\n\n```\nfabrikam\n |- definition.yaml\n```\n\nand executed `bedrock infra generate` inside the `fabrikam` directory, this will\ngenerate the following:\n\n```\nfabrikam-generated\n |- main.tf\n |- variables.tf\n |- bedrock.tfvars\n```\n" + }, + "infra scaffold": { + "command": "scaffold", + "alias": "s", + "description": "Create initial scaffolding for cluster deployment.", + "options": [ + { + "arg": "-n, --name ", + "description": "Cluster name for scaffolding", + "required": true, + "defaultValue": "" + }, + { + "arg": "-s, --source ", + "description": "Source URL for the repository containing the terraform deployment", + "required": false, + "defaultValue": "" + }, + { + "arg": "-r --version ", + "description": "Version or tag for the repository so a fixed version is referenced", + "required": true, + "defaultValue": "" + }, + { + "arg": "-t, --template ", + "description": "Location of the variables.tf for the terraform deployment", + "required": true, + "defaultValue": "" + } + ], + "markdown": "## Description\n\nBuilds a scaffold of an infrastructure deployment project containing a\n`definition.yaml` that enables a user to version, modify and organize terraform\ndeployments.\n\nIn detail, it will do the following:\n\n- Create a new folder with the `` you provided.\n- Clone and cache the source repo to `~.bedrock/templates`.\n- Provide an infrastructure deployment scaffold based on a `` git url\n for a repo that holds terraform template, a `` respective to the\n repository tag or branch to pull from, and a `