This page describes the steps involved in setting up a cloud node to run a staging-like setup. struck through things can be done by salt.

  1. Run the provision users script

  2. Create instance-manager user.

    1. Set the password to '1234'

      • i. Don't worry, we don't allow login with passwords...

    2. Also add the user to the admin group

  3. Create become-instance-manager script.

    1. http://paste.ubuntu.com/1266312/ -> /usr/local/bin/become-instance-manager

  4. Install x86 compatible libraries so that you can run the ADB binary for Android

    1. sudo apt-get install ia32-libs

    2. copy /usr/local/bin/adb from control to /usr/local/bin

  5. Mount the nas and make production db snapshots available.

    1. apt-get install -y nfs-common

    2. add 192.168.1.21:/c/val_backup /mnt/nas01/val_backup nfs to fstab

    3. mkdir -p /mnt/nas01/val_backup

    4. mountall

    5. ln -s /mnt/nas01/val_backup/lava-instances /srv/lava/backups

  6. Run ldt setup, ldt install --non-interactive
  7. Set up custom buildout.cfg.
  8. Configure the dispatcher
    1. Need to set LAVA_SERVER_IP to external IP address -- which I don't think is knowable from the instance.

    2. Not sure what recommended setting for LAVA_IMAGE_TMPDIR etc should be -- ephemeral storage maybe?

    3. This means copying various port-resetting and pdu managing helper scripts around

    4. Accessing usb devices like snowballs involves setting the device.conf like connection_command = conmux-console control/snowball10

    5. Also add urlmappings.txt to allow access to restricted builds.

    6. Presumably there is an ssh private key involved too...

  9. Run restore-staging-db
    1. Maybe set LAVA_INSTANCE, LAVA_HOSTNAME on invocation
  10. Add sudoer rule to allow instance-manager to restart the instance without password

    1. instance-manager ALL=(ALL) NOPASSWD:/sbin/start lava-instance LAVA_INSTANCE=staging, /sbin/stop lava-instance LAVA_INSTANCE=staging, /sbin/restart lava-instance LAVA_INSTANCE=staging

  11. Set up the cronjobs to create the deployment report and do code updates
    1. http://paste.ubuntu.com/1266457/

  12. Put branches in /srv/lava/branches
  13. Set up instance to use these branches
  14. Create /linaro/tmp and /linaro/cache directories (maybe? see above about settings for LINARO_IMAGE_TMPDIR)
  15. Set up apache to SetHandler none for and create symlinks for deployment-report.xhtml and staging-updates.txt and enable access to images for the dispatcher

  16. Install java

    1. sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

    2. sudo apt-get update

    3. sudo apt-get install sun-java6-jdk

    4. Are we happy about installing packages from hardy? No.

Platform/LAVA/DevOps/SettingUpStaging (last modified 2013-01-15 00:42:30)