Skip to content

clouddrove/machine-setup

DevOps Machine Setup πŸš€

License: MIT Ansible Lint

An open-source Ansible playbook that automates the installation and configuration of essential DevOps tools on Ubuntu systems. Set up your development environment in minutes with a single command!

Originally developed by Clouddrove, now open-source and community-driven.

✨ Features

  • 🎯 One-Command Setup: Install 20+ DevOps tools with make setup
  • 🧩 Modular Design: Well-organized Ansible roles for easy customization
  • πŸ”’ Secure: GPG key verification for all packages
  • πŸ“š Well Documented: Comprehensive guides for beginners and experts
  • πŸ§ͺ Tested: Linted, tested, and production-ready
  • πŸŽ“ Beginner Friendly: Clear documentation and helpful error messages

πŸ› οΈ What Gets Installed?

DevOps Tools

  • Git - Version control (configured with your details)
  • Docker & Docker Compose - Container platform
  • AWS CLI v2 - Amazon Web Services CLI
  • Azure CLI - Microsoft Azure cloud management
  • GCP CLI (gcloud) - Google Cloud Platform CLI
  • Kubectl - Kubernetes command-line tool
  • Helm - Kubernetes package manager
  • k9s - Kubernetes terminal UI
  • Terraform - Infrastructure as code (via tfswitch)
  • Ansible - Automation and configuration management
  • Visual Studio Code - Industry-standard code editor
  • Lens - Kubernetes IDE

Web Browsers

  • Google Chrome - Web browser
  • Brave Browser - Privacy-focused browser
  • Tor Browser - Anonymous browsing

Communication Tools

  • Slack - Team collaboration
  • Zoom - Video conferencing
  • Telegram - Messaging app
  • Discord - Developer communities
  • Microsoft Teams - Enterprise communication

System Configuration

  • SSH Keys - Secure shell authentication
  • Oh My Zsh - Enhanced Zsh shell with plugins

πŸ“‹ Prerequisites

  • Operating System: Ubuntu 20.04 or later
  • Permissions: Sudo/root access
  • Internet: Active internet connection
  • Ansible: Will be auto-installed if missing (via Makefile)

🍎 Using macOS? This playbook requires Ubuntu Linux. See TESTING_ON_MAC.md for testing options using VMs or containers.

πŸš€ Quick Start

Option 1: Using Makefile (Recommended)

# Clone the repository
git clone <repository-url>
cd machine-setup

# Run setup (handles everything automatically)
make setup

That's it! The Makefile will:

  • Check and install Ansible if needed
  • Verify your system
  • Run the playbook
  • Guide you through the setup

Option 2: Manual Installation

# 1. Install Ansible
sudo apt update
sudo apt install -y ansible

# 2. Run the playbook
ansible-playbook -i ./inventories/hosts.ini ./playbooks/tools_setup.yml

What to Expect

During setup, you'll be prompted for:

  1. Git Username - Your Git username (e.g., john.doe)
  2. Git Email - Your Git email address (e.g., john.doe@example.com)

Note: Your hostname will be automatically generated as DEV-{random_number} (e.g., DEV-45678). You can customize this by setting the hostname_prefix variable.

πŸ“– Available Commands

The project includes a Makefile with helpful commands:

make help              # Show all available commands
make setup            # Run the Ansible playbook (main command)
make lint             # Run ansible-lint on all files
make syntax-check     # Check playbook syntax
make test             # Run all tests (lint + syntax)
make install-pre-commit  # Install pre-commit hooks
make run-pre-commit   # Run pre-commit on all files
make clean           # Clean up temporary files
make info            # Display system information

# Testing on Mac (see TESTING_ON_MAC.md)
make test-multipass  # Test using Multipass (easiest)
make test-docker     # Test using Docker
make test-vagrant    # Test using Vagrant
make test-help       # Show testing options

βš™οΈ Customization

Custom Hostname Prefix

By default, hostnames are set as DEV-{random_number}. To use a custom prefix:

ansible-playbook -i ./inventories/hosts.ini ./playbooks/tools_setup.yml -e hostname_prefix=MYORG

Selective Installation

You can install only specific tools using tags:

# Only install DevOps tools
ansible-playbook -i ./inventories/hosts.ini ./playbooks/tools_setup.yml --tags devops-tools

# Only install browsers
ansible-playbook -i ./inventories/hosts.ini ./playbooks/tools_setup.yml --tags web-browsers

# Only install communication tools
ansible-playbook -i ./inventories/hosts.ini ./playbooks/tools_setup.yml --tags communication-tools

Configure Browsers

Edit roles/browsers/defaults/main.yml to select which browsers to install:

browsers:
  - chrome
  # - brave  # Comment out to skip
  # - tor    # Comment out to skip

πŸ“ Project Structure

machine-setup/
β”œβ”€β”€ Makefile                 # Main commands (make setup, make lint, etc.)
β”œβ”€β”€ playbooks/
β”‚   └── tools_setup.yml     # Main Ansible playbook
β”œβ”€β”€ roles/                   # Ansible roles (modular components)
β”‚   β”œβ”€β”€ devops/             # DevOps tools (Git, Docker, AWS, etc.)
β”‚   β”œβ”€β”€ browsers/           # Web browsers
β”‚   β”œβ”€β”€ communication-tools/ # Slack, Zoom, Telegram
β”‚   └── system-configuration/ # SSH Keys, Oh My Zsh
β”œβ”€β”€ inventories/
β”‚   └── hosts.ini           # Inventory file (target hosts)
β”œβ”€β”€ .ansible-lint           # Ansible lint configuration
β”œβ”€β”€ .pre-commit-config.yaml # Pre-commit hooks
β”œβ”€β”€ requirements.yml        # Ansible collections requirements
└── .github/
    └── workflows/          # GitHub Actions CI/CD

⏱️ Installation Time

  • Fast internet: ~15 minutes
  • Slow internet: ~30 minutes

The playbook shows progress for each tool being installed.

πŸŽ“ Learning Resources

For Beginners

  • πŸ“– QUICKSTART.md - Step-by-step guide with troubleshooting
  • πŸ“š CONTRIBUTING.md - Learn how to contribute
  • πŸ’‘ Run make help to see all available commands

For Advanced Users

  • πŸ”§ CODE_REVIEW.md - Technical documentation and architecture
  • πŸ§ͺ Customize roles in roles/*/defaults/main.yml
  • πŸ—οΈ Modify tasks in roles/*/tasks/main.yml

πŸ†˜ Troubleshooting

Common Issues

Issue: "Ansible not found"

# Solution: Install Ansible
sudo apt update && sudo apt install -y ansible

Issue: "Permission denied"

# Solution: Make sure you have sudo access
sudo make setup

Issue: "Connection refused"

# Solution: Check inventories/hosts.ini
# Should contain: localhost ansible_connection=local

Issue: Installation takes too long

# This is normal! The playbook downloads many tools.
# Be patient, it typically takes 15-30 minutes.

Getting Help

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick contribution steps:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run make lint and make test
  5. Submit a pull request

πŸ”’ Security

  • πŸ” All packages use GPG key verification
  • πŸ›‘οΈ Only official package sources are used
  • πŸ”‘ SSH keys generated with secure defaults (RSA 4096)
  • 🧹 Temporary files are cleaned up after installation

For security concerns, please see SECURITY.md.

πŸ“ Code Quality

This project maintains high code quality standards:

  • βœ… Ansible Lint: All code is linted
  • βœ… Pre-commit Hooks: Automatic checks on commit
  • βœ… GitHub Actions: CI/CD pipeline for testing
  • βœ… Best Practices: Follows Ansible conventions

Run make lint to check code quality locally.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Originally developed by Clouddrove
  • Built with Ansible
  • Community-driven and open-source

πŸ“Š Project Status

  • βœ… Production Ready: Tested and stable
  • βœ… Open Source: MIT Licensed
  • βœ… Maintained: Active development
  • βœ… Documented: Comprehensive guides

🌟 Star History

If you find this project useful, please consider giving it a ⭐ on GitHub!


Made with ❀️ by the open-source community

For questions, suggestions, or contributions, please open an issue or pull request!

About

Setting up development environment, tools, and configurations on your machine.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •