2016-12-02 22:13:25 +03:00
# BatchLabs
2016-12-02 22:34:09 +03:00
[![Build Status ](https://travis-ci.org/Azure/BatchLabs.svg?branch=master )](https://travis-ci.org/Azure/BatchLabs)
2016-12-05 20:40:41 +03:00
2017-03-22 18:22:30 +03:00
**Note: BatchLabs is in beta. We don't provide any installer/packaged binaries as of now. You will need to build this app yourself.**
2016-12-05 20:40:41 +03:00
2017-06-20 20:30:48 +03:00
This is the readme for the 'master' branch which contains the latest changes, 'stable' may differ from this [Stable readme ](https://github.com/Azure/BatchLabs/tree/stable )
2017-04-03 22:13:39 +03:00
2017-05-22 21:11:09 +03:00
## Description
2017-06-20 20:30:48 +03:00
Batch Labs is a tool to manage your Azure Batch accounts. The goal is to implement a great user experience that will help you debug, monitor and manage your pools, jobs and tasks.
It will also include expermiental features such as `Batch Templates` in the aim to improve your Batch experience. We are open to any feedback, ideas and contributions you might have.
2017-05-22 21:11:09 +03:00
2016-12-02 22:08:53 +03:00
## Getting started
2017-03-23 01:04:03 +03:00
#### 1. Prerequisites
2017-04-25 21:14:34 +03:00
- **Install node.js version `6.9` or greater. [Download ](https://nodejs.org/en/download/ )**
2017-03-23 01:04:03 +03:00
- Install yarn `npm install -g yarn`
2016-12-15 01:31:59 +03:00
2017-03-23 01:04:03 +03:00
#### 2. Clone the repo
2017-03-22 01:56:56 +03:00
- At stable branch `git clone -b stable https://github.com/Azure/BatchLabs`
- Or for the latest changes `git clone https://github.com/Azure/BatchLabs`
2016-12-02 22:08:53 +03:00
2017-05-22 21:11:09 +03:00
Move to the directory `cd BatchLabs`
2017-03-23 01:04:03 +03:00
#### 3. Install the dependencies
2017-03-28 00:12:36 +03:00
```bash
2017-03-23 01:04:03 +03:00
yarn install
2016-12-02 22:08:53 +03:00
```
2017-06-20 20:30:48 +03:00
Note: You can also use `npm install` at your own risk. However please do not submit an issue if you didn't use `yarn install` . Yarn will make sure you have the right set of dependencies, which reduces the likelihood of any unexpected build issues relating to third party packages.
2016-12-02 22:08:53 +03:00
2017-03-23 01:04:03 +03:00
#### 4. Build and run the application
2017-03-28 00:12:36 +03:00
```bash
2017-05-24 00:56:40 +03:00
# Make an executable
npm run build-and-pack
# Manual
2017-03-22 18:22:30 +03:00
npm run build:prod
npm run electron:prod
# To debug errors
2016-12-16 21:42:19 +03:00
npm run build
npm run electron
```
## Developers
2017-01-27 03:10:28 +03:00
[Dev docs ](docs/readme.md )
2016-12-16 21:42:19 +03:00
For developers, you can set up a development environment as follows:
2017-06-20 20:30:48 +03:00
**Use `yarn install` instead of `npm install` . This ensures a consistent build environment with the right set of dependencies [Migrating from npm to yarn ](https://yarnpkg.com/lang/en/docs/migrating-from-npm/ )**
2016-12-16 21:42:19 +03:00
2016-12-02 22:08:53 +03:00
Start the dev server
2017-03-28 00:12:36 +03:00
```bash
2016-12-02 22:08:53 +03:00
npm run dev-server
```
Start electron
2017-03-28 00:12:36 +03:00
```bash
# In the command line
2016-12-02 22:08:53 +03:00
npm run dev-electron
2017-03-28 00:12:36 +03:00
# In VSCode just press F5
2016-12-02 22:08:53 +03:00
```
2016-12-16 21:42:19 +03:00
The dev-server and dev-electron support hot reload for a better development experience. Simply saving a file will cause the UI to refresh to your updated changes.
2017-06-16 21:43:20 +03:00
*Note:* Changes to any files in the node client directory ('src/client') require restarting the application.
2016-12-16 21:42:19 +03:00
If you're using VSCode (recommended) we suggest you use the following extensions:
* Debugger for Chrome
* EditorConfig for VS Code
* TSLint
Please also take a look at the [coding guidelines ](coding-guidelines.md ) for this repo for best practices.
2017-01-24 04:31:33 +03:00
## Testing
[Testing doc ](docs/testing.md )
2016-12-02 22:08:53 +03:00
## Editor
In vscode install the editorconfig extension
## Detailed commands:
2017-06-20 20:30:48 +03:00
**Magic command (starts the server and electron in dev mode)**
2016-12-02 22:08:53 +03:00
```
npm run dev
```
Build project
```
npm run build
```
Run app
```
npm run electron
```
2017-06-20 20:30:48 +03:00
Run watch (this will build files on save)
2016-12-02 22:08:53 +03:00
```
npm run watch
```
2017-06-20 20:30:48 +03:00
Run dev server (this will handle the refresh of files and later should have live reload)
2016-12-02 22:08:53 +03:00
```
npm run dev-server
```
2017-06-20 20:30:48 +03:00
Run dev electron (to use the dev server you need to run this)
2016-12-02 22:08:53 +03:00
```
npm run dev-electron
```
2017-04-05 21:56:07 +03:00
## License
Batch labs is licensed under MIT [See license ](LICENSE )
Some icons are under Creative Commons Attribution-ShareAlike 3.0 Unported [See license ](app/assets/images/logos/LICENSE )