mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 17:00:21 +00:00
add node-exporter to setup
This commit is contained in:
@@ -22,38 +22,16 @@ read -s DOCKER_PASSWORD
|
||||
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
echo "✅ Docker Hub login configured"
|
||||
|
||||
echo "☁️ Installing AWS CLI for Cloudflare R2..."
|
||||
# Install AWS CLI
|
||||
apt install -y unzip curl
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
./aws/install
|
||||
rm -rf aws awscliv2.zip
|
||||
echo "🔄 Installing Node Exporter..."
|
||||
|
||||
# Configure AWS CLI for R2
|
||||
echo "🔧 Configuring AWS CLI for Cloudflare R2..."
|
||||
echo "Enter your Cloudflare R2 Access Key ID:"
|
||||
read R2_ACCESS_KEY
|
||||
echo "Enter your Cloudflare R2 Secret Access Key:"
|
||||
read -s R2_SECRET_KEY
|
||||
echo "Enter your Cloudflare Account ID:"
|
||||
read CLOUDFLARE_ACCOUNT_ID
|
||||
docker run -d --name node-exporter --restart=unless-stopped \
|
||||
--net="host" \
|
||||
--pid="host" \
|
||||
-v "/:/host:ro,rslave" \
|
||||
prom/node-exporter:latest \
|
||||
--path.rootfs=/host
|
||||
|
||||
# Create R2 profile configuration
|
||||
mkdir -p ~/.aws
|
||||
cat > ~/.aws/credentials << EOL
|
||||
[r2]
|
||||
aws_access_key_id = $R2_ACCESS_KEY
|
||||
aws_secret_access_key = $R2_SECRET_KEY
|
||||
EOL
|
||||
|
||||
cat > ~/.aws/config << EOL
|
||||
[profile r2]
|
||||
region = auto
|
||||
endpoint_url = https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com
|
||||
EOL
|
||||
|
||||
echo "✅ R2 configuration complete"
|
||||
echo "node-exporter installed"
|
||||
|
||||
echo "🎉 Setup complete! You can find helpful Docker and R2 commands in ~/docker-commands.sh"
|
||||
echo "Test your R2 connection: aws s3 ls --profile r2"
|
||||
Reference in New Issue
Block a user