Skip to content

Commit df04cc2

Browse files
authored
Update README.md
1 parent 49a7b53 commit df04cc2

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

appengine/standard/xmpp_wikibot/README.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,43 @@ chatbot does two things:
1616

1717
## Setup
1818

19+
Download the [Google Cloud SDK](https://cloud.google.com/sdk/) to your local machine.
20+
It will allow you to access many of the features of Google Compute Engine via
21+
your local machine.
22+
23+
Clone this project to your local machine.
24+
1925
Follow the instructions at the
2026
[Compute Engine Quickstart Guide](https://cloud.google.com/compute/docs/quickstart-linux)
2127
on how to create a project, create a virtual machine, and connect to your
22-
instance via SSH. Once you have done this, you may jump to
23-
[Installing files and dependencies](#installing-files-and-dependencies).
28+
instance via SSH.
2429

25-
You should also download the [Google Cloud SDK](https://cloud.google.com/sdk/).
26-
It will allow you to access many of the features of Google Compute Engine via
27-
your local machine.
30+
Copy the `wikibot.py` and `requirements.txt` files from this sample to your remote
31+
instance running in Compute Engine using the following commands from your local machine:
2832

29-
**IMPORTANT** You must enable tcp traffic on port 5000 to send messages to the
30-
XMPP server. This can be done by running the following SDK commands:
33+
gcloud config set compute/zone ZONE
3134

32-
gcloud config set project <YOUR PROJECT NAME>
35+
gcloud config set compute/region REGION
36+
37+
gcloud compute copy-files [LOCAL_FILE_PATH] [INSTANCE_NAME]:~/
3338

34-
gcloud compute firewall-rules create wikibot-server-rule --allow tcp:5000 --source-ranges=0.0.0.0/0
39+
Replace ZONE, REGION, and [INSTANCE_NAME] with the values from your project. Replace
40+
[LOCAL_FILE_PATH] with the path to the `wikibot.py` and `requirement.txt` files.
3541

36-
Or you can create a new firewall rule via the UI in the
37-
[Networks](https://console.cloud.google.com/networking/networks/list) section of
38-
the Google Cloud Console.
42+
Using the SSH terminal into the project instance, install the dependencies using [pip](http://pip.readthedocs.io/en/stable/):
3943

40-
### Installing files and dependencies
44+
pip install -r requirements.txt
4145

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

48-
Before running or deploying this application, you must install the dependencies
49-
using [pip](http://pip.readthedocs.io/en/stable/):
47+
Enable tcp traffic on port 5000 to send messages to the XMPP server, by running the following SDK commands:
48+
49+
gcloud config set project <YOUR PROJECT NAME>
5050

51-
pip install -r requirements.txt
51+
gcloud compute firewall-rules create wikibot-server-rule --allow tcp:5000 --source-ranges=0.0.0.0/0
5252

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

5457
## Running the sample
5558

@@ -69,4 +72,4 @@ Enter control-Z to stop the server
6972
### Running on your local machine
7073

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

0 commit comments

Comments
 (0)