How to Execute The Command 'Appcfg Rollback'

How do I execute the command 'appcfg rollback'?

You want appcfg.sh rollback (which is in path_to_your_app_engine_sdk/bin/). appcfg comes in different variants for each type of runtime (Python, Java, Go), so the suggested command is a bit generic.

If, for whatever reason, you don't have easy access to the entire war directory of your project (if, for example your IDE only gives you a .war file), you can do the following:

  1. Make a directory named war.
  2. Inside the war folder make another directory and name it as WEB-INF.
  3. In the folder WEB-INF drop two xml files, namely web.xml and appengine-web.xml. These should have the contents of your deployed web.xml and appengine-web.xml files respectively.

Then run the following shell command (this assumes you execute it from the bin directory of the App Engine Java SDK):

[non-admin@user bin]$ ./appcfg.sh rollback /home/non-admin/NetBeansProjects/PersonalSite/web/war

If you are using the Go appengine tools, then you'll need to run:

$ cd [your go_appengine directory]
$ ./appcfg.py rollback [your app directory with app.yaml in it]

How to rollback the appcfg in Google App Engine?

Just as the message says, you need to use rollback command to undo the previous update that failed to complete. Just replace the word update with the word rollback (everything else stays the same) and run the command.

You can run it in the terminal window (command prompt) on your computer by running appcfg program.

  • Python:
    https://cloud.google.com/appengine/docs/python/tools/uploadinganapp

  • Java: https://cloud.google.com/appengine/docs/java/tools/uploadinganapp

How to appcfg rollback my project?

You need to cd into the src folder.

Then do:

appcfg.py --no_cookies --email=YOUR_EMAIL_HERE@gmail.com --passin rollback ./

That always does the trick for me.

Google App Engine: appcfg.py rollback

The rollback command can rollback a transaction on the server, but you are unlikely to need to use that unless an update of your app failed for some reason. You should be getting some feedback from appcfg.py that such an action is required. Is that what you want to do? If so, just open a command prompt and type appcfg.py rollback.

Otherwise, please let us know what you are trying to accomplish by performing a 'rollback'.

How to rollback in App-engine?

To roll back the update use the appcfg rollback command which is documented for Java apps here and for Python here.

If you are using Python on Windows then you would use:

appcfg.py rollback C:\myappdirectory

Just substitute C:\myappdirectory for the directory of your application. If you are using Java then you should substitute appcfg.py for directory-to-java-sdk\appcfg.cmd on Windows and directory-to-java-sdk\appcfg.shon linux and mac.

Google App Engine Make a rollback with appcfg.sh

It does not have execute permission by default:

-rw-r--r--  1 yorkw  staff   558 11 Dec 06:01 appcfg.sh

Run chmod 755 appcfg.sh to change the permission:

-rwxr-xr-x  1 yorkw  staff   558 11 Dec 06:01 appcfg.sh

Then you should be able to run it in terminal.

How to rollback a python application

In the windows command prompt, reference your python executable:

eg:

[cmd]

cd C:\Program Files (x86)\Google\google_appengine (ie: [GAE dir])

C:\Python27\python.exe appcfg.py rollback [deploy dir]

What's the gcloud equivalent of appcfg rollback?

I think there is no direct command to appcfg rollback. However, I would highly recommend you to consider the Splitting the traffic option.

This will let you redirect the traffic from one of your versions to another, even between old versions of your service.

Let's imagine this:

  • You have version 1 of your service and it works just fine.
  • A couple weeks later you decide to deploy a new the version: version 2
  • However, the deploy fails and your app is completely down. You are loosing users and money. Everything is on fire.
  • You can easily switch the traffic to the trusty version 1 by redirecting 100% of the traffic to it.
  • Version 2 is out of the game until you deploy a new version.

The advantage of this is that you don't have to wait until the rollback is done. The traffic is automatically redirected to an old version. Additionally, it has the gcloud set traffic command for you to run it via the CLI.

Hope this is helpful!

How do I rollback the appcfg in Google App Engine's Python SDK?

That's because an initial update might have stalled or something. So you need to rollback like the error message points out.

In your specific case, you can open the command prompt(Win+R, then type cmd then enter) and run the following:

C:\Program Files (x86)\Google\google_appengine\appcfg.py rollback C:\Users\Bryce\Desktop\ShaolinP


Related Topics



Leave a reply



Submit