Skip to content

Commit 5d7126a

Browse files
authored
Merge pull request #89 from RLOpenCatalyst/topic-release
Add cost-resource parameter in the product
2 parents a61212c + f2888d1 commit 5d7126a

6 files changed

Lines changed: 159 additions & 4 deletions

File tree

cft-templates/s3.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Resources:
1111
Type: AWS::S3::Bucket
1212
Properties:
1313
BucketName: !Ref Namespace
14+
Tags:
15+
- Key: cost_resource
16+
Value: !Sub ${AWS::StackName}
17+
- Key: Name
18+
Value: !Sub ${Namespace}
1419

1520
Outputs:
1621
BucketArn:

cft-templates/sagemaker-template-with-url.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Resources:
3636
InstanceType: !Ref NotebookInstanceType
3737
RoleArn: !GetAtt SageMakerRole.Arn
3838
LifecycleConfigName: 'Research-Portal-Setup'
39+
Tags:
40+
- Key: cost_resource
41+
Value: !Sub ${AWS::StackName}
42+
- Key: Name
43+
Value: !Sub ${AWS::StackName}
3944
Outputs:
4045
SageMakerNotebookInstanceARN:
4146
Description: "ARN for the newly created SageMaker Notebook Instance"

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
- sp2net
1919

2020
cc-3102:
21-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.0_b1235
21+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.1_b1244
2222
secrets:
2323
- source: sp2prod-config.json
2424
target: /rlc/cc/server/app/config/config.json
@@ -42,7 +42,7 @@ services:
4242
command: /bin/bash start.sh
4343

4444
scheduler-3102:
45-
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.0_b1235
45+
image: 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.1_b1244
4646
secrets:
4747
- source: sp2prod-config.json
4848
target: /rlc/cc/server/app/config/config.json

dump/standardcatalogitems.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@
258258
"post_provisioning": [],
259259
"checks_before_assigning_product": [],
260260
"checks_after_assigning_product": [],
261-
"permission_required": {}
261+
"permission_required": {},
262+
"cost_resource": true
262263
}
263264
},
264265
{

provisioners/provision-ecr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -xe
22
sudo docker login -u AWS -p $(aws ecr get-login-password --region us-east-2) 045938549113.dkr.ecr.us-east-2.amazonaws.com
3-
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.0_b1235
3+
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/researchportal:_fd_1.12.1_b1244
44
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/nginx:latest
55
sudo docker pull 045938549113.dkr.ecr.us-east-2.amazonaws.com/notificationsink:1.12.1_b1

rg-alb-route53.yml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
Metadata:
2+
AWS::CloudFormation::Interface:
3+
ParameterGroups:
4+
- Label:
5+
default: Network Configuration
6+
Parameters:
7+
- VPC
8+
- PublicSubnet1
9+
- PublicSubnet2
10+
- PublicSubnet3
11+
- Label:
12+
default: Certificate of your domain
13+
Parameters:
14+
- CertificateArn
15+
16+
Parameters:
17+
VPC:
18+
Description: The vpc to launch the service
19+
Type: AWS::EC2::VPC::Id
20+
PublicSubnet1:
21+
Description: The subnet where to launch the service
22+
Type: AWS::EC2::Subnet::Id
23+
PublicSubnet2:
24+
Description: The subnet where to launch the service
25+
Type: AWS::EC2::Subnet::Id
26+
PublicSubnet3:
27+
Description: The subnet where to launch the service
28+
Type: AWS::EC2::Subnet::Id
29+
CertificateArn:
30+
Description: Provide your certificate Arn to Research Gateway application available securely over SSL or leave it blank(optional)
31+
Default: ""
32+
Type: String
33+
34+
Conditions:
35+
securecommunication: !Not [!Equals [!Ref CertificateArn, ""]]
36+
nonsecurecommunication: !Equals [!Ref CertificateArn, ""]
37+
Resources:
38+
RGInstanceSecurityGroup:
39+
Type: AWS::EC2::SecurityGroup
40+
Properties:
41+
GroupDescription: Allow http to client host
42+
VpcId: !Ref VPC
43+
SecurityGroupIngress:
44+
- IpProtocol: tcp
45+
FromPort: 80
46+
ToPort: 80
47+
CidrIp: 0.0.0.0/0
48+
- IpProtocol: tcp
49+
FromPort: 443
50+
ToPort: 443
51+
CidrIp: 0.0.0.0/0
52+
- IpProtocol: tcp
53+
FromPort: 22
54+
ToPort: 22
55+
CidrIp: 0.0.0.0/0
56+
RGApplicationLoadBalancer:
57+
Type: "AWS::ElasticLoadBalancingV2::LoadBalancer"
58+
Properties:
59+
Name: "RG-Application-Load-Balancer"
60+
Scheme: "internet-facing"
61+
Type: "application"
62+
Subnets:
63+
- !Ref PublicSubnet1
64+
- !Ref PublicSubnet2
65+
- !Ref PublicSubnet3
66+
SecurityGroups:
67+
- !GetAtt RGInstanceSecurityGroup.GroupId
68+
IpAddressType: "ipv4"
69+
RGHTTPSListener:
70+
Type: "AWS::ElasticLoadBalancingV2::Listener"
71+
Condition: securecommunication
72+
Properties:
73+
LoadBalancerArn: !Ref RGApplicationLoadBalancer
74+
Port: 443
75+
Protocol: "HTTPS"
76+
SslPolicy: "ELBSecurityPolicy-2016-08"
77+
Certificates:
78+
-
79+
CertificateArn: !Ref CertificateArn
80+
81+
DefaultActions:
82+
-
83+
Order: 1
84+
TargetGroupArn: !Ref RGTargetGroup
85+
Type: "forward"
86+
87+
RGHTTPListener:
88+
Type: "AWS::ElasticLoadBalancingV2::Listener"
89+
Condition: securecommunication
90+
Properties:
91+
LoadBalancerArn: !Ref RGApplicationLoadBalancer
92+
Port: 80
93+
Protocol: "HTTP"
94+
DefaultActions:
95+
-
96+
Order: 1
97+
RedirectConfig:
98+
Protocol: "HTTPS"
99+
Port: "443"
100+
Host: "#{host}"
101+
Path: "/#{path}"
102+
Query: "#{query}"
103+
StatusCode: "HTTP_301"
104+
Type: "redirect"
105+
RGTargetGroup:
106+
Type: "AWS::ElasticLoadBalancingV2::TargetGroup"
107+
Properties:
108+
HealthCheckIntervalSeconds: 30
109+
HealthCheckPath: "/"
110+
Port: 80
111+
Protocol: "HTTP"
112+
HealthCheckPort: "traffic-port"
113+
HealthCheckProtocol: "HTTP"
114+
HealthCheckTimeoutSeconds: 5
115+
UnhealthyThresholdCount: 2
116+
TargetType: "instance"
117+
Matcher:
118+
HttpCode: "200"
119+
HealthyThresholdCount: 5
120+
VpcId: !Ref VPC
121+
Name: "Rg-target-group-1"
122+
HealthCheckEnabled: true
123+
RGHTTPListener1:
124+
Type: "AWS::ElasticLoadBalancingV2::Listener"
125+
Condition: nonsecurecommunication
126+
Properties:
127+
DefaultActions:
128+
- Type: "forward"
129+
TargetGroupArn: !Ref RGTargetGroup
130+
Port: 80
131+
Protocol: "HTTP"
132+
LoadBalancerArn: !Ref RGApplicationLoadBalancer
133+
134+
Outputs:
135+
Applicationloadbalancer:
136+
Description: The created loadbalancer
137+
Value: !Ref RGApplicationLoadBalancer
138+
TargetGroup:
139+
Description: The created TargetGroup
140+
Value: !Ref RGTargetGroup
141+
LoadBalancerSecurityGroup:
142+
Description: The securty group for the ALB
143+
Value: !Ref RGInstanceSecurityGroup
144+

0 commit comments

Comments
 (0)