There will be much flapping of wings and breathing of fire. You are embarking on stage 5 of the Atlassian Dragon Quest.
In this stage, you will install FishEye and hook it up to a Mercurial repository on Bitbucket for breathtaking overviews of your source code repository. At the same time, you will set up Crucible for piercingly insightful code reviews. Prepare to be blown away by FishEye/Crucible's integration with JIRA and Bamboo.
Time estimate: This stage will take approximately 30 minutes.
On this page:
Step 1. Install Mercurial
The first step is to install a source control management tool, so that you have a code repository for FishEye to look at. We will use Mercurial.
- Get Mercurial and Python. Make sure that you get Mercurial 1.5 or later (requiring Python 2.7).
Note: For some UNIX distributions, the default download will include Mercurial 1.4.3. You will need a later version: 1.5 through 1.9.x. To find the download for a specific version of Mercurial, go to the download directory. - Add or edit your Mercurial configuration file at
C:\Documents and Settings\MY_NAME\mercurial.ini
(Windows XP) orC:\Users\MY_NAME\mercurial.ini
(Windows 7) or~/.hgrc
(UNIX). The file should contain your preferred editor and your username.- If the Mercurial configuration file does not exist, create it.
If you do not already have a username, you can use
atlassian_dragons
:[ui] ; editor used to enter commit logs, etc. Most text editors will work. editor = notepad username = atlassian_dragons
Step 2. Create your FishEye Database in PostgreSQL
Now you will create a database where FishEye will store its data, and the user that FishEye will use to connect to the database. Crucible will use this database as well. We are assuming that you have already created your PostgreSQL database server in Dragons Stage 1.
We are using pgAdmin III, the administration user interface supplied with PostgreSQL. If you used the one-click installer in Dragons Stage 1, pgAdmin III will be already installed on your computer.
- Start pgAdmin III.
- Right-click (or double-click) the database server name and log in using the password that you specified for the 'postgres' super user.
- Add a new login role called 'fishuser':
- Right-click Login Roles and select New Login Role.
- Enter the role Role name:
fishuser
- Enter a suitable Password and enter it again to confirm it.
- Click the Role privileges tab.
- Select Can create database objects.
- Select Can create roles.
- Click OK to create the user.
- Add a new database called 'fisheye':
- Right-click Databases and select New Database.
- Enter the database Name:
fisheye
- Select the Owner:
fishuser
- Click OK to create the database.
Alternatively, If you are on UNIX and do not have pgAdmin III, you can use the command line interface instead. Assuming that you are using the default installation directory of /opt/PostgreSQL/8.4/bin/
, enter the following commands:
sudo -s -H -u postgres # Create the FishEye user: /opt/PostgreSQL/8.4/bin/createuser -S -d -r -P -E fishuser # Create the FishEye database: /opt/PostgreSQL/8.4/bin/createdb --owner fishuser --encoding utf8 fisheye exit
Screenshot 1 (click to enlarge): FishEye/Crucible database and user in PostgreSQL
Problems? Please raise a support ticket for the product you're stuck on, or see answers from the community.
Victory? Please continue.
Step 3. Install FishEye and Crucible
Requirements: FishEye/Crucible 2.7.10.
Problems? Please raise a support ticket for the product you're stuck on, or see answers from the community.
Victory? Please continue.
Step 4. Set Up FishEye and Crucible
In this step you will do the initial setup of your FishEye/Crucible site. As part of this process, you will connect FishEye and Crucible to JIRA, so that you can manage all your users via JIRA and share information between JIRA and FishEye/Crucible.
- To access FishEye/Crucible, go to your web browser and type this address:
http://localhost:8060/fisheye
. Alternatively, type the host name or IP address instead oflocalhost
. - The FishEye/Crucible setup wizard will start.
- If you already have a license key, click Enter existing license. Enter your FishEye license into the FishEye License Key field and your Crucible license into the Crucible License Key field.
- If you do not have a license key, click Obtain evaluation license and follow the instructions on screen. If prompted, ensure that you choose to include Crucible as part of this evaluation.
- Click Next. The 'Connect to JIRA' step will appear. Enter the following information:
- JIRA Base URL – Enter the web address of your JIRA server. For example:
http://www.foobar.com:8080
- Admin Username:
charlie
This is Charlie's username in JIRA. - Admin Password – Enter Charlie's password for JIRA.
- JIRA Base URL – Enter the web address of your JIRA server. For example:
- Leave the other fields (the 'advanced options') at their default values and click the Connect to JIRA button.
- The 'Set administrator password' screen will appear. Enter an administration password and then enter it again to confirm it.
This is the password you can use to access your FishEye/Crucible administration screens, by clicking the 'Administration' option at the bottom of the FishEye screens. In addition, you will be able to access the administration screens using the usernamecharlie
and Charlie's JIRA password. - Click Next.
- Click Add repository to exit the wizard.
- Log in to FishEye/Crucible when prompted.
You can use the administration password that you defined in the previous step, or you can use Charlie's login. We recommend that you log in as Charlie:- Click Log In in the top menu bar.
- Enter the username '
charlie
' and Charlie's password in JIRA.
- The FishEye/Crucible 'Admin' screen will appear. Now you will connect FishEye/Crucible to your database. In the left-hand 'Admin' menu, click Database under 'Systems Settings'.
- Click Edit and enter the following details:
- Click Test Connection to verify that FishEye/Crucible can log in to the database.
- Click Save & Migrate, then click OK when the migration is complete.
Screenshot 2 (click to enlarge): FishEye/Crucible database migration successful
Full details are in the FishEye documentation.
Problems? Please raise a support ticket for the product you're stuck on, or see answers from the community.
Victory? Please continue.
Step 5. Connect FishEye to Bitbucket
For this integration exercise we provide a Bitbucket repository that you can connect to your FishEye 'Dragons' repository. Bitbucket is a code hosting site for the Mercurial distributed version control system (DVCS). We recommend this repository because:
- We have committed a code change with a JIRA issue key in the commit message, to match a JIRA issue you created earlier. This will allow you to see the JIRA and FishEye integration immediately, without having to do your own commit.
- The sample repository is small, so that FishEye's initial repository indexing process will be fast.
FishEye supports Mercurial, Subversion and a number of other repository types. When you start using FishEye outside this integration exercise, you will need to create another FishEye repository and connect it to your source repository as described in the FishEye documentation.
For this integration exercise, follow the steps below to connect to our sample repository.
- Go to your FishEye administration screen in your browser.
- In the left-hand 'Admin' menu, click Repositories under 'Repository Settings'.
- Click Add Existing. The first screen of the 'Add Repository' wizard will appear.
- Enter the following information:
- Repository Type:
Mercurial
- Name:
Dragons
- Description:
Dragons repository
- Repository Type:
- Click Next and enter the following information:
- Repository Location:
https://bitbucket.org/atlassian_dragons/dragonslayers
- Authentication Style:
No authentication
- Repository Location:
- Click Next and enter the following information:
- Store Diff Info – Select this checkbox.
- Enable Repository After Adding – Select this checkbox.
- Click Test Connection to verify that Bitbucket is properly connected to FishEye. Click Close.
- Click Add. The 'Repositories' page will display the 'Dragons' repository.
- Click the Source tab at the top of the screen.
- Click the star symbol next to the 'Dragons' repository to select it as a favourite. (Note: You need to be logged in as Charlie in order to see the star symbol. If you are logged in purely for administration, you will not see the symbol. If you are not logged in as Charlie, please log in now.)
- Click the FishEye logo at top left of the screen to return to the FishEye dashboard. You should be able to see the activity stream showing recent commit messages for the repository.
If you do not see any activity, please wait a while for FishEye to finish scanning (indexing) the repository. With our sample repository, this should only take a few minutes.
Screenshot 3 (click to enlarge): FishEye dashboard with activity stream
Full details are in the FishEye documentation. You can learn about Bitbucket and Mercurial in the Bitbucket documentation.
Problems? Please raise a support ticket for the product you're stuck on, or see answers from the community.
Victory? Please continue.
Victory!
You can now see your source in FishEye. Go to the FishEye dashboard, click the Source tab and click Dragons to browse the contents of your new 'Dragons' repository.
If your repository is large, FishEye may take a while to index all your files. If the index scanning is still underway, you will see a message at the top of the screen saying '
NOTE: The repository is being scanned, some statistics may not be up to date. ...'
Want an RSS feed of your repository activity? Go to the Activity tab on the 'Source' view. Click Tools then RSS Feed. You can get an RSS feed on the dashboard too.
Click the changeset number (
0:922fd9308885
) in the activity stream to see FishEye's view of your source code.
Screenshot 4 (click to enlarge): FishEye source repository viewer
Problems? Please raise a support ticket for the product you're stuck on, or see answers from the community.
Victory? Please continue.
Don your armour and move to the next stage
|
Attachments:


































