bflad / chef-stash

Chef Cookbook for Atlassian Stash
Other
37 stars 42 forks source link

Add Bitbucket Server 4.0 Support #116

Closed SuperTux88 closed 9 years ago

SuperTux88 commented 9 years ago

After Stash is now Bitbucket Server, I have extended the cookbook to also support the new Bitbucket Server 4.0.

By default it creates a fresh and installation with Bitbucket (user, database, folders all named bitbucket).

If someone wants to update an existing stash installation, he needs to set the following attributes:

node['stash']['home_path'] = "/var/atlassian/application-data/stash"
node['stash']['user'] = "stash"
node['stash']['database']['name'] = "stash"
node['stash']['database']['user'] = "stash"

With this, Bitbucket finds the data from the old Stash. I have tested this upgrade scenario with an existing Stash on Centos 7.1.

All internal names in the cookbook (and the cookbook itself) are still "stash".

linc01n commented 9 years ago

Thanks @SuperTux88

I have run the test and it all passed. Merged

ramonskie commented 9 years ago

when is this going to be release in the supermarket? or are you first going to rename everything to bitbucket?

linc01n commented 9 years ago

Hi @ramonskie ,

I'm almost ready to release the new cookbook. However when I was doing a manual install 3 days ago, I encountered this bug.

https://jira.atlassian.com/browse/BSERV-7875

screen shot 2015-10-08 at 6 18 59 pm

I would like to wait Atlassian to fix this bug before releasing the cookbook to supermarket.

I think keeping the name to stash for now is better.

/cc @patcon @bflad

ramonskie commented 9 years ago

okay i will also try to upgrade now from source in combination with our wrapper cookbook and will let you know if i see something

brilliantnut commented 9 years ago

Hi @linc01n, for what its worth, I used the chef cookbook from @SuperTux88's repo (i.e. the source of the pull request), and the error you've listed did not show up, so maybe its an issue with the CFN scripts or AMI, and not with the cookbook itself. I'm not sure why that issue should stop this repo to be published to the supermarket.

linc01n commented 9 years ago

Hi @brilliantnut , May I ask are you using MySQL as database?

I am testing on a clean CentOS 6.7 on a KVM hypervisor. If I use MySQL there is no problem. But if I pick PostgreSQL it threw the above error.

The next version of this cookbook is going to use PostgreSQL as a default database. (now it is MySQL)

So I don't want new user using this cookbook the first thing they see is a broken Bitbucket

We've already merged @SuperTux88 PR.

You can specify cookbook 'stash', :git => 'https://github.com/bflad/chef-stash.git' inside your Cheffile if you want Stash/Bitbucket 4.0.1

brilliantnut commented 9 years ago

Hi @linc01n,

I used external PostgreSQL on RDS, with stash (bitbucket) on Amazon Linux, setup using OpsWorks. I had to override some files in the repo, but I didn't face the above error.

I've already switched to using the cookbook hosted on https://github.com/bflad/chef-stash.git, so no problem there, but obviously would be nice to use the cookbook from the marketplace.

brilliantnut commented 9 years ago

Hi @linc01n,

Maybe I spoke too soon, but I started seeing the same exception that you've linked, so perhaps it is a little early before BitBucket Server 4.0.1 is ready for production like environments, I guess.

I know 4.0.2 doesn't fix this issue, but is it feasible to add that version in regardless?