Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instance names to 1st gen & 2nd gen #454

Merged
merged 1 commit into from
Dec 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions appengine/cloudsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Developers Console](https://console.cloud.google.com/sql/instances). Alternative
2. Change the root password (under Access Control) and / or create a new user / password.
3. Create a Database (under Databases) (or use MySQL with `gcloud sql connect <instance> --user=root`)
4. Note the **Instance connection name** under Overview > properties
(It will look like project:instance for v1 or project:region:zone for v2)
(It will look like project:instance for 1st Generation or project:region:zone for 2nd Generation)

## Deploying

```bash
$ mvn clean appengine:deploy -DINSTANCE_CONNECTION_NAME="instanceConnectionName" -Duser=root
$ mvn clean appengine:deploy -DINSTANCE_CONNECTION_NAME=instanceConnectionName -Duser=root
-Dpassword=myPassword -Ddatabase=myDatabase
```

Expand All @@ -23,6 +23,7 @@ Or you can update the properties in `pom.xml`
## Running locally

```bash
$ mvn clean appengine:run -Duser=root -Dpassword=myPassowrd -Ddatabase=myDatabase
$ mvn clean appengine:run -DINSTANCE_CONNECTION_NAME=instanceConnectionName -Duser=root -Dpassword=myPassowrd -Ddatabase=myDatabase
```

Note - you must use a local mysql instance for the 1st Generation instance and change the local Url
in `src/main/webapp/WEB-INF/appengine-web.xml` to use your local server.
8 changes: 4 additions & 4 deletions appengine/cloudsql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<properties>
<!-- INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties
or gcloud sql instances describe <instance>
project:region:instance for Cloud SQL v2 or
project:instance for Cloud SQL v1
project:region:instance for Cloud SQL 2nd Generation or
project:instance for Cloud SQL 1st Generation
-->
<INSTANCE_CONNECTION_NAME></INSTANCE_CONNECTION_NAME>
<user>root</user>
<password></password>
<database></database>
<password>myPassword</password>
<database>sqldemo</database>

<!-- [START_EXCLUDE] -->
<appengine.maven.plugin>1.0.0</appengine.maven.plugin>
Expand Down