You are on page 1of 4
i Cyclotron Getting Started This quickstart guide walks through the steps required to run Cyclotron locally. Pre-Requisites The following pre-requisites are required: + MongoDB + Nodes Node,js and MongoD8 are available on Linux, macOS, and Windows. It's possible to run Cyclotron on any of these platforms, although the specific steps may vary. MongoDB Installing MongoDB is out of the scope of this guide, but detailed instructions are available for most operating systems. MongoDB does not have to be installed on the same system as Cyclotron. The connection string in the REST API configuration file must be updated accordingly. Replica sets and authentication are also supported by the MongoDB connection string. If installing MongoDB locally, ensure it is running before continuing: mongod --config /ui /mongod. conf Node.js 1. Install the latest stable version of Nodes for your system. This should install npm as well. macOS macOS users can install Node,js via Homebrew: brew install node Other OSes and package managers may also have packages available for easy installation. 2. Ensure node and npm are both available before continuing: node -v apm -v Downloading Start by cloning the Cyclotron git repository locally onto your computer. If you don't have git installed, GitHub has a nice guide: Set Up Git. On Windows, GitHub for Windows is an easy way to install git. Alternatively, download a ZIP archive of the repository contents and extract it. Running the API The REST API is located in the cyclotron-sve/ folder. 1. Openthe cyclotron-sve/ folder in the shell 2. Install dependencies using npm Windows: This may need to be run as an Administrator. Open the Node js Command Prompt as an Administrator and run the command there. Windows/macOS/Linux: Node-gyp may require certain prerequisites to avoid warnings during npm installation. See platform-specific instructions here, 3. Create a configuration file at cyclotron-svc/config/config. . A sample configuration file sample. config. js Is provided in the same folder: cp config/sample.config.js config/config.js The sample config defaults to using a local MongoDB instance, with authentication disabled, If using a remote MongoDB server or cluster, update the _mongod property accordingly. IF using Active Directory or LDAP, ensure that the property cnableAuth js set to true, and that all the Idap properties are filled in correctly, including the service account username and password 4, Start the service in node: 5. Open the API documentation in a browser at http://localhost:8077 For more information on the REST API and its configuration, please refer to eyclotron-sve/README .md Running the Website The Cyclotron website is located in the cyclotron-site/ folder. 1,Openthe cyclotron-site/ folder in the shell 2. Install dependencies using npm apm install Windows: This may need to be run as an Administrator. Open the Node,js Command Prompt as an Administrator and run the command there. 3. Install Gulp globally. This is the build system for the website, and only has to be installed once. apm install ~ global gulp Windows/Linux/Os x: This may need to be run as an Administrator or with sudo priviledges. 4, Build the website and start a web server: lp server This compiles the website into the _public folder and starts a local development web server. The website should autornatically open in a browser: http://localhost:8080. “unable to connect to github.com": This may be due to a firewall blocking the *git://* protocol, Run this command to use https instead nsteado: git config --global arl."h Windows: Git must be in the PATH to successfully build the website. If using GitHub for Windows, click the Git Shell button to launch a Command Prompt with the updated PATH. as needed. This file was 5, Update the configuration file at_pubiic/js/conf/config automatically created from sample. configService.js_ the first time the project is built This sample config defaults to a local Cyclotron-svc instance, with authentication disabled. If authentication has been enabled in the REST AP|, it must be enabled in this config as well. For more information on the Cyclotron website and its configuration, please refer to clotron-site/README.md Using Cyclotron For more information on creating Dashboards with Cyclotron, click on the @ Help button on the home page, or in the site header.

You might also like