-
-
Save jbeezley/aecebae0bb498bda86b3 to your computer and use it in GitHub Desktop.
Vagrant deployment for UVCDAT using osmesa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: install dependencies | |
apt: name={{ item }} state=present update_cache=yes | |
sudo: yes | |
with_items: | |
- git | |
- gfortran | |
- g++ | |
- libffi-dev | |
- libsqlite-dev | |
- libssl-dev | |
- libbz2-dev | |
- libexpat-dev | |
- ncurses-dev | |
- name: download latest cmake | |
get_url: url=http://www.cmake.org/files/v3.2/cmake-3.2.0-rc2-Linux-x86_64.tar.gz | |
dest=/home/vagrant/cmake-3.2.0-rc2.tar.gz | |
- name: unpack cmake tarball | |
command: tar zxvf /home/vagrant/cmake-3.2.0-rc2.tar.gz | |
args: | |
chdir: /home/vagrant | |
- name: checkout uvcdat | |
git: repo=https://github.com/UV-CDAT/uvcdat.git | |
dest=/home/vagrant/uvcdat | |
update=yes | |
recursive=yes | |
version={{ uvcdat_head }} | |
- name: create build directory | |
file: path=/home/vagrant/build | |
state=directory | |
- name: run cmake | |
command: /home/vagrant/cmake-3.2.0-rc2-Linux-x86_64/bin/cmake -DCDAT_BUILD_WEB=ON -DCDAT_BUILD_GUI=OFF -DCDAT_BUILD_OSMESA=ON -DCDAT_BUILD_OFFSCREEN=ON /home/vagrant/uvcdat | |
args: | |
chdir: /home/vagrant/build | |
- name: build | |
command: make | |
args: | |
chdir: /home/vagrant/build | |
- name: source setup script in bashrc | |
lineinfile: dest=/home/vagrant/.bashrc line="if [ -f ${HOME}/build/install/bin/setup_runtime.sh ] ; then source ${HOME}/build/install/bin/setup_runtime.sh ; fi" regexp="source .*setup_runtime.sh" | |
- name: test python imports | |
script: test.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source $HOME/build/install/bin/setup_runtime.sh | |
env | |
python -c "import vcs; print vcs.prefix" | |
python -c "import vtk; print vtk.vtkVersion().GetVTKVersion()" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "hashicorp/precise64" | |
# Disable automatic box update checking. If you disable this, then | |
# boxes will only be checked for updates when the user runs | |
# `vagrant box outdated`. This is not recommended. | |
# config.vm.box_check_update = false | |
config.vm.network "forwarded_port", guest: 80, host: 9080 | |
config.vm.provider "virtualbox" do |vb| | |
# Don't boot with headless mode | |
vb.gui = false | |
vb.memory = 4096 | |
vb.cpus = 2 | |
end | |
config.vm.provision "ansible" do |ansible| | |
ansible.playbook = "playbook.yml" | |
ansible.extra_vars = { | |
uvcdat_head: "cdatweb-head" | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment