Skip to content

Commit

Permalink
Merge pull request #250 from aws-solutions/staging/v1.0.0
Browse files Browse the repository at this point in the history
Version 1.0.0 Automated Release PR
  • Loading branch information
aburkleaux-amazon authored Nov 4, 2021
2 parents cfb2af6 + 62a6fd2 commit 37cdf66
Show file tree
Hide file tree
Showing 53 changed files with 678 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
VERSION=v${{ github.event.inputs.version }}
DIST_OUTPUT_BUCKET=micl-dev
TEMPLATE_OUTPUT_BUCKET=micl-dev-${{ env.REGION }}
./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
echo y | ./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
echo "Templates artifact:"
cat ./templateUrl.txt
- name: 'Upload MIE One-click Deployment Artifact'
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
VERSION=v${{ github.event.inputs.version }}
DIST_OUTPUT_BUCKET=micl-dev
TEMPLATE_OUTPUT_BUCKET=micl-dev-${{ env.REGION }}
./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
echo y | ./build-s3-dist.sh --no-layer --template-bucket $TEMPLATE_OUTPUT_BUCKET --code-bucket $DIST_OUTPUT_BUCKET --version $VERSION --region $REGION
echo "Templates artifact:"
cat ./templateUrl.txt
- name: 'Upload MIE One-click Deployment Artifact'
Expand Down
12 changes: 2 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2021-10-22
- Initial release.

## [1.0.0] - 2021-11-3
### Added
- Everything.

### Changed
- Nothing. This is the first release.

### Removed
- Nothing. This is the first release.
- CHANGELOG version 1.0.0 release
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ reported the issue. Please try to include as much information as you can. Detail
## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *main* branch.
1. You are working against the latest source on the *development* branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ The following Cloudformation templates will deploy the Content Localization fron

Region| Launch
------|-----
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=clo&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
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=clo&templateURL=https://rodeolabz-us-east-1.s3.us-east-1.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
EU West (Ireland) | [![Launch in eu-west-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-eu-west-1.s3.eu-west-1.amazonaws.com/content-localization-on-aws/v0.1.0/content-localization-on-aws.template)
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=clo&templateURL=https://rodeolabz-us-west-2.s3.us-west-2.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)
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=clo&templateURL=https://rodeolabz-us-east-1.s3.us-east-1.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)
EU West (Ireland) | [![Launch in eu-west-1](doc/images/launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=clo&templateURL=https://rodeolabz-eu-west-1.s3.eu-west-1.amazonaws.com/content-localization-on-aws/v1.0.0/content-localization-on-aws.template)

For more installation options, see the [Advanced Installation](#advanced-installation-options) section.

Expand Down Expand Up @@ -141,6 +141,10 @@ TEMPLATE=[copy "Without existing MIE deployment" link from output of build scrip
aws cloudformation create-stack --stack-name $WEBAPP_STACK_NAME --template-url $TEMPLATE --region $REGION --parameters ParameterKey=AdminEmail,ParameterValue=$EMAIL --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --profile default --disable-rollback
```

### Tests

See the [tests README document](test/README.md) for information on how to run tests for this project.

# Advanced Usage

## Adding new operators and extending data stream consumers:
Expand Down Expand Up @@ -255,7 +259,9 @@ aws s3 rb s3://<bucket-name> --force

## Collection of operational metrics

This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the [implementation guide](_https://docs.aws.amazon.com/solutions/latest/<content-localization-on-aws>/collection-of-operational-metrics.html_).
This solution collects anonymous operational metrics to help AWS improve the
quality of features of the solution. For more information, including how to disable
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/content-localization-on-aws/collection-of-operational-metrics.html).

When enabled, the following information is collected and sent to AWS:

Expand All @@ -273,7 +279,7 @@ Example data:
"UUID": "d84a0bd5-7483-494e-8ab1-fdfaa7e97687",
"TimeStamp": "2021-03-01T20:03:05.798545",
"Data": {
"Version": "v2.0.0",
"Version": "v1.0.0",
"CFTemplate": "Created"
}
}
Expand Down
2 changes: 1 addition & 1 deletion deployment/content-localization-on-aws-auth.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: "Content Localization on AWS - user authentication infrastructure"
Description: "Content Localization on AWS %%VERSION%% - user authentication infrastructure"

Parameters:
AdminEmail:
Expand Down
4 changes: 2 additions & 2 deletions deployment/content-localization-on-aws-opensearch.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: "Content Localization on AWS - Opensearch Consumer stack"
Description: "Content Localization on AWS %%VERSION%% - Opensearch Consumer stack"

Parameters:
NodeType:
Expand Down Expand Up @@ -96,7 +96,7 @@ Resources:
Variables:
EsEndpoint: !GetAtt OpensearchServiceDomain.DomainEndpoint
DataplaneBucket: !Ref MieDataplaneBucket
botoConfig: '{"user_agent_extra": "AwsSolution/SO0042/%%VERSION%%"}'
botoConfig: '{"user_agent_extra": "AwsSolution/SO0164/%%VERSION%%"}'

# stream event mapping for lambda

Expand Down
2 changes: 1 addition & 1 deletion deployment/content-localization-on-aws-video-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: "Content Localization on AWS - Deploys video processing workflow"
Description: "Content Localization on AWS %%VERSION%% - Deploys video processing workflow"

Parameters:
WorkflowCustomResourceArn:
Expand Down
2 changes: 1 addition & 1 deletion deployment/content-localization-on-aws-web.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: "Content Localization on AWS - Deploys the Content Localization on AWS website resources"
Description: "Content Localization on AWS %%VERSION%% - Deploys the Content Localization on AWS website resources"

Parameters:
DataplaneEndpoint:
Expand Down
14 changes: 12 additions & 2 deletions source/consumer/lambda_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################

from elasticsearch import Elasticsearch, RequestsHttpConnection
import base64
Expand Down
41 changes: 26 additions & 15 deletions source/helper/website_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################

import boto3
import json
import logging
Expand Down Expand Up @@ -101,22 +114,20 @@ def copy_source(event, context):

deployment_bucket = s3.Bucket(website_bucket)

objects = s3.Bucket(name=source_bucket).objects.filter(Prefix='{k}/'.format(k=source_key))

for s3_object in objects:
old_key = s3_object.key
LOGGER.info(old_key)
try:
new_key = old_key.split('website/')[1]
# Only pickup items under the "website" prefix
except IndexError:
pass
else:
source = {"Bucket": source_bucket, "Key": old_key}
deployment_bucket.copy(source, '{key}'.format(key=new_key))
if replace_env_variables is True and new_key == "runtimeConfig.json":
with open('./webapp-manifest.json') as file:
manifest = json.load(file)
print('UPLOADING FILES::')
for key in manifest:
print('s3://'+source_bucket+'/'+source_key+'/'+key)
copy_source = {
'Bucket': source_bucket,
'Key': source_key+'/'+key
}
s3.meta.client.copy(copy_source, website_bucket, key)
if replace_env_variables is True and key == "runtimeConfig.json":
LOGGER.info("updating runtimeConfig.json")
write_to_s3(event, context, website_bucket, new_key, json.dumps(new_variables))
write_to_s3(event, context, website_bucket, key, json.dumps(new_variables))

except Exception as e:
LOGGER.info("Unable to copy website source code into the website bucket: {e}".format(e=e))
send_response(event, context, "FAILED", {"Message": "Unexpected event received from CloudFormation"})
Expand Down
15 changes: 15 additions & 0 deletions source/website/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################
*/

module.exports = {
presets: [
'@vue/app'
Expand Down
14 changes: 14 additions & 0 deletions source/website/public/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<!--
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################
-->
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
14 changes: 14 additions & 0 deletions source/website/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<!--
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################
-->
<template>
<div id="app">
<router-view />
Expand Down
15 changes: 15 additions & 0 deletions source/website/src/components/Celebrities.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!--
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance #
# with the License. A copy of the License is located at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES #
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions #
# and limitations under the License. #
######################################################################################################################
-->

<!--suppress ALL -->
<template>
<b-container fluid>
Expand Down
Loading

0 comments on commit 37cdf66

Please sign in to comment.