BUILD: Move vagrant to repo root

- Takes Vagrant out of the old solo-builder and puts it into the root of the Open Solo repo.  Gives vagrant full access to the entire repo.
- Cleaned up deps.sh and added everything that was in the playbook file.
- Removed the playbook work in favor of the deps.sh
This commit is contained in:
Matt Lawrence 2019-01-05 00:33:14 -05:00 committed by Matt
parent 2a1b2377e3
commit 5781715be2
8 changed files with 33 additions and 122 deletions

3
.gitignore vendored
View File

@ -116,3 +116,6 @@ $RECYCLE.BIN/
# Windows shortcuts # Windows shortcuts
*.lnk *.lnk
#Vagrant files to be ignored
.vagrant/

6
solo-builder/Vagrantfile → Vagrantfile vendored Normal file → Executable file
View File

@ -39,12 +39,6 @@ Vagrant.configure(2) do |config|
vb.cpus = processor_count vb.cpus = processor_count
end end
config.vm.provision "guest_ansible" do |ansible|
ansible.extra_vars = {
build_dir_owner: "vagrant"
}
ansible.playbook = "playbook.yml"
end
end end

30
install-vagrant-deps.sh Executable file
View File

@ -0,0 +1,30 @@
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D1D8367A3421AFB
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BB92C09DB82666C
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E601AAF9486D3664
#apt packages
sudo apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main' -y
sudo add-apt-repository 'ppa:terry.guo/gcc-arm-embedded' -y
sudo add-apt-repository 'ppa:fkrull/deadsnakes-python2.7' -y
sudo apt-get --assume-yes update
sudo apt-get install -y --assume-yes python2.7 python2.7-dev
sudo apt-get install -y --assume-yes git python-pip freetype* python-setuptools libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk libffi* ansible libssl-dev gcc-arm-none-eabi gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm texinfo tup gawk wget git-core diffstat unzip curl
# pip packages
sudo pip install --upgrade pip
sudo pip install --upgrade setuptools
sudo pip install urllib3[secure] bcrypt pynacl cryptography==2.0.3 pillow
#wgets
sudo wget "http://stedolan.github.io/jq/download/linux64/jq" -O "/usr/local/bin/jq"
sudo chmod 0755 /usr/local/bin/jq
sudo wget "https://storage.googleapis.com/git-repo-downloads/repo" -O "/usr/local/bin/repo"
sudo chmod 0755 /usr/local/bin/rep
ssh-keyscan -t rsa github.com
ssh-keyscan -t rsa bitbucket.org
cp /vagrant/vagrant.gitconfig ~/.gitconfig
sudo chmod +x /vagrant/solo-builder/builder.sh

View File

@ -1,5 +0,0 @@
[ssh_connection]
pipelining = True
[ssh_connection]
ssh_args = -o ForwardAgent=yes

View File

@ -1,51 +0,0 @@
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D1D8367A3421AFB
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BB92C09DB82666C
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E601AAF9486D3664
# fix broken urllib3 or some ssl stuff diesn't work
sudo apt-get install -y --force-yes python-pip
sudo pip install urllib3[secure]
sudo pip install bcrypt
sudo pip install pynacl
# need to update pip and setuptools to newer version before cryptography will install:
sudo pip install --upgrade pip
sudo pip install --upgrade setuptools
sudo apt-get install -y --force-yes libssl-dev
# get a specificversion of this, as newer ones don't work on 14.04:
#sudo pip install cryptography
sudo pip install cryptography==2.0.3
# fix broken python2.7.x by moving it forward to something newer than 2.7.8:
sudo add-apt-repository -y ppa:fkrull/deadsnakes-python2.7
sudo apt-get -y --force-yes update
sudo apt-get install -y --force-yes python2.7 python2.7-dev
## get deps for pillow, and note that we get Pillow from easy_install instead of 'pip' or apt-get becuase this method actually works.
#sudo apt-get install -y python-dev python-setuptools
#sudo apt-get install -y --force-yes libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
#sudo easy_install Pillow
sudo apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main' -y
sudo add-apt-repository 'ppa:terry.guo/gcc-arm-embedded' -y
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install tup freetype* python-pip python-dev gcc-arm-none-eabi git
sudo apt-get --assume-yes install libffi*
sudo apt-get --assume-yes install ansible
ssh-keyscan -t rsa github.com
ssh-keyscan -t rsa bitbucket.org
#sudo pip install --upgrade pip
#sudo pip install pillow
#echo ""
#echo To build the artoo stm32 binary enter the VM with:
#echo vagrant ssh
#echo Then type this:
#echo cd /vagrant
#echo tup

View File

@ -1 +0,0 @@
default

View File

@ -1,59 +0,0 @@
- hosts: all
tasks:
- name: Installs packages
sudo: true
apt: pkg={{item}} state=installed update_cache=true cache_valid_time=86400
with_items:
- gawk
- wget
- git-core
- diffstat
- unzip
- texinfo
- gcc-multilib
- build-essential
- chrpath
- socat
- libsdl1.2-dev
- xterm
- curl
- name: Install jq
sudo: true
get_url: url=http://stedolan.github.io/jq/download/linux64/jq dest=/usr/local/bin/jq mode=0755
- name: Install repo
sudo: true
get_url: url=https://storage.googleapis.com/git-repo-downloads/repo dest=/usr/local/bin/repo mode=0755
- name: Git configuration
copy: src=ansible.gitconfig dest=~/.gitconfig
#- name: ensure github.com is a known host
# lineinfile:
# dest: ~/.ssh/known_hosts
# create: yes
# state: present
# line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
# regexp: "^github\\.com"
#- name: ensure bitbucket.org is a known host
# lineinfile:
# dest: ~/.ssh/known_hosts
# create: yes
# state: present
# line: "{{ lookup('pipe', 'ssh-keyscan -t rsa bitbucket.org') }}"
# regexp: "^bitbucket\\.org"
- name: create build dir
sudo: true
# option to override build_dir_owner (currently used by vagrant)
file: path=/solo-build state=directory mode=0755 owner={{build_dir_owner | default('ubuntu')}}
- name: repo init
shell: repo init -u https://github.com/OpenSolo/3dr-arm-yocto-bsp/
args:
chdir: /solo-build
creates: /solo-build/build
#- copy: src=~/.ssh/github_token dest=~/.ssh/github_token mode=0455

0
solo-builder/ansible.gitconfig → vagrant.gitconfig Normal file → Executable file
View File