Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: skolo/raspberry-pi/finalize_image.yml

Issue 1930143002: Make swarming bootstrap at boot, not login (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 --- 1 ---
2 - hosts: 127.0.0.1 2 - hosts: 127.0.0.1
3 connection: local 3 connection: local
4 remote_user: chrome-bot 4 remote_user: chrome-bot
5 become_user: root 5 become_user: root
6 become: yes 6 become: yes
7 become_method: sudo 7 become_method: sudo
8 vars: 8 vars:
9 image: /opt/rpi_img/2016-03-18-raspbian-jessie-lite.img 9 image: /opt/rpi_img/2016-03-18-raspbian-jessie-lite.img
10 # 8192 * 512 10 # 8192 * 512
11 offset_boot: 4194304 11 offset_boot: 4194304
12 # 131072 * 512 12 # 131072 * 512
13 offset_root: 67108864 13 offset_root: 67108864
14 tasks: 14 tasks:
15 # Set up mounts in image's fstab 15 # Set up mounts in image's fstab
16 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab regexp=".*mmcblk0p2.*" st ate=absent 16 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab regexp=".*mmcblk0p2.*" st ate=absent
17 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p3 /b ext4 defaults 0 2" state=present 17 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p3 /b ext4 defaults 0 2" state=present
18 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p5 /va r ext4 defaults 0 2" state=present 18 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p5 /va r ext4 defaults 0 2" state=present
19 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p6 /tm p ext4 defaults 0 2" state=present 19 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p6 /tm p ext4 defaults 0 2" state=present
20 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p7 /ho me/chrome-bot ext4 defaults 0 2" state=present 20 - lineinfile: dest=/opt/raspberrypi/root/etc/fstab line="/dev/mmcblk0p7 /ho me/chrome-bot ext4 defaults 0 2" state=present
21 21
22 # Swarming needs a /b file (which will have an SD card partition mounted to it.) 22 # Swarming needs a /b file (which will have an SD card partition mounted to it.)
23 - file: path=/opt/raspberrypi/root/b state=directory mode=0777 23 - file: path=/opt/raspberrypi/root/b state=directory mode=0777
24 # Make the hostname be set from the cmdline, not etc/hostname 24 # Make the hostname be set from the cmdline, not etc/hostname
25 - file: path=/opt/raspberrypi/root/etc/hostname state=absent 25 - file: path=/opt/raspberrypi/root/etc/hostname state=absent
26 # Autologin to our user 26 # Autologin to our user
27 - lineinfile: dest=/opt/raspberrypi/root/lib/systemd/system/getty@.service r egexp="^ExecStart.*" state=absent 27 - lineinfile: dest=/opt/raspberrypi/root/lib/systemd/system/getty@.service r egexp="^ExecStart.*" state=absent
28 - lineinfile: dest=/opt/raspberrypi/root/lib/systemd/system/getty@.service l ine="ExecStart=-/sbin/agetty --autologin chrome-bot --noclear %I $TERM" state=pr esent insertafter="\[Service\]" 28 - lineinfile: dest=/opt/raspberrypi/root/lib/systemd/system/getty@.service l ine="ExecStart=-/sbin/agetty --autologin chrome-bot --noclear %I $TERM" state=pr esent insertafter="\[Service\]"
29 29
30 - name: Create the startup script
31 copy: src=startup-script.sh dest=/opt/raspberrypi/root/opt/startup-script. sh owner=root group=root mode=0755
32
33 - name: Set to run our startup script at boot
34 lineinfile: dest=/opt/raspberrypi/root/home/chrome-bot line="/opt/startup- script.sh" insertafter=EOF
35
36 - name: Fixing udev rules for Android and NVIDIA devices 30 - name: Fixing udev rules for Android and NVIDIA devices
37 copy: src=udev-rules dest=/opt/raspberrypi/root/etc/udev/rules.d/51-androi d.rules owner=root group=root mode=0644 31 copy: src=udev-rules dest=/opt/raspberrypi/root/etc/udev/rules.d/51-androi d.rules owner=root group=root mode=0644
38 32
39 # Some niceties 33 # Some niceties
40 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias l='ls -CF'" state=present 34 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias l='ls -CF'" state=present
41 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias la='ls -A'" state=present 35 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias la='ls -A'" state=present
42 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias ll='ls -alF '" state=present 36 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias ll='ls -alF '" state=present
43 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias ls='ls --co lor=auto'" state=present 37 - lineinfile: dest=/opt/raspberrypi/root/etc/profile line="alias ls='ls --co lor=auto'" state=present
44 38
45 39
46 - lineinfile: dest=/opt/raspberrypi/root/etc/ld.so.preload line="#/usr/lib/a rm-linux-gnueabihf/libarmmem.so" state=absent 40 - lineinfile: dest=/opt/raspberrypi/root/etc/ld.so.preload line="#/usr/lib/a rm-linux-gnueabihf/libarmmem.so" state=absent
47 - lineinfile: dest=/opt/raspberrypi/root/etc/ld.so.preload line="/usr/lib/ar m-linux-gnueabihf/libarmmem.so" state=present 41 - lineinfile: dest=/opt/raspberrypi/root/etc/ld.so.preload line="/usr/lib/ar m-linux-gnueabihf/libarmmem.so" state=present
48 42
43 # With these unmounted, chroot not work anymore. To make chroot work
44 # again, run the setup_for_chroot playbook.
49 - command: umount /opt/raspberrypi/root/dev 45 - command: umount /opt/raspberrypi/root/dev
46 ignore_errors: true
50 - command: umount /opt/raspberrypi/root/proc 47 - command: umount /opt/raspberrypi/root/proc
48 ignore_errors: true
51 - command: umount /opt/raspberrypi/root/sys 49 - command: umount /opt/raspberrypi/root/sys
50 ignore_errors: true
52 51
53 - mount: name="/opt/raspberrypi/root" src="dontcare" fstype="auto" state="un mounted" 52 - mount: name="/opt/raspberrypi/root" src="dontcare" fstype="auto" state="un mounted"
54 handlers: 53 handlers:
55 54
OLDNEW
« no previous file with comments | « no previous file | skolo/raspberry-pi/setup-swarming.sh » ('j') | skolo/raspberry-pi/setup-swarming.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698