diff --git a/README.md b/README.md index 7f0affc..c651cfc 100644 --- a/README.md +++ b/README.md @@ -19,30 +19,45 @@ This project provides a development environment for deploying an Ansible Control In this production-like setup, Semaphore, PostgreSQL and Nginx, run directly on the host system. This setup can host Clusterlust - the project to create a Kubernetes cluster with Kubespray. -## Installation +## Quick Start Windows/macOS/Ubuntu Laptop -Follow these steps to set up the environment: +### Follow these steps to set up the environment: -1. **Prerequisites**: +1. You will need a Hypervisor to create a virtual machine on your machine with **Vagrant** (discussed below). + - [VirtualBox](https://www.virtualbox.org/), available for Windows/macOS/Linux + - **Hyper-V** a Windows-only feature. + - [Vagrant](https://www.vagrantup.com/) available for Windows/macOS/Linux, download and install. - **Note**: The `inventory/local` configuration is suitable for direct deployment on systems like Ubuntu Jammy, Red Hat, AlmaLinux, or Rocky Linux (8). In this setup, Vagrant and VirtualBox are not required. - - [VirtualBox](https://www.virtualbox.org/), installed on your laptop. - - [Vagrant](https://www.vagrantup.com/) installed on your laptop. +2. Create a sub-directory named `controller` on your machine. +3. Copy the `Vagrantfile.template` from this repository to `Vagrantfile` in this directory. +4. + - If on Windows start an Administrator Powershell and change directory to the directory controller. + - In on Mac start a terminal and change directory to the directory controller. +5. Run `vagrant up` and take not of the IP address that is logged. +6. Browse with https to the IP address. (NOTE: The certificate is self-signed at first.) -2. **Clone the repository**: +## Quick Start AlmaLinux controller host + +### Prerequisites**: + + **Note**: The `inventory/local` configuration is suitable for direct deployment on systems like Red Hat, AlmaLinux, Rocky Linux (8), or Ubuntu Jammy. In this setup, Vagrant and VirtualBox are not required. + +### Follow these steps to set up the environment: + +1. **Clone the repository**: ```bash git clone https://github.com/playingfield/controller.git cd controller ``` -3. **Install Ansible in a Python virtualenv**: +2. **Install Ansible in a Python virtualenv**: ```bash source ansible.sh ./prepare.sh ``` -4. **Define the variables in inventory/{{ name }}/group_vars**: +3. **Define the variables in inventory/{{ name }}/group_vars**: For instance, when you use the `local` inventory on an Ubuntu 22.04 machine, change this file `inventory/local/group_vars/database.yml` from 15 to 14: @@ -50,7 +65,7 @@ Follow these steps to set up the environment: postgres_version: 14 ``` -5. **Define these secrets as environment variables** +4. **Define these secrets as environment variables** Store them in a safe place afterwards: ```bash diff --git a/Vagrantfile.template b/Vagrantfile.template index 851e498..f9efd4d 100644 --- a/Vagrantfile.template +++ b/Vagrantfile.template @@ -1,7 +1,6 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -# To use these virtual machines install Vagrant and VirtualBox. -# vagrant up +# To use these virtual machines install Vagrant and Hyper-V or VirtualBox. Vagrant.require_version ">= 2.0.0" Vagrant.configure(2) do |config| @@ -21,19 +20,15 @@ Vagrant.configure(2) do |config| # use the standard vagrant ssh key config.ssh.insert_key = false - - # Iterate through entries in JSON file - config.vm.box = "ansiblebook/controller" config.vm.hostname = "controller" config.vm.network "public_network", type: "dhcp", bridge: "Wi-Fi" - config.vm.network :forwarded_port, host: 8443, guest: 443 # set no_share to false to enable file sharing config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true config.vm.provider "hyperv" do |hyperv| hyperv.cpus = 4 - hyperv.memory = 4096 + hyperv.memory = 8192 hyperv.vmname = "controller" hyperv.enable_virtualization_extensions = true hyperv.vm_integration_services = { @@ -44,17 +39,12 @@ Vagrant.configure(2) do |config| } hyperv.linked_clone = true end - config.vm.provider :vmware_desktop do |vmware| - vmware.gui = false - vmware.vmx['memsize'] = 4096 - vmware.vmx['numvcpus'] = 4 - end config.vm.provider :virtualbox do |virtualbox| virtualbox.customize ["modifyvm", :id, "--audio-driver", "none", "--cpus", 4, - "--memory", 4096, - "--natnet1", "192.168.33.0/24", + "--memory", 8192, + "--natnet1", "192.168.33.0/24", "--graphicscontroller", "VMSVGA", "--vram", "64" ]