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

CLI codenvy upgrade command #1033

Closed
skabashnyuk opened this issue Oct 26, 2016 · 13 comments · Fixed by #1147
Closed

CLI codenvy upgrade command #1033

skabashnyuk opened this issue Oct 26, 2016 · 13 comments · Fixed by #1147

Comments

@skabashnyuk
Copy link
Contributor

b. "codenvy upgrade y" will do the following:
---- Access the manifest that is in ~/.codenvy/manifests/upgrades to see if x -> y is allowed
---- If not allowed, terminate with friendly error message
---- If allowed, perform upgrade sequence of (cmd_stop(), cmd_backup()?, cmd_download() to get new images, cmd_start() (which does a config and launches Codenvy tomcat which does migration), and then if any errors along the way, some sort of rollback.

@TylerJewell
Copy link
Contributor

I can help with some of the CLI upgrade() parts + education on how the system works. There are two primary parts of the implementation;

  1. Looking up from the manifest the valid upgrade paths and verifying that the user has entered a proper one.
  2. Actually doing the upgrade by downloading the new images and starting the system.

This will probably not be that hard if you know the CLI --- but we will need two sets of images created by @skabashnyuk team so that we can practice upgrading from one format to another. If we can get those images created on dockerhub with different tags and the manifest updated, then we can test.

@skabashnyuk
Copy link
Contributor Author

skabashnyuk commented Oct 26, 2016

Need more inputs.

  1. ---- Access the manifest that is in ~/.codenvy/manifests/upgrades to see if x -> y is allowed
    How this file "upgrades" will be created, maintained, what format?
    BTW in what cases it can be NOT allowed to upgrade?
  2. cmd_backup what it should do? exactly.

@TylerJewell
Copy link
Contributor

Backup already implemented in cli so upgrade just reused that function.

Upgrades file is already generated by CI system and placed into codenvy/version image which is singleton that is downloaded when you first start the system. This is all documented in the docs page :)

If it will help I can implement the function that checks upgrades for a valid upgrade request.

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Oct 27, 2016

@skabashnyuk: is Codenvy CLI https://github.com/codenvy/codenvy/tree/master/cli ?
Or it is completely new product?

@TylerJewell
Copy link
Contributor

Completely new product - look at codenvy.sh and cli.sh in "hackathon" branch.

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Oct 27, 2016

@TylerJewell
Copy link
Contributor

I would like to implement a part of the upgrade method the part that verifies the upgrade version is acceptable.

-Tyler

On Thu, Oct 27, 2016 at 12:36 PM -0400, "Dmytro Nochevnov" notifications@github.com wrote:

Got it https://github.com/codenvy/codenvy/blob/hackathon/codenvy.sh

Thank you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@TylerJewell
Copy link
Contributor

@dmytro-ndp - I have implemented the logic in 'cmd_upgrade()' to check the currently installed version and then iterate through the list of upgradeable paths in the manifest to determine if the targeted upgrade to version is a version that we will accept. So now we just have to implement the upgrade logic once we have versions that are upgradeable within images.

@JamesDrummond
Copy link

@vkuznyetsov We need this in the current sprint to make get this done by CheConf. Do you need additional resources/help from others to complete this task?

@TylerJewell
Copy link
Contributor

This is not needed for current sprint. Upgrade() is not expected nor required for CheConf.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Nov 11, 2016

Ok after some code investigation i see some points:

  1. We need an utility method to know is codenvy currently running
  2. We need ability to download the specified version (which may differ from latest AFAIU)
  3. Rollback is still a question for me
  4. We need images of different versions to test everything

@TylerJewell
Copy link
Contributor

@mshaposhnik - the existing CLI has some utility methods for checking that the server is already running. You should be able to reuse that capability.

Also, the CLI also has tools for downloading images against a version, so you can reuse that, too.

@mshaposhnik
Copy link
Contributor

Testing was performed by manually adding entries into updates manifest to allow fake updates to the same version, like nightly -> nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants