Commit c0e4c17c authored by Lukáš Lalinský's avatar Lukáš Lalinský

Remove the Vagrant config

parent baac1a71
Pipeline #18650 passed with stages
in 10 minutes and 15 seconds
......@@ -60,15 +60,10 @@ necessary requirements::
To create or update protobuf classes, change the tag in ``gen-protobuf.sh`` and execute.
If you need a Phoenix server for experimenting, you can get one running
quickly using Vagrant::
quickly using Docker::
vagrant up
You can connect to the virtual machine and work with the Phoenix shell
from there::
vagrant ssh
/opt/phoenix/bin/sqlline.py localhost
docker pull docker.oxygene.sk/lukas/python-phoenixdb/phoenix:4.11
docker run -p 127.0.0.1:8765:8765 docker.oxygene.sk/lukas/python-phoenixdb/phoenix:4.11
Interactive SQL shell
---------------------
......
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell", path: "provision.sh"
config.vm.hostname = "phoenix-test"
config.vm.network "forwarded_port", guest: 8765, host: 8765
end
#!/usr/bin/env bash
set -e
#PHOENIX_VERSION=4.7.0-HBase-1.1
#PHOENIX_VERSION=4.8.2-HBase-1.2
#PHOENIX_VERSION=4.9.0-HBase-1.2
PHOENIX_VERSION=4.10.0-HBase-1.2
case $PHOENIX_VERSION in
4.7.*)
PHOENIX_NAME=phoenix
;;
4.8.*)
PHOENIX_NAME=apache-phoenix
;;
4.9.*)
PHOENIX_NAME=apache-phoenix
;;
4.10.*)
PHOENIX_NAME=apache-phoenix
;;
*)
echo "! Unsupported Phoenix version - $PHOENIX_VERSION"
exit 1
;;
esac
case $PHOENIX_VERSION in
*-HBase-1.2)
HBASE_VERSION=1.2.5
;;
*-HBase-1.1)
HBASE_VERSION=1.1.9
;;
*)
echo "! Unsupported HBase version - $PHOENIX_VERSION"
exit 1
;;
esac
export DEBIAN_FRONTEND=noninteractive
echo "> Installing java"
sudo apt-get -y update
sudo apt-get -y install wget openjdk-8-jdk-headless python
if [ -z "$APACHE_MIRROR" ]
then
APACHE_MIRROR="$(python -c 'import json, urllib2; a = json.load(urllib2.urlopen("http://www.apache.org/dyn/closer.cgi?as_json=1")); print a["preferred"].rstrip("/")')"
fi
echo "> Using Apache mirror: $APACHE_MIRROR"
if [ ! -d /opt/hbase ]
then
echo "> Downloading HBase $HBASE_VERSION"
wget --no-verbose -P /tmp -c -N $APACHE_MIRROR/hbase/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz
echo "> Extracting HBase"
sudo mkdir /opt/hbase
sudo chown ubuntu:ubuntu -R /opt/hbase
tar xf /tmp/hbase-$HBASE_VERSION-bin.tar.gz --strip-components=1 -C /opt/hbase
fi
if [ ! -d /opt/phoenix ]
then
echo "> Downloading Phoenix $PHOENIX_VERSION"
wget --no-verbose -P /tmp -c -N $APACHE_MIRROR/phoenix/$PHOENIX_NAME-$PHOENIX_VERSION/bin/$PHOENIX_NAME-$PHOENIX_VERSION-bin.tar.gz
echo "> Extracting Phoenix"
sudo mkdir /opt/phoenix
sudo chown ubuntu:ubuntu -R /opt/phoenix
tar xf /tmp/$PHOENIX_NAME-$PHOENIX_VERSION-bin.tar.gz --strip-components=1 -C /opt/phoenix
fi
echo "> Linking Phoenix server JAR file to HBase lib directory"
ln -svfT /opt/phoenix/phoenix-$PHOENIX_VERSION-server.jar /opt/hbase/lib/phoenix-$PHOENIX_VERSION-server.jar
echo "> Setting JAVA_HOME for HBase"
perl -pi -e 's{^\#?\s*export\s*JAVA_HOME\s*=.*$}{export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64}' /opt/hbase/conf/hbase-env.sh
if ! pgrep -f proc_master >/dev/null
then
echo "> Starting HBase"
sudo -u ubuntu /opt/hbase/bin/start-hbase.sh
fi
if ! pgrep -f proc_phoenixserver >/dev/null
then
echo "> Starting Phoenix query server"
sudo -u ubuntu /opt/phoenix/bin/queryserver.py start
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment