dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #08826
Re: Upgrading from 2.16 to 2.21 (using dhis2-tools)
Thanks Bob for sharing.
-Ese
On Wed, Dec 9, 2015 at 8:40 PM, gerald thomas <gerald17006@xxxxxxxxx> wrote:
> Noted Bob
>
> Regards,
> Gerald
> On Dec 9, 2015 7:29 PM, "Bob Jolliffe" <bobjolliffe@xxxxxxxxx> wrote:
>
>> Hi Gerald
>>
>> If you are not doing this over ssh like me, it would probably be best
>> to do step 1 by popping a 14.04 server cd in the tray (or usb thingy)
>> and upgrading the OS off that.
>>
>> Bob
>>
>> On 9 December 2015 at 19:16, gerald thomas <gerald17006@xxxxxxxxx> wrote:
>> > Thanks Bob,
>> > Noted!!! You had been so helpful to me.
>> >
>> > Regards,
>> > Gerald
>> >
>> > On Dec 9, 2015 6:06 PM, "Knut Staring" <knutst@xxxxxxxxx> wrote:
>> >>
>> >> Thanks Bob,
>> >>
>> >> This is very helpful, and should be part of the documentation.
>> >>
>> >> Should have thought of the need for Step 7 when I was upgrading
>> recently,
>> >> would have saved me a ton of headache
>> >>
>> >> Knut
>> >>
>> >> On Wed, Dec 9, 2015 at 5:54 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>> >> wrote:
>> >>>
>> >>> I know questions about this comes up now and again. I just finished
>> >>> doing exactly this for a regional server today so I list my steps here
>> >>> for those planning a similar process.
>> >>>
>> >>> Starting state was a server running ubuntu 12.04, openjdk 7 and dhis2
>> >>> 2.16.
>> >>>
>> >>> Database backup was made and a copy kept off the server.
>> >>>
>> >>> 1. Upgrade the OS to 14.04. This is the longest (and scariest) step
>> >>> - a big upgrade to do over the internet. But the recommended
>> >>> procedure (running 'sudo do-release-upgrade') worked fine. Took a few
>> >>> hours. Ubuntu creates an emergency ssh backdoor on port 1022 while
>> >>> this is going on, but fortunately I didn't have to use it. But we did
>> >>> have ufw firewall running so I took the precaution of opening that
>> >>> port just in case (sudo ufw allow 1022).
>> >>>
>> >>> 2. Install oracle java 8 :
>> >>>
>> >>> sudo apt-get install software-properties-common
>> >>> sudo add-apt-repository ppa:webupd8team/java
>> >>> sudo apt-get update
>> >>> sudo apt-get install oracle-java8-installer
>> >>> sudo update-java-alternatives -s java-8-oracle
>> >>>
>> >>> 3. Download all the upgrade scripts and war files
>> >>> for ver in 17 18 19 20 21;
>> >>> do
>> >>> wget -O dhis-2.$ver.war
>> >>> https://www.dhis2.org/download/releases/2.$ver/dhis.war;
>> >>> wget
>> >>>
>> https://raw.githubusercontent.com/dhis2/dhis2-utils/master/resources/sql/upgrade-2$ver.sql
>> >>> done
>> >>>
>> >>> 4. Read carefully all the upgrade notes at:
>> >>> https://www.dhis2.org/217-upgrade
>> >>> https://www.dhis2.org/218-upgrade
>> >>> https://www.dhis2.org/219-upgrade
>> >>> https://www.dhis2.org/220-upgrade
>> >>> https://www.dhis2.org/221-upgrade
>> >>>
>> >>> 5. shutdown nginx with
>> >>> sudo service nginx stop
>> >>>
>> >>> 6. start deploying war files and checking logs as we go. Apply
>> >>> upgrade scripts as necessary
>> >>>
>> >>> dhis2-deploy-war -f dhis-2.17.war dhis2; tail -f
>> >>> /var/lib/dhis2/dhis2/logs/catalina.out
>> >>>
>> >>> dhis2-deploy-war -f dhis-2.18.war dhis2; tail -f
>> >>> /var/lib/dhis2/dhis2/logs/catalina.out
>> >>>
>> >>> cat upgrade-219.sql |psql dhis2
>> >>> dhis2-deploy-war -f dhis-2.19.war dhis2; tail -f
>> >>> /var/lib/dhis2/dhis2/logs/catalina.out
>> >>>
>> >>> cat upgrade-220.sql |psql dhis2
>> >>> dhis2-deploy-war -f dhis-2.12.war dhis2; tail -f
>> >>> /var/lib/dhis2/dhis2/logs/catalina.out
>> >>>
>> >>> 7. clear nginx cache and restart
>> >>> sudo -s
>> >>> rm /var/cache/nginx/*
>> >>> exit
>> >>> sudo service nginx start
>> >>>
>> >>> That's about it. So far everything seems ok. We just hope there are
>> >>> not problems from messy metadata. Probably it is a better I idea to
>> >>> do integrity checks on the metadata right at the very start (I
>> >>> forgot).
>> >>>
>> >>> Note I am holding back on 2.21 upgrade because of the issue with md5
>> >>> passwords mentioned in the upgrade notes. I'll give the users a day
>> >>> or two to make sure they have tested their logins. Will take 5
>> >>> minutes to do when the time comes.
>> >>>
>> >>> Note that the OS upgrade is necessary to get the right tomcat version
>> >>> through the package system. We could have avoided by doing a custom
>> >>> tomcat install, but I prefer to stick with the packages.
>> >>>
>> >>> Hope the above helps anyone else faced with this challenge.
>> >>>
>> >>> Bob
>> >>>
>> >>> _______________________________________________
>> >>> Mailing list: https://launchpad.net/~dhis2-users
>> >>> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> >>> Unsubscribe : https://launchpad.net/~dhis2-users
>> >>> More help : https://help.launchpad.net/ListHelp
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Knut Staring
>> >> Dept. of Informatics, University of Oslo
>> >> Norway: +4791880522
>> >> Skype: knutstar
>> >> http://dhis2.org
>> >>
>> >> _______________________________________________
>> >> Mailing list: https://launchpad.net/~dhis2-users
>> >> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> >> Unsubscribe : https://launchpad.net/~dhis2-users
>> >> More help : https://help.launchpad.net/ListHelp
>> >>
>> >
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
>
References