Skip to content

Commit

Permalink
Fixes to provisioning script.
Browse files Browse the repository at this point in the history
0. Documentation clarifications.
1. Add support for Ubuntu 13.04 LTS.
2. Fix a regression on the ARM setup, remove Ansible pretty printer,
which occasionally throws uncaught exceptions.
  • Loading branch information
mookerji committed Jan 12, 2015
1 parent eaacffc commit e368737
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 15 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ There are a few options:
installers (Windows and OS X) are
[here](http://downloads.swiftnav.com/piksi_console/).

* **Development (native)**. To install development tools for your
platform (OS X and Ubuntu), run the setup script in this repository
via `bash setup.sh -x install`.
* **Development (native)**. To install dependencies for the
development tools for your platform (OS X, Ubuntu, or Debian), run
the setup script in this repository via `sudo bash setup.sh -x
install`. If you're also building the firmware, you'll need to
checkout the submodules as well.

* **Development (VM)**. The Vagrant file is currently used for testing
installation setup.sh, but can also be used to provision a
Expand Down
23 changes: 18 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile used largely for cross-platform testing of
# piksi_firmware dependency installation.

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Box definitions for different targets
# Ubuntu 14.10 LTS
config.vm.define "utopic" do |utopic|
utopic.vm.box = "utopic"
utopic.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
utopic.vm.box_download_checksum_type = "sha256"
utopic.vm.box_download_checksum = "0c37d6eaeeade5f4057a08de6c858513d61adc462058285bccc22ea1bac87ff9"
end
# Ubuntu 14.04 LTS
config.vm.define "trusty" do |trusty64|
trusty64.vm.box = "trusty64"
trusty64.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box"
trusty64.vm.box_download_checksum_type = "sha256"
trusty64.vm.box_download_checksum = "1362fff999ba5dd8332e88a906de8eec7baaca6b288223dbc9a0f762a67f685b"
end
config.vm.define "utopic" do |utopic|
utopic.vm.box = "utopic"
utopic.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
utopic.vm.box_download_checksum_type = "sha256"
utopic.vm.box_download_checksum = "0c37d6eaeeade5f4057a08de6c858513d61adc462058285bccc22ea1bac87ff9"
# Ubuntu 13.04 LTS
config.vm.define "raring" do |raring|
raring.vm.box = "raring"
raring.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/20140125/raring-server-cloudimg-i386-vagrant-disk1.box"
raring.vm.box_download_checksum_type = "sha256"
raring.vm.box_download_checksum = "16559835c0487e7f90d9fedd8c678325769017c10bccb4c9b7e712e03b91ca26"
end
# Debian 7.6
config.vm.define "wheezy" do |wheezy|
wheezy.vm.box = "wheezy"
wheezy.vm.box_url = "https://github.com/jose-lpa/packer-debian_7.6.0/releases/download/1.0/packer_virtualbox-iso_virtualbox.box"
Expand Down
2 changes: 0 additions & 2 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[defaults]

force_color = True
host_key_checking = False
host_key_checking = False
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
callback_plugins = ~/.ansible/callback_plugins
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ function run_all_platforms () {
log_error "This script does not support this platform. Please contact [email protected]."
exit 1
fi
setup_ansible_plugins
ansible-playbook -v --ask-sudo-pass -i setup/ansible/inventory.ini \
#setup_ansible_plugins
ansible-playbook --ask-sudo-pass -i setup/ansible/inventory.ini \
setup/ansible/provision.yml --connection=local
build
log_info "Done!"
Expand Down
1 change: 0 additions & 1 deletion setup/ansible/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

- name: provision piksi development dependencies for Ubuntu
hosts: Ubuntu
sudo: yes
gather_facts: false
roles:
- common_ubuntu
Expand Down
2 changes: 1 addition & 1 deletion setup/ansible/roles/common_ubuntu/tasks/arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
shell: echo '\nexport PATH=$PATH:~/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin' >> ~/.bashrc

- name: Update PATH
shell: source ~/.bashrc
shell: . ~/.bashrc
10 changes: 9 additions & 1 deletion setup/ansible/roles/common_ubuntu/tasks/sys_deps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Uses apt-get to install system-wide dependencies and pip to install
# python dependencies.

# If using Ubuntu 13.04, you may discover that some repositories are missing.
# See this for details:
# https://gist.github.com/dergachev/f5da514802fcbbb441a1
- name: Handle Ubuntu 13.04 end of life.
sudo: True
shell: sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '13.04'

- name: Install base Ubuntu packages
apt: pkg={{ item }} state=installed update_cache=yes
sudo: True
Expand Down Expand Up @@ -39,7 +47,7 @@
sudo: Yes
apt: update_cache=yes

- name: Install python dependencies
- name: Install python Enthought dependencies
sudo: True
command: >
pip install traits traitsui pyserial pylibftdi
Expand Down

0 comments on commit e368737

Please sign in to comment.