Skip to content

Commit

Permalink
Release/v2.6.1 (#55)
Browse files Browse the repository at this point in the history
* Device access links (#18)

* Update package.json

* Update cdk-pipeline-stack.ts

* Bump pillow from 10.0.1 to 10.2.0 in /lib/lambda_layers/print_functions (#23)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Set the default sort order on the events table to event date, most recent first (#24)

* Model table sorting (#25)

* Set the default sort order on the events table to event date, most recent first

* Set the default sorting order to model upload date

* CarUploadStepFunction waits on InProgress OR Pending (#28)

* InProgress OR Pending

* Delete .gitlab-ci.yml

* Pipeline Approval Stage (#29)

* Initial "deploy from GitHub" pipeline

* branchName -> labelName

* updated readme
removed commented code
updated a few more 'branch' to 'label'

* fixed CDK command

* added source_repo

* typo

* added source repo to make file

* Fixed H3 header

* added '-c source_branch=${props.sourceBranchName}'

* added repo swap instructions

* InProgress OR Pending

* Removed GitLab CI config

* ManualApprovalStep

* Added Pipeline SNS notifications

* Activation tweaks (#32)

* Update the OpenVINO cert

* Setting the hashbang

* Update the OpenVINO cert (#30)

* Device ping time (#33)

* Prettier
* Fix for device last ping data time being incorrect

* RPi DREM activation (#34)

* Updated (untested) DREM activation script for DR AWS Car and DR RPi version

* Updated to mostly work and also change the python path depending on the version of Ubuntu installed

* Removed SSM code / id as separate boxes as they are never used and moved SSM activation details from the collapsed container

* Setting the backup path using the logged in user and not sudo home dir (/root)

* Output tweaks and changing the SSM agent based on the RPi type

* Message formatting tweaks

* Formatting tweaks

* Bump pillow from 10.2.0 to 10.3.0 in /lib/lambda_layers/print_functions (#45)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Race management view can now be filtered by track (#42)

* Tweak fonts (#46)

* Update build-size (#49)

* Fix RUM Access Denied / Region Hard-Coding (#48)

* Fix RUM errors

* Additional hard-coded region

* Remove hard-coded value

* Change reference

* Clean configuration

* Event Administration: Prevent eventDate from being undefined (#50)

* Avoid null value of DatePicker

* Force empty string

* Linking in the timer documentation and adding warnings the Pi operating system version (#51)

* Only show "enabled" users (#52)

* Filter='status = "Enabled"' (#53)

* Only show "enabled" users

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: David Smith <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lars Lorentz Ludvigsen <[email protected]>
  • Loading branch information
4 people committed May 16, 2024
1 parent b9e262f commit be61395
Show file tree
Hide file tree
Showing 31 changed files with 535 additions and 503 deletions.
52 changes: 0 additions & 52 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ DREM offers event organizers tools for managing users, models, cars and fleets,

**Note:** DREM is designed for use with AWS DeepRacer cars running firmware version 20.04 and above. Earlier firmware versions are not supported. If you need to update your device, see [Update and restore your AWS DeepRacer device](https://docs.aws.amazon.com/deepracer/"latest/developerguide/deepracer-ubuntu-update.html)

## Automated timer

Instructions for the automated timer can be found [here](./leaderboard-timer/README.md)

Please note that the most recent release of Raspberry Pi OS "Bookworm" is currently not supported, please use "Bullseye" (Legacy) for the RPi operating system.

## Deployment

### Deployment prerequisites
Expand Down
6 changes: 5 additions & 1 deletion leaderboard-timer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

The DeepRacer timer is an automated timing solution which is used together with the leaderboard & timekeeper system used during DeepRacer events.

### Important

Please note that the most recent release of Raspberry Pi OS "Bookworm" is currently not supported due to changes in the way the GPIO is handled, please use "Bullseye" (Legacy) for the RPi operating system.

## Hardware Requirements

**NOTE:** At this time the Raspberry Pi 5 is not supported for automated timing due to changes in the way the GPIO is connected. Please review this [issue](https://github.com/aws-solutions-library-samples/guidance-for-aws-deepracer-event-management/issues/14) for updates.
**NOTE:** At this time the Raspberry Pi 5 is not supported for automated timing due to changes in the way the GPIO is connected. Please review this [issue](https://github.com/aws-solutions-library-samples/guidance-for-aws-deepracer-event-management/issues/14) for updates.

### Required

Expand Down
22 changes: 21 additions & 1 deletion lib/cdk-pipeline-stack.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as cdk from 'aws-cdk-lib';
import { Environment, Stage } from 'aws-cdk-lib';
import * as codebuild from 'aws-cdk-lib/aws-codebuild';
import * as notifications from 'aws-cdk-lib/aws-codestarnotifications';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as sns from 'aws-cdk-lib/aws-sns';
import * as subs from 'aws-cdk-lib/aws-sns-subscriptions';
import * as pipelines from 'aws-cdk-lib/pipelines';
import { Construct } from 'constructs';
import { BaseStack } from './base-stack';
Expand Down Expand Up @@ -82,6 +85,7 @@ export class CdkPipelineStack extends cdk.Stack {
synth: new pipelines.CodeBuildStep('SynthAndDeployBackend', {
buildEnvironment: {
buildImage: codebuild.LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0,
computeType: codebuild.ComputeType.LARGE,
},
input: pipelines.CodePipelineSource.gitHub(props.sourceRepo, props.sourceBranchName, {
authentication: cdk.SecretValue.secretsManager('drem/github-token'),
Expand Down Expand Up @@ -125,7 +129,9 @@ export class CdkPipelineStack extends cdk.Stack {

const infrastructure = new InfrastructurePipelineStage(this, `drem-backend-${props.labelName}`, { ...props });

const infrastructure_stage = pipeline.addStage(infrastructure);
const infrastructure_stage = pipeline.addStage(infrastructure, {
pre: [new pipelines.ManualApprovalStep('DeployDREM')],
});

const rolePolicyStatementsForWebsiteDeployStages = [
new iam.PolicyStatement({
Expand Down Expand Up @@ -284,5 +290,19 @@ export class CdkPipelineStack extends cdk.Stack {
rolePolicyStatements: rolePolicyStatementsForWebsiteDeployStages,
})
);

pipeline.buildPipeline();
const topic = new sns.Topic(this, 'PipelineTopic');
topic.addSubscription(new subs.EmailSubscription(props.email));
const rule = new notifications.NotificationRule(this, 'NotificationRule', {
source: pipeline.pipeline,
events: [
'codepipeline-pipeline-pipeline-execution-started',
'codepipeline-pipeline-pipeline-execution-failed',
'codepipeline-pipeline-pipeline-execution-succeeded',
'codepipeline-pipeline-manual-approval-needed',
],
targets: [topic],
});
}
}
6 changes: 4 additions & 2 deletions lib/constructs/cw-rum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ export interface CwRumAppMonitorProps {
export class CwRumAppMonitor extends Construct {
public readonly script: string;
public readonly id: string;
public readonly region: string;
public readonly config: string;

constructor(scope: Construct, id: string, props: CwRumAppMonitorProps) {
super(scope, id);

const stack = Stack.of(this);
this.region = stack.region;

// RUM Cognito Identity Pool
const rum_identity_pool = new cognito.CfnIdentityPool(this, 'CwRumIdentityPool', {
Expand Down Expand Up @@ -132,7 +134,7 @@ export class CwRumAppMonitor extends Construct {
sessionSampleRate: ${sessionSampleRate},
guestRoleArn: "${rum_id_pool_unauth_user_role.roleArn}",
identityPoolId: "${rum_identity_pool.ref}",
endpoint: "https://dataplane.rum.eu-west-1.amazonaws.com",
endpoint: "https://dataplane.rum.${stack.region}.amazonaws.com",
telemetries: [${telemetries}],
allowCookies: ${allowCookies},
enableXRay: ${enableXray}
Expand All @@ -148,7 +150,7 @@ export class CwRumAppMonitor extends Construct {
"sessionSampleRate": ${sessionSampleRate},
"guestRoleArn": "${rum_id_pool_unauth_user_role.roleArn}",
"identityPoolId": "${rum_identity_pool.ref}",
"endpoint": "https://dataplane.rum.eu-west-1.amazonaws.com",
"endpoint": "https://dataplane.rum.${stack.region}.amazonaws.com",
"telemetries": [${telemetries}],
"allowCookies": ${allowCookies},
"enableXRay": ${enableXray}
Expand Down
5 changes: 4 additions & 1 deletion lib/constructs/models-manager-car-upload-step-function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ export class CarUploadStepFunction extends Construct {

const mapToSsmChoice = new stepFunctions.Choice(this, 'mapToSsmChoice');
const condition1 = stepFunctions.Condition.stringEquals('$.status.status', 'InProgress');
const condition2 = stepFunctions.Condition.stringEquals('$.status.status', 'Pending');
const finish = new stepFunctions.Pass(this, 'Finish');

const mapToSsmChoiceDefinition = mapToSsmChoice.when(condition1, mapToSsmWait).otherwise(finish);
const mapToSsmChoiceDefinition = mapToSsmChoice
.when(stepFunctions.Condition.or(condition1, condition2), mapToSsmWait)
.otherwise(finish);

// mapToSsm definition
mapToSsm.iterator(invokeWithSsm.next(mapToSsmWait).next(statusWithSsm).next(mapToSsmChoiceDefinition));
Expand Down
8 changes: 8 additions & 0 deletions lib/drem-app-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ export class DeepracerEventManagerStack extends cdk.Stack {
value: cwRumAppMonitor.id,
});

new cdk.CfnOutput(this, 'cwRumAppMonitorRegion', {
value: cwRumAppMonitor.region,
});

new cdk.CfnOutput(this, 'cwRumAppMonitorConfig', {
value: cwRumAppMonitor.config,
});
Expand All @@ -263,6 +267,10 @@ export class DeepracerEventManagerStack extends cdk.Stack {
value: cwRumLeaderboardAppMonitor.id,
});

new cdk.CfnOutput(this, 'cwRumLeaderboardAppMonitorRegion', {
value: cwRumLeaderboardAppMonitor.region,
});

new cdk.CfnOutput(this, 'cwRumLeaderboardAppMonitorConfig', {
value: cwRumLeaderboardAppMonitor.config,
});
Expand Down
2 changes: 1 addition & 1 deletion lib/lambda_layers/print_functions/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Pillow==10.0.1
Pillow==10.3.0
qrcode==7.3.1
brother_ql==0.9.4
1 change: 1 addition & 0 deletions lib/lambdas/users_function/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __get_users() -> list:
PaginationConfig={
"PageSize": 60,
},
Filter='status = "Enabled"'
)

users = []
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate_amplify_config_cfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
streamingOverlayWebsite = key["OutputValue"]
if key["OutputKey"] == "cwRumAppMonitorId":
cwRumAppMonitorId = key["OutputValue"]
if key["OutputKey"] == "cwRumAppMonitorRegion":
cwRumAppMonitorRegion = key["OutputValue"]
if key["OutputKey"] == "cwRumAppMonitorConfig":
cwRumAppMonitorConfig = key["OutputValue"]

Expand Down Expand Up @@ -73,6 +75,7 @@
"Rum": {
"drem": {
"id": cwRumAppMonitorId,
"region": cwRumAppMonitorRegion,
"config": cwRumAppMonitorConfig,
},
},
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate_leaderboard_amplify_config_cfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
DremWebsite = key["OutputValue"]
if key["OutputKey"] == "cwRumLeaderboardAppMonitorId":
cwRumLeaderboardAppMonitorId = key["OutputValue"]
if key["OutputKey"] == "cwRumLeaderboardAppMonitorRegion":
cwRumLeaderboardAppMonitorRegion = key["OutputValue"]
if key["OutputKey"] == "cwRumLeaderboardAppMonitorConfig":
cwRumLeaderboardAppMonitorConfig = key["OutputValue"]

Expand All @@ -32,6 +34,7 @@
"Rum": {
"leaderboard": {
"id": cwRumLeaderboardAppMonitorId,
"region": cwRumLeaderboardAppMonitorRegion,
"config": cwRumLeaderboardAppMonitorConfig,
},
},
Expand Down
2 changes: 1 addition & 1 deletion website-leaderboard/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ try {
const config = JSON.parse(awsconfig.Rum.leaderboard.config);
const APPLICATION_ID = awsconfig.Rum.leaderboard.id;
const APPLICATION_VERSION = '1.0.0';
const APPLICATION_REGION = 'eu-west-1';
const APPLICATION_REGION = awsconfig.Rum.leaderboard.region;

/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "awsRum" }]*/
awsRum = new AwsRum(APPLICATION_ID, APPLICATION_VERSION, APPLICATION_REGION, config);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions website-stream-overlays/public/assets/svg/RacerAndLapInfo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit be61395

Please sign in to comment.