Skip to content

Commit

Permalink
updated downloader, installer and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhunter committed Apr 17, 2011
1 parent b9c18e6 commit 4d343eb
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 14 deletions.
15 changes: 12 additions & 3 deletions README.mkd
Expand Up @@ -2,6 +2,15 @@

Visual browser for Basho's data store, riak, built as a riak app.

##Goals
1. Install locally using `./install.sh`
2. Download and install using `curl -s get.rekonapp.com | sh`
## Installing

### tl;dr
`curl -s get.rekonapp.com | sh`

### Quick Install
Download and install using `curl -s get.rekonapp.com | sh` or
`curl -s get.rekonapp.com | node=node-addr:host sh` to specify the node.

### Manual Install
Install locally using `./install.sh` or `./install.sh node-addr:host`
to specify the node.
46 changes: 37 additions & 9 deletions download.sh
@@ -1,24 +1,52 @@
#!/bin/sh

# Allow overriding the target install node
if [ -z "$node" ] ; then
node='127.0.0.1:8098'
fi

echo
echo "Begining Install..."
echo "Downloading Rekon"
echo "Begining Install into $node..."
echo "Downloading Rekon from Github"

# Download the github tarbal to the /tmp directory
curl -L -s https://github.com/adamhunter/rekon/tarball/master > /tmp/rekon.tar.gz

echo
echo "Download Completed"
echo "Extracting Source"

# Clean up from previously installed versions
rm -rf /tmp/extract-rekon /tmp/rekon

# Setup directories for extraction and running installer
mkdir /tmp/extract-rekon /tmp/rekon

# Unzip rekon into extraction directory
tar xzf /tmp/rekon.tar.gz -C /tmp/extract-rekon

# Move crazy gitub adamhunter-sha directory to standardized path
mv -f /tmp/extract-rekon/*/* /tmp/rekon/
echo
cd /tmp/rekon
/tmp/rekon/install.sh
cd -

# Run downloaded installer script
/tmp/rekon/install.sh $node;

# Clean up after the install
rm -rf /tmp/extract-rekon /tmp/rekon

echo
echo "Install Completed!"

if [ $OSTYPE == 'darwin10.0' ]; then
echo "Opening http://127.0.0.1:8098/riak/rekon/go#/buckets"
open "http://127.0.0.1:8098/riak/rekon/go#/buckets"
# if we are macking OSX, use open to take the user to rekon
echo "Opening http://$node/riak/rekon/go#/buckets"
open "http://$node/riak/rekon/go#/buckets"
else
echo
echo "Visit http://127.0.0.1:8098/riak/rekon/go in your browser"
echo "************************************************"
echo "Visit http://$node/riak/rekon/go in your browser"
echo "************************************************"
fi

# Lets get a newline before we return to the prompt
echo
11 changes: 9 additions & 2 deletions install.sh
@@ -1,5 +1,7 @@
#!/bin/sh

# Allow running the script and specifiying an install target
# ./install node-address:host
if [ -n "$1" ] ; then
node=$1
else
Expand All @@ -10,7 +12,10 @@ riak_url="http://$node/riak/rekon"

echo "Installing rekon to $node..."

for f in $(ls app); do
base_dir="`dirname $0`/app"

# loop through everything in the app directory and put in in the rekon bucket
for f in $(ls $base_dir); do
# echo "Uploading $f to riak"
case $f in
go | *.html )
Expand All @@ -33,5 +38,7 @@ for f in $(ls app); do
;;
esac

curl -X PUT -H"Content-Type: $content_type" $riak_url/$f --data-binary @app/$f
curl -X PUT -H"Content-Type: $content_type" $riak_url/$f --data-binary @$base_dir/$f
done

echo "Installed, now visit: http://$riak_url/go"

0 comments on commit 4d343eb

Please sign in to comment.