Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update technical solution 06 #250

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,26 @@ Resources:
PolicyAttachments:
System:
- AliyunSTSAssumeRoleAccess
VodUploadRoleTestRole:
Type: ALIYUN::RAM::Role
Properties:
RoleName:
Fn::Sub: ${CommonName}-${ALIYUN::StackId}-VodUploadRole
Description: VodUploadRoleTest
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
RAM:
- acs:ram::1754580903499898:root
Version: '1'
MaxSessionDuration: 3600
DeletionForce: true
PolicyAttachments:
System:
- AliyunSTSAssumeRoleAccess
- AliyunVODUploadAuth
EcsInstanceGroup1:
Type: ALIYUN::ECS::InstanceGroup
Properties:
Expand All @@ -194,7 +214,7 @@ Resources:
Ref: EcsVSwitch1
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId: centos_7
ImageId: aliyun_3_9_x64_20G_alibase_20231219.vhd
IoOptimized: optimized
SystemDiskCategory: cloud_essd
InternetMaxBandwidthOut: 5
Expand All @@ -219,7 +239,7 @@ Resources:
Ref: EcsVSwitch2
SecurityGroupId:
Ref: EcsSecurityGroup
ImageId: centos_7
ImageId: aliyun_3_9_x64_20G_alibase_20231219.vhd
IoOptimized: optimized
SystemDiskCategory: cloud_essd
InternetMaxBandwidthOut: 5
Expand Down Expand Up @@ -328,15 +348,17 @@ Resources:
Fn::Sub: |
#!/bin/bash

wget https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20230830/qhwb/server.zip
wget https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20230830/qhwb/server.zip
yum install unzip -y
unzip server.zip
cd server
pip3 install --upgrade pip
pip3 install -r requirements.txt
pip3 install uwsgi==2.0.22
sed -i "s/socket=127.0.0.1:5000/http=0.0.0.0:8000/g" uwsgi.ini
uwsgi uwsgi.ini
export ECS_RAM_ROLE=${RoleForEcs}
export ROLE_ARN=${VodUploadRoleTestRole.Arn}
nohup uwsgi uwsgi.ini > output.log 2>&1 &
Queue:
Type: ALIYUN::MNS::Queue
DependsOn: AutoEnableMNS
Expand Down
Loading