add install instruc and update mirror role

master
Andrew Wang 1 year ago
parent b05ebe8013
commit e969093d67
  1. 6
      libvirt/README.md
  2. BIN
      libvirt/ubuntu/01-networking.png
  3. BIN
      libvirt/ubuntu/02-select_mirror.png
  4. BIN
      libvirt/ubuntu/03-partitioning.png
  5. BIN
      libvirt/ubuntu/04a-boot_partition.png
  6. BIN
      libvirt/ubuntu/04b-boot_partition.png
  7. BIN
      libvirt/ubuntu/05a-free_partition.png
  8. BIN
      libvirt/ubuntu/05b-free_partition.png
  9. BIN
      libvirt/ubuntu/05c-free_partition.png
  10. BIN
      libvirt/ubuntu/05d-free_partition.png
  11. BIN
      libvirt/ubuntu/06a-raid.png
  12. BIN
      libvirt/ubuntu/06b-raid.png
  13. BIN
      libvirt/ubuntu/07a-lvm.png
  14. BIN
      libvirt/ubuntu/07b-lvm.png
  15. BIN
      libvirt/ubuntu/07c-lvm.png
  16. BIN
      libvirt/ubuntu/07d-lvm.png
  17. BIN
      libvirt/ubuntu/08-finished_partitioning.png
  18. BIN
      libvirt/ubuntu/09-add_user.png
  19. BIN
      libvirt/ubuntu/10-install_ssh.png
  20. BIN
      libvirt/ubuntu/11-no_snaps.png
  21. BIN
      libvirt/ubuntu/12-finished_installing.png
  22. BIN
      libvirt/ubuntu/13-ignore_error.png
  23. BIN
      libvirt/ubuntu/14-result.png
  24. 30
      libvirt/ubuntu/README.md
  25. 2
      roles/ftp/tasks/main.yml
  26. 56
      roles/mirror/tasks/main.yml
  27. 1
      roles/mirror/templates/root/merlin/bin/arthur
  28. BIN
      roles/mirror/templates/root/merlin/bin/busybox
  29. 1
      roles/mirror/templates/root/merlin/bin/cd
  30. 1
      roles/mirror/templates/root/merlin/bin/cp
  31. 1
      roles/mirror/templates/root/merlin/bin/ln
  32. 1
      roles/mirror/templates/root/merlin/bin/ls
  33. 1
      roles/mirror/templates/root/merlin/bin/rm
  34. 1
      roles/mirror/templates/root/merlin/bin/sh
  35. 1
      roles/mirror/templates/root/merlin/bin/sleep
  36. 0
      roles/mirror/templates/root/merlin/dev/.gitkeep
  37. 0
      roles/mirror/templates/root/merlin/run/.gitkeep

@ -10,13 +10,9 @@ If vm is on a remote machine
```
virt-viewer --connect qemu+ssh://user@X.X.X.X/system mirror
```
## TODO
for now just have a folder of screenshots
- change name of lvm volume from "lv0-root" to just "root"
troubleshooting: ignore "failed to unmount /cdrom" and just ctrl+c in viewer
## Troubleshooting
```
net.ipv4.ip_forward = 1 ?
net.ipv4.ip_forward = 1
```
```
modprobe kvm_intel

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

@ -0,0 +1,30 @@
user: local
password: password
TODO: add images
<img src="./01-networking.png" width="200" height="150">
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

@ -31,6 +31,8 @@
loop:
- { src: blacklist.dat, dest: blacklist.dat, mode: "644" }
# - { src: dhparams.pem, dest: dhparams.pem, mode: "644" }
# generate this file with:
# openssl dhparam -outform PEM -2|-5 1024|1536|2048|3072|4096|6144|7680|8192 >> dhparams.pem
- { src: ldap.conf, dest: ldap.conf, mode: "600" }
- { src: modules.conf, dest: modules.conf, mode: "644" }
- { src: proftpd.conf, dest: proftpd.conf, mode: "644" }

@ -23,29 +23,53 @@
group: csc-mirror
mode: preserve
- name: copy merlin
copy:
src: "{{ role_path }}/templates/root/merlin/"
dest: /mirror/merlin
- name: create merlin directories
file:
path: /mirror/merlin
owner: root
group: root
mode: "0755"
- name: set /mirror/merlin/run permissions
file:
path: /mirror/merlin/run
state: directory
owner: mirror
group: mirrot
- name: create merlin subdirectories
file:
path: "/mirror/merlin/{{ item.file }}"
owner: "{{ item.owner }}"
group: "{{ item.owner }}"
mode: "0755"
loop:
- { file: bin, owner: root }
- { file: dev, owner: root }
- { file: run, owner: mirror }
# apt install busybox-static
# then move to /mirror/merlin/run and create symblinks
# once this is
- name: copy over arthur and busybox
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: "0755"
loop:
- src: "{{ role_path }}/templates/root/merlin/arthur"
dest: "/mirror/merlin/arthur"
- src: "/usr/bin/busybox"
dest: "/mirror/merlin/bin/busybox"
# for busybox
# ln -s /bin/busybox ls
# then ./ls will execute ls from busybox
- name: create symlinks
# noqa deprecated-command-syntax
# need chdir to create relative symlinks
command:
cmd: "ln -s {{ item.src }} {{ item.dest }}"
chdir: "/mirror/merlin/run"
creates: "/mirror/merlin/run/{{ item.dest }}"
loop:
- { src: busybox, dest: cd }
- { src: busybox, dest: cp }
- { src: busybox, dest: ln }
- { src: busybox, dest: ls }
- { src: busybox, dest: rm }
- { src: busybox, dest: sh }
- { src: busybox, dest: sleep }
- { src: ../arthur, dest: arthur }
# startup merlin to get
# /mirror/merlin/run/merlin.sock

Loading…
Cancel
Save