README.md 4.65 KB
Newer Older
Jonathan Wilkes's avatar
Jonathan Wilkes committed
1 2 3 4 5 6 7
Guide for setting up a runner for Purr Data

* have to manually rename gitlab-ci-multi-runner to gitlab-runner because
  that's what the artifacts upload logic expects. (Probably need to add a bug report upstream about this
* allow sshd to get through the Windows firewall
* use key-based authentication to log in
* add the msys2 sshd script here, and tweak it so it works in i386, too
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Windows
-------

1. Download and install virtualbox (5 min.)
2. Get a virtualbox image for Windows from [microsoft](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/) (1 min.)
3. From Virtualbox menu, choose `File -> Import Appliance`
4. Choose IE11 - Win7.ova
5. Follow the instructions to import the disk image. You may want to increase
   the amount of RAM to the VM, otherwise it will be sluggish (7 min.)
6. Start your Windows 7 VM
7. Choose "Public Network" in the networking screen that pops up
8. Click Start, then right click on Command Prompt and choose "Run as
   Administrator"
9. Click "Yes" on the prompt that follows
23
10. Type `slmgr /ato` and press `<Enter>`
24
11. Click "Ok" button on the activation window that pops up
25
11. Type `exit` and press `<Enter>` to close the command prompt
26 27 28 29 30 31 32 33 34 35 36 37
12. Start -> Control Panel -> System and Security -> Windows Update, then
   click "Check for updates"
13. Install updates
14. Follow the instructions [here](https://git.purrdata.net/jwilkes/purr-data#windows-32-bit-using-msys2) to set up the build environment. You can ignore
    steps 5-8 if you don't want to test a manual build of Purr Data in the VM
15. Click Start and type `MSYS2 MinGW 32-bit` then *right-click* on the
    result "MSYS2 MinGW 32-bit" and choose "Run as administrator"
16. `pacman -S mingw-w64-i686-editrights cygrunsrv`
16. `git clone https://git.purrdata.net/jwilkes/ci-runner-setup.git`
17. `cd ci-runner-setup`
18. `./msys2_sshd_setup.sh`
19. There may be an error about removing a service. Ignore it.
38
20. `ssh-keygen -t rsa -b 4096` then press `<Enter>` for each prompt
39 40 41 42
21. `cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys`
22. Now try `ssh IEUser@localhost` and answer "yes" at the prompt
23. You should have successfully logged in! Ignore the lastlog_openseek
    errors.
43 44
24. Type `exit` and it should reset the terminal and close the ssh connection
25. Edit `/etc/ssh/sshd_config` from `#PermitUserEnvironment no` to `PermitUserEnvironment yes`
45
26. Type `echo MSYSTEM=MINGW32 > ~/.ssh/environment` then press `<Enter>`
46 47
27. Download gitlab-runner from [gitlab](https://docs.gitlab.com/runner/install/windows.html)
28. Save the x86 gitlab binary as "gitlab-runner" in
48 49 50
    `C://msys32/usr/bin/`. Note: you must *manually* specify the name
    "gitlab-runner". Otherwise it will be saved as "gitlab-runner-windows-x86"
    and the CI won't be able to find it.
51
29. You need to somehow copy ~/.ssh/id_rsa to your host machine. I encrypt it
52 53
    and send it to a third-party machine with rsync, but maybe there's an
    easier way.
54
30. Start -> Control Panel -> System and Security -> Allow a program through
55
    Windows Firewall
56 57 58 59 60 61 62 63 64
31. Click "Change settings"
32. Click "Allow another program..."
33. Click "Browse"
34. Click "Local Disk"
35. Navigate to `msys32/usr/bin/sshd` and click "Open"
36. Click "Add"
37. At the very bottom of the settings window click "Ok"
38. Close all windows and shut down the VM
39. In Virtual box, make sure that Windows VM is selected and click the
65
    "Snapshots" button at the top-right of the window.
66
40. Click "Current State" and then click the little blue button that has
67 68
    the following tooltip: "Take a snapshot of the current virtual machine
    state (Ctrl+Shift+S)"
69 70 71
41. Name it "ci-snapshot" or something memorable
42. Request a token for git.purrdata.net on the pd-l2ork list
43. Run `gitlab-runner register` on your host machine and fill in the
72 73
    info. You'll need to point to the private key file so that it correctly
    logs into the machine with ssh.
Jonathan Wilkes's avatar
Jonathan Wilkes committed
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

Debian Stretch
--------------

1. Install Debian Stretch
2. `su` and then type your password
3. `apt-get install sudo curl`
4. `apt-get install openssh-server`
5. apt-get install valgrind
6. install [gitlab runner](https://docs.gitlab.com/runner/)
7. `visudo`
8. Add this line:
  add user     ALL=(ALL) NOPASSWD: ALL in the # User privelege specification
9. shutdown and set a snapshot in virtualbox
10. run `gitlab-runner register` on the host and enter in the name of
   the runner as it appears in the Virtualbox GUI.

For setting up Ubuntu runners:
------------------------------

1. sudo systemctl disable apt-daily.service
2. sudo systemctl disable apt-daily.timer

Look into removing:

tcl8.5-dev tk8.5-dev tcl-dev tk-dev libslv2-dev slv2-jack tkpng tclxapian python-tk ladspa-foo-plugins ubuntu-studio-audio-plugins subversion