Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 19 additions & 23 deletions appengine/standard/xmpp_wikibot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,37 @@ chatbot does two things:

## Setup

Download the [Google Cloud SDK](https://cloud.google.com/sdk/) to your local machine.
It will allow you to access many of the features of Google Compute Engine via
your local machine.

Clone this project to your local machine.

Follow the instructions at the
[Compute Engine Quickstart Guide](https://cloud.google.com/compute/docs/quickstart-linux)
on how to create a project, create a virtual machine, and connect to your
instance via SSH. Once you have done this, you may jump to
[Installing files and dependencies](#installing-files-and-dependencies).
instance via SSH.

Copy the `wikibot.py` and `requirements.txt` files from this sample to your remote
instance running in Compute Engine. See
[Transferring Files](https://cloud.google.com/compute/docs/instances/transfer-files)
for more information.

Install the dependencies using [pip](http://pip.readthedocs.io/en/stable/):

pip install -r requirements.txt

You should also download the [Google Cloud SDK](https://cloud.google.com/sdk/).
It will allow you to access many of the features of Google Compute Engine via
your local machine.

**IMPORTANT** You must enable tcp traffic on port 5000 to send messages to the
XMPP server. This can be done by running the following SDK commands:
Enable tcp traffic on port 5000 to send messages to the XMPP server, by running the following SDK commands:

gcloud config set project <YOUR PROJECT NAME>

gcloud compute firewall-rules create wikibot-server-rule --allow tcp:5000 --source-ranges=0.0.0.0/0

Or you can create a new firewall rule via the UI in the
Alternatively to enabling `tcp` traffic on port 5000, you can create a new firewall rule via the UI in the
[Networks](https://console.cloud.google.com/networking/networks/list) section of
the Google Cloud Console.

### Installing files and dependencies

First, install the `wikibot.py` and `requirements.txt` files onto your remote
instance. See the guide on
[Transferring Files](https://cloud.google.com/compute/docs/instances/transfer-files)
for more information on how to do this using the Mac file browser, `scp`, or
the Google Cloud SDK.

Before running or deploying this application, you must install the dependencies
using [pip](http://pip.readthedocs.io/en/stable/):

pip install -r requirements.txt


## Running the sample

You'll need to have an XMPP account prior to actually running the sample.
Expand All @@ -69,4 +65,4 @@ Enter control-Z to stop the server
### Running on your local machine

You may also run the sample locally by simply copying `wikibot.py` to a project
directory and installing all python dependencies there.
directory and installing all python dependencies there.