Skip to content

Commit

Permalink
#23: Migrate to AWS CDK 2 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada authored Apr 18, 2023
1 parent 280bc96 commit 357f091
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 91 deletions.
3 changes: 0 additions & 3 deletions .project-keeper.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
sources:
- type: maven
path: pom.xml
modules:
linkReplacements:
excludes:
- "E-PK-CORE-17: Missing required file: 'src/test/resources/logging.properties'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/release_droid_prepare_original_checksum.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/release_droid_print_quick_checksum.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/release_droid_upload_github_release_assets.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/ci-build.yml'"
- regex: "E-PK-CORE-53: The dependencies.md file has outdated content.*"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Acloudwatch-dashboard-examples&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=com.exasol%3Acloudwatch-dashboard-examples)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Acloudwatch-dashboard-examples&metric=ncloc)](https://sonarcloud.io/dashboard?id=com.exasol%3Acloudwatch-dashboard-examples)

This project contains an [AWS CDK](https://aws.amazon.com/cdk/) template for an example CouldWatch dashboard that visualizes the metrics reported by the [Exasol – Cloud Watch adapter](https://github.com/exasol/cloudwatch-adapter).
This project contains an [AWS CDK](https://aws.amazon.com/cdk/) template for an example CouldWatch dashboard that visualizes the metrics reported by the [Exasol – CloudWatch adapter](https://github.com/exasol/cloudwatch-adapter).

This dashboard should get you started with Exasol and CloudWatch integration.

Expand All @@ -24,9 +24,9 @@ This dashboard should get you started with Exasol and CloudWatch integration.

If you just want to use the example dashboard, you can simply download the latest AWS CloudFormation template in the [releases section](https://github.com/exasol/cloudwatch-dashboard-examples/releases/) and run it in cloudformation.

There you will have to set a Deployment Name. This is the name of your exasol installation you entered during the setup of the cloudwatch-adapter.
There you will have to set a Deployment Name. This is the name of your Exasol installation you entered during the setup of the cloudwatch-adapter.

Now you can view and edit your cloudwatch dashboard in the AWS Console. You can also deploy this template multiple times and build different dashboards for different use cases.
Now you can view and edit your CloudWatch dashboard in the AWS Console. You can also deploy this template multiple times and build different dashboards for different use cases.

## Advanced Usage

Expand All @@ -39,15 +39,15 @@ You can use this as a starting point for your own dashboards. In contrast to cha
* [Install the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)
* Deploy your dashboard using
```shell
cdk deploy --parameters deploymentName=<YOUR DEPLOYMENT NAME> --parameters clusterName=MAIN
cdk deploy --parameters deploymentName=<YOUR DEPLOYMENT NAME> --parameters clusterName=MAIN
```
(Don't forget to replace `<YOUR DEPLOYMENT NAME>` with the value you configured during the CloudWatch-adapter setup)
## Injecting Metrics Values for Testing
To test your dashboard and alarms you can manually inject metrics values by executing commands like these:
```sh
```shell
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Seconds --value 30 --metric-name "BACKUP_DURATION"
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Count --value 1 --metric-name "EVENT_BACKUP_START"
aws cloudwatch put-metric-data --namespace "Exasol" --dimensions "Cluster Name=MAIN,Deployment=<YOUR DEPLOYMENT NAME>" --unit Count --value 1 --metric-name "EVENT_BACKUP_END"
Expand Down
12 changes: 2 additions & 10 deletions cdk.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"app": "mvn -e -q compile exec:java",
"context": {
"@aws-cdk/core:enableStackNameDuplicates": "true",
"aws-cdk:enableDiffNoFail": "true",
"@aws-cdk/core:stackRelativeExports": "true",
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true,
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true,
"@aws-cdk/aws-kms:defaultKeyPolicies": true,
"@aws-cdk/aws-s3:grantWriteWithoutAcl": true
}
}
"context": {}
}
106 changes: 55 additions & 51 deletions dependencies.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions doc/changes/changes_1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Cloudwatch Dashboard Examples 1.0.0, released 2023-04-18

Code name: Migrate to AWS CDK v2

## Summary

This release migrates the AWS CDK v2 as support for v1 will end on June 1, 2023. If you customized your dashboard you might need to adapt to the new version. See AWS' [migration guide](https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html) for details.

## Features

* #23: Migrate to AWS CDK v2

## Refactoring

* #19: Removed workaround for project-keeper bug

## Dependency Updates

### Compile Dependency Updates

* Added `software.amazon.awscdk:aws-cdk-lib:2.75.0`
* Removed `software.amazon.awscdk:cloudwatch:1.197.0`
* Removed `software.amazon.awscdk:core:1.197.0`
* Added `software.constructs:constructs:10.1.314`

### Plugin Dependency Updates

* Updated `com.exasol:error-code-crawler-maven-plugin:1.2.2` to `1.2.3`
* Updated `com.exasol:project-keeper-maven-plugin:2.9.4` to `2.9.7`
* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.10.1` to `3.11.0`
* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.2.1` to `3.3.0`
* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M8` to `3.0.0`
* Added `org.basepom.maven:duplicate-finder-maven-plugin:1.5.1`
* Updated `org.codehaus.mojo:flatten-maven-plugin:1.3.0` to `1.4.1`
* Updated `org.codehaus.mojo:versions-maven-plugin:2.14.2` to `2.15.0`
* Updated `org.jacoco:jacoco-maven-plugin:0.8.8` to `0.8.9`
44 changes: 35 additions & 9 deletions pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 357f091

Please sign in to comment.