add install instruc and update mirror role

This commit is contained in:
Andrew Wang 2021-09-30 01:01:55 -04:00
parent b05ebe8013
commit e969093d67
37 changed files with 73 additions and 29 deletions

View File

@ -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

BIN
libvirt/ubuntu/06a-raid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
libvirt/ubuntu/06b-raid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
libvirt/ubuntu/07a-lvm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
libvirt/ubuntu/07b-lvm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
libvirt/ubuntu/07c-lvm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
libvirt/ubuntu/07d-lvm.png Normal file

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

30
libvirt/ubuntu/README.md Normal file
View File

@ -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

View File

@ -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" }

View File

@ -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
- name: create merlin subdirectories
file:
path: /mirror/merlin/run
state: directory
owner: mirror
group: mirrot
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

View File

@ -1 +0,0 @@
../arthur

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox

View File

@ -1 +0,0 @@
busybox