Atlassian Integration Guide : Dragons Stage 5 - Install FishEye and Crucible This page last changed on Dec 09, 2010 by alui. You are embarking on stage 5 of the Atlassian Dragon Quest, a place filled with flame and serpents and dragons. In this stage, you will install FishEye for breathtaking overviews of your source code repository and Crucible for piercingly insightful code reviews. Prepare to be blown away by FishEye/Crucible's integration with JIRA, Crowd and Bamboo. Time estimate: This stage will take approximately 40 minutes. On this page: Step 1. Create your FishEye Database in PostgreSQL Step 2. Install FishEye and Crucible Step 3. Set Up FishEye/Crucible and Connect to PostgreSQL Database Step 4. Hook FishEye/Crucible up to Crowd Step 5. Connect FishEye to Subversion Victory! ## Step 1. 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. 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. 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.3/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 try the Dragon Slayers' Forum. Victory? Please continue. ## Step 2. Install FishEye and Crucible Requirements: FishEye/Crucible 2.4.3. For Windows: (click to expand) Go to the Atlassian download centre. Download the 'FishEye 2.4.3' zip archive. This archive actually includes Crucible 2.4.3 as well. Unpack the zip archive into a directory of your choice, avoiding spaces in the directory name. For example: `c:\fisheyecrucible`. We will now refer to this location as the FishEye/Crucible installation directory. Now you will create another directory where FishEye/Crucible will store local data, separate from the installation directory: Create the new directory, e.g. `C:\data\fisheyecrucible`. Create an environment variable called '`FECRU_INST`' and point it to your new directory. (Open your Windows 'Control Panel'. Click 'System' to open the 'System Properties'. Click the 'Advanced' tab. Click 'Environment Variables'. Add a new 'System variable' with the name '`FECRU_INST`' and a value of your new directory's location of e.g. `C:\data\fisheyecrucible`.) Copy the `config.xml` file from the root of your FishEye/Crucible installation directory to the root of your new `FECRU_INST` directory. Now you will make your PostgreSQL driver available to FishEye/Crucible: Create a `\lib` directory as a sub-directory of your new `FECRU_INST` directory Copy the PostgreSQL JDBC driver JAR (downloaded in Dragons Stage 1) to the new `\lib` directory. Start FishEye/Crucible from the command line by running `bin\run.bat` from your FishEye/Crucible installation directory. Wait a few minutes for the server to launch. This message will appear on the command line once ready: 'INFO - Server started on :8060 (http) (control port on your-server-IP-address:8059)'. For Linux: (click to expand) Go to the Atlassian download centre. Download the 'FishEye 2.4.3' zip archive. This archive actually includes Crucible 2.4.3 as well. Unpack the zip archive into a directory of your choice, avoiding spaces in the directory name. For example: `/opt/fecru-x.x.x`. We will now refer to this location as the FishEye/Crucible installation directory. Now you will create another directory where FishEye/Crucible will store local data, separate from the installation directory: Create the new directory, e.g. `/opt/fisheyecruclbie`. Create an environment variable called '`FECRU_INST`' and point it to your new directory. Copy the `config.xml` file from the root of your FishEye installation directory to the root of your new `FECRU_INST` directory. Now you will make your PostgreSQL driver available to FishEye/Crucible: Create a `/lib` directory as a sub-directory of your new `FECRU_INST` directory. Copy the PostgreSQL JDBC driver JAR (downloaded in Dragons Stage 1) to the new `/lib` directory. Start FishEye/Crucible from the command line by running `./bin/run.sh` from your FishEye/Crucible installation directory. Wait a few minutes for the server to launch. This message will appear on the command line once ready: 'INFO - Server started on :8060 (http) (control port on your-server-IP-address:8059)'. Problems? Please raise a support ticket for the product you're stuck on, or try the Dragon Slayers' Forum. Victory? Please continue. ## Step 3. Set Up FishEye/Crucible and Connect to PostgreSQL Database To access FishEye/Crucible, go to your web browser and type this address: `http://localhost:8060/` (or type the host name or IP address instead of `localhost`). The FishEye/Crucible set-up 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 don't have a license key, click 'Obtain evaluation license' and follow the instructions on screen. Ensure that you leave the 'Yes! Please include Crucible as part of this evaluation.' checkbox selected during the process. Choose an administration password, enter it and then enter it again to confirm it. Click 'Next'. Click 'Add repository' to exit the wizard. Log in to FishEye/Crucible when prompted. In the left-hand 'Admin' menu, click 'Database' under Systems Settings. Click 'Edit' and enter the following details: 'Type' – Select 'PostgreSQL' from the 'Type' dropdown list. Driver Location – Select 'User Supplied - FISHEYE_INST/lib'. URL: `jdbc:postgresql://localhost:5432/fisheye` User Name: `fishuser` – This is the user you created in step 1 (above). Password – This is the password you chose in step 1 (above). Click 'Test Connection' to verify that FishEye/Crucible can log in to the database. If this fails, verify that you have the PostgreSQL JDBC driver JAR file in the `FECRU_INST/lib` directory (see step 2 above). Note that this is not your installation directory. Also ensure that the database user can log in to the database from the machine that FishEye/Crucible is running on and that all the required privileges are present. Hint: If you have a virus checker running, there may be a delay in the driver's availability after you have placed the driver JAR into the directory, while the virus checker scans the file. It's worth waiting a while and trying again. Click 'Save & Migrate'. Screenshot 2 (click to enlarge): FishEye/Crucible database migration successful Problems? Please raise a support ticket for the product you're stuck on, or try the Dragon Slayers' Forum. Victory? Please continue. ## Step 4. Hook FishEye/Crucible up to Crowd Follow the steps below to hook FishEye and Crucible up to Crowd for SSO (single sign-on) and centralised user management. If Crowd is not already running, start it up by running {`CROWD_INSTALL}/start_crowd.bat`. Open up a new browser window/tab and go to your Crowd URL, e.g. `http://www.foobar.com:8095/crowd`. Do not close your FishEye/Crucible browser/tab. If not already logged in, log in to Crowd with username `charlie`. Click 'Applications' in Crowd's top navigation bar. The 'Application Browser' will appear. Click 'Add Application' in the left-hand menu. This will display the first screen for the 'Add Application' wizard for Crowd. Enter the following information: Note: You only need to configure a FishEye application in Crowd. Crucible will share the authentication mechanism and integration that you set up with FishEye and Crowd. Application Type: `FishEye` Name: `fisheye` Description: `Atlassian FishEye` Password – Enter a password that FishEye/Crucible will use to access Crowd and enter it again to confirm it. URL – Enter the base URL of your FishEye/Crucible site, e.g. `http://fisheye.foobar.com:8060`. Click 'Resolve IP Address' to ask Crowd to find the 'Remote IP Address' for you. The value will be something like this: `127.0.0.1`. Select the '`Crowd`' directory that you created in Dragons Stage 1. Select 'Allow all users to authenticate'. Click 'Add Application'. Check the IP addresses for your FishEye application: Click the 'Remote Addresses' tab. Add your FishEye/Crucible host name, excluding the "http://www." prefix and the ":8060" port number. e.g. `foobar.com`. If it's not already present, add: `127.0.0.1`. Go back to your the FishEye/Crucible Admin screens in your FishEye/Crucible browser window/tab. In the left-hand 'Admin' menu, click 'Authentication' under Security Settings. The 'Authentication Settings' screen will appear. Select 'Setup Crowd authentication'. The 'Crowd Authentication Settings' screen will appear. Enter the following information: Application name: `fisheye`. Application password – Enter the password you specified in Crowd's 'Add Application' wizard, as described above. Leave the other fields at their default values. Click 'Apply'. Now you will grant `charlie` administrator rights in your FishEye instance. Log in to FishEye using the Crowd user you set up in Stage 1, i.e. '`charlie`'. Click the username (i.e. 'Charlie of Atlassian') then 'Administration' from the dropdown menu, to go to the FishEye Admin screens. In the left-hand 'Admin' menu, click 'Administrators' under Security Settings. The 'Manage Admin Users and Groups' screen will appear. Select `charlie` under 'Non-Admin Users' and click 'Add >>' to grant `charlie` administrator rights. Full details are in the Crowd documentation. Problems? Please raise a support ticket for the product you're stuck on, or try the Dragon Slayers' Forum. Victory? Please continue. ## Step 5. Connect FishEye to Subversion For the purposes of this integration exercise, we have provided a read-only Subversion repository that you can connect to your FishEye 'Dragons' repository. 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 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. In the left-hand 'Admin' menu, click 'Repositories' under Repository Settings. Click the 'Add...' button. The 'New Repository - Page 1 of 3' screen will appear. Enter the following information: Repository Type: `Subversion`. Name: `Dragons`. Description: `Dragons repository`. Click 'Next' and enter the following information: SVN URL: `https://studio.plugins.atlassian.com/svn/`. Path: `DRA`. Username and Password – Not required for our sample repository, because the repository allows anonymous access. Click 'Next' and enter the following information: Store Diff Info – Select this checkbox. Enable immediately – Select this checkbox. Click 'Test Connection' to verify that Subversion 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. 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 SVN 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. Problems? Please raise a support ticket for the product you're stuck on, or try the Dragon Slayers' Forum. 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 Dashboard or on the 'Source' view. Click 'Tools' then 'RSS'. Click the changeset number (`153935`) from the activity stream or via FishEye's 'Source' tab 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 try the Dragon Slayers' Forum. Victory? Please continue.
| ##### Don your Armour and Move to the Next Stage Tweet? Tweet. Go to Dragons Stage 6 - Get JIRA and FishEye Talking.
## Attachments: PGAdminFishEyeDB.png (image/png) FishEyeDatabaseSetup.png (image/png) FishEyeDashboard.png (image/png) FishEyeSourceView.png (image/png) FishEyeDashboard.png (image/png) FishEyeDashboard.png (image/png) FishEyeQuickNav.png (image/png) FishEyeSourceView.png (image/png) FishEyeDashboardV2.png (image/png) FishEyeDashboard.png (image/png) FishEyeSourceView.png (image/png) FishEyeSourceView.png (image/png) PGAdminFishEyeDB.png (image/png) FishEyeDashboard.png (image/png) FishEyeDatabaseSetup.png (image/png)

Document generated by Confluence on Feb 27, 2011 17:37