Before you do anything, I suggest going through the release notes <https://www.gocd.org/releases/> between 15.2 to the latest to identify any backward incompatibilities. A lot has changed in gocd in the last 3 years since the 15.2 release.
On Sat, Feb 17, 2018 at 12:15 AM Fred <[email protected]> wrote: > Hi guys ! > > Recently I was mandated to plan a version update of GoCD from 1.5.2 to > latest and because of political reason, this upgrade can't afford to fail. > I started digging into the documentation and wrote an upgrade and rollback > plan which ended with a couple of questions and I'm wondering if you guys > could help me on this. > > Here is the questions I come up : > > 1) Documentation says that goCD will always updates his agent to its > corresponding version , could there be a problem in case of a rollback to > an older version (17.+ to 1.5.2) ? > There is one gotcha that you should remember — the latest gocd server and agents require java 8 to run, 15.2 required java 7. So an auto-upgrade of agents 15.2 to a latest version is not possible because of this. As long as you backup, you should not hit a problem. Check the backup instructions for 15.2 — https://docs.gocd.org/15.2.0/advanced_usage/one_click_backup.html, not backup instructions for the latest. > 2) Do disabled agents finish their current executing task properly ? > Yes, they continue to finish their jobs. There is no maintenance mode, so it's better to set agents in disabled state prior to upgrading, and let them complete whatever jobs that are in flight. > 3) Is there a maintenance mode in GoCD that prevents anything to start > automatically. A one Pause button to rule them all ? Can we pause all > pipeline prior to starting a goCD server ? > Yes, you may, disabling agents however works better. > 4) Following a goCD server upgrade , when are agents upgraded ? Does goCD > upgrades disabled agents? > They do, but not in this case of a major upgrade because of java version incompatibilities I mention above. However the agents will stay disabled and will need to be manually upgraded. Going forward if you upgrade the gocd server, the agents will upgrade automatically when you upgrade the server. > 5) Does the server stop command wait for jobs to be finished (graceful > stop) or I need to make sure nothing runs before stopping the server ? > No, it does not stop for anything to complete. It mostly flushes the DB to disk and shuts down. > 6) What is the impact of doing the backup procedure whille there is job > executing on the goCD server ? > The job will be re-scheduled when the server comes back online. Since this is a fairly major upgrade, I'd recommend the following to play it safe: 1. Disable all agents — remember which agents you disabled, so you can enable them back later. 2. Wait for all jobs to finish 3. Backup the DB and configuration using the backup button on the admin console. Make sure to copy this backup somewhere safe 4. Shutdown the gocd server. 5. Shutdown all gocd agents. 6. If you are running on linux, ensure to upgrade the server and agents to the latest java 8. If you are running on windows, java is bundled along with the gocd server, so no java upgrade is required on windows. 7. Make sure that `/etc/default/go-agent` and `/etc/default/go-server` point to the correct java 8 location, or just remove any references to JAVA_HOME if there are any. Backup this file before making any changes. 8. Upgrade the gocd server with the latest version and start the service. Depending on the size of your DB, the gocd service may take a few minutes to start up because of the database migration scripts that happen on startup. 9. Upgrade a couple of gocd agents with the latest version and start the service. 10. Enable the agents that you upgraded in step (9) 11. Kick off a couple of builds to make sure everything is good. 12. Upgrade the rest of the agents. Should you have to rollback, make sure to: 1. Shutdown the server and all agents 2. Restore the `/etc/default/go-agent` and `/etc/default/go-server` files 3. Restore the gocd server from backup 4. Downgrade the agent and server to the previous version (15.2) 5. Startup server and agents Here is teh rollback plan : > > 7) If there is any problem we are doom. > I don't believe we've seen this scenario before :) Good luck with the upgrade, let us know how it goes. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
