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

Creating staging environbemnt of Bitbucket affected production Jira and Bitbucked functionality

Krystian Wroblewski May 28, 2019

Last week I attempted creating a staging environment for Bitbucket following migration process document.

I did backup original DB and restored to the new DB.

I copied home and installation directories to the new server and changed %BITBUCKET_HOME%\shared\bitbucket.properties to point to the new database.

#>*******************************************************
#> Migrated to database at jdbc:sqlserver://SQLServerName:1433;databaseName=Bitbucket_test;
#> Updated on 2017-09-12T23:28:39.208+01:00
#>*******************************************************
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://SQLServerName:1433;databaseName=Bitbucket_test;
jdbc.user=user
jdbc.password=password

(Initially i have only change jdbc:sqlserver and missed the second command (jdbc.url)

 

Afterwards, we realized that:

1) changes done in test env. are present in production env. This was probably caused by the above which was now resolved (I have pointed jdbc.url to the right place now).

2) When using production Jira and trying to open link to Bitbucket, Jira asks for Bitbucket authentication and fails even that Bitbucket is setup to use Jira directory for authentication.

 

 

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2019

Hello Krystain and welcome to the Community!

This deployment can be problematic if you’re doing a copy of your production instance into staging and any application links or DNS entries are left intact or not cleaned up. From your explanation, it seems that your Bitbucket to Jira application link was left in place when the copy was completed. This would have results in Jira still communicating to Bitbucket as they’re still trusted. Additionally, if your DNS entries are not changed or the Bitbucket staging instance did not have its URL changed then communication would have persisted after the copy.

Here are a few items to know when creating a staging instance:

  • Ensure the staging instance has a different DNS entry from production.
    • It helps to have your staging instance on a separate network if possible to avoid interference with production.
  • When bringing the staging instance online, remove any application links or reference connections (To include webhooks).
    • Ideally, you’ll want to do this with the network interface disabled to avoid interference with production.
  • Use your Admin account to remove your Jira user directory as you shouldn’t be communicating to Jira anymore.

Additional information on this may also be found at How to establish staging server environments for Bitbucket Server.

I hope this proves helpful and you’re able to clean up your staging instance and avoid further interruption with production.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events