-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.py
43 lines (31 loc) · 908 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
from aws_cdk import core
from infrastructure.ecs_stack import RosbagProcessor
import os
import json
import shutil
#zip plugin
shutil.make_archive('plugins/plugins', 'zip', 'plugins/')
# Load config
project_dir = os.path.dirname(os.path.abspath(__file__))
config_file = os.path.join(project_dir, "config.json")
with open(config_file) as json_file:
config = json.load(json_file)
print(config)
image_name = config["image-name"]
stack_id = config["stack-id"]
ecr_repository_name = config["ecr-repository-name"]
cpu = config["cpu"]
memory_limit_mib = config["memory-limit-mib"]
app = core.App()
RosbagProcessor(
app,
stack_id,
image_name=image_name,
ecr_repository_name=ecr_repository_name,
cpu=cpu,
memory_limit_mib=memory_limit_mib
)
app.synth()