Skip to content

Commit

Permalink
Added README
Browse files Browse the repository at this point in the history
  • Loading branch information
nati committed Dec 13, 2017
1 parent bc1b48c commit ae6bb0c
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Go code base for contrail projects

# Important principal

- Apply lint tools
- Go get must simply work
- Follow best practices
Effective Go: https://golang.org/doc/effective_go.html

# How to build

``` shell
go get github.com/Juniper/contrail
```

# Generate Code

``` shell
make generate
```

Templates are stored in tools/templates
You can add your template on template_config.yaml

# Schema Files

Note that schema stored here is just a cache for helping development.
Developers should make sure download latest schema from http://github.com/Juniper/contrail-api-client

JSON version stored in public/schema.json

# Testing

You need to run local mysql running with test configuraion.

ID: root
Password: contrail123
DataBase: contrail_test

Init DB before test
```
./tool/reset_db.sh
```

```
make test
```

# API Server

You can run API server using this command.

```
go run cmd/contrail/main.go server -c tools/test_config.yml
```

# Packaging

TBD

# Dependency management

We use golang standard dep tool for dependency management.
(see https://github.com/golang/dep)

```
brew install dep
```

0 comments on commit ae6bb0c

Please sign in to comment.