add install instruc and update mirror role
|
@ -10,13 +10,9 @@ If vm is on a remote machine
|
||||||
```
|
```
|
||||||
virt-viewer --connect qemu+ssh://user@X.X.X.X/system mirror
|
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
|
## Troubleshooting
|
||||||
```
|
```
|
||||||
net.ipv4.ip_forward = 1 ?
|
net.ipv4.ip_forward = 1
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
modprobe kvm_intel
|
modprobe kvm_intel
|
||||||
|
|
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 105 KiB |
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:
|
loop:
|
||||||
- { src: blacklist.dat, dest: blacklist.dat, mode: "644" }
|
- { src: blacklist.dat, dest: blacklist.dat, mode: "644" }
|
||||||
# - { src: dhparams.pem, dest: dhparams.pem, 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: ldap.conf, dest: ldap.conf, mode: "600" }
|
||||||
- { src: modules.conf, dest: modules.conf, mode: "644" }
|
- { src: modules.conf, dest: modules.conf, mode: "644" }
|
||||||
- { src: proftpd.conf, dest: proftpd.conf, mode: "644" }
|
- { src: proftpd.conf, dest: proftpd.conf, mode: "644" }
|
||||||
|
|
|
@ -23,29 +23,53 @@
|
||||||
group: csc-mirror
|
group: csc-mirror
|
||||||
mode: preserve
|
mode: preserve
|
||||||
|
|
||||||
- name: copy merlin
|
- name: create merlin directories
|
||||||
copy:
|
file:
|
||||||
src: "{{ role_path }}/templates/root/merlin/"
|
path: /mirror/merlin
|
||||||
dest: /mirror/merlin
|
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|
||||||
- name: set /mirror/merlin/run permissions
|
- name: create merlin subdirectories
|
||||||
file:
|
file:
|
||||||
path: /mirror/merlin/run
|
path: "/mirror/merlin/{{ item.file }}"
|
||||||
state: directory
|
owner: "{{ item.owner }}"
|
||||||
owner: mirror
|
group: "{{ item.owner }}"
|
||||||
group: mirrot
|
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
loop:
|
||||||
|
- { file: bin, owner: root }
|
||||||
|
- { file: dev, owner: root }
|
||||||
|
- { file: run, owner: mirror }
|
||||||
|
|
||||||
# apt install busybox-static
|
- name: copy over arthur and busybox
|
||||||
# then move to /mirror/merlin/run and create symblinks
|
copy:
|
||||||
# once this is
|
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
|
- name: create symlinks
|
||||||
# ln -s /bin/busybox ls
|
# noqa deprecated-command-syntax
|
||||||
# then ./ls will execute ls from busybox
|
# 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
|
# startup merlin to get
|
||||||
# /mirror/merlin/run/merlin.sock
|
# /mirror/merlin/run/merlin.sock
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../arthur
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|
|
@ -1 +0,0 @@
|
||||||
busybox
|
|