Installing tributary.io locally
I'm using a very cool environment called tributary.io. You can find the source, and the installation instructions I based this post on here. Tributary assumes that you've got node and mongodb installed. I had node installed, but not mongo. So let's assume you are like me don't have mongodb, and start there.
I'm using a Debian derivative, so I followed the here.
The important steps are copy-pasted below
Yay, it's installed. Now all you have to do is run it.
You might also want to know how to stop and restart it.
OK, now everything is fine. Until your server crashes. Then things might not work so good. In that case you'll need to follow this procedure:
Yay.
Now, with MongoDB all installed and running, it's time to get Tributary up and rolling.
To install it locally, do the following:
You'll get a screen that asks you to fill out some information. Here's what you'll need to fill out:
If you click on the blue "Register your application" link you'll see something like this:
I'm using a Debian derivative, so I followed the here.
The important steps are copy-pasted below
1
Import the public key used by the package management system.
Issue the following command to add the MongoDB public GPG Key to the system key ring.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
2
Create a /etc/apt/sources.list.d/mongodb-org-3.0.list file for MongoDB.
Create the list file using the following command:
echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
3
Reload local package database.
Issue the following command to reload the local package database:
sudo apt-get update
4
Install the MongoDB packages.
You can install either the latest stable version of MongoDB or a specific version of MongoDB.
Install the latest stable version of MongoDB.
Issue the following command:
sudo apt-get install -y mongodb-org
1
2
Verify that MongoDB has started successfully
Verify that the mongod process has started successfully by checking the contents of the log file at/var/log/mongodb/mongod.log for a line reading
[initandlisten] waiting for connections on port <port>
where <port> is the port configured in /etc/mongod.conf, 27017 by default.
A
Stop MongoDB.
As needed, you can stop the mongod process by issuing the following command:
sudo service mongod stop
OK, now everything is fine. Until your server crashes. Then things might not work so good. In that case you'll need to follow this procedure:
C
Repair MongoDB.¶
Issue the following command to restart mongod:
sudo -u mongoddb mongod --repair --dbpath /var/lib/mongodb/
sudo service mongod start
cat /var/log/mongodb/mongod.log
Yay.
Now, with MongoDB all installed and running, it's time to get Tributary up and rolling.
git clone https://github.com/enjalot/tributary
cd ./tributary
To install it locally, do the following:
git clone https://github.com/enjalot/tributary
cd ./tributary
You'll probably want to have github authentication workingso you will need to setup a github app (https://github.com/settings/applications ).
You'll see a screen that includes this section. Click on "Register new application"
You'll get a screen that asks you to fill out some information. Here's what you'll need to fill out:
github will give you some authenticated information, which you'll put in your settings.js file.
You'll want to do likewise for imgur. To do that, set up an account and go to https://api.imgur.com/oauth2 to get a client ID and client secret.
To do that, you'll start with their API overview page, shown below.
At the bottom of the page is a section for registering an application. You can see it stand-alone in the image below:
If you click on the blue "Register your application" link you'll see something like this:
Fill in the data that's asked for, solve the CAPTCHA, ans submit. You'll then have your clientID and secret generated for you. They'll be displayed on a screen like this:
The Client ID and Client Secret are needed for the settings.js file
var settings = module.exports; settings.port = 8888; settings.hostname = "localhost"; //on port 80 you don't want to specify the port, so settings.origin would be "http://tributary.io" for example settings.origin = "http://" + settings.hostname + ":" + settings.port; settings.sandboxOrigin = "http://sandbox." + settings.hostname + ":" + settings.port; settings.SECRET = 'secret' settings.GITHUB_CLIENT_ID="<PUT THE CLIENT ID HERE>"; settings.GITHUB_CLIENT_SECRET="<PUT THE SECRET HERE>"; settings.IMGUR_CLIENT_ID="<PUT THE CLIENT ID HERE>"; settings.IMGUR_CLIENT_SECRET="<PUT THE SECRET HERE>";
make
node server.js
If everything's gone well, you should be able to run tributary.
To make life even better for Tributary developers, (like me) I've written a shell script that runs the server, and also auto reloads pages. I will document it real soon, here.
To make life even better for Tributary developers, (like me) I've written a shell script that runs the server, and also auto reloads pages. I will document it real soon, here.
./runserver
Comments
Post a Comment