@@ -12,66 +12,115 @@ Pre-requisites:
1212 - Cloud SQL API
1313
1414
15- 1) git clone https://github.com/cloud-ark/caastle.git
16- 2) cd caastle
17- 3) ./install.sh
18- 4) cld setup gcloud
15+ Steps:
16+ -------
17+
18+ 0) CaaStle Documentation:
19+ https://cloud-ark.github.io/caastle/docs/html/html/index.html
20+
21+ 1) Install CaaStle:
22+ - git clone https://github.com/cloud-ark/caastle.git
23+ - cd caastle
24+ - ./install.sh
25+
26+ CaaStle requires Docker to be available on the Host. For Ubuntu hosts, there is
27+ a script included in caastle repository: install-docker-ubuntu.sh
28+
29+ You can run this script to install Docker. If you are running on EC2 instance, log out
30+ and log back in after installing Docker. This is required so that you get added to
31+ the Docker group and are able to run Docker commands without requiring 'sudo'.
32+
33+ If you are on Mac, check https://cloud-ark.github.io/caastle/docs/html/html/installation.html
34+
35+
36+ 2) Setup CaaStle for Google Cloud:
37+ - cld setup gcloud
1938 - Follow the steps
20- 5) ./start-caastle.sh
2139
22- 6) cld app list
23- 7) cd examples/greetings/
40+ 3) Start CaaStle server:
41+ - ./start-caastle.sh
42+
43+ 4) Verify the CaaStle installation and setup is working correctly:
44+ - cld app list
45+
46+
47+ Deploy Application to GKE:
48+ --------------------------
49+
50+ 1) cd examples/greetings/
2451
2552Check README.txt for details.
2653
27- 8 ) Create Environment:
54+ 2 ) Create Environment:
2855 - cld env create envapril4 environment-cloudsql-gke.yaml
2956 - cld env show envapril4
3057 - cld resource list
3158 - cld env show envapril4
3259
33- Once environment is 'available'
60+ Environment creation will take approximately 5/10 minutes. As part of
61+ Environment creation, a one Node GKE cluster and a Google Cloud SQL instance are created.
62+
63+ You can track creation of GKE cluster and Cloud SQL instance through the Google Cloud Console.
64+
65+ Once environment is 'available', do following steps:
3466
3567
36- 9 ) Build and Push Container:
68+ 3 ) Build and Push Container:
3769 - cld container create contapril4 gcr
3870 - cld container show contapril4
3971
40- Once container is 'ready'
72+
73+ Above steps will build your application's container and push it to Google's Container Registry (GCR).
74+ It will take approximately 3/4 minutes.
75+
76+ Once container is 'ready', do following steps:
4177
4278
43- 10 ) Deploy application container
79+ 4 ) Deploy application container
4480 - Edit app-gcloud.yaml to include tagged_image value from output of 'cld container show' command
4581 as value of 'image' field in app-gcloud.yaml
46- - Note that you will have to delete the previous value from this file.
82+ - Note that you will have to delete the previous image value from this file.
4783
4884 - cld app deploy greetings-april4 envapril4 app-gcloud.yaml
4985 - cld app show greetings-april4
5086
87+ Above steps will deploy your application container in the environment. CaaStle will create a Pod
88+ for your application and run it on the GKE cluster in the environment.
89+ It will also resolve the parameterized environment variables binding your application to the
90+ Google Cloud SQL instance created as part of the environment.
5191
52- 11) Once application deployment is complete:
92+
93+ 5) Once application deployment is complete:
5394
5495 - cld app logs greetings-april4
5596 - more /home/devdatta/.cld/data/deployments/greetings-april4/2018-04-04-12-31-38/logs/greetings-april4.deploy-log <use your app's log path>
5697 - more /home/devdatta/.cld/data/deployments/greetings-april4/2018-04-04-12-31-38/logs/greetings-april4.runtime-log <use your app's log path>
5798
5899
59- 12 ) Run Kubernetes and Cloud SQL commands in the environment:
100+ 6 ) Run Kubernetes and Cloud SQL commands in the environment:
60101 - cld env shell envapril4
61102 - help
62103 - kubectl get pods
63104 - kubectl describe pods <pod-name> (<pod-name> will be available from the previous command)
64105 - gcloud sql instances list
65106
66107
67- 13 ) Listing
108+ 7 ) Listing
68109 - cld app list
69110 - cld container list
70111 - cld env list
71112 - cld resource list
72113
73114
74- 14 ) Cleanup
115+ 8 ) Cleanup
75116 - cld app delete greetings-april4
76117 - cld env delete envapril4
77118 - cld container delete contapril4
119+
120+
121+ 9) Cleanup++
122+ - Currently CaaStle does not automatically delete VPC network when Kubernetes cluster is deleted.
123+ You should delete this manually from Google Cloud Console.
124+
125+ - Currently CaaStle does not automatically delete the GCR repository when container is deleted.
126+ You should delete this manually from Google Cloud Console.
0 commit comments