Atlassian Integration Guide : Dragons Stage 5 - Install FishEye This page last changed on Oct 05, 2009 by smaddox. 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. Prepare to be blown away by FishEye's integration with JIRA, Crowd and Bamboo. Time estimate: This stage will take approximately 30 minutes. On this page: Step 1. Create your FishEye Database in PostgreSQL Step 2. Install FishEye Step 3. Set Up FishEye and Connect to PostgreSQL Database Step 4. Connect FishEye to Subversion Step 5. Hook FishEye up to Crowd 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. 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.3/bin/createuser -S -d -r -P -E fishuser
    # Create the FishEye database:
    /opt/PostgreSQL/8.3/bin/createdb -O fishuser fisheye
    exit
Screenshot 1 (click to enlarge): FishEye database and user in PostgreSQL Problems? Please go immediately to the Dragon Slayers' Forum. Victory? Please continue. ## Step 2. Install FishEye Requirements: FishEye 2.0.5. For Windows: (click to expand) Go to the Atlassian download centre. Download the 'FishEye 2.0.5' zip archive. Unpack the zip archive into a directory of your choice, avoiding spaces in the directory name. For example: `c:\fisheye`. We will now refer to this location as the FishEye installation directory. Now you will create another directory where FishEye will store its local data, separate from the installation directory: Create the new directory, e.g. `C:\data\fisheye`. Create an environment variable called '`FISHEYE_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 '`FISHEYE_INST`' and a value of your new directory's location of e.g. `C:\data\fisheye`.) Copy the `config.xml` file from the root of your FishEye installation directory to the root of your new `FISHEYE_INST` directory. Now you will make your PostgreSQL driver available to FishEye: Create a `\lib` directory as a sub-directory of your new `FISHEYE_INST` directory Copy the PostgreSQL JDBC driver JAR (downloaded in Dragons Stage 1) to the new `\lib` directory. Start FishEye from the command line by running `bin\run.bat` from your FishEye 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.0.5' zip archive. 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 installation directory. Now you will create another directory where FishEye will store its local data, separate from the installation directory: Create the new directory, e.g. `/opt/fisheye`. Create an environment variable called '`FISHEYE_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 `FISHEYE_INST` directory. Now you will make your PostgreSQL driver available to FishEye: Create a `/lib` directory as a sub-directory of your new `FISHEYE_INST` directory. Copy the PostgreSQL JDBC driver JAR (downloaded in Dragons Stage 1) to the new `/lib` directory. Start FishEye from the command line by running `./bin/run.sh` from your FishEye 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 go immediately to the Dragon Slayers' Forum. Victory? Please continue. ## Step 3. Set Up FishEye and Connect to PostgreSQL Database To access FishEye, go to your web browser and type this address: `http://localhost:8060/` (or type the host name or IP address instead of `localhost`). Choose an administration password, enter it and then enter it again to confirm it. Enter your FishEye license into the 'FishEye License Key' field. If you do not already have a FishEye license, follow the prompts on the FishEye/Crucible Setup screen to get an evaluation license key. If you have a Crucible license as well as a FishEye license, you could enter the Crucible license on this screen too. But for the purposes of this integration exercise, we will assume you do not want to enable Crucible at this stage. Click 'Save'. Click 'Admin Interface' to go to the FishEye administration screens. The 'Repository List' screen appears. Click 'Database Configuration' in the left-hand panel. Select 'PostgreSQL' from the 'Type' dropdown list. Enter the following details: 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 can log in to the database. If this fails, verify that you have the PostgreSQL JDBC driver JAR file in the `FISHEYE_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 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 Data'. Screenshot 2 (click to enlarge): FishEye database migration successful Problems? Please go immediately to the Dragon Slayers' Forum. Victory? Please continue. ## Step 4. 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. Click the '(new)' part of 'Repository List (new)' in the left-hand panel of the FishEye Admin interface. The 'Add Repository' screen will appear. Enter the following information: Name: `Dragons`. Description: `Dragons repository`. Repository type: `Subversion`. Enable immediately: `Yes`. SVN URL: `http://dragons.atlassian.com/dragons`. Path – Not required for our sample repository. Username and Password – Not required for our sample repository, because the repository allows anonymous access. Click 'Add'. The 'View Repository' screen will appear. Click 'Test Connection' to verify that Subversion is properly connected to FishEye. Click the FishEye logo 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 go immediately to the Dragon Slayers' Forum. Victory? Please continue. ## Step 5. Hook FishEye up to Crowd Follow the steps below to hook FishEye 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`. 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: Application Type: `FishEye` Name: `fisheye` Description: `Atlassian FishEye` Password – Enter a password that FishEye will use to access Crowd and enter it again to confirm it. URL – Enter the base URL of your FishEye 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 host name, e.g. `http://fisheye.foobar.com:8060`. If it's not already present, add: `127.0.0.1`. Go back to your FishEye browser window/tab. Click 'Administration' at the bottom of the FishEye screen, to go to the FishEye Admin screens. Click 'Security' in the left-hand panel. 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'. Full details are in the Crowd documentation. Problems? Please go immediately to 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. Hint: Mark the Dragons repository as Charlie's favourite, so that Charlie will see all the repository activity on his FishEye activity streams. How? Make sure you are logged in as '`charlie`', click 'Source' in the top navigation bar, then click the star next to the '`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'. Try FishEye's 'Quick Nav' feature for a rapid search of your repository contents. Go to the 'Search' box at top right of the FishEye screen and start typing 'DRA-. The results will appear as you type. You should see a link to the initial commit in the repository, like this: Click through from the search results (shown above) 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 go immediately to 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)

Document generated by Confluence on Oct 06, 2009 00:43