Skip to content

Commit 4539421

Browse files
committed
v2.0.0 release
1 parent 49df487 commit 4539421

File tree

100 files changed

+5579
-3081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5579
-3081
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ You can deploy MIE in your AWS account with the following Cloud Formation templa
1010

1111
Region| Launch
1212
------|-----
13-
US East (N. Virginia) | [![Launch in us-east-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=mie&templateURL=https://rodeolabz-us-east-1.s3.amazonaws.com/media_insights_engine/v1.0.0/cf/media-insights-stack.template)
14-
US West (Oregon) | [![Launch in us-west-2](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=mie&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/media_insights_engine/v1.0.0/cf/media-insights-stack.template)
13+
US East (N. Virginia) | [![Launch in us-east-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=mie&templateURL=https://rodeolabz-us-east-1.s3.amazonaws.com/media_insights_engine/v2.0.0/cf/media-insights-stack.template)
14+
US West (Oregon) | [![Launch in us-west-2](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=mie&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/media_insights_engine/v2.0.0/cf/media-insights-stack.template)
1515

1616
The Cloud Formation options for these one-click deploys are described in the [installation parameters](#installation-parameters) section.
1717

@@ -95,6 +95,7 @@ You can deploy MIE and the demo GUI in your AWS account with the [one-click depl
9595
* **DeployAnalyticsPipeline**: If set to true, deploys a Kinesis data stream that can be used by front-end applications to obtain the data generated by workflows. Defaults to `true`.
9696
* **DeployOperatorLibrary**: If set to true, deploys operators for MediaConvert, Rekognition, Transcribe, Translate, et al. Defaults to `true`.
9797
* **DeployTestWorkflow**: If set to true, deploys test workflow which contains operator, stage and workflow stubs for integration testing. Defaults to `false`.
98+
* **EnableXrayTrace**: If set to true, xray tracing is enabled for all supported services in the stack. Defaults to `false`
9899

99100
# Developers
100101

deployment/build-s3-dist.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fi
8686
VENV=$(mktemp -d)
8787
python3 -m venv "$VENV"
8888
source "$VENV"/bin/activate
89-
pip install --quiet boto3 chalice docopt pyyaml jsonschema
89+
pip install --quiet boto3 chalice docopt pyyaml jsonschema aws_xray_sdk
9090
export PYTHONPATH="$PYTHONPATH:$source_dir/lib/MediaInsightsEngineLambdaHelper/"
9191
echo "PYTHONPATH=$PYTHONPATH"
9292
if [ $? -ne 0 ]; then
@@ -592,6 +592,11 @@ if ! [ -x "$(command -v chalice)" ]; then
592592
echo 'Chalice is not installed. It is required for this solution. Exiting.'
593593
exit 1
594594
fi
595+
596+
# Remove chalice deployments to force redeploy when there are changes to configuration only
597+
# Otherwise, chalice will use the existing deployment package
598+
[ -e .chalice/deployments ] && rm -rf .chalice/deployments
599+
595600
echo "running chalice..."
596601
chalice package --merge-template external_resources.json dist
597602
echo "...chalice done"
@@ -621,6 +626,11 @@ if ! [ -x "$(command -v chalice)" ]; then
621626
echo 'Chalice is not installed. It is required for this solution. Exiting.'
622627
exit 1
623628
fi
629+
630+
# Remove chalice deployments to force redeploy when there are changes to configuration only
631+
# Otherwise, chalice will use the existing deployment package
632+
[ -e .chalice/deployments ] && rm -rf .chalice/deployments
633+
624634
chalice package --merge-template external_resources.json dist
625635
echo "cp ./dist/sam.json $dist_dir/media-insights-dataplane-api-stack.template"
626636
cp dist/sam.json "$dist_dir"/media-insights-dataplane-api-stack.template
@@ -673,7 +683,7 @@ echo "--------------------------------------------------------------------------
673683

674684
echo ""
675685
echo "Template to deploy:"
676-
echo https://"$bucket"."$s3domain"/media_insights_engine/"$version"/cf/media-insights-stack.template
686+
echo "TEMPLATE='"https://"$bucket"."$s3domain"/media_insights_engine/"$version"/cf/media-insights-stack.template"'"
677687

678688
echo "------------------------------------------------------------------------------"
679689
echo "Done"

deployment/chalice-fix-inputs.py

-68
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
boto3
22
requests
3-
urllib3
4-
pymediainfo
3+
urllib3==1.25.4
4+
pymediainfo==4.2.1
5+
jsonpickle==1.3.0
6+
aws-xray-sdk==2.6.0
57
/packages/Media_Insights_Engine_Lambda_Helper-0.0.3-py3-none-any.whl

deployment/media-insights-dataplane-streaming-stack.template

+16-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Parameters:
1414

1515
Mappings:
1616
SourceCode:
17-
General:
18-
S3Bucket: '%%BUCKET_NAME%%'
19-
KeyPrefix: "media_insights_engine/%%VERSION%%/code"
20-
TemplateKeyPrefix: "media_insights_engine/%%VERSION%%/cf"
17+
General:
18+
S3Bucket: '%%BUCKET_NAME%%'
19+
KeyPrefix: "media_insights_engine/%%VERSION%%/code"
20+
TemplateKeyPrefix: "media_insights_engine/%%VERSION%%/cf"
2121

2222
Resources:
2323
# kinesis data stream
@@ -37,6 +37,8 @@ Resources:
3737
Properties:
3838
Handler: "stream.lambda_handler"
3939
Role: !GetAtt LambdaStreamRole.Arn
40+
TracingConfig:
41+
Mode: "PassThrough"
4042
Code:
4143
S3Bucket: !FindInMap ["SourceCode", "General", "S3Bucket"]
4244
S3Key:
@@ -65,6 +67,11 @@ Resources:
6567
# iam stuff
6668
LambdaStreamRole:
6769
Type: "AWS::IAM::Role"
70+
Metadata:
71+
cfn_nag:
72+
rules_to_suppress:
73+
- id: W11
74+
reason: "The policy applies to all resources - can't be scoped to a specific resource"
6875
Properties:
6976
AssumeRolePolicyDocument:
7077
Version: 2012-10-17
@@ -97,6 +104,11 @@ Resources:
97104
- "dynamodb:GetShardIterator"
98105
- "dynamodb:ListStreams"
99106
Resource: !Ref DynamoStreamArn
107+
- Effect: Allow
108+
Action:
109+
- "xray:PutTraceSegments"
110+
- "xray:PutTelemetryRecords"
111+
Resource: "*"
100112
# TODO: Security - Scope this down
101113
- Effect: Allow
102114
Action:

0 commit comments

Comments
 (0)