Skip to content

Commit dc63193

Browse files
author
Alexander Wenzowski
committed
feat(docs): gcutil is deprecated; convert all calls to gcloud compute
Move to us-central1-c Haswell zone as us-central1-a will be announced as deprecated soon and increase disk size to 256GB ($30 USD/month) since 32GB does not provide sufficient IOPS for ceph.
1 parent fb2ffc0 commit dc63193

1 file changed

Lines changed: 30 additions & 40 deletions

File tree

docs/installing_deis/gce.rst

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Initialize Compute Engine
5757
Google Computer Engine won't be available via the command line tools until it is initialized in the
5858
web console. Navigate to *COMPUTE* -> *COMPUTE ENGINE* -> *VM Instances* in the project console.
5959
The Compute Engine will take a moment to initialize and then be ready to create resources via
60-
``gcutil``.
60+
``gcloud compute``.
6161

6262

6363
Cloud Init
@@ -95,43 +95,37 @@ Create a SSH key that we will use for Deis host communication:
9595
9696
Create some persistent disks to use for ``/var/lib/docker``. The default root partition of CoreOS
9797
is only around 4 GB and not enough for storing Docker images and instances. The following creates 3
98-
disks sized at 32 GB:
98+
disks sized at 256 GB:
9999

100100
.. code-block:: console
101101
102-
$ gcutil adddisk --zone us-central1-a --size_gb 32 cored1 cored2 cored3
103-
104-
Table of resources:
105-
106-
+--------+---------------+--------+---------+
107-
| name | zone | status | size-gb |
108-
+--------+---------------+--------+---------+
109-
| cored1 | us-central1-a | READY | 32 |
110-
+--------+---------------+--------+---------+
111-
| cored2 | us-central1-a | READY | 32 |
112-
+--------+---------------+--------+---------+
113-
| cored3 | us-central1-a | READY | 32 |
114-
+--------+---------------+--------+---------+
102+
$ gcloud compute disks create cored1 cored2 cored3 --size 256GB --type pd-standard --zone us-central1-c
115103
104+
NAME ZONE SIZE_GB TYPE STATUS
105+
cored1 us-central1-c 256 pd-standard READY
106+
cored2 us-central1-c 256 pd-standard READY
107+
cored3 us-central1-c 256 pd-standard READY
116108
117109
Launch 3 instances. You can choose another starting CoreOS image from the listing output of
118110
``gcloud compute images list``:
119111

120112
.. code-block:: console
121113
122-
$ for num in 1 2 3; do gcutil addinstance --use_compute_key --image projects/coreos-cloud/global/images/coreos-stable-557-2-0-v20150210 --persistent_boot_disk --zone us-central1-a --machine_type n1-standard-2 --tags deis --metadata_from_file user-data:gce-user-data --disk cored${num},deviceName=coredocker --authorized_ssh_keys=core:~/.ssh/deis.pub,core:~/.ssh/google_compute_engine.pub core${num}; done
123-
124-
Table of resources:
125-
126-
+-------+---------------+--------------+---------------+---------+
127-
| name | network-ip | external-ip | zone | status |
128-
+-------+---------------+--------------+---------------+---------+
129-
| core1 | 10.240.33.107 | 23.236.59.66 | us-central1-a | RUNNING |
130-
+-------+---------------+--------------+---------------+---------+
131-
| core2 | 10.240.94.33 | 108.59.80.17 | us-central1-a | RUNNING |
132-
+-------+---------------+--------------+---------------+---------+
133-
| core3 | 10.240.28.163 | 108.59.85.85 | us-central1-a | RUNNING |
134-
+-------+---------------+--------------+---------------+---------+
114+
$ for num in 1 2 3; do
115+
gcloud compute instances create core${num} \
116+
--zone us-central1-c \
117+
--machine-type n1-standard-2 \
118+
--metadata-from-file user-data=gce-user-data sshKeys=~/.ssh/deis.pub \
119+
--disk name=cored${num} device-name=coredocker \
120+
--tags deis \
121+
--image coreos-stable-557-2-0-v20150210 \
122+
--image-project coreos-cloud;
123+
done
124+
125+
NAME ZONE MACHINE_TYPE INTERNAL_IP EXTERNAL_IP STATUS
126+
core1 us-central1-c n1-standard-2 10.240.10.107 108.59.80.10 RUNNING
127+
core2 us-central1-c n1-standard-2 10.240.10.108 108.59.80.11 RUNNING
128+
core3 us-central1-c n1-standard-2 10.240.10.109 108.59.80.12 RUNNING
135129
136130
.. note::
137131

@@ -146,23 +140,19 @@ We will need to load balance the Deis routers so we can get to Deis services (co
146140

147141
.. code-block:: console
148142
149-
$ gcutil addhttphealthcheck basic-check --request_path /health-check
150-
$ gcutil addtargetpool deis --health_checks basic-check --region us-central1 --instances core1,core2,core3
151-
$ gcutil addforwardingrule deisapp --region us-central1 --target_pool deis
152-
153-
Table of resources:
143+
$ gcloud compute http-health-checks create basic-check --request-path /health-check
144+
$ gcloud compute target-pools create deis --health-check basic-check --session-affinity CLIENT_IP_PROTO --region us-central1
145+
$ gcloud compute target-pools add-instances deis --instances core1 core2 core3
146+
$ gcloud compute forwarding-rules create deisapp --target-pool deis --region us-central1
154147
155-
+---------+-------------+--------------+
156-
| name | region | ip |
157-
+---------+-------------+--------------+
158-
| deisapp | us-central1 | 23.251.153.6 |
159-
+---------+-------------+--------------+
148+
NAME REGION IP_ADDRESS IP_PROTOCOL TARGET
149+
deisapp us-central1 23.251.153.6 TCP us-central1/targetPools/deis
160150
161151
Note the forwarding rule external IP address. We will use it as the Deis login endpoint in a future step. Now allow the ports on the CoreOS nodes:
162152

163153
.. code-block:: console
164154
165-
$ gcutil addfirewall deis-router --target_tags deis --allowed "tcp:80,tcp:2222"
155+
$ gcloud compute firewall-rules create deis-router --target-tags deis --allow tcp:80 tcp:443 tcp:2222
166156
167157
168158
Configure DNS
@@ -284,5 +274,5 @@ start installing the platform.
284274
It works! Enjoy your Deis cluster in Google Compute Engine!
285275

286276
.. _`contrib/gce`: https://github.com/deis/deis/tree/master/contrib/gce
287-
.. _`Google Cloud SDK`: https://developers.google.com/compute/docs/gcutil/#install
277+
.. _`Google Cloud SDK`: https://cloud.google.com/compute/docs/gcloud-compute/#install
288278
.. _`Google Developer Console`: https://console.developers.google.com/project

0 commit comments

Comments
 (0)