Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #26 from GoogleCloudPlatform/tswast-readmes
Browse files Browse the repository at this point in the history
update readme to latest tools
  • Loading branch information
tswast committed Nov 17, 2016
2 parents bbed84e + cc1d211 commit 8357d41
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 23 deletions.
21 changes: 21 additions & 0 deletions .github/templates/README.md
@@ -0,0 +1,21 @@
# Markdown Templates for Google Cloud Platform Samples

The `.mdpp` files in this directory are templates used in READMEs relating to
Google Cloud samples.

## Before you begin

Install [MarkdownPP](https://github.com/jreese/markdown-pp), a preprocessor for
Markdown files. (Requires Python and PIP)

pip install MarkdownPP

## Rendering the templates

for readme in **/README.mdpp; do
(
cd $(dirname "$readme")
markdown-pp README.mdpp -o README.md
)
done

13 changes: 13 additions & 0 deletions .github/templates/before-you-begin.mdpp
@@ -0,0 +1,13 @@
## Before you begin

1. Download and install the [Google Cloud
SDK](https://cloud.google.com/sdk/docs/), which includes the
[gcloud](https://cloud.google.com/sdk/gcloud/) command-line tool.

1. Create a [new Google Cloud Platform project from the Cloud
Console](https://console.cloud.google.com/project) or use an existing one.

1. Initialize the Cloud SDK.

gcloud init

7 changes: 7 additions & 0 deletions .github/templates/getting-sample-code.mdpp
@@ -0,0 +1,7 @@
## Getting the sample code

Get the latest sample code from GitHub using Git or download the repository as a ZIP file.
([Download](https://github.com/GoogleCloudPlatform/REPO_NAME/archive/master.zip))

git clone https://github.com/GoogleCloudPlatform/REPO_NAME.git

58 changes: 35 additions & 23 deletions README.md
Expand Up @@ -6,40 +6,52 @@ See our other [Google Cloud Platform github
repos](https://github.com/GoogleCloudPlatform) for sample applications and
scaffolding for other frameworks and use cases.

## Getting the sample code

Get the latest sample code from GitHub using Git or download the repository as a ZIP file.
([Download](https://github.com/GoogleCloudPlatform/REPO_NAME/archive/master.zip))

git clone https://github.com/GoogleCloudPlatform/REPO_NAME.git


## Before you begin

1. Download and install the [Google Cloud
SDK](https://cloud.google.com/sdk/docs/), which includes the
[gcloud](https://cloud.google.com/sdk/gcloud/) command-line tool.

1. Create a [new Google Cloud Platform project from the Cloud
Console](https://console.cloud.google.com/project) or use an existing one.

1. Initialize the Cloud SDK.

gcloud init


## Run Locally
1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/), including the [gcloud tool](https://cloud.google.com/sdk/gcloud/), and [gcloud app component](https://cloud.google.com/sdk/gcloud-app).
2. Setup the gcloud tool.

```
gcloud init
```
You don't need a valid app-id to run locally, but will need a valid id to deploy below.

1. Clone this repo.

```
git clone https://github.com/GoogleCloudPlatform/<REPO NAME>.git
```

You don't need a valid project ID to run locally, but will need a valid ID to
deploy.

1. Run the application using the tool of your choice.

1. Visit the application at [http://localhost:8080](http://localhost:8080).

## Deploying

1. Use the [Cloud Developer Console](https://console.developer.google.com) to create a project/app id. (App id and project id are identical)
2. Configure gcloud with your app id.
1. Use the [Cloud Console](https://console.cloud.google.com/project) to create
a project ID.

1. Configure gcloud with your project ID.

```
gcloud config set project <your-app-id>
```
gcloud config set project YOUR-PROJECT-ID

1. Use gcloud to deploy your app.
1. Use gcloud to deploy your app.

```
gcloud app deploy <REPO NAME>/
```
gcloud app deploy REPO_NAME/

1. Congratulations! Your application is now live at your-app-id.appspot.com
1. Congratulations! Your application is now live at
your-project-id.appspot.com

## Contributing changes

Expand Down
44 changes: 44 additions & 0 deletions README.mdpp
@@ -0,0 +1,44 @@
## Project Name

Project description.

See our other [Google Cloud Platform github
repos](https://github.com/GoogleCloudPlatform) for sample applications and
scaffolding for other frameworks and use cases.

!INCLUDE ".github/templates/getting-sample-code.mdpp"

!INCLUDE ".github/templates/before-you-begin.mdpp"

## Run Locally

You don't need a valid project ID to run locally, but will need a valid ID to
deploy.

1. Run the application using the tool of your choice.

1. Visit the application at [http://localhost:8080](http://localhost:8080).

## Deploying

1. Use the [Cloud Console](https://console.cloud.google.com/project) to create
a project ID.

1. Configure gcloud with your project ID.

gcloud config set project YOUR-PROJECT-ID

1. Use gcloud to deploy your app.

gcloud app deploy REPO_NAME/

1. Congratulations! Your application is now live at
your-project-id.appspot.com

## Contributing changes

* See [CONTRIBUTING.md](CONTRIBUTING.md)

## Licensing

* See [LICENSE](LICENSE)

0 comments on commit 8357d41

Please sign in to comment.