The general process of setting up and using a development machine is described in Set Up a Development Machine. This topic provides additional guidance to use when setting up an OSX machine for LabKey development.

Software Installation

1. You may need to install the Apple OSX developer tools.

2. GitHub for OSX

You can use GitHub Desktop or another Git client.

Install GitHub Desktop: Install a command-line git option for your platform:

3. Java for OSX

Download the appropriate version and variant (x64 or aarch64 depending on your CPU type) of the recommended version of Java:

4. PostgreSQL Database 5. Set up environment variables: We use <LK_ENLISTMENT> to refer to the location where you placed your enlistment. Substitute it where shown.
  • Add this location to your PATH: <LK_ENLISTMENT>/build/deploy/bin
    • This directory won't exist yet, but add it to the PATH anyway. The Gradle build downloads binaries used by the server, such as graphvis, dot, and proteomics tools, to this directory.
You can do this via traditional linux methods (in ~/.bash_profile) or via OSX's plist environment system.

To add the environment variables using ~/.zshrc or ~/.bash_profile (depending on your default shell), edit the file and add the lines, customizing for your own local paths to your enlistment and java:

export JAVA_HOME=`/usr/libexec/java_home -v 11`
export LK_ENLISTMENT=/labkeydev/labkeyEnlistment
export PATH=$LK_ENLISTMENT/build/deploy/bin:$PATH

IntelliJ IDEA

The setup for IntelliJ is described in the common documentation. There may be differences for OSX, and version differences, including but not limited to:

    • The menu path for setting path variables is IntelliJ IDEA > Preferences > Appearance & Behavior > Path Variables.

SQL Server Notes (Premium Feature)

Premium Feature — Using SQL Server is available with Premium Editions of LabKey Server. Learn more or contact LabKey.

Typically SQL Server Express is adequate for development. Follow the instructions here for the installation. Note that you should not need to do the extra steps to get GROUP_CONCAT installed. It will be installed automatically when you start up LabKey Server for the first time pointing to your SQL Server database.

SQL Server Browser Setup

During the installation, you will want to set the SQL Server Browser to start automatically. You can do this from within the SQL Server Configuration Manager. Under SQL Server Services, right click on the SQL Server Browser and open the Properties window. Go to the Service tab and change the Start Mode to "Automatic."

Remote Access to SQL Server

To allow for remote access to SQL Server, you will need to:

  1. Create a hole for SQL Server in the Windows firewall. Follow the instructions in the "TCP Access" section of this TechNet note.
  2. Make some configuration changes to allow remote connections and set up a login for LabKey Server to use:
  • Open SQL Server Management Studio (which is not the same as the SQL Server Configuration Manager)
  • Right click on the <Server Name> and choose Properties -->Connections, check "Allow remote connections to this server"
  • From <Server Name> --> Properties, --> Security, set Server Authentication to “SQL Server & Windows Authentication mode”
  • Click OK and Close the Properties window
  • Choose Security --> Logins --> double click on 'sa' --> Status, set Login to Enabled. This is the user that will be used by LabKey Server, so set the password and take note of it.
  • From Sql Server Configuration Manager, select SQL Server Network Configuration --> Protocols for MSSQLSERVER.
    • Enable TCP/IP (If not enabled already).
    • Right Click on TCP/IP --> Properties --> IP Addresses tab
    • Make sure ports with IP Addresses of 127.0.0.1 and other other IP Address (thats used in Port Forwarding that you found using ipconfig), are Enabled.
    • Restart your computer.
  1. Restart SQL Server & SQL Server Browser from the Services control panel.

LabKey Properties Files

  1. Edit the mssql.properties config file under <LK_ENLISTMENT>/server/configs. If you have setup the NAT forwarding mentioned above, then set the databaseDefaultHost to 127.0.0.1. Otherwise, set the databaseDefaultHost to the windows IP (use ipconfig to find out what this is; you want the IPv4 address) (seems like this is necessary; just using the name of the host instead doesn't seem to work). If you have multiple datasources defined in your application.properties file, the IP address needs to be used for those data sources as well.
  2. Edit the mssql.properties config file further by updating the jdbcUser and jdbcPassword information. This is where you use the "sa" user and the password you had setup during the SQL Server install.
  3. Pick SQL Server for LabKey (run "gradlew pickMSSQL" - either from the command line or within IntelliJ)
  4. Restart your LabKey Server Instance

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all