Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash Post Upgrade

Safir Salihu May 19, 2014

I followed the instructions to upgrade Stash from 2.6 to 2.12. Everything went successful. My question is based on the statement "Update the value of STASH_HOME in the new Stash installation directory to point to your existing Stash home directory"

So after the upgrade, does the STASH_HOME installation directory need to be changed to point to the newest version's home directory?

I am wondering if that is not the case, I would end up creating a bunch of directories for each upgrade.

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2014

Hi Safir,

If you've followed the upgrade guide, you'll have a new Stash _installation_ directory for the new Stash version, but you'll still be using the same STASH_HOME directory. The "Update the value of STASH_HOME in the new Stash installation directory to point to your existing Stash home directory" line instructs you to configure the new Stash installation to use your old Stash home.

The next couple of lines in the upgrade guide tell you what you need to do specifically:

  • On Windows, update the home directory location as defined by the STASH_HOME line of the new <Stash installation directory>/bin/setenv.bat.
  • On Linux and Mac, update the home directory location as defined by the STASH_HOME line of the new <Stash installation directory>/bin/setenv.sh.

Hope that clears things up!

Cheers,

Michael

Safir Salihu May 19, 2014

Hey Michael,
Yes I followed the setup to set the STASH_HOME variable in the new installation directory to point to the existing STASH_HOME. I do understand that the detail in the upgrade guide tells you how to set up the reference.

My question is what happens when I do another upgrade? If I follow the same process, will I end up always changing the STASH_HOME of the installed newest version to point to my initial and original STASH_HOME installation?

Does that mean I will always have 2 versions of the STASH folder at any point of time? The way that I understand is that the new version's setenv.sh will reference the STASH_HOME folder of the original intial folder.

I am trying to understand what will be the folder setup for subsequent upgrades? Since the above guidlines specifies that the original home folder needs to be preserved since it is being referenced by the new install (sentenv.sh), during the next upgrade is that reference still be accurate from the newest installation directory?

Example

Initial version 2.6

Upgrade to 2.11 (2.11's setenv reference to 2.6 dir)

Upgrade to 2.12 (2.12 setenv references 2.?? ). What should it reference.

Please let me know if my question is still unclear.


Thanks!

Safir

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2014

Please note that there are 2 Stash directories:

  • Stash installation directory - the unzipped Stash download, containing the application and startup scripts.
  • Stash home - the directory that contains your git repositories and other application data.

The two are separated to make it easier to upgrade. You download the new version and unpack it, tell it where your Stash home (application data) is and you're done.

Where do you have your home directory configured? If it's configured inside your installation directory, consider moving it out to make upgrades easier.

Typically, I'd use a layout like:

/opt/stash/atlassian-stash-2.11.0
/opt/stash/current -&gt; symlink to atlassian-stash-2.11.0
/opt/stash/home

With /opt/stash/atlassian-stash-2.11.0/bin/setenv STASH_HOME set to /opt/stash/home

Then when you upgrade to 2.12.0, the layout becomes:

/opt/stash/atlassian-stash-2.11.0
/opt/stash/atlassian-stash-2.12.0
/opt/stash/current -&gt; symlink to atlassian-stash-2.12.0
/opt/stash/home

Again with setenv in both 2.11.0 and 2.12.0 set to /opt/stash/home. Your startup scripts (if you have them) can call /opt/stash/current/bin/start. After the upgrade completes and you're happy with the result, you can delete the atlassian-stash-2.11.0 directory.

Michael

Safir Salihu May 19, 2014

Ah. I got it now. I have the home directory and the installation directory as the same one. Thank you for your explanation. This makes sense to me now.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events