Skip to content

Commit

Permalink
release v3.0.1 (#555)
Browse files Browse the repository at this point in the history
* release v3.0.1

* fix cli packaging
  • Loading branch information
CrypticCabub authored Jun 27, 2024
1 parent 675da38 commit 98ddb98
Show file tree
Hide file tree
Showing 71 changed files with 2,532 additions and 4,870 deletions.
2 changes: 1 addition & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { PythonProject } from "projen/lib/python";

function main() {
new InstanceScheduler({ version: "3.0.0", cdkVersion: "2.130.0" }).synth();
new InstanceScheduler({ version: "3.0.1", cdkVersion: "2.130.0" }).synth();
}

interface InstanceSchedulerProps {
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [3.0.1] -- 2024-06-27

### Changed
- Scheduler CLI installation process now uses a version-agnostic installation process
- Lambda memory size for orchestration and asg scheduling lambdas is now configurable

### Fixed
- Fixed an error that would cause maintenance window scheduling to fail when the SSM api returned expired maintenance windows without a `NextExecutionTime` property
- Fixed KMS encryption key being deleted when DynamoDB tables were configured to be retained on stack delete
- Fixed an error that caused ASG schedule updates to fail when more than 5 schedules were updated at once
- Fixed a possible name conflict with Operational Insights Dashboard when deploying multiple copies of Instance Scheduler to the same account

### Security

- Upgrade braces to mitigate CVE-2024-4068
- Upgrade urllib3 to mitigate CVE-2024-37891

### Removed
- Removed e2e testing pipeline from public assets

## [3.0.0] - 2024-06-05

### Added
Expand Down
85 changes: 0 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,91 +174,6 @@ npm ci
npm run test
```

### Automated Testing Pipeline

Instance Scheduler on AWS includes an optional automated testing pipeline that can be deployed to automatically test any
changes you develop for the solution on your own development fork. Once setup, this pipeline will automatically
download, build, and test any changes that you push to a specified branch on your development fork.

The pipeline can be configured to automatically watch and pull from repos hosted on either [AWS
CodeCommit](https://aws.amazon.com/codecommit/) or GitHub.

#### Prerequisites

- AWS account
- repository fork
- AWS CLI v2
- Node.js 18
- docker

#### Step 0 (If Using GitHub) - Connect CodeStar to Your GitHub Account

For the pipeline to be able to test your changes, you must provide permission to access your development repo.

https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html

_Note: CodeStar only needs access to your Instance Scheduler development fork, it does not need access to all
repositories._

Once the connection has been set up, make sure you save the connection ARN for the next step.

#### Step 1 - Prepare Your Environment

In your local environment, first install all necessary dependencies and bootstrap your account for CDK deployment.

```
npm ci
npx cdk bootstrap
```

#### Step 2 - Deploy the testing pipeline bootstrap stack

```
npx cdk deploy instance-scheduler-on-aws-testing-pipeline-bootstrap
```

Once the stack is deployed, Go to CloudFormation and [update the bootstrap
stack](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-direct.html) with the
configuration your pipeline should use

At a minimum you must provide:

- repoName -- the name of your forked repo (either in CodeCommit or GitHub)
- repoBranch -- The branch in your fork that should be watched and pulled from for testing

if sourcing from GitHub instead of CodeCommit, you must also provide:

- codestarArn -- the CodeStar connection ARN from the previous step
- repoArn -- the GitHub owner of your fork

For example, if your GitHub username is "myUser" and you would like to test changes pushed to the develop branch of your
fork the values you would need to set would be:

```
arn = {arn from Step 0}
owner = myUser
repo = instance-scheduler-on-aws
branch = develop
```

#### Step 3 - Deploy the Testing Pipeline

```
# source from CodeCommit
npx cdk deploy instance-scheduler-on-aws-testing-pipeline --context instance-scheduler-on-aws-pipeline-source=codecommit
# source from GitHub
npx cdk deploy instance-scheduler-on-aws-testing-pipeline --context instance-scheduler-on-aws-pipeline-source=codestar
```

_note: If you do not provide a context, the pipeline will default to using codecommit._

This will deploy the automated testing pipeline into your AWS account which will then begin running tests against your
development fork automatically.

To view the results. Go to [CodePipeline](https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines) and
click on the pipeline that begins with instance-scheduler-on-aws-testing-pipeline.

## Modifying the Solution

### projen
Expand Down
6 changes: 5 additions & 1 deletion deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ main() {
header "[Scheduler-CLI] Package the Scheduler cli"
pushd "$cli_source_dir"
python -m poetry build
cp ./dist/* "$global_dist_dir"
cp -r ./dist "$build_dir/instance_scheduler_cli"
popd

pushd "$build_dir"
zip -r "$global_dist_dir/instance_scheduler_cli.zip" "instance_scheduler_cli"
popd
}

Expand Down
23 changes: 14 additions & 9 deletions deployment/cdk-solution-helper/package-lock.json

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

Loading

0 comments on commit 98ddb98

Please sign in to comment.