Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Modified install scripts to add back twisted_app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Beard committed Mar 9, 2016
1 parent 9a082cf commit 853123e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
15 changes: 7 additions & 8 deletions Vagrantfile
Expand Up @@ -25,7 +25,7 @@ Vagrant.configure(2) do |config|
end

config.vm.define "elk" do |elk|
elk.vm.box = "ubuntu/trusty64"
elk.vm.box = "ubuntu/trusty64"

# Change the default elk vagrant box folder to point to the
# elk directory within the project. This will allow separation between
Expand Down Expand Up @@ -63,19 +63,18 @@ Vagrant.configure(2) do |config|
# Specify a base virtual machine that is based on Ubuntu Trusty Tahr
dev.vm.box = "ubuntu/trusty64"

# Change the default client vagrant box folder to point to the
# client directory within the project. This will allow separation between
# client and server folders.
dev.vm.synced_folder "client/", "/vagrant"

# Setup a static IP to allow both vagrant boxes to know where
# to contact each other. This will allow communication between the
# web developer and the logging server.
dev.vm.network "private_network", ip: "172.16.1.10"

# Specify the provisioning script that will be used in order to
# install the necessary files needed for this vagrant box
dev.vm.provision "shell", inline: "twistd -y /vagrant/twisted_client.py &",
run: "always"

# Change the default client vagrant box folder to point to the
# client directory within the project. This will allow separation between
# client and server folders.
dev.vm.synced_folder "client/", "/vagrant"
dev.vm.provision "shell", inline: "twistd -y /vagrant/twisted_client.py &", run: "always"
end
end
8 changes: 5 additions & 3 deletions dashboard/scripts/install.sh
Expand Up @@ -47,15 +47,17 @@ sudo dpkg -i $ELASTIC.deb || exit $?
sudo dpkg -i $LOGSTASH-1_all.deb || exit $?

# Install Elastic HQ Plugin
$ES_BIN/plugin -install royrusso/elasticsearch-HQ || exit $?
sudo $ES_BIN/plugin install royrusso/elasticsearch-HQ || exit $?

# Download and install Kibana to the vagrant box.
wget -q $KIBANA_SRC || exit $?
tar -xvf $KIBANA.tar.gz || exit $?
sudo cp /vagrant/files/config/elasticsearch.yml $ES_CONFIG/ || exit $?
tar -xvf $HOME/$KIBANA.tar.gz || exit $?
sudo cp /vagrant/files/config/elasticsearch.yml /etc/elasticsearch/ || exit $?
sudo cp /vagrant/files/config/xdata.conf /etc/logstash/conf.d/ || exit $?
sudo cp /vagrant/files/twisted_app.py $HOME/ || exit $?
sudo cp /vagrant/files/config/kibana.yml $HOME/$KIBANA/config/ || exit $?
# Startup Kibana
sudo $HOME/$KIBANA/bin/kibana || exit $?

# Restart all the services to ensure the configurations are being used properly
# and Run the kibana twisted web server so the developer has access to the
Expand Down
16 changes: 8 additions & 8 deletions dashboard/scripts/restart.sh
Expand Up @@ -37,19 +37,19 @@ curl -XDELETE 'http://localhost:9200/xdata_v2/'
curl -XDELETE 'http://localhost:9200/xdata_old/'

# Create XData indexes (even though logstash will create them automatically)
curl -XPUT 'http://127.0.0.1:9200/xdata_v3/'
curl -XPUT 'http://127.0.0.1:9200/xdata_v2/'
curl -XPUT 'http://127.0.0.1:9200/xdata_old/'
curl -XPUT 'http://localhost:9200/xdata_v3/'
curl -XPUT 'http://localhost:9200/xdata_v2/'
curl -XPUT 'http://localhost:9200/xdata_old/'

# Remove .sincedb file to trigger logstash to reindex all xdata_* data
rm /var/lib/logstash/.sincedb_*
service logstash start

PIDFILE=$HOME/twistd.pid

#if [ -f $PIDFILE ]; then
# echo 'Twisted Running, Killing it!'
# sudo -E kill `cat $PIDFILE`
#fi
if [ -f $PIDFILE ]; then
echo 'Twisted Running, Killing it!'
sudo -E kill `cat $PIDFILE`
fi

# sudo -E twistd --pidfile=$PIDFILE -y twisted_app.py
sudo -E twistd --pidfile=$PIDFILE -y twisted_app.py

0 comments on commit 853123e

Please sign in to comment.