From 993f10e63554f61602708ef25a4c38c785f67914 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 1 Oct 2021 01:15:17 -0400 Subject: [PATCH] cleanup --- .gitignore | 0 README.md | 49 +------------------------------- libvirt/README.md | 60 +++++++++++++++++++++++++++++++++++++++- libvirt/ubuntu/README.md | 30 -------------------- roles/README.md | 7 ----- 5 files changed, 60 insertions(+), 86 deletions(-) delete mode 100644 .gitignore delete mode 100644 libvirt/ubuntu/README.md delete mode 100644 roles/README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index 61e0b8d..08ff31f 100644 --- a/README.md +++ b/README.md @@ -53,54 +53,7 @@ password: ubuntu ``` ## VM Install Option 2 (libvirt) - -### Install Packages (debian) -Install QEMU and KVM -``` -$ apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system virtinst -``` -Install other packages for the playbook -``` -$ apt install ansible cloud-image-utils dnsmasq ovmf -``` -Other packages that you probably don't need -``` -virtinst -virt-viewer -virt-manager -bridge-utils -``` -Also will need python - - -### Install Packages (archlinux) -**needs update** -``` -$ pacman -S qemu libvirt virt-install virt-viewer ansible -``` - -### Run Playbook -``` -ansible-playbook libvirt/main.yml -``` - -First, install ansible and sshpass. Perform all the following commands in the `post-install/` directory. - -Also install the extra roles -``` -$ ansible-galaxy install -r requirements.yml -``` -Check that ansible can talk to the vm: -``` -$ ansible -m ping all -``` - -We can now complete the rest of the post-install with -``` -$ ansible-playbook -K playbook.yml -``` - -## VM Install Option 3 (manual) +Follow instructions in the README.md of the libvirt directory ## System Details Further system information for those that are interested. diff --git a/libvirt/README.md b/libvirt/README.md index 10fb410..8ce23d6 100644 --- a/libvirt/README.md +++ b/libvirt/README.md @@ -1,4 +1,30 @@ ## Installation +### Prerequisites (debian) +Install QEMU and KVM +``` +$ apt install --no-install-recommends qemu-system libvirt-clients libvirt-daemon-system +``` +Install other packages for the playbook +``` +$ apt install ansible cloud-image-utils dnsmasq ovmf python3 +``` +Packages I can't tell if you need or not +``` +virtinst +virt-manager +bridge-utils +``` +Then install virt-viewer to interact run through the install with +``` +virt-viewer +``` +### Prerequisites (archlinux) +**needs update** +``` +$ pacman -S qemu libvirt virt-install virt-viewer ansible +``` +### Running the Playbook +Run the playbook from one directory down ``` ansible-playbook libvirt/main.yml ``` @@ -10,7 +36,7 @@ If vm is on a remote machine ``` virt-viewer --connect qemu+ssh://user@X.X.X.X/system mirror ``` -## Troubleshooting +### Troubleshooting ``` net.ipv4.ip_forward = 1 ``` @@ -24,3 +50,35 @@ user = "root" group = "root" $ service restart libvirtd ``` +### Installing Ubuntu +user: local +password: password + +TODO: add the rest of the images + + + +can just press enter for can't remove cdrom + +container may stop so will need to start with +``` +virsh start mirror +``` +after starting check the ip address of the vm with +``` +virsh net-dhcp-leases mirbr0 +``` +and ssh +``` +ssh local@192.168.123.XXX +``` + +in the machine switch to root and update before installing some packages and cloning the repo +``` +$ sudo su +$ cd +$ apt update && apt upgrade +$ apt install git ansible +$ git clone https://git.csclub.uwaterloo.ca/public/mirror-env.git +``` +then enter `mirror-env/mirror` and use the instructions listed there \ No newline at end of file diff --git a/libvirt/ubuntu/README.md b/libvirt/ubuntu/README.md deleted file mode 100644 index 4bf2abf..0000000 --- a/libvirt/ubuntu/README.md +++ /dev/null @@ -1,30 +0,0 @@ -user: local -password: password - -TODO: add images - - -can just press enter for can't remove cdrom - -container may stop so will need to start with -``` -virsh start mirror -``` -after starting check the ip address of the vm with -``` -virsh net-dhcp-leases mirbr0 -``` -and ssh -``` -ssh local@192.168.123.XXX -``` - -in the machine switch to root and update before installing some packages and cloning the repo -``` -$ sudo su -$ cd -$ apt update && apt upgrade -$ apt install git ansible -$ git clone https://git.csclub.uwaterloo.ca/public/mirror-env.git -``` -then enter `mirror-env/mirror` and use the instructions listed there diff --git a/roles/README.md b/roles/README.md deleted file mode 100644 index ad73729..0000000 --- a/roles/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## to update -- hosts + ansible.cfg -- group_vars -- quote the file mode (0777 -> '0777') -- add directory_mode to set directory permission -- double check src and dest behaviour with trailing / - - could check that copy works like rsync