Skip to content

Commit 29e0a00

Browse files
author
Jon Wayne Parrott
committed
Making yaml files templates, updating readme and makefile.
1 parent 97e6a59 commit 29e0a00

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bookshelf-frontend.yaml
2+
bookshelf-worker.yaml

optional-container-engine/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
GCLOUD_PROJECT:=$(shell gcloud config list project --format="value(core.project)")
2+
13
.PHONY: all
24
all: deploy
35

@@ -21,8 +23,8 @@ push: build
2123

2224
.PHONY: template
2325
template:
24-
sed -i ".tmpl" "s/\$$GCLOUD_PROJECT/$(GCLOUD_PROJECT)/g" bookshelf-frontend.yaml
25-
sed -i ".tmpl" "s/\$$GCLOUD_PROJECT/$(GCLOUD_PROJECT)/g" bookshelf-worker.yaml
26+
sed "s/\$$GCLOUD_PROJECT/$(GCLOUD_PROJECT)/g" bookshelf-frontend.tmpl.yaml > bookshelf-frontend.yaml
27+
sed "s/\$$GCLOUD_PROJECT/$(GCLOUD_PROJECT)/g" bookshelf-worker.tmpl.yaml > bookshelf-worker.yaml
2628

2729
.PHONY: deploy-frontend
2830
deploy-frontend: push template

optional-container-engine/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Before the application can be deployed to Container Engine, you will need build
5050

5151
The bookshelf app has two distinct "tiers". The frontend serves a web interface to create and manage books, while the worker handles fetching book information from the Google Books API.
5252

53-
`bookshelf-frontend.yaml` contains the Kubernetes resource definitions to deploy the frontend. **Update this file with your Project ID**, then use `kubectl` to create these resources on the cluster:
53+
Copy `bookshelf-frontend.tmpl.yaml` to `bookshelf-frontend.yaml` and **update the file with your Project ID**. This file contains the Kubernetes resource definitions to deploy the frontend. You can use `kubectl` to create these resources on the cluster:
5454

5555
kubectl create -f bookshelf-frontend.yaml
5656

@@ -70,7 +70,7 @@ You can then browse to the public IP address in your browser to see the bookshel
7070

7171
# Deploy worker
7272

73-
`bookshelf-worker.yaml` contains the Kubernetes resource definitions to deploy the worker. The worker doesn't need to serve web traffic or expose any ports, so it has significantly less configuration than the frontend. **Update `bookshelf-worker.yaml` file with your Project ID**, then use `kubectl` to create these resources on the cluster:
73+
Copy `bookshelf-worker.tmpl.yaml` to `bookshelf-worker.yaml` and **update the file with your Project ID**. This file contains the Kubernetes resource definitions to deploy the worker. The worker doesn't need to serve web traffic or expose any ports, so it has significantly less configuration than the frontend. You can use `kubectl` to create these resources on the cluster:
7474

7575
kubectl create -f bookshelf-worker.yaml
7676

0 commit comments

Comments
 (0)