Skip to content

Commit

Permalink
Add documentation for running dependencies on the host (#1416)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Mar 29, 2021
1 parent eed9144 commit cbece1e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
11 changes: 3 additions & 8 deletions CONTRIBUTING.md
@@ -1,5 +1,4 @@
# Develop Temporal Server

This doc is for contributors to Temporal Server (hopefully that's you!)

**Note:** All contributors also need to fill out the [Temporal Contributor License Agreement](https://gist.github.com/samarabbas/7dcd41eb1d847e12263cc961ccfdb197) before we can merge in any of your changes.
Expand All @@ -18,19 +17,19 @@ This doc is for contributors to Temporal Server (hopefully that's you!)
* [docker](https://docs.docker.com/engine/install/)
* [docker-compose](https://docs.docker.com/compose/install/)

### For Windows developers
> Note: it is possible to run Temporal server without a `docker`. If for some reason (for example, performance on macOS)
> you want to run dependencies on the host OS, please follow the [doc](develop/run_dependencies_host.md).
### For Windows developers
For developing on Windows, install [Windows Subsystem for Linux 2 (WSL2)](https://aka.ms/wsl) and [Ubuntu](https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-6---install-your-linux-distribution-of-choice). After that, follow the guidance for installing prerequisites, building, and testing on Ubuntu.

## Check out the code

Temporal uses go modules, there is no dependency on `$GOPATH` variable. Clone the repo into the preferred location:
```bash
git clone https://github.com/temporalio/temporal.git
```

## Build

For the very first time build `temporal-server` and helper tools with simple `make` command:
```bash
make
Expand All @@ -46,7 +45,6 @@ make bins
Please check the top of our [Makefile](Makefile) for other useful build targets.

## Run tests

Tests require runtime dependencies. They can be run with `start-dependencies` target (uses `docker-compose` internally). Open new terminal window and run:
```bash
make start-dependencies
Expand Down Expand Up @@ -87,7 +85,6 @@ make stop-dependencies
```

## Run Temporal Server locally

First start runtime dependencies. They can be run with `start-dependencies` target (uses `docker-compose` internally). Open new terminal window and run:
```bash
make start-dependencies
Expand Down Expand Up @@ -115,15 +112,13 @@ make stop-dependencies
```

## Licence headers

This project is Open Source Software, and requires a header at the beginning of
all source files. To verify that all files contain the header execute:
```bash
make copyright
```

## Commit Messages And Titles of Pull Requests

Overcommit adds some requirements to your commit messages. At Temporal, we follow the
[Chris Beams](http://chris.beams.io/posts/git-commit/) guide to writing git
commit messages. Read it, follow it, learn it, love it.
Expand Down
6 changes: 2 additions & 4 deletions develop/docs/macos/cassandra.md
@@ -1,6 +1,4 @@
# Temporal Server Cassandra Setup Guide

## v3.11
# Run Cassandra v3.11 on macOS

### Install
```bash
Expand All @@ -13,7 +11,7 @@ cassandra -f
```

### Post Installation
Verify Cassandra v5.7 is running & accessible:
Verify Cassandra v3.11 is running and accessible:
```bash
cqlsh
```
8 changes: 3 additions & 5 deletions develop/docs/macos/mysql.md
@@ -1,6 +1,4 @@
# Temporal Server MySQL Setup Guide

## v5.7
# Run MySQL v5.7 on macOS

### Install
```bash
Expand All @@ -18,12 +16,12 @@ brew services stop mysql@5.7
```

### Post Installation
Verify MySQL v5.7 is running & accessible:
Verify MySQL v5.7 is running and accessible:
```bash
mysql -h 127.0.0.1 -P 3306 -u root
```

Within mysql shell, create user & password:
Within `mysql` shell, create user and password:
```mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
CREATE USER 'temporal'@'localhost' IDENTIFIED BY 'temporal';
Expand Down
8 changes: 3 additions & 5 deletions develop/docs/macos/postgresql.md
@@ -1,6 +1,4 @@
# Temporal Server PostgreSQL Setup Guide

## v9.6
# Run PostgreSQL v9.6 on macOS

### Install
```bash
Expand All @@ -23,12 +21,12 @@ Create a user `postgres`
createuser -s root
```

Verify PostgreSQL v9.6 is running & accessible:
Verify PostgreSQL v9.6 is running and accessible:
```bash
psql -h 127.0.0.1 -p 5432 -U root -d postgres
```

Within psql shell, add a password:
Within `psql` shell, add a password:
```postgresql
ALTER USER root WITH PASSWORD 'root';
ALTER USER root WITH SUPERUSER;
Expand Down
9 changes: 9 additions & 0 deletions develop/docs/run_dependencies_host.md
@@ -0,0 +1,9 @@
## Run Temporal dependencies on the host

### macOS
While developing Temporal server you may want to run its dependencies locally. One of the reason might be
a bad docker file system performance on macOS. Please follow the doc for the database you use:
[Cassandra](macos/cassandra.md), [MySQL](macos/mysql.md), or [PostgreSQL](macos/postgresql.md).

### Linux
Linux users should use `docker-compose` as described in the [contribution guide](../CONTRIBUTING.md).

0 comments on commit cbece1e

Please sign in to comment.