Tutorial

Nuevas actualizaciones y mejoras para Macfleet.

Aviso importante

Los ejemplos de código y scripts proporcionados en estos tutoriales son solo para propósitos educativos. Macfleet no es responsable de ningún problema, daño o vulnerabilidad de seguridad que pueda surgir del uso, modificación o implementación de estos ejemplos. Siempre revisa y prueba el código en un entorno seguro antes de usarlo en sistemas de producción.

Manage Bluetooth Menu on Status Bar in macOS

Managing the visibility of system menus in the status bar is essential for maintaining a consistent user experience across your Mac fleet. This tutorial shows you how to control the Bluetooth menu display on macOS devices using shell scripts.

Why Manage Bluetooth Menu Visibility

Controlling the Bluetooth menu visibility helps with:

  • Consistent user experience: Standardize interface elements across all devices
  • Quick access management: Provide users with convenient Bluetooth controls
  • Support efficiency: Reduce support tickets by ensuring easy access to Bluetooth settings
  • Enterprise compliance: Maintain consistent UI standards across the organization
  • User productivity: Enable quick Bluetooth connection management

Understanding Control Center Configuration

macOS uses the Control Center preference system to manage status bar items. The Bluetooth menu is controlled through the com.apple.controlcenter.plist file with these key values:

  • Value 18: Show Bluetooth menu in status bar
  • Value 0: Hide Bluetooth menu from status bar

Basic Bluetooth Menu Management

Show Bluetooth Menu in Status Bar

#!/bin/bash

# Script to show Bluetooth menu on status bar
CurrentUser=$(ls -l /dev/console | awk '/ / { print $3 }')
CurrentUserUID=$(id -u "$CurrentUser")

launchctl asuser $CurrentUserUID sudo -iu "$CurrentUser" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18

echo "Bluetooth menu enabled on status bar for user: $CurrentUser"

Hide Bluetooth Menu from Status Bar

#!/bin/bash

# Script to hide Bluetooth menu from status bar
CurrentUser=$(ls -l /dev/console | awk '/ / { print $3 }')
CurrentUserUID=$(id -u "$CurrentUser")

launchctl asuser $CurrentUserUID sudo -iu "$CurrentUser" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 0

echo "Bluetooth menu hidden from status bar for user: $CurrentUser"

Enhanced Bluetooth Menu Management

Comprehensive Bluetooth Status Script

#!/bin/bash

# Enhanced Bluetooth menu management with validation
DEVICE_NAME=$(scutil --get ComputerName)
CURRENT_USER=$(ls -l /dev/console | awk '/ / { print $3 }')
CURRENT_USER_UID=$(id -u "$CURRENT_USER")
LOG_FILE="/var/log/macfleet_bluetooth_menu.log"

# Function to log messages
log_message() {
    echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
}

# Function to get current Bluetooth menu status
get_bluetooth_status() {
    local status=$(launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost read com.apple.controlcenter.plist Bluetooth 2>/dev/null)
    echo "$status"
}

# Function to show Bluetooth menu
show_bluetooth_menu() {
    launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18
    log_message "Bluetooth menu enabled on $DEVICE_NAME for user $CURRENT_USER"
}

# Function to hide Bluetooth menu
hide_bluetooth_menu() {
    launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 0
    log_message "Bluetooth menu hidden on $DEVICE_NAME for user $CURRENT_USER"
}

# Function to validate current state
validate_bluetooth_state() {
    local current_status=$(get_bluetooth_status)
    log_message "Current Bluetooth menu status: $current_status"
    
    if [ "$current_status" = "18" ]; then
        echo "✅ Bluetooth menu is currently visible in status bar"
    elif [ "$current_status" = "0" ]; then
        echo "❌ Bluetooth menu is currently hidden from status bar"
    else
        echo "⚠️  Bluetooth menu status is undefined or not set"
    fi
}

# Main execution
log_message "Starting Bluetooth menu management on $DEVICE_NAME"

# Check current status
validate_bluetooth_state

# Example: Show Bluetooth menu (uncomment to use)
# show_bluetooth_menu

# Example: Hide Bluetooth menu (uncomment to use)
# hide_bluetooth_menu

# Verify change
validate_bluetooth_state
log_message "Bluetooth menu management completed"

Interactive Bluetooth Menu Manager

#!/bin/bash

# Interactive Bluetooth menu manager
CURRENT_USER=$(ls -l /dev/console | awk '/ / { print $3 }')
CURRENT_USER_UID=$(id -u "$CURRENT_USER")

# Function to get current status
get_current_status() {
    local status=$(launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost read com.apple.controlcenter.plist Bluetooth 2>/dev/null)
    case "$status" in
        18) echo "visible" ;;
        0) echo "hidden" ;;
        *) echo "undefined" ;;
    esac
}

# Function to toggle Bluetooth menu
toggle_bluetooth_menu() {
    local current_status=$(get_current_status)
    
    if [ "$current_status" = "visible" ]; then
        launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 0
        echo "Bluetooth menu has been hidden from status bar"
    else
        launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18
        echo "Bluetooth menu has been shown in status bar"
    fi
}

# Display current status
echo "MacFleet Bluetooth Menu Manager"
echo "==============================="
echo "Device: $(scutil --get ComputerName)"
echo "User: $CURRENT_USER"
echo "Current Bluetooth menu status: $(get_current_status)"
echo ""

# Provide options
echo "Options:"
echo "1. Show Bluetooth menu"
echo "2. Hide Bluetooth menu"
echo "3. Toggle Bluetooth menu"
echo "4. Check current status"
echo ""

read -p "Enter your choice (1-4): " choice

case $choice in
    1)
        launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18
        echo "✅ Bluetooth menu is now visible in status bar"
        ;;
    2)
        launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 0
        echo "❌ Bluetooth menu is now hidden from status bar"
        ;;
    3)
        toggle_bluetooth_menu
        ;;
    4)
        echo "Current status: $(get_current_status)"
        ;;
    *)
        echo "Invalid choice. Please run the script again."
        ;;
esac

Advanced Control Center Management

Comprehensive Control Center Configuration

#!/bin/bash

# Comprehensive Control Center menu management
CURRENT_USER=$(ls -l /dev/console | awk '/ / { print $3 }')
CURRENT_USER_UID=$(id -u "$CURRENT_USER")

# Define Control Center menu items and their values
declare -A control_center_items=(
    ["Bluetooth"]="18"
    ["WiFi"]="18"
    ["AirDrop"]="18"
    ["Focus"]="18"
    ["StageManager"]="18"
    ["Display"]="18"
    ["Sound"]="18"
    ["NowPlaying"]="18"
    ["ScreenMirroring"]="18"
    ["Battery"]="18"
    ["Clock"]="18"
    ["UserSwitcher"]="18"
)

# Function to configure Control Center item
configure_control_center_item() {
    local item="$1"
    local value="$2"
    local action="$3"
    
    launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost write com.apple.controlcenter.plist "$item" -int "$value"
    
    if [ "$value" = "18" ]; then
        echo "✅ $item: Enabled in status bar"
    else
        echo "❌ $item: Disabled in status bar"
    fi
}

# Function to show all Control Center items
show_all_items() {
    echo "Enabling all Control Center items..."
    for item in "${!control_center_items[@]}"; do
        configure_control_center_item "$item" "18"
    done
}

# Function to hide all Control Center items
hide_all_items() {
    echo "Disabling all Control Center items..."
    for item in "${!control_center_items[@]}"; do
        configure_control_center_item "$item" "0"
    done
}

# Function to show current status of all items
show_current_status() {
    echo "Current Control Center Status:"
    echo "=============================="
    
    for item in "${!control_center_items[@]}"; do
        local current_value=$(launchctl asuser $CURRENT_USER_UID sudo -iu "$CURRENT_USER" defaults -currentHost read com.apple.controlcenter.plist "$item" 2>/dev/null)
        
        case "$current_value" in
            18) echo "✅ $item: Visible" ;;
            0) echo "❌ $item: Hidden" ;;
            *) echo "⚠️  $item: Not configured" ;;
        esac
    done
}

# Function to configure essential items only
configure_essential_items() {
    echo "Configuring essential Control Center items..."
    
    # Essential items for most users
    essential_items=("Bluetooth" "WiFi" "Sound" "Battery" "Clock")
    
    # Hide all items first
    hide_all_items
    
    # Show only essential items
    for item in "${essential_items[@]}"; do
        configure_control_center_item "$item" "18"
    done
}

# Main menu
echo "MacFleet Control Center Manager"
echo "==============================="
echo "Device: $(scutil --get ComputerName)"
echo "User: $CURRENT_USER"
echo ""

show_current_status

echo ""
echo "Management Options:"
echo "1. Show all Control Center items"
echo "2. Hide all Control Center items"
echo "3. Show essential items only"
echo "4. Show only Bluetooth menu"
echo "5. Hide only Bluetooth menu"
echo "6. Check current status"
echo ""

read -p "Enter your choice (1-6): " choice

case $choice in
    1) show_all_items ;;
    2) hide_all_items ;;
    3) configure_essential_items ;;
    4) configure_control_center_item "Bluetooth" "18" ;;
    5) configure_control_center_item "Bluetooth" "0" ;;
    6) show_current_status ;;
    *) echo "Invalid choice. Please run the script again." ;;
esac

echo ""
echo "Configuration completed. Changes may require logout/login to take full effect."

Enterprise Deployment Scripts

Bulk Bluetooth Menu Configuration

#!/bin/bash

# Bulk Bluetooth menu configuration for enterprise deployment
COMPANY_NAME="MacFleet"
DEPLOYMENT_DATE=$(date +"%Y-%m-%d")
LOG_FILE="/var/log/macfleet_bluetooth_deployment.log"
REPORT_FILE="/tmp/bluetooth_deployment_report_$(date +%Y%m%d_%H%M%S).txt"

# Configuration settings
BLUETOOTH_ENABLED=true  # Set to false to disable
FORCE_RESTART_CONTROL_CENTER=true

# Function to log messages
log_message() {
    echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
}

# Function to get device information
get_device_info() {
    local device_name=$(scutil --get ComputerName)
    local device_serial=$(system_profiler SPHardwareDataType | grep "Serial Number" | awk '{print $4}')
    local macos_version=$(sw_vers -productVersion)
    local current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    
    echo "Device: $device_name"
    echo "Serial: $device_serial"
    echo "macOS: $macos_version"
    echo "User: $current_user"
}

# Function to configure Bluetooth menu
configure_bluetooth_menu() {
    local enable_bluetooth="$1"
    local current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    local current_user_uid=$(id -u "$current_user")
    
    if [ "$enable_bluetooth" = true ]; then
        launchctl asuser $current_user_uid sudo -iu "$current_user" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18
        log_message "Bluetooth menu enabled for user $current_user"
        echo "✅ Bluetooth menu enabled"
    else
        launchctl asuser $current_user_uid sudo -iu "$current_user" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 0
        log_message "Bluetooth menu disabled for user $current_user"
        echo "❌ Bluetooth menu disabled"
    fi
}

# Function to restart Control Center
restart_control_center() {
    local current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    local current_user_uid=$(id -u "$current_user")
    
    # Kill Control Center process to force reload
    launchctl asuser $current_user_uid sudo -iu "$current_user" killall ControlCenter 2>/dev/null
    log_message "Control Center restarted for user $current_user"
}

# Function to validate deployment
validate_deployment() {
    local current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    local current_user_uid=$(id -u "$current_user")
    local bluetooth_status=$(launchctl asuser $current_user_uid sudo -iu "$current_user" defaults -currentHost read com.apple.controlcenter.plist Bluetooth 2>/dev/null)
    
    if [ "$BLUETOOTH_ENABLED" = true ] && [ "$bluetooth_status" = "18" ]; then
        echo "✅ Deployment successful - Bluetooth menu is visible"
        log_message "Deployment validation successful"
        return 0
    elif [ "$BLUETOOTH_ENABLED" = false ] && [ "$bluetooth_status" = "0" ]; then
        echo "✅ Deployment successful - Bluetooth menu is hidden"
        log_message "Deployment validation successful"
        return 0
    else
        echo "❌ Deployment validation failed"
        log_message "Deployment validation failed - Expected: $BLUETOOTH_ENABLED, Got: $bluetooth_status"
        return 1
    fi
}

# Main deployment process
echo "$COMPANY_NAME Bluetooth Menu Deployment" > "$REPORT_FILE"
echo "=========================================" >> "$REPORT_FILE"
echo "Date: $DEPLOYMENT_DATE" >> "$REPORT_FILE"
echo "" >> "$REPORT_FILE"

get_device_info >> "$REPORT_FILE"
echo "" >> "$REPORT_FILE"

log_message "Starting Bluetooth menu deployment"
echo "Starting deployment..." >> "$REPORT_FILE"

# Configure Bluetooth menu
configure_bluetooth_menu $BLUETOOTH_ENABLED

# Restart Control Center if requested
if [ "$FORCE_RESTART_CONTROL_CENTER" = true ]; then
    restart_control_center
    sleep 2
fi

# Validate deployment
if validate_deployment; then
    echo "Status: SUCCESS" >> "$REPORT_FILE"
else
    echo "Status: FAILED" >> "$REPORT_FILE"
fi

log_message "Deployment completed"
echo "Deployment completed. Report saved to: $REPORT_FILE"
cat "$REPORT_FILE"

Remote Bluetooth Menu Management

#!/bin/bash

# Remote Bluetooth menu management with JSON reporting
CENTRAL_SERVER="your-macfleet-server.com"
DEVICE_ID=$(system_profiler SPHardwareDataType | grep "Serial Number" | awk '{print $4}')
REPORT_FILE="/tmp/bluetooth_menu_report_${DEVICE_ID}.json"

# Function to create JSON report
create_json_report() {
    local device_name=$(scutil --get ComputerName)
    local device_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    local device_user_uid=$(id -u "$device_user")
    local os_version=$(sw_vers -productVersion)
    local timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
    
    # Get current Bluetooth menu status
    local bluetooth_status=$(launchctl asuser $device_user_uid sudo -iu "$device_user" defaults -currentHost read com.apple.controlcenter.plist Bluetooth 2>/dev/null)
    
    cat > "$REPORT_FILE" << EOF
{
  "device_info": {
    "device_id": "$DEVICE_ID",
    "device_name": "$device_name",
    "user": "$device_user",
    "os_version": "$os_version",
    "timestamp": "$timestamp"
  },
  "bluetooth_menu": {
    "status": "$bluetooth_status",
    "visible": $([ "$bluetooth_status" = "18" ] && echo "true" || echo "false"),
    "configured": $([ -n "$bluetooth_status" ] && echo "true" || echo "false")
  },
  "control_center": {
    "items": {
EOF

    # Check other Control Center items
    local items=("WiFi" "AirDrop" "Focus" "Display" "Sound" "NowPlaying" "Battery" "Clock")
    local first_item=true
    
    for item in "${items[@]}"; do
        local item_status=$(launchctl asuser $device_user_uid sudo -iu "$device_user" defaults -currentHost read com.apple.controlcenter.plist "$item" 2>/dev/null)
        
        if [ "$first_item" = false ]; then
            echo "," >> "$REPORT_FILE"
        fi
        
        echo "      \"$item\": {" >> "$REPORT_FILE"
        echo "        \"status\": \"$item_status\"," >> "$REPORT_FILE"
        echo "        \"visible\": $([ "$item_status" = "18" ] && echo "true" || echo "false")" >> "$REPORT_FILE"
        echo "      }" >> "$REPORT_FILE"
        
        first_item=false
    done
    
    echo "" >> "$REPORT_FILE"
    echo "    }" >> "$REPORT_FILE"
    echo "  }" >> "$REPORT_FILE"
    echo "}" >> "$REPORT_FILE"
}

# Function to apply configuration from server
apply_server_config() {
    local config_url="https://$CENTRAL_SERVER/api/device-config/$DEVICE_ID"
    
    # Download configuration (example)
    # curl -s "$config_url" -o "/tmp/device_config.json"
    
    # For demonstration, we'll use a local example
    echo "Applying server configuration..."
    
    # Example: Enable Bluetooth menu
    local current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
    local current_user_uid=$(id -u "$current_user")
    
    launchctl asuser $current_user_uid sudo -iu "$current_user" defaults -currentHost write com.apple.controlcenter.plist Bluetooth -int 18
    
    echo "Server configuration applied successfully"
}

# Main execution
echo "MacFleet Remote Bluetooth Menu Management"
echo "========================================"
echo "Device ID: $DEVICE_ID"

# Create initial report
create_json_report

# Display current status
echo "Current Bluetooth menu status: $(grep -o '"visible": [^,]*' "$REPORT_FILE" | head -1 | cut -d' ' -f2)"

# Apply server configuration if needed
# apply_server_config

# Create final report
create_json_report

echo "Report generated: $REPORT_FILE"
echo "Device reporting completed"

# Optional: Send to central server
# curl -X POST -H "Content-Type: application/json" -d @"$REPORT_FILE" "https://$CENTRAL_SERVER/api/device-reports"

Best Practices for Status Bar Management

1. User Experience Considerations

  • Maintain consistent status bar layouts across all devices
  • Provide essential tools while avoiding clutter
  • Consider user workflow requirements

2. Deployment Strategy

  • Test configuration changes on a small group first
  • Document standard configurations for different user types
  • Provide rollback procedures

3. Change Management

  • Notify users of interface changes in advance
  • Provide training materials for new configurations
  • Monitor support requests after changes

4. Monitoring and Maintenance

  • Regular audits of status bar configurations
  • Automated compliance checking
  • User feedback collection

Troubleshooting Common Issues

Issue: Changes Not Taking Effect

# Force Control Center restart
killall ControlCenter
sleep 2

# Check if preferences are properly written
defaults -currentHost read com.apple.controlcenter.plist Bluetooth

Issue: Permission Denied

# Verify user context
current_user=$(ls -l /dev/console | awk '/ / { print $3 }')
echo "Current user: $current_user"

# Check user permissions
id "$current_user"

Issue: macOS Version Compatibility

# Check macOS version
macos_version=$(sw_vers -productVersion)
echo "macOS version: $macos_version"

# For macOS 12.0 and below, use different preference location
if [[ "$macos_version" < "12.0" ]]; then
    echo "Using legacy preferences location"
    # Use different defaults domain for older versions
fi

Issue: Preferences Not Persisting

# Force preferences synchronization
defaults -currentHost synchronize

# Check if preferences file exists
ls -la ~/Library/Preferences/ByHost/com.apple.controlcenter.*

Conclusion

Managing Bluetooth menu visibility in the status bar is a simple but effective way to standardize the user experience across your Mac fleet. These scripts provide:

  • Consistent interface: Standardized status bar layouts
  • Remote management: Centralized control over UI elements
  • User productivity: Quick access to essential controls
  • Enterprise compliance: Maintaining organizational standards

Regular implementation of these status bar management practices will help ensure a consistent and productive user experience across your entire Mac fleet.

For more advanced Control Center management, consider integrating these scripts with your existing device management and configuration tools.

Tutorial

Nuevas actualizaciones y mejoras para Macfleet.

Configurando un Runner de GitHub Actions en un Mac Mini (Apple Silicon)

Runner de GitHub Actions

GitHub Actions es una plataforma poderosa de CI/CD que te permite automatizar tus flujos de trabajo de desarrollo de software. Aunque GitHub ofrece runners hospedados, los runners auto-hospedados proporcionan mayor control y personalización para tu configuración de CI/CD. Este tutorial te guía a través de la configuración y conexión de un runner auto-hospedado en un Mac mini para ejecutar pipelines de macOS.

Prerrequisitos

Antes de comenzar, asegúrate de tener:

  • Un Mac mini (regístrate en Macfleet)
  • Un repositorio de GitHub con derechos de administrador
  • Un gestor de paquetes instalado (preferiblemente Homebrew)
  • Git instalado en tu sistema

Paso 1: Crear una Cuenta de Usuario Dedicada

Primero, crea una cuenta de usuario dedicada para el runner de GitHub Actions:

# Crear la cuenta de usuario 'gh-runner'
sudo dscl . -create /Users/gh-runner
sudo dscl . -create /Users/gh-runner UserShell /bin/bash
sudo dscl . -create /Users/gh-runner RealName "GitHub runner"
sudo dscl . -create /Users/gh-runner UniqueID "1001"
sudo dscl . -create /Users/gh-runner PrimaryGroupID 20
sudo dscl . -create /Users/gh-runner NFSHomeDirectory /Users/gh-runner

# Establecer la contraseña para el usuario
sudo dscl . -passwd /Users/gh-runner tu_contraseña

# Agregar 'gh-runner' al grupo 'admin'
sudo dscl . -append /Groups/admin GroupMembership gh-runner

Cambia a la nueva cuenta de usuario:

su gh-runner

Paso 2: Instalar Software Requerido

Instala Git y Rosetta 2 (si usas Apple Silicon):

# Instalar Git si no está ya instalado
brew install git

# Instalar Rosetta 2 para Macs Apple Silicon
softwareupdate --install-rosetta

Paso 3: Configurar el Runner de GitHub Actions

  1. Ve a tu repositorio de GitHub
  2. Navega a Configuración > Actions > Runners

Runner de GitHub Actions

  1. Haz clic en "New self-hosted runner" (https://github.com/<username>/<repository>/settings/actions/runners/new)
  2. Selecciona macOS como imagen del runner y ARM64 como arquitectura
  3. Sigue los comandos proporcionados para descargar y configurar el runner

Runner de GitHub Actions

Crea un archivo .env en el directorio _work del runner:

# archivo _work/.env
ImageOS=macos15
XCODE_15_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
  1. Ejecuta el script run.sh en tu directorio del runner para completar la configuración.
  2. Verifica que el runner esté activo y escuchando trabajos en la terminal y revisa la configuración del repositorio de GitHub para la asociación del runner y el estado Idle.

Runner de GitHub Actions

Paso 4: Configurar Sudoers (Opcional)

Si tus acciones requieren privilegios de root, configura el archivo sudoers:

sudo visudo

Agrega la siguiente línea:

gh-runner ALL=(ALL) NOPASSWD: ALL

Paso 5: Usar el Runner en Flujos de Trabajo

Configura tu flujo de trabajo de GitHub Actions para usar el runner auto-hospedado:

name: Flujo de trabajo de muestra

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: [self-hosted, macOS, ARM64]
    steps:
      - name: Instalar NodeJS
        run: brew install node

El runner está autenticado en tu repositorio y etiquetado con self-hosted, macOS, y ARM64. Úsalo en tus flujos de trabajo especificando estas etiquetas en el campo runs-on:

runs-on: [self-hosted, macOS, ARM64]

Mejores Prácticas

  • Mantén tu software del runner actualizado
  • Monitorea regularmente los logs del runner para problemas
  • Usa etiquetas específicas para diferentes tipos de runners
  • Implementa medidas de seguridad apropiadas
  • Considera usar múltiples runners para balanceo de carga

Solución de Problemas

Problemas comunes y soluciones:

  1. Runner no conectando:

    • Verifica conectividad de red
    • Verifica validez del token de GitHub
    • Asegúrate de permisos apropiados
  2. Fallas de construcción:

    • Verifica instalación de Xcode
    • Verifica dependencias requeridas
    • Revisa logs del flujo de trabajo
  3. Problemas de permisos:

    • Verifica permisos de usuario
    • Verifica configuración de sudoers
    • Revisa permisos del sistema de archivos

Conclusión

Ahora tienes un runner auto-hospedado de GitHub Actions configurado en tu Mac mini. Esta configuración te proporciona más control sobre tu entorno de CI/CD y te permite ejecutar flujos de trabajo específicos de macOS de manera eficiente.

Recuerda mantener regularmente tu runner y mantenerlo actualizado con los últimos parches de seguridad y versiones de software.

Aplicación Nativa

Aplicación nativa de Macfleet

Guía de Instalación de Macfleet

Macfleet es una solución poderosa de gestión de flota diseñada específicamente para entornos de Mac Mini alojados en la nube. Como proveedor de hosting en la nube de Mac Mini, puedes usar Macfleet para monitorear, gestionar y optimizar toda tu flota de instancias Mac virtualizadas.

Esta guía de instalación te llevará a través de la configuración del monitoreo de Macfleet en sistemas macOS, Windows y Linux para asegurar una supervisión integral de tu infraestructura en la nube.

🍎 macOS

  • Descarga el archivo .dmg para Mac aquí
  • Haz doble clic en el archivo .dmg descargado
  • Arrastra la aplicación Macfleet a la carpeta Aplicaciones
  • Expulsa el archivo .dmg
  • Abre Preferencias del Sistema > Seguridad y Privacidad
    • Pestaña Privacidad > Accesibilidad
    • Marca Macfleet para permitir el monitoreo
  • Inicia Macfleet desde Aplicaciones
  • El seguimiento comienza automáticamente

🪟 Windows

  • Descarga el archivo .exe para Windows aquí
  • Haz clic derecho en el archivo .exe > "Ejecutar como administrador"
  • Sigue el asistente de instalación
  • Acepta los términos y condiciones
  • Permite en Windows Defender si se solicita
  • Concede permisos de monitoreo de aplicaciones
  • Inicia Macfleet desde el Menú Inicio
  • La aplicación comienza el seguimiento automáticamente

🐧 Linux

  • Descarga el paquete .deb (Ubuntu/Debian) o .rpm (CentOS/RHEL) aquí
  • Instala usando tu gestor de paquetes
    • Ubuntu/Debian: sudo dpkg -i Macfleet-linux.deb
    • CentOS/RHEL: sudo rpm -ivh Macfleet-linux.rpm
  • Permite permisos de acceso X11 si se solicita
  • Agrega el usuario a los grupos apropiados si es necesario
  • Inicia Macfleet desde el menú de Aplicaciones
  • La aplicación comienza el seguimiento automáticamente

Nota: Después de la instalación en todos los sistemas, inicia sesión con tus credenciales de Macfleet para sincronizar datos con tu panel de control.