Skip to content

POC Upgrade

Jeffrey Yang edited this page Aug 1, 2014 · 7 revisions

Kinisi Agent upgrade:

This is a similar procedure as the Kinisi Agent installation, however, there are some important differences. Please pay attention to the comments.

Don't forget to SUDO!

# Do everything as root
sudo su

Remove any existing local data (optional, but recommended)

# Change to install directory
pushd /usr/local/kinisi-agent-nodejs

# Truncate the existing database
export NODE_ENV=production
node scripts/truncate_db.js

# Get out of install directory
popd

Replace the existing installation

# Choose one:
# 1. the Tarball method (only requires username/pw) 
# 2. the Repo Clone method (requires Git Setup, below)

# 1. Tarball Method
curl -sL --user "{github_username}:{github_password}" https://github.com/kinisi/kinisi-agent-nodejs/archive/master.tar.gz > master.tar.gz
tar xzf master.tar.gz
mv kinisi-agent-nodejs-master kinisi-agent-nodejs

# 2. Repo Clone method
git clone [email protected]:kinisi/kinisi-agent-nodejs.git

# Now update existing files with rsync:
rsync -av --delete --exclude node_modules --exclude config/auth.js kinisi-agent-nodejs/ /usr/local/kinisi-agent-nodejs/

# Install NPM dependencies.
# This may not result in any changes, or it may take a while to install new dependencies.
pushd /usr/local/kinisi-agent-nodejs
npm install
popd

You should restart and verify the Raspberry Pi.

For git clone to work, see the Git Setup documentation.

Clone this wiki locally