forked from astashov/dartdocs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_google_cloud_project.sh
More file actions
43 lines (36 loc) · 1.55 KB
/
create_google_cloud_project.sh
File metadata and controls
43 lines (36 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Create datastore indexes
gcloud preview datastore create-indexes index.yaml
gcloud preview datastore cleanup-indexes index.yaml
# Create the bucket and configure it as a static site
gsutil -m rm -r gs://www.dartdocs2.com
gsutil mb gs://www.dartdocs2.com -p dartdocs
gsutil acl ch -u AllUsers:R gs://www.dartdocs2.com
gsutil web set -m index.html -e 404.html gs://www.dartdocs2.com
# Create initial docsVersion in Datastore
dart bin/bump_docs_version.dart
# Create templates and instance groups with index and package generators
gcloud compute instance-templates create dartdocs-index-generator \
--boot-disk-size 30GB \
--boot-disk-type pd-standard \
--image ubuntu-14-04 \
--machine-type n1-standard-2 \
--metadata-from-file startup-script=index_generator_boot.sh \
--scopes datastore,storage-full,compute-ro
gcloud compute instance-templates create dartdocs-package-generator \
--boot-disk-size 30GB \
--boot-disk-type pd-standard \
--machine-type n1-standard-2 \
--image ubuntu-14-04 \
--metadata-from-file startup-script=package_generator_boot.sh \
--scopes datastore,storage-full,compute-ro
gcloud compute instance-groups managed create dartdocs-index-generators \
--base-instance-name dartdocs-index-generators \
--size 1 \
--template dartdocs-index-generator \
--zone us-central1-f
gcloud compute instance-groups managed create dartdocs-package-generators \
--base-instance-name dartdocs-package-generators \
--size 20 \
--template dartdocs-package-generator \
--zone us-central1-f