Standardize config files: use blockchain.env and node.env instead of .env
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 11s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 11s
Documentation Validation / validate-policies-strict (push) Successful in 4s
- Update CLI config to load from /etc/aitbc/blockchain.env - Update operational-features.md documentation - Update setup.sh to create/use blockchain.env - Update utility scripts (setup-credentials, migrate_secrets, generate_unique_node_ids, chain_regen_node, load-keystore-secrets) - Update workflow scripts (01_preflight_setup, hermes preflight setups) - Maintain backward compatibility for existing deployments
This commit is contained in:
@@ -13,18 +13,18 @@ systemctl stop aitbc-blockchain-* 2>/dev/null || true
|
||||
# 2. Update ALL systemd configurations (main files + drop-ins + overrides)
|
||||
echo "2. Updating systemd configurations..."
|
||||
# Update main service files
|
||||
sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' /opt/aitbc/systemd/aitbc-blockchain-*.service
|
||||
sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/blockchain.env|g' /opt/aitbc/systemd/aitbc-blockchain-*.service
|
||||
# Update drop-in configs
|
||||
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "10-central-env.conf" -exec sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' {} \; 2>/dev/null || true
|
||||
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "10-central-env.conf" -exec sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/blockchain.env|g' {} \; 2>/dev/null || true
|
||||
# Fix override configs (wrong venv paths)
|
||||
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "override.conf" -exec sed -i 's|/opt/aitbc/apps/blockchain-node/.venv/bin/python3|/opt/aitbc/venv/bin/python3|g' {} \; 2>/dev/null || true
|
||||
systemctl daemon-reload
|
||||
|
||||
# 3. Create central configuration file
|
||||
echo "3. Setting up central configuration file..."
|
||||
cp /opt/aitbc/.env /etc/aitbc/.env.backup 2>/dev/null || true
|
||||
# Ensure .env is in the correct location (already should be)
|
||||
mv /opt/aitbc/.env /etc/aitbc/.env 2>/dev/null || true
|
||||
cp /opt/aitbc/.env /etc/aitbc/blockchain.env.backup 2>/dev/null || true
|
||||
# Ensure blockchain.env is in the correct location
|
||||
mv /opt/aitbc/.env /etc/aitbc/blockchain.env 2>/dev/null || true
|
||||
|
||||
# 4. Setup AITBC CLI tool
|
||||
echo "4. Setting up AITBC CLI tool..."
|
||||
@@ -48,7 +48,7 @@ chmod 600 /var/lib/aitbc/keystore/.password
|
||||
# 7. Verify setup
|
||||
echo "7. Verifying setup..."
|
||||
aitbc --help 2>/dev/null || echo "CLI available but limited commands"
|
||||
ls -la /etc/aitbc/.env
|
||||
ls -la /etc/aitbc/blockchain.env
|
||||
|
||||
echo "✅ Pre-flight setup completed successfully!"
|
||||
echo "System is ready for multi-node blockchain deployment."
|
||||
|
||||
Reference in New Issue
Block a user