This is part of an on going series where i will be building out my development environment to do continuous delivery and automated deployments. Ill be using the Atlassian suit of software for Source Control Bitbucket Server (server) and SourceTree  (Client). Then Bamboo for builds and releases. Ill then be hooking it all together with RedGate SQL Source ControlDLM Automation Suite and DLM Dashboard.

My plan is to run all my CI software (Bitbucket, Bamboo, DLM Dashboard, SQL CI and SQL Release) on one server named “DLM” which part of a domain and running a new Windows 20012 r2.

The purpose of these steps isn’t necessarily to configure things in a best practice, but to get things working, If I’ve learned anything speaking with different people on this, everyone does things slightly different. Hopefully these steps will show how to configure everything from the ground up.

Series Links:

101 – Installing GIT for Bitbucket Server
102 – Installing BitBucket

BitBucket Server Setup

To get started with BitBucket Server we first need to need install SQL Server (Again to keep it all simple i installed it on my DLM server), I wont go into to much detail about that as you can read more here. The one thing you have to do is create a database with the collation and create a login. Using the script below:

/* Create Bitbucket database and login */

USE [master];

CREATE LOGIN [Bitbucket_User] WITH PASSWORD=N'Pa$$w0rd';
USE [BitBucket];
CREATE USER [Bitbucket_User] FOR LOGIN [Bitbucket_User];
USE [BitBucket];
ALTER ROLE [db_owner] ADD MEMBER [Bitbucket_User];

So lets get started open up a web browser and go to http://localhost:7990/setup

Follow the steps below:

Configure BitBucket01

Test connection and click Next if its successful.

Next enter a username and password (For me i want to keep it separate from my standard account i login to with)

Configure BitBucket02

You are then asked to login

Configure BitBucket03

Now we have the basics in place, Next we will need to set up Bitbucket as a service.