Skip to content

Commit

Permalink
removed cf-oss commands (#317)
Browse files Browse the repository at this point in the history
* removed cf-oss commands

* added gdeploy login
  • Loading branch information
shwethaumashanker committed Feb 2, 2024
1 parent 570b859 commit 0a4e8b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 166 deletions.
150 changes: 0 additions & 150 deletions docs/glide/providers/02-setup.mdx

This file was deleted.

30 changes: 15 additions & 15 deletions docs/glide/providers/03-deploying.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -40,10 +40,10 @@ The command performs the following actions:
When running this command, you should see an output similar to the below:

<details>
<summary>Example output for the `cf oss provider deploy` commnad</summary>
<summary>Example output for the `gdeploy provider-v2 deploy` commnad</summary>
<div>
<CodeBlock className="language-bash">
{`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
Expand Down Expand Up @@ -85,15 +85,15 @@ 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 <handler-id> --target-group-id <target-group-id> --delete-cloudformation-stack
gdeploy provider-v2 destroy --handler-id <handler-id> --target-group-id <target-group-id> --delete-cloudformation-stack
```

## Listing existing Providers

List all the existing providers in Provider Registry by running:

```
cf oss provider list
gdeploy provider-v2 list
```

You can quickly view a Provider's [schema](./concepts#schema) by running:
Expand All @@ -104,14 +104,14 @@ curl https://api.registry.commonfate.io/v1alpha1/providers/common-fate/aws/v0.2.

## Step-by-step

Running `cf oss provider deploy` walks through the deployment process interactively. If you prefer, you can run commands individually to deploy a Provider.
Running `gdeploy provider-v2 deploy` walks through the deployment process interactively. If you prefer, you can run commands individually to deploy a Provider.

### 1. Copying assets

To copy the Provider assets to your bootstrap bucket, run the following command:

```
cf oss provider bootstrap --id <provider-id> --bootstrap-bucket=DEPLOYMENT_BUCKET
gdeploy provider-v2 bootstrap --id <provider-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:
Expand All @@ -127,37 +127,37 @@ 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 <enter_a_unique_targetgroup_identifier> --schema-from <provider-id>
gdeploy targetgroup create --id <enter_a_unique_targetgroup_identifier> --schema-from <provider-id>
```

### 3. Creating the Handler

Create a new Handler for your Provider by running:

```
cf oss handler register --id <enter_a_unique_handler_identifier> --aws-region <your_aws_region> --aws-account <your_aws_accound_id>
gdeploy handler register --id <enter_a_unique_handler_identifier> --aws-region <your_aws_region> --aws-account <your_aws_accound_id>
```

### 4. Target group linking

Link your Target Group with a Handler by running:

```
cf oss targetgroup link --target-group <target_group_id> --handler <handler_id> --kind <kind_name>
gdeploy targetgroup link --target-group <target_group_id> --handler <handler_id> --kind <kind_name>
```

### 5. Deployment

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 <provider_id> --handler-id <handler_id> --region <aws_region>
gdeploy cloudformation generate cloudformation-create --provider-id <provider_id> --handler-id <handler_id> --region <aws_region>
```

Both will generate the `aws cloudformation create-stack` command.
Expand All @@ -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 <handler_id> --aws-region <region> --runtime aws-lambda
gdeploy handler validate --id <handler_id> --aws-region <region> --runtime aws-lambda
```
2 changes: 1 addition & 1 deletion docs/glide/providers/04-concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 0a4e8b8

Please sign in to comment.