Skip to content

Commit e368737

Browse files
committed
Fixes to provisioning script.
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.
1 parent eaacffc commit e368737

File tree

7 files changed

+35
-15
lines changed

7 files changed

+35
-15
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ There are a few options:
2626
installers (Windows and OS X) are
2727
[here](http://downloads.swiftnav.com/piksi_console/).
2828

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

3335
* **Development (VM)**. The Vagrant file is currently used for testing
3436
installation setup.sh, but can also be used to provision a

Vagrantfile

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33

4+
# Vagrantfile used largely for cross-platform testing of
5+
# piksi_firmware dependency installation.
6+
47
VAGRANTFILE_API_VERSION = "2"
58

69
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
710
# Box definitions for different targets
11+
# Ubuntu 14.10 LTS
12+
config.vm.define "utopic" do |utopic|
13+
utopic.vm.box = "utopic"
14+
utopic.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
15+
utopic.vm.box_download_checksum_type = "sha256"
16+
utopic.vm.box_download_checksum = "0c37d6eaeeade5f4057a08de6c858513d61adc462058285bccc22ea1bac87ff9"
17+
end
18+
# Ubuntu 14.04 LTS
819
config.vm.define "trusty" do |trusty64|
920
trusty64.vm.box = "trusty64"
1021
trusty64.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box"
1122
trusty64.vm.box_download_checksum_type = "sha256"
1223
trusty64.vm.box_download_checksum = "1362fff999ba5dd8332e88a906de8eec7baaca6b288223dbc9a0f762a67f685b"
1324
end
14-
config.vm.define "utopic" do |utopic|
15-
utopic.vm.box = "utopic"
16-
utopic.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
17-
utopic.vm.box_download_checksum_type = "sha256"
18-
utopic.vm.box_download_checksum = "0c37d6eaeeade5f4057a08de6c858513d61adc462058285bccc22ea1bac87ff9"
25+
# Ubuntu 13.04 LTS
26+
config.vm.define "raring" do |raring|
27+
raring.vm.box = "raring"
28+
raring.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/20140125/raring-server-cloudimg-i386-vagrant-disk1.box"
29+
raring.vm.box_download_checksum_type = "sha256"
30+
raring.vm.box_download_checksum = "16559835c0487e7f90d9fedd8c678325769017c10bccb4c9b7e712e03b91ca26"
1931
end
32+
# Debian 7.6
2033
config.vm.define "wheezy" do |wheezy|
2134
wheezy.vm.box = "wheezy"
2235
wheezy.vm.box_url = "https://github.com/jose-lpa/packer-debian_7.6.0/releases/download/1.0/packer_virtualbox-iso_virtualbox.box"

ansible.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[defaults]
2-
32
force_color = True
43
host_key_checking = False
54
host_key_checking = False
65
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
7-
callback_plugins = ~/.ansible/callback_plugins

setup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ function run_all_platforms () {
163163
log_error "This script does not support this platform. Please contact mookerji@swiftnav.com."
164164
exit 1
165165
fi
166-
setup_ansible_plugins
167-
ansible-playbook -v --ask-sudo-pass -i setup/ansible/inventory.ini \
166+
#setup_ansible_plugins
167+
ansible-playbook --ask-sudo-pass -i setup/ansible/inventory.ini \
168168
setup/ansible/provision.yml --connection=local
169169
build
170170
log_info "Done!"

setup/ansible/provision.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
- name: provision piksi development dependencies for Ubuntu
1717
hosts: Ubuntu
18-
sudo: yes
1918
gather_facts: false
2019
roles:
2120
- common_ubuntu

setup/ansible/roles/common_ubuntu/tasks/arm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
shell: echo '\nexport PATH=$PATH:~/gcc-arm-none-eabi/gcc-arm-none-eabi-4_8-2014q3/bin' >> ~/.bashrc
1919

2020
- name: Update PATH
21-
shell: source ~/.bashrc
21+
shell: . ~/.bashrc

setup/ansible/roles/common_ubuntu/tasks/sys_deps.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Uses apt-get to install system-wide dependencies and pip to install
22
# python dependencies.
33

4+
# If using Ubuntu 13.04, you may discover that some repositories are missing.
5+
# See this for details:
6+
# https://gist.github.com/dergachev/f5da514802fcbbb441a1
7+
- name: Handle Ubuntu 13.04 end of life.
8+
sudo: True
9+
shell: sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
10+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '13.04'
11+
412
- name: Install base Ubuntu packages
513
apt: pkg={{ item }} state=installed update_cache=yes
614
sudo: True
@@ -39,7 +47,7 @@
3947
sudo: Yes
4048
apt: update_cache=yes
4149

42-
- name: Install python dependencies
50+
- name: Install python Enthought dependencies
4351
sudo: True
4452
command: >
4553
pip install traits traitsui pyserial pylibftdi

0 commit comments

Comments
 (0)