diff --git a/Dockerfile b/Dockerfile index f6db547..44b5aa2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,7 @@ FROM ruby:2.3.1 RUN mkdir /lobsters WORKDIR /lobsters -ADD Gemfile /lobsters/Gemfile -ADD Gemfile.lock /lobsters/Gemfile.lock +ADD Gemfile /lobsters/Gemfile && Gemfile.lock /lobsters/Gemfile.lock RUN apt-get update && apt-get install nodejs -y RUN bundle install ADD . /lobsters diff --git a/docs/create-docker-images.md b/docs/create-docker-images.md index 3687a3d..c5bcfd1 100644 --- a/docs/create-docker-images.md +++ b/docs/create-docker-images.md @@ -7,7 +7,7 @@ git clone https://github.com/kelseyhightower/lobsters.git ``` ``` -cp Dockerfile lobsters +cp lobsters-on-kubernetes/Dockerfile lobsters/ ``` ``` @@ -21,7 +21,7 @@ docker push kelseyhightower/lobsters:2.0.0 ## kelseyhightower/lobsters:2.0.1 ``` -cp custom.css lobsters/app/assets/stylesheets/local +cp lobsters-on-kubernetes/custom.css lobsters/app/assets/stylesheets/local ``` ``` diff --git a/docs/create-lobsters-deployment.md b/docs/create-lobsters-deployment.md index ae27598..f547ad9 100644 --- a/docs/create-lobsters-deployment.md +++ b/docs/create-lobsters-deployment.md @@ -3,7 +3,7 @@ ## Create lobsters Service ``` -kubectl create -f services/lobsters.yaml +kubectl create -f lobsters-on-kubernetes/services/lobsters.yaml ``` ``` @@ -13,5 +13,5 @@ gcloud compute firewall-rules create lobsters --allow tcp:3000 ## Create lobsters Deployment ``` -kubectl create -f deployments/lobsters.yaml +kubectl create -f lobsters-on-kubernetes//deployments/lobsters.yaml ``` diff --git a/docs/create-mysql-deployment.md b/docs/create-mysql-deployment.md index eeeac5f..8829aa7 100644 --- a/docs/create-mysql-deployment.md +++ b/docs/create-mysql-deployment.md @@ -4,10 +4,8 @@ ## Create Google Persistent Disk ``` -gcloud compute disks create mysql -``` +$ gcloud compute disks create mysql -``` NAME ZONE SIZE_GB TYPE STATUS mysql us-west1-b 500 pd-standard READY ``` @@ -15,49 +13,42 @@ mysql us-west1-b 500 pd-standard READY ## Create mysql PersistentVolume ``` -kubectl create -f pv/mysql.yaml -``` -``` -persistentvolume "mysql" created +$ kubectl create -f lobsters-on-kubernetes/pv/mysql.yaml + +=> persistentvolume "mysql" created ``` ## Create mysql PersistentVolumeClaim ``` -kubectl create -f pvc/mysql.yaml -``` -``` -persistentvolumeclaim "mysql" created +$ kubectl create -f lobsters-on-kubernetes/pvc/mysql.yaml + +=> persistentvolumeclaim "mysql" created ``` ## Create mysql Secrets ``` -kubectl create secret generic lobsters \ +$ kubectl create secret generic lobsters \ --from-literal=root-password=l0bst3rs \ --from-literal=mysql-password=lobsters \ --from-literal='database-url=mysql2://lobsters:lobsters@mysql:3306/lobsters' -``` -``` -secret "lobsters" created +=> secret "lobsters" created ``` ## Create mysql Deployment ``` -kubectl create -f deployments/mysql.yaml -``` -``` -deployment "mysql" created +$ kubectl create -f lobsters-on-kubernetes/deployments/mysql.yaml + +=> deployment "mysql" created ``` ## Create mysql Service ``` -kubectl create -f services/mysql.yaml -``` +$ kubectl create -f lobsters-on-kubernetes/services/mysql.yaml -``` -service "mysql" created +=> service "mysql" created ``` diff --git a/docs/run-database-migrations.md b/docs/run-database-migrations.md index 949fee4..03019c8 100644 --- a/docs/run-database-migrations.md +++ b/docs/run-database-migrations.md @@ -1,9 +1,9 @@ # Run Database Migrations ``` -kubectl create -f jobs/lobsters-db-schema-load.yaml +kubectl create -f lobsters-on-kubernetes/jobs/lobsters-db-schema-load.yaml ``` ``` -kubectl create -f jobs/lobsters-db-seed.yaml +kubectl create -f lobsters-on-kubernetes/jobs/lobsters-db-seed.yaml ```