How to test a sr-build-tools branch
Docker
Start by installing docker. Check Docker install page. You may also find useful information on Source install page useful.
Download plain ubuntu docker image from Docker Hub.
sudo docker pull ubuntu:14.04.4
Start Docker container named ubuntu_trusty
sudo docker run -it -w "/root/sr-build-tools/ansible" --env=HOME=/root --name "ubuntu_trusty" -v $HOME:/host:rw "ubuntu:14.04.4" /bin/bash
If you exit the Docker container, it remains on the machine unless removed specifically. To start it again use
sudo docker start ubuntu_trusty
sudo docker attach ubuntu_trusty
If you want to have two Docker containers you can use the same command but give it a different name. If you do not specify a name, Docker automatically generate a name for it.
Here are some useful docker commands:
docker pull
docker run
docker run
sudo docker ps -a: lists the running docker images
sudo docker start
sudo docker attach
sudo docker rm < name of your container>: deletes the container
Tasks on Docker image
Docker container does not have ubuntu desktop. This can cause problem for running production script. Install the ubuntu-desktop with following command.
sudo apt-get install --no-install-recommends ubuntu-desktop
Note dev-machine script can be installed from any user as long as it has sudo privilege. Production script creates a hand user and fails if it is run from hand user.
Before running the one-liner it might be necessary to install curl and python
sudo apt-get update
sudo apt-get install curl python-minimal
Testing master branches
If you want to test the master branch you can use the one line script in the docker session. Although both devel and production scripts are checked every night in Jenkins.
curl -L bit.ly/prod-install | bash -s indigo-devel
curl -L bit.ly/dev-machine | bash -s -- -w ~{{ros_user}}/projects/shadow_robot/base
If you want to create workspaces in a different location, specify it after -w {{ros_user}}. If no parameter is specified, they will be created catkin_ws and catkin_ws_deps.
Testing other branches
If you want to run a branch of sr-build-tools for development script use the following command
curl -L bit.ly/dev-machine | bash -s -- -b <branch name> -w ~{{ros_user}}/projects/shadow_robot/base
For production script use
curl -L bit.ly/prod-install | bash -s indigo-devel <branch name>
NOTE If the main script is modified (bin/setup_production_machine for production script and bin/setup_dev_machine for development script) the bit.ly links would not work as they point to master script. To overcome this simply replace them with the rawgithubcontent link. e.g.
curl -L raw.githubusercontent.com/shadow-robot/sr-build-tools/F%23249_add_blockly/bin/setup_dev_machine | bash -s indigo-devel F#49_add_blockly
will run the production script from branch F#49_add_blockly .
After running the production script make sure to switch user to hand.
N.B. There are minor differences between the production script and development script. The development script uses -b for sr-build-tools and -c for sr_config branch name. The production script uses first argument (after bash -s) for sr_config branch and second argument for sr-build-tools branch.
Testing full UI
To test the UI, use VirtualBox.
sudo apt-get install virtualbox
If don't already have it create a new ubuntu machine and install ubuntu on it.
It is better to clone the machine and use the cloned one (to save ubuntu installation time for next efforts).