Jump to content

Set up a hosted backpack.tf automatic instance for free!


The Oddball

Recommended Posts

So, I've been in the process of trying to do this for awhile, and I've finally done it.

This is a FREE way to get hosted backpack.tf automatic.

 

Step 1:

Get an AWS Account. http://console.aws.amazon.com

Either use an Existing Amazon Account, or set up a new one.

 

 

 

Step 2:

Navigate to EC2, in the top left.

 

 

Step 3:

Click "Launch Instance"

 

 

Select the first one in the list.

 

Click Review and Launch.

 

The free one is fine.

 

 

Click "Edit security groups"

 

 

 

Change the Source dropdown box to "My Ip"

 

 

Click Review and Launch, then Launch.

 

Step 4:

Select "Create a new Keypair", and name it whatever you want. (It doesn't matter)

 

 

Then click "Download Keypair".

You should put this file on your desktop.

 

Now click "Launch Instances".

 

Click the name of the instance to go to the EC2 Dashboard, but don't close this tab.

(It should be a random alphanumerical)

 

Step 5:

Download PuTTY, from http://www.putty.org/

 

Just download the Windows MSI Installer, it should include everything you need.

 

Step 6:

Open PuTTYGen, and click "Load"

 

 

Then, change the file type from .ppk, to all.

 

Now, select the key pair you downloaded from AWS.

 

Click "OK"

 

 

Now click "Save private key"

 

 

Click "Yes"

 

 

Save it to the desktop, as whatever file name.

 

 

Exit PuTTYgen.

 

Step 7:

Open PuTTY itself.

 

Under Hostname / IP Address, put the IP of your AWS Instance.

 

Find it here:

hzjhk.png

Under Public DNS.

 

Put in the Hostname box

"ec2-user@(the public DNS)"

 

 

Click the + sign next to "SSH", then click Auth.

Browse for the .ppk file you made with PuTTYgen, then go back to "Session", put a name in the "Saved Sessions" box, and click "Save", now click "Open".

 

Step 8:

(You can paste by right-clicking!)

Click "Yes".

 

Now, run:

sudo yum update
Press y, and enter when it asks.

 

Wait for it to finish, then run:

sudo yum install git
Then press y and enter again when it asks.

Now, nodejs is harder.

First, run:

sudo yum install nodejs npm --enablerepo=epel
Then y again when it asks.

 

Now, you need to update to the newest node version.

 

Run:

git clone git://github.com/nodejs/node.git
Then:
cd node
Then:
git checkout v0.12.2
Then:
./configure
(This will take a long time, it spits out a lot of data, that's ok.), now run:
make
Then:
sudo make install
Node should be working now!

 

Step 9:

To make sure your server doesn't terminate when you close PuTTY, press Control + A, then press N.

 

Put in:

git clone https://bitbucket.org/srabouin/backpack.tf-automatic.git
Now:
cd backpack.tf-automatic
Now:
npm install
It should be working now!

 

Step 10:

Run:

node automatic.js
And set it up like you normally would.

 

Now, press Ctrl + A, then D, to disconnect the screen, to allow you to exit PuTTY.

 

When you log back in, run:

screen -r
to go back to your automatic.

 

It should be working!

Link to comment
Share on other sites

Or use OpenShift. that's what I use. It has free and paid options.

 

The free version must get atlest 1 outside http request every 24 hours or it does into idle, which isnt that hard to just load 1 page a day.

 All you have to do is add the below snippet to backpack's code. ( Its an "Hello World" example for express)


var server_port = process.env.OPENSHIFT_NODEJS_PORT || 3000;
var server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';

app.get('/', function (req, res) {
  res.send('Hello World!');
});

var server = app.listen(server_port, server_ip_address, function () {
  var host = server.address().address;
  var port = server.address().port;
  console.log( "Listening on http://%s:%s", server_ip_address, port );
});
Link to comment
Share on other sites

 

Or use OpenShift. that's what I use. It has free and paid options.

 

The free version must get atlest 1 outside http request every 24 hours or it does into idle, which isnt that hard to just load 1 page a day.

 All you have to do is add the below snippet to backpack's code. ( Its an "Hello World" example for express)

var server_port = process.env.OPENSHIFT_NODEJS_PORT || 3000;
var server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';

app.get('/', function (req, res) {
  res.send('Hello World!');
});

var server = app.listen(server_port, server_ip_address, function () {
  var host = server.address().address;
  var port = server.address().port;
  console.log( "Listening on http://%s:%s", server_ip_address, port );
});

It's not as easy to set up, as you need to know how to code java for that.

Link to comment
Share on other sites

It's not as easy to set up, as you need to know how to code java for that.

Not really, after making an openshift account all you have to do is push backpack's bot to your openshifts' git orgin. Only thing you need to know is how to use Git to add, commit, push. And only "code" that needs to be changed is adding above to app.js or w/e they have their init file called. no need to learn javascript.

 

 

ANYWAYs. kudos for making this tutor. and trying to help others get their own bot up and running.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...