|
@@ -7,4 +7,38 @@ chmod +x /root/server_demo
|
|
|
yum install -y amazon-efs-utils
|
|
yum install -y amazon-efs-utils
|
|
|
mkdir -p /mnt/v1
|
|
mkdir -p /mnt/v1
|
|
|
sudo mount -t efs -o tls fs-56c463b3:/ /mnt/v1
|
|
sudo mount -t efs -o tls fs-56c463b3:/ /mnt/v1
|
|
|
|
|
+/root/server_demo /root/conf.toml
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#!/bin/bash
|
|
|
|
|
+sleep 5
|
|
|
|
|
+wget -O /root/server_demo http://a.xclouds.cloud/all/html/q1/server_demo
|
|
|
|
|
+wget -O /root/conf.toml http://a.xclouds.cloud/all/html/q1/conf.toml
|
|
|
|
|
+chmod +x /root/server_demo
|
|
|
|
|
+mkdir -p /mnt/v1
|
|
|
|
|
+aws configure set default.region cn-northwest-1
|
|
|
|
|
+
|
|
|
|
|
+yum install -y awslogs
|
|
|
|
|
+cat > /etc/awslogs/awscli.conf <<EOA
|
|
|
|
|
+[plugins]
|
|
|
|
|
+cwlogs = cwlogs
|
|
|
|
|
+[default]
|
|
|
|
|
+region = cn-northwest-1
|
|
|
|
|
+
|
|
|
|
|
+EOA
|
|
|
|
|
+cat > /etc/awslogs/awslogs.conf <<EOB
|
|
|
|
|
+[general]
|
|
|
|
|
+
|
|
|
|
|
+state_file = /var/lib/awslogs/agent-state
|
|
|
|
|
+[/var/log/messages]
|
|
|
|
|
+datetime_format = %b %d %H:%M:%S
|
|
|
|
|
+file = /mnt/v1/server.log
|
|
|
|
|
+buffer_duration = 5000
|
|
|
|
|
+log_stream_name = {instance_id}
|
|
|
|
|
+initial_position = start_of_file
|
|
|
|
|
+log_group_name = cloudlog
|
|
|
|
|
+
|
|
|
|
|
+EOB
|
|
|
|
|
+systemctl restart awslogsd
|
|
|
/root/server_demo /root/conf.toml
|
|
/root/server_demo /root/conf.toml
|