diff --git a/docs/glide/providers/02-setup.mdx b/docs/glide/providers/02-setup.mdx deleted file mode 100644 index 6a8b8f8..0000000 --- a/docs/glide/providers/02-setup.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -slug: setup ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# PDK Provider Setup - -In Common Fate v0.15+, Providers built with the [Provider Development Kit (PDK)](https://github.com/common-fate/commonfate-provider-core) are deployed separately to a Common Fate deployment. - -## Installing `cf` - -To deploy a PDK Provider, start by installing `cf`. - -`cf` is a command-line interface (CLI) tool for performing authenticated actions against a Glide deployment. It provides commands for creating and updating Target Groups, Handlers, Routes and also for operational tasks like viewing Handler logs. - -:::info -`cf` version above 0.11.0 has all PDK related commands inside the `cf oss` subcommand. -::: - -To install `cf`, follow the instructions below based on your computer's operating system: - - - - -[Homebrew](https://brew.sh/) is an open source package manager for MacOS. We publish a Homebrew formula for `cf`. To install `cf` with Homebrew, run the commands below in your terminal. - -``` -brew install common-fate/tap/cf -``` - - - - - -Select the steps which match your system architecture. You can find your architecture by running `uname -m` from a terminal window. - - - - - -``` -curl -OL releases.commonfate.io/cf/v0.11.0/cf_0.11.0_darwin_x86_64.tar.gz -sudo tar -zxvf ./cf_0.11.0_darwin_x86_64.tar.gz -C /usr/local/bin/ -``` - - - - -``` -curl -OL releases.commonfate.io/cf/v0.11.0/cf_0.11.0_darwin_arm64.tar.gz -sudo tar -zxvf ./cf_0.11.0_darwin_arm64.tar.gz -C /usr/local/bin/ -``` - - - - - - - -Select the steps which match your system architecture. You can find your architecture by running `uname -m` from a terminal window. - - - - - -``` -curl -OL releases.commonfate.io/cf/v0.11.0/cf_0.11.0_linux_x86_64.tar.gz -sudo tar -zxvf ./cf_0.11.0_linux_x86_64.tar.gz -C /usr/local/bin/ -``` - - - - -``` -curl -OL releases.commonfate.io/cf/v0.11.0/cf_0.11.0_linux_arm64.tar.gz -sudo tar -zxvf ./cf_0.11.0_linux_arm64.tar.gz -C /usr/local/bin/ -``` - - - - -``` -curl -OL releases.commonfate.io/cf/v0.11.0/cf_0.11.0_linux_i386.tar.gz -sudo tar -zxvf ./cf_0.11.0_linux_i386.tar.gz -C /usr/local/bin/ -``` - - - - - - - - -First, download the zip archive of `cf` which matches your system's architecture. You can find your architecture by viewing your system properties in the Control Panel. - -[cf for Windows x86_64](https://releases.commonfate.io/cf/v0.11.0/cf_0.11.0_windows_x86_64.zip) - -[cf for Windows arm64](https://releases.commonfate.io/cf/v0.11.0/cf_0.11.0_windows_arm64.zip) - -[cf for Windows i386](https://releases.commonfate.io/cf/v0.11.0/cf_0.11.0_windows_i386.zip) - -After downloading cf, unzip the package. - -You'll need to move the binary to a folder which is accessible on your `PATH`. [This StackOverflow link](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows) has instructions on how to do this. - - - - - -## Verify the installation - -You can verify the integrity and authenticity of the `cf` binary you have downloaded by running through the [verification process here](/granted/security#release-verification). You will need to replace references to `granted` in URLs with `cf`. - -Check that `cf` has been installed correctly by running the following command: - -``` -cf -v -``` - -You should see a version output similar to the below: - -``` -cf version 0.11.0 -``` diff --git a/docs/glide/providers/03-deploying.mdx b/docs/glide/providers/03-deploying.mdx index 1f37ab5..436cc9a 100644 --- a/docs/glide/providers/03-deploying.mdx +++ b/docs/glide/providers/03-deploying.mdx @@ -7,7 +7,7 @@ import CodeBlock from "@theme/CodeBlock"; # Deploying PDK Providers :::info -To deploy a PDK Provider, you'll need to have [installed the `cf` CLI](./setup), and have valid AWS credentials in your terminal environment. +To deploy a PDK Provider, you'll need to have [installed the `gdeploy` CLI](../deploying-glide/02-setup), and have valid AWS credentials in your terminal environment. ::: PDK Providers are packaged and deployed as AWS CloudFormation templates. These templates contain: @@ -20,10 +20,10 @@ PDK Providers are packaged and deployed as AWS CloudFormation templates. These t To view the full process on deploying a PDK provider, see the [section below](#step-by-step). -To quickly and interactively deploy a new PDK Provider, run the following command: +Login into your Glide deployment by running `gdeploy login`. To quickly and interactively deploy a new PDK Provider, run the following command: ``` -cf oss provider deploy +gdeploy provider-v2 deploy ``` This command will walk you through the deployment and configuration process for the Handler, and will provision a CloudFormation template which will create AWS resources. The command will prompt you to [bootstrap your AWS environment](./concepts#bootstrapping) if it has not been bootstrapped already. @@ -40,10 +40,10 @@ The command performs the following actions: When running this command, you should see an output similar to the below:
- Example output for the `cf oss provider deploy` commnad + Example output for the `gdeploy provider-v2 deploy` commnad
- {`❯ cf oss provider deploy --common-fate-aws-account 123456789012 + {`❯ gdeploy provider-v2 deploy --common-fate-aws-account 123456789012 ? The Provider to deploy common-fate/cloudwatch-log-groups ? The version of the Provider to deploy v0.2.1 [i] This Provider will grant access to LogGroup targets @@ -85,7 +85,7 @@ When running this command, you should see an output similar to the below: To uninstall the provider and its associated items, run the following command: ``` -cf oss provider destroy --handler-id --target-group-id --delete-cloudformation-stack +gdeploy provider-v2 destroy --handler-id --target-group-id --delete-cloudformation-stack ``` ## Listing existing Providers @@ -93,7 +93,7 @@ cf oss provider destroy --handler-id --target-group-id --bootstrap-bucket=DEPLOYMENT_BUCKET +gdeploy provider-v2 bootstrap --id --bootstrap-bucket=DEPLOYMENT_BUCKET ``` Here, the `provider-id` is the complete provider information including the publisher and version information. The format should take the following shape: @@ -127,7 +127,7 @@ For example, `common-fate/aws@v.0.2.0` means publisher is `common-fate`, name is Create a new Target Group for your Provider by running: ``` -cf oss targetgroup create --id --schema-from +gdeploy targetgroup create --id --schema-from ``` ### 3. Creating the Handler @@ -135,7 +135,7 @@ cf oss targetgroup create --id --schema- Create a new Handler for your Provider by running: ``` -cf oss handler register --id --aws-region --aws-account +gdeploy handler register --id --aws-region --aws-account ``` ### 4. Target group linking @@ -143,7 +143,7 @@ cf oss handler register --id --aws-region --handler --kind +gdeploy targetgroup link --target-group --handler --kind ``` ### 5. Deployment @@ -151,13 +151,13 @@ cf oss targetgroup link --target-group --handler You are now ready to deploy the CloudFormation stack for your Handler. To interactively enter all the required CloudFormation parameters, run the following command: ``` -cf oss provider generate cloudformation-create +gdeploy provider-v2 generate cloudformation-create ``` Alternatively, you can prefill these fields in the following command: ``` -cf oss cloudformation generate cloudformation-create --provider-id --handler-id --region +gdeploy cloudformation generate cloudformation-create --provider-id --handler-id --region ``` Both will generate the `aws cloudformation create-stack` command. @@ -167,5 +167,5 @@ Both will generate the `aws cloudformation create-stack` command. To check the status of your Handler, run the following command: ``` -cf oss handler validate --id --aws-region --runtime aws-lambda +gdeploy handler validate --id --aws-region --runtime aws-lambda ``` diff --git a/docs/glide/providers/04-concepts.mdx b/docs/glide/providers/04-concepts.mdx index ad84213..f0361c9 100644 --- a/docs/glide/providers/04-concepts.mdx +++ b/docs/glide/providers/04-concepts.mdx @@ -262,4 +262,4 @@ If a Handler is incompatible with its Target Group it will be marked _invalid_. In order to deploy PDK Providers into a particular AWS account and region, you will first need to bootstrap the region. Bootstrapping is the process of deploying a CloudFormation template, which provisions an Amazon S3 bucket to store PDK Provider files. Once deployed, this CloudFormation template will appear in the AWS CloudFormation console, like any other CloudFormation stack. -When a PDK Provider is deployed, the CloudFormation template and Lambda function for the Provider are first copied into this bucket by the `cf` CLI, prior to resources being provisioned. +When a PDK Provider is deployed, the CloudFormation template and Lambda function for the Provider are first copied into this bucket by the `gdeploy` CLI, prior to resources being provisioned.