Skip to content

Updating all references to gcloud preview app to gcloud app #407

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

Merged
merged 2 commits into from
Jul 7, 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
2 changes: 1 addition & 1 deletion appengine/flexible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Some samples in this repositories may have special deployment instructions. Refe
3. Use gcloud to deploy your app.

```
gcloud preview app deploy app.yaml
gcloud app deploy
```

4. Congratulations! Your application is now live at `your-app-id.appspot.com`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good spot to show gcloud app browse

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcloud app deploy spit it out anyway, so I don't mind not mentioning it here.

Expand Down
30 changes: 13 additions & 17 deletions appengine/flexible/django_cloudsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Note: setting allowed networks to 0.0.0.0/0 opens your SQL instance to traffic f
* Alternatively, the instance can be created with the gcloud command line tool as follows, substituting `your-root-pw
with a strong, unique password.

`gcloud sql instances create <instance_name> --assign-ip --authorized-networks=0.0.0.0/0 set-root-password=your-root-pw`
gcloud sql instances create <instance_name> --assign-ip --authorized-networks=0.0.0.0/0 set-root-password=your-root-pw

* Create a Database And User

Expand All @@ -51,23 +51,21 @@ First make sure you have Django installed. It's recommended you do so in a
[virtualenv](https://virtualenv.pypa.io/en/latest/). The requirements.txt
contains just the Django dependency.

`pip install -r requirements.txt`
pip install -r requirements.txt

Once the database is setup, run the migrations.

`python manage.py migrate`
python manage.py migrate

If you'd like to use the admin console, create a superuser.

`python manage.py createsuperuser`
python manage.py createsuperuser

The app can be run locally the same way as any other Django app.

`python manage.py runserver`
python manage.py runserver

Now you can view the admin panel of your local site at

`http://localhost:8080/admin`
Now you can view the admin panel of your local site at http://localhost:8080/admin

## Deploying

Expand All @@ -76,33 +74,31 @@ the static content is instead served from Google Cloud Storage.

First, make a bucket and make it publically readable, replacing <your-gcs-bucket> with a bucket name, such as your project id:

`gsutil mb gs://<your-gcs-bucket>`
`gsutil defacl set public-read gs://<your-gcs-bucket>`
gsutil mb gs://<your-gcs-bucket>
gsutil defacl set public-read gs://<your-gcs-bucket>

Next, gather all the static content locally into one folder using the Django `collectstatic` command

`python manage.py collectstatic`
python manage.py collectstatic

Then upload it to CloudStorage using the `gsutil rsync` command

`gsutil rsync -R static/ gs://<your-gcs-bucket>/static`
gsutil rsync -R static/ gs://<your-gcs-bucket>/static

Now your static content can be served from the following URL:

`http://storage.googleapis.com/<your-gcs-bucket/static/`
http://storage.googleapis.com/<your-gcs-bucket/static/

Make sure to replace <your-cloud-bucket> within `mysite/settings.py` to set STATIC_URL to the correct value to serve static content from, and
uncomment the STATIC_URL to point to the new URL.

The app can be deployed by running

`gcloud preview app deploy app.yaml --set-default --version=1 --promote`
gcloud app deploy

which deploys to version 1, and `promote` makes version 1 the default version.

Now you can view the admin panel of your deployed site at

`https://<your-app-id>.appspot.com/admin`
Now you can view the admin panel of your deployed site at https://<your-app-id>.appspot.com/admin.

## Contributing changes

Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/endpoints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Open the `swagger.yaml` file and in the `host` property, replace

Then, deploy the sample using `gcloud`:

gcloud preview app deploy app.yaml
gcloud app deploy

Once deployed, you can access the application at https://YOUR-PROJECT-ID.appspot.com/.

Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/extending_runtime_compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ This sample demonstrates how to extend the [python-compat](https://cloud.google.

3. Deploy the sample:

$ gcloud preview app deploy
$ gcloud app deploy
2 changes: 1 addition & 1 deletion appengine/flexible/hello_world_compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ This sample demonstrates using the [python-compat](https://cloud.google.com/appe

3. Deploy the sample:

$ gcloud preview app deploy
$ gcloud app deploy
2 changes: 1 addition & 1 deletion scripts/prepare-testing-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gcloud alpha bigquery import \
--schema-file bigquery/api/resources/schema.json

echo "Creating datastore indexes."
gcloud preview app deploy -q datastore/api/index.yaml
gcloud app deploy -q datastore/api/index.yaml

echo "Creating pubsub resources."
gcloud alpha pubsub topics create gae-mvm-pubsub-topic
Expand Down