From 76748e4e4f59510fb89d097d835bb141eb9e73b7 Mon Sep 17 00:00:00 2001 From: qitan Date: Thu, 25 Jan 2024 11:27:40 +0800 Subject: [PATCH] fix tech solution 08 and 80 --- .../operating-system-migration.yml | 4 +- .../Nginx-access-log-data-archive.yml | 69 ++++++++++--------- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/documents/solution/cloud-migration/operating-system-migration.yml b/documents/solution/cloud-migration/operating-system-migration.yml index 75ac6a38..8e00e7a4 100644 --- a/documents/solution/cloud-migration/operating-system-migration.yml +++ b/documents/solution/cloud-migration/operating-system-migration.yml @@ -135,6 +135,7 @@ Parameters: numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in). zh-cn: '长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)。' AllowedPattern: '[0-9A-Za-z\_\-\&:;''<>,=%`~!@#\(\)\$\^\*\+\|\{\}\[\]\.\?\/]+$' + AssociationProperty: ALIYUN::ECS::Instance::Password AssociationPropertyMetadata: Visible: Condition: @@ -163,6 +164,7 @@ Parameters: MinLength: 8 MaxLength: 32 NoEcho: true + AssociationProperty: ALIYUN::ECS::Instance::Password Resources: Vpc: Type: 'ALIYUN::ECS::VPC' @@ -639,4 +641,4 @@ Metadata: Label: default: ECS TemplateTags: - - 'acs:technical-solution:cloud-migration:操作系统迁移-tech_solu_80' + - 'acs:technical-solution:cloud-migration:CentOS到Alinux操作系统迁移-tech_solu_80' diff --git a/documents/solution/internet-application-development/Nginx-access-log-data-archive.yml b/documents/solution/internet-application-development/Nginx-access-log-data-archive.yml index 4d31b10e..9dacb0ea 100644 --- a/documents/solution/internet-application-development/Nginx-access-log-data-archive.yml +++ b/documents/solution/internet-application-development/Nginx-access-log-data-archive.yml @@ -196,10 +196,15 @@ Resources: Type: RunShellScript Frequency: '0 * * * * ?' Timed: true - CommandContent: |- + CommandContent: >- #!/bin/bash + cur_date=$(date +'%d/%b/%Y') - echo "127.0.0.0 - - [${cur_date}:$(date +'%H:%M:%S %z')] \"GET / HTTP/1.1\" 200 4897 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\"" | tee -a /var/log/nginx/access.log + + echo "127.0.0.0 - - [${cur_date}:$(date +'%H:%M:%S %z')] \"GET / + HTTP/1.1\" 200 4897 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) + AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\"" + | tee -a /var/log/nginx/access.log DependsOn: - InstallNginx InstallLogAgent: @@ -440,35 +445,6 @@ Resources: Type: ALIYUN::ROS::AutoEnableService Properties: ServiceName: OSS -Metadata: - ALIYUN::ROS::Interface: - ParameterGroups: - - Parameters: - - VSwitchZoneId - - EcsInstanceType - - EcsImageId - - EcsDiskCategory - Label: - default: - en: ECS configure - zh-cn: 云服务器ECS配置 - - Parameters: - - SlsProjectName - - SlsLogstoreName - Label: - default: - en: SLS - zh-cn: 日志服务SLS配置 - - Parameters: - - OssBucketName - Label: - default: - en: OSS bucket - zh-cn: 对象存储OSS配置 - TemplateTags: - - acs:technical-solution:internet-application-development:应用日志数据归档-tech_solu_08 - Hidden: - - CommonName Outputs: VpcId: Description: Vpc id. @@ -502,4 +478,33 @@ Outputs: - - 'oss-export' - Fn::GetAtt: - RoleNameSuffix - - value \ No newline at end of file + - value +Metadata: + ALIYUN::ROS::Interface: + ParameterGroups: + - Parameters: + - VSwitchZoneId + - EcsInstanceType + - EcsImageId + - EcsDiskCategory + Label: + default: + en: ECS configure + zh-cn: 云服务器ECS配置 + - Parameters: + - SlsProjectName + - SlsLogstoreName + Label: + default: + en: SLS + zh-cn: 日志服务SLS配置 + - Parameters: + - OssBucketName + Label: + default: + en: OSS bucket + zh-cn: 对象存储OSS配置 + Hidden: + - CommonName + TemplateTags: + - acs:technical-solution:internet-application-development:应用日志数据归档-tech_solu_08 \ No newline at end of file