Migration/Upgradation gluide 4.6.2->5.1

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Migration/Upgradation gluide 4.6.2->5.1

zedfauji
Hi,

Need a migration or upgradation guide from 4.6.2 to 5.1.
Currently running 4.6.2 in production env. so wanna upgrade to 5.1 but don wanna loose anything. So please help .
-=Zed=- a.k.a -=Fauji=- More quieter you are , more you can hear
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator
I will "back port" the release notes into the new migration guide at some point in the future. But in order to migrate to glu 5.1.0, you should:

* since 4.6.2 is java 1.6, you need to migrate to glu 4.7.2 first
* then upgrade your java environment to java 1.7
* then migrate to 5.1.0 (5.0.0 is simply the same as 4.7.2 but compiled with java 7 so you can skip) or in other words the steps from 5.0.0 -> 5.1.0 are the same as 4.7.2 -> 5.1.0 (AFTER you are running under java 7)

Yan
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

sodul
I guess you could switch from 4.6.2 to 5.1.0 directly as long as you switch from Java 6 to Java 7 at the same time.

In practice upgrading the agents is rather simple. What we do is:
* stop the old agent
* install the new agent
* copy the data directory from the old install
* copy the pre_master_conf.sh from the old install
* update JAVA_HOME in pre_master_conf.sh if needed
* start the new agent

The console is fairly similar except the data is stored in the DB and we just need to pass the config files along.

Unfortunately this is all from memory and I don't have a detailed procedure to share.
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator
There is a section in the documentation about how to upgrade the agents. By far the recommended way is to use the console as it does it for you: you simply need to point to the "upgrade" tar ball. (Also note that since 5.1.0 you can build your own custom upgrade tarball).

Yan
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

sodul
The gotcha with upgrading the agents from the console is that it does not preserve pre_master_conf.sh since it is inside the versioned directory. Our approach around it is that we have a pre_master_conf.sh symlink in that versioned directory that point to a static pre_master_conf.sh that is machine specific (agent name and fabric name are set there). We have the agents managed by Salt anyhow so we do not use the console to upgrade them.
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator
Yes I know. For this there are 2 things:

1) with 5.1.0 you can build your own agent upgrade tar ball which can obviously include your own pre_master_conf.sh (although you may not even need to do that, as configTokens may be enough!)
2) there is this ticket (https://github.com/pongasoft/glu/issues/215) about "Add ability to configure agent outside the "tarball"" which I will implement in the next release of glu (did not want to add more changes as there were already so many in this one)

Yan
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

zedfauji
Yan,Sodul
I can really need some help over. I have running 4.6.2 since  and i really need to migrate this over 5.2.0

So please guide me through this.
Thanks in advance
-=Zed=- a.k.a -=Fauji=- More quieter you are , more you can hear
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator
There is now a migration guide online: http://pongasoft.github.io/glu/docs/latest/html/migration-guide.html

But in a nutshell, the easiest path for you is:

1) Upgrade from 4.6.2 to 4.7.2 (meaning download 4.7.2 and use the auto upgrade capability to upgrade your agents and then upgrade the console)
2) Install java 7 on each node where you have an agent and the node where you have the console and make sure you configure JAVA_HOME to point to the new java
3) Bounce (meaning stop and start) every agent and the console. They should now start using java 7 (you can check that it is the case by looking at the log file):

2013/07/20 12:09:42.458 INFO [AgentMain] java version "1.7.0_25" | Java(TM) SE Runtime Environment (build 1.7.0_25-b15) | Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)


=> you now have a 5.2.0 distribution which is similar (in structure) to 4.7.2 => use the auto upgrade capability to upgrade your agents and then upgrade the console

Yan
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

zedfauji
Thanks Yan, getting below error while upgrading

2013/08/22 00:03:45.597 INFO [/self/upgrade] Preparing...
2013/08/22 00:04:05.574 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:04:15.583 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:04:25.589 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:04:35.594 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:04:45.598 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:04:55.603 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:05.610 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:15.615 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:25.620 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:35.624 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:45.629 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:05:55.634 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:05.640 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:15.644 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:25.648 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:35.652 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:45.657 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:55.662 INFO [/self/upgrade] waitForState([state:prepared, timeout:10s, mountPoint:/self/upgrade]): false
2013/08/22 00:06:55.720 INFO [/self/upgrade] Prepare complete... restarting agent...
2013/08/22 00:08:59.844 INFO [StateKeeperScriptManager] Restoring state: [scriptDefinition:[mountPoint: /self/upgrade, parent: /, scriptFactoryArgs: [class:org.linkedin.glu.agent.impl.script.FromClassNameScriptFactory, className:org.linkedin.glu.agent.impl.script.AutoUpgradeScript], initParameters: [agentTar:org.linkedin.glu.agent-server-upgrade-4.7.2.tgz, newVersion:4.7.2]], scriptState:[script:[agentRootDir:/cacheDir/glu-agent, currentVersion:4.6.2, untarredAgent:file:/cacheDir/glu-agent/data/tmp/self/upgrade/__tmp244431005Dir], stateMachine:[currentState:prepared]]]
2013/08/22 00:08:59.897 INFO [/self/upgrade] installScript([mountPoint: /self/upgrade, parent: /, scriptFactoryArgs: [class:org.linkedin.glu.agent.impl.script.FromClassNameScriptFactory, className:org.linkedin.glu.agent.impl.script.AutoUpgradeScript], initParameters: [agentTar:org.linkedin.glu.agent-server-upgrade-4.7.2.tgz, newVersion:4.7.2]])
-=Zed=- a.k.a -=Fauji=- More quieter you are , more you can hear
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator

Why are you saying it is an error? Maybe I am not seeing something obvious but this looks like info messages to me.

Yan

Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

zedfauji
Yan , i tried to upgrade agents.
But the problem is i have to manually restart agent to get it done. Though agent has been upgraded but while opening on glu console. console is throwing run time exception.

And please tell how to upgrade console also
-=Zed=- a.k.a -=Fauji=- More quieter you are , more you can hear
Reply | Threaded
Open this post in threaded view
|

Re: Migration/Upgradation gluide 4.6.2->5.1

frenchyan
Administrator
Upgrading the agents should not require manual intervention. Only the migration from java 6 to java 7 should as there is no current way to bounce an agent. With the small amount of details you provide ("console is throwing run time exception") I am not sure what you want me to do about it.

Upgrading the console depends on what you did to configure it and which database you use. After 5.1.0 it is a lot cleaner and easier since you should keep your customization outside the console in the meta model. That being said since you are not there, the way to upgrade is the following:

* shut down the running console
* copy your conf/glu-console-webapp.groovy into the conf folder of the new console
* copy your jetty-distribution-8.1.10.v20130312/database folder (IF you are using the database provided with glu, which is not recommended) into the jetty-distribution-8.1.10.v20130312 folder of the new console
* migrate java 6 to java 7
* start the new console

Yan