-
Notifications
You must be signed in to change notification settings - Fork 41
Screepspl.us agent with Compute Engine
bonzaiferroni edited this page Sep 3, 2017
·
6 revisions
If you are using the Grafana service from screepspl.us, there is a cheap and easy solution for running the agent remotely. I use the Compute Engine from Google Cloud Platform and it only costs about 35 cents a month. Here is how you can set it up.
- Create an instance with google cloud compute, least expensive machine will work. I used
micro
with a Debian boot disk. I used all the default settings. - Once your machine is ready to use, start an SSH session. I just used the browser window. (VM instances -> Remote Access -> SSH -> Open in browser window)
- Install git
sudo apt-get install -y git
- Install nodejs
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
- Clone the screepspl.us agent
git clone https://github.com/ScreepsPlus/node-agent.git
- Navigate to
node-agent
folder and install
npm install
- Log in to screepspl.us and get your token, make a copy of
config.js.sample
and use nano to editconfig.js
cp config.js.sample config.js
nano config.js
- Start the agent running in another thread so that it continues after you log out of the SSH session:
screen -d -m -S screeps node node-agent/app.js
- Complete the instructions at https://screepspl.us/agent to set up your screeps codebase.
- Support this excellent service and its author with patreon! https://www.patreon.com/ags131