Dr. Chocolate
Dr. Chocolate

Reputation: 2165

How to reset openshift deployment to a new state?

I have an openshift application and I radically redesigned the app locally and want to start fresh on the openshift server.

I could delete all the gears and redo them but is there a elegant way or any way to just fully reset an openshift application to it's default fresh state?

Upvotes: 2

Views: 1297

Answers (3)

user2879327
user2879327

Reputation:

If you want to completely reset your git repository for your application you can follow these instructions (https://forums.openshift.com/how-to-erase-all-history-from-a-git-repository-on-openshift-and-start-over-with). It's a little unclear what exactly you are trying to accomplish. I would recommend adding more details about what you are trying to do. Deleting and starting over is probably your best bet to "completely start over".

Upvotes: 3

Dr. Chocolate
Dr. Chocolate

Reputation: 2165

I found several answers.

  1. rhc ssh yourAppName
  2. rm -rf everything in /app-root/repo
  3. rm -rf everything in the /git directory(ignore the errors)
  4. cd into /git/yourAppName.git
  5. git init --bare

There's also deployment management here:
https://developers.openshift.com/en/managing-deployments.html
You can restore back to a pristine state.

I just wanted to know how to do it by hand.

Upvotes: 4

modonoghue
modonoghue

Reputation: 91

Push the updated code to the server with Git. More info here: https://developers.openshift.com/en/managing-modifying-applications.html

Upvotes: 1

Related Questions