Skip to content

Commit

Permalink
MM-16230 Add initial dev steps (#52)
Browse files Browse the repository at this point in the history
* Add initial dev steps

* Update README.md

Co-Authored-By: Gabe Jackson <gabe@coffeepowered.co>

* Updates per feedback
  • Loading branch information
jwilander authored and gabrieljackson committed Jul 26, 2019
1 parent a990692 commit d13f473
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,52 @@ This repository houses the open-source components of Mattermost Private Cloud. O
## Get Involved

- [Join the discussion on Private Cloud](https://community.mattermost.com/core/channels/cloud)

## Developing

### Environment Setup

1. Install [Go](https://golang.org/doc/install)
2. Install [Terraform](https://learn.hashicorp.com/terraform/getting-started/install.html) version v0.11.14
3. Install [kops](https://github.com/kubernetes/kops/blob/master/docs/install.md) version 1.12.X
4. Install [Helm](https://helm.sh/docs/using_helm/)
5. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
6. Generate an AWS Access and Secret key pair, then export them in your bash profile:
```
export AWS_ACCESS_KEY_ID=YOURACCESSKEYID
export AWS_SECRET_ACCESS_KEY=YOURSECRETACCESSKEY
```
7. Create an S3 bucket to store the kops state
8. Clone this repository into your GOPATH (or anywhere if you have Go Modules enabled)

### Building

Simply run the following:

```
$ go install ./cmd/cloud
```

### Running

Before running the server the first time you must set up the DB with:

```
$ cloud schema migrate
```

To run the server you will need a certificate ARN, private and public Route53 IDs, and a private DNS from AWS. For staff developers you can get these in our dev AWS account.

Run the server with:

```
$ cloud server --state-store=<your-s3-bucket> --private-dns dev.cloud.internal.mattermost.com --private-route53-id=<private-route53-id> --route53-id=<public-route53-id> --certificate-aws-arn <certifcate-aws-arn>
```

### Testing

Run the go tests to test:

```
$ go test ./...
```

0 comments on commit d13f473

Please sign in to comment.