If you need to setup a development machine from scratch, this is the guide to do it.

The script listed below will run in Ubuntu 16.04 and build out a development machine with the right dependencies for development.

#!/bin/bash
export PRECISE_DEB="deb https://apt.dockerproject.org/repo ubuntu-precise main"
export TRUSTY_DEB="deb https://apt.dockerproject.org/repo ubuntu-trusty main"
export XENIAL_DEB="deb https://apt.dockerproject.org/repo ubuntu-xenial main"

export LINUX_1604_VERSION="https://gist.githubusercontent.com/wflanagan/d2054159936bd4927b30bc610f200549/raw/159729a744ca02f1f74d1fef6e565a8b509a5f57/setup_script.sh"

set -xeu
echo ""
echo "Building OMAlab development environment. YOU WILL BE ASKED around"
echo "10 questions. Have your answers ready. If you do not have you answers,"
echo "ask at [email protected]."
echo ""
echo "This script assumes docker is installed, and its on Ubuntu 16.04. If "
echo "this is not true, break out of this script and ask for support."
echo ""
sudo apt-get update -qq
sudo apt-get install -qq -y python-pip curl wget git-core zsh ruby ruby-bundler \
                            apt-transport-https ca-certificates nodejs npm \
                            linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "$XENIAL_DEB" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update -qq
ruby -e 'File.directory?("~.oh-my-zsh") ? system("mv ~/.oh-my-zsh/ ~/.oh-my-zsh-backup/") : puts("no zsh")'
curl -L http://install.ohmyz.sh | sh
ln -s `which nodejs` /usr/bin/node
sudo pip install --upgrade pip
sudo pip install docker-compose
sudo npm install brackets -g
mkdir -p ~/containers
mkdir ~/.brackets
sudo adduser --disabled-password --gecos "Dev User,Online,,," postgres
sudo usermod -a -G docker postgres
echo ""
echo "\nQuestions now."
echo ""
git clone https://github.com/omalab/audienti.git ~/containers/audienti
cd ~/containers/audienti
echo "Launching Audienti Question-based Configuration. Make sure you have your "
echo "information handy to complete this process.\n"
echo "Your home directory is:"
pwd
echo "\n\n"
bundle install
# gem uninstall -i /usr/share/rubygems-integration/all minitest # if you have the minitest erorr
ruby -e 'puts "Your working folder is: #{Dir.pwd}"'
ruby ./cli.rb config
echo "\n\nRestart your shell, return to this directory and type"
echo "\n\t$> cli download_repos"
echo "\to download audienti repos for development"
echo "\n\n"
echo "How to develop? Use Docker compose to launch:"
echo "  $> dcdb oma "
echo "     - will give you a bash prompt in the OMA repo, installing all the databases needed"
echo "     - from there, bundle install, and import development data."
echo "\n\nHappy developing."

results matching ""

    No results matching ""