lab:kubernetes_app:step_1_-_set_up_the_host
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lab:kubernetes_app:step_1_-_set_up_the_host [2024/02/01 01:17] – improved user | lab:kubernetes_app:step_1_-_set_up_the_host [2024/05/13 18:16] (current) – removed user | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Step 1 - Set up the Host ====== | ||
- | You will need to set up a large-ish Ubuntu system. This will be home to the Oracle VirtualBox virtual machines (VM' | ||
- | ====== Install Ubuntu 22.04 Desktop ====== | ||
- | The first step is to install Ubuntu 22.04 Desktop on the host system. It's a good idea to use a " | ||
- | |||
- | // See [[https:// | ||
- | |||
- | ====== Update and Install Packages ====== | ||
- | Once installation is complete, follow best practice to upgrade software packages on the system. Open Terminal and enter the commands below. | ||
- | |||
- | <code bash> | ||
- | sudo apt update | ||
- | sudo apt upgrade -y | ||
- | </ | ||
- | |||
- | Next we will add the ppa:ansible repository and install a number of packages. | ||
- | <code bash> | ||
- | sudo apt-add-repository ppa: | ||
- | sudo apt update | ||
- | sudo apt install openssh-server vim ansible p7zip xorriso ansible python3-passlib -y | ||
- | </ | ||
- | |||
- | You should now be able to ssh to your host. | ||
- | |||
- | // See [[https:// | ||
- | |||
- | ====== Configure the ansible User and Generate Keys ====== | ||
- | - Create the user ansible and give sudo permission (and enter a password for the user when prompted) | ||
- | * < | ||
- | sudo useradd -m -s /bin/bash ansible | ||
- | sudo usermod -aG sudo ansible | ||
- | sudo passwd ansible | ||
- | </ | ||
- | * // See [[https:// | ||
- | - Test the new user | ||
- | * From your regular login switch to the '' | ||
- | * '' | ||
- | * Enter the password | ||
- | * '' | ||
- | * exit | ||
- | * Test connecting to your host via SSH with user '' | ||
- | * For the rest of the lab, we will be logged in as the '' | ||
- | - Create Keys for Ansible Management | ||
- | * Ensure you are logged as the user '' | ||
- | * < | ||
- | * __Do not__ enter a passphrase | ||
- | * View the public key and __save it for a later step__ | ||
- | * < | ||
- | * It will look like this: | ||
- | * < | ||
- | |||
- | ====== Install Oracle VirtualBox Using Ansible====== | ||
- | NOTE There are many references out there if you don't want to use Ansible to install VirtualBox (e.g., [[https:// | ||
- | |||
- | Run the following playbook to install VirtualBox. | ||
- | |||
- | <file yaml install-virtualbox.yml> | ||
- | --- | ||
- | - hosts: localhost | ||
- | connection: local | ||
- | become: true | ||
- | tasks: | ||
- | - name: Add Oracle apt key | ||
- | apt_key: | ||
- | url: https:// | ||
- | state: present | ||
- | - name: Add Virtualbox repo | ||
- | apt_repository: | ||
- | repo: "deb [arch=amd64] https:// | ||
- | state: present | ||
- | - name: Install Virtualbox | ||
- | apt: | ||
- | pkg: | ||
- | - virtualbox | ||
- | state: present | ||
- | update_cache: | ||
- | - name: Ensure vboxdrv kernel module is loaded (optional) | ||
- | modprobe: | ||
- | name: vboxdrv | ||
- | state: present | ||
- | </ | ||
- | |||
- | Run as < | ||
- | Enter the password for the user '' | ||
- | |||
- | ====== Restart the Host ====== | ||
- | Run '' | ||
- | |||
- | ====== Next Step ====== | ||
- | Continue to [[Step 2 - Deploy the VMs]] | ||
- | |||
- | Or back to [[lab: |
lab/kubernetes_app/step_1_-_set_up_the_host.1706750238.txt.gz · Last modified: 2024/02/01 01:17 by user