-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Juniper/readme
Added README
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |