Skip to content

Commit 9c40d2f

Browse files
author
zthomas
committed
updated docs
1 parent 3adee73 commit 9c40d2f

File tree

5 files changed

+247
-45
lines changed

5 files changed

+247
-45
lines changed

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,28 @@ check:
3636
fmt:
3737
go fmt ./...
3838

39-
run:
40-
go run main.go
41-
42-
build:
43-
CGO_ENABLED=0 packr2 build -o commit0
44-
packr2 clean
45-
4639
build-example: build clean-example
4740
mkdir -p example
4841
cd example && ../commit0 create "hello-world"
4942
cd example/hello-world && ../../commit0 generate -l go
5043

44+
build-docker-local:
45+
docker build . -t commit0:v0
46+
5147
build-example-docker: clean-example
5248
mkdir -p example
5349
docker run -v "$(shell pwd)/example:/project" --user $(shell id -u):$(shell id -g) commit0:v0 create "hello-world"
5450
docker run -v "$(shell pwd)/example/hello-world:/project" --user $(shell id -u):$(shell id -g) commit0:v0 generate -l go
5551

56-
build-docker-local:
57-
docker build . -t commit0:v0
58-
5952
clean-example:
6053
rm -rf example
6154

55+
# builds
56+
build:
57+
CGO_ENABLED=0 packr2 build -o commit0
58+
packr2 clean
59+
60+
# Installs the CLI int your GOPATH
6261
install-go:
6362
CGO_ENABLED=0 packr2 build -o ${GOPATH}/bin/commit0
6463
packr2 clean

README.md

Lines changed: 58 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,43 @@
22

33
[![Build Status](https://travis-ci.org/commitdev/commit0.svg)](https://travis-ci.org/commitdev/commit0)
44

5-
Status: currently poc
5+
Status: Proof of Concept
66

7-
Commit0 intends to be a multi-language service generator. The intention is to create a modular monolith, which is easy to seperate at a later stage when the boundries are completely understood.
7+
Commit0 is an open source Push-To-Deploy tool designed to provide an amazing deployment process for developers while not compromising on dev ops best practices. Instead of using a Platform as a Service that simplifies your development but locks you in, we recreate the entire seamless workflow using open source technolgies and generate the infrastructure code for you while providing you with a simple interface.
8+
9+
With Commit0:
10+
- You get the same simple Push-To-Deploy workflow that you are accustomed to with premium PaaS offerings
11+
- Based on your configurations we'll generate all the infrastructure code that is needed to deploy and scale your application (Kubenetes manifests, Terraform, CI/CI configs etc.) and deploy to your own cloud provider.
12+
- There's no vendor lock-in. It's all done with open source tools and generated code
13+
- You don't need to know any dev ops to use Commit0 but if you are a dev ops engineer you can rest assured that you have a solid starting point and you can customize it as your project grows.
14+
- We also include a set of commonly used open source microservices for tasks like authentication, user management, image resizing etc. so you can start developing the core application right away.
15+
16+
## Installation
17+
18+
As there alot of dependencies it will be easier to use this tool within the provided image, clone the repo and then run `make build-docker-local`.
19+
The best way then to use this is to add an alias, then you can use the CLI as if it was installed as usual on your machine:
20+
`alias commit0='docker run -v "$(pwd):/project" commit0:v0'`
21+
22+
## Usage
23+
24+
1) To create a project run `commit0 create [PROJECT_NAME]`
25+
2) A folder will be created and within that update the `commit0.yml` and then run `commit0 generate -l=[LANGUAGE OF CHOICE] eg. go`
26+
3) You will see that there is now an idl folder created.
27+
4) Within the idl folder modify the the protobuf services generated with your desired methods
28+
5) Go up to the parent directory and re run `commit0 generate -l=[LANGUAGE OF CHOICE]`
29+
6) You will now see a `server` folder navigate to your service folder within that directory and implement the methods generated for it
30+
7) Once you have tested your implementation and are happy with it return to the idl repo push that directory up to git
31+
8) Return to the parent directory and check the depency file, for go it will be the go.mod file remove the lines that point it to your local directory, this will now point it to the version on git that was pushed up previously
32+
10) Test and push up your implementation!
33+
9) When you feel the need to add more services add them to the commit0 config and re-run `commit0 generate` and repeat steps 4 - 7.
34+
35+
36+
## What does it generate?
37+
38+
The generation will create project folder, within this there will be your implementation and an IDL folder
39+
40+
* A parent directory that implements a skeleton and sets up your service implementation of the generated artifacts
41+
* A child directory for the IDL's, this folder will also contain generated artifacts from the IDL under 'gen'
842

943
Based on specified config it will generate:
1044
* Proto files [Done]
@@ -18,33 +52,35 @@ Based on specified config it will generate:
1852

1953
It will also live with your project, when you add a new service to the config it will generate everything needed for that new service.
2054

21-
## What does it generate?
2255

23-
The generation will create project folder, within this there will be your implementation and an IDL folder
56+
## Development
57+
We are looking for contributors!
2458

25-
* A parent directory that implements a skeleton and sets up your service implementation of the generated artifacts
26-
* A child directory for the IDL's, this folder will also contain generated artifacts from the IDL under 'gen'
59+
Building from the source
60+
```
61+
make build-deps
62+
make deps-go
63+
```
64+
this will create a commit0 executable in your working direcory. To install install it into your go path use:
65+
```
66+
make install-go
67+
```
2768

28-
## The development cycle
69+
### Architecture
70+
The project is built with GoLang and requires Docker
71+
- /cmd - the CLI command entry points
72+
- /internal/generate
73+
- /internal/config
74+
- /internal/templator - the templating service
2975

30-
1) To create a project run `commit0 create [PROJECT_NAME]`
31-
2) A folder will be created and within that update the `commit0.yml` and then run `commit0 generate -l=[LANGUAGE OF CHOICE] eg. go`
32-
3) You will see that there is now an idl folder created.
33-
4) Within the idl folder modify the the protobuf services generated with your desired methods
34-
5) Go up to the parent directory and re run `commit0 generate -l=[LANGUAGE OF CHOICE]`
35-
6) You will now see a `server` folder navigate to your service folder within that directory and implement the methods generated for it
36-
7) Once you have tested your implementation and are happy with it return to the idl repo push that directory up to git
37-
8) Return to the parent directory and check the depency file, for go it will be the go.mod file remove the lines that point it to your local directory, this will now point it to the version on git that was pushed up previously
38-
10) Test and push up your implementation!
39-
9) When you feel the need to add more services add them to the commit0 config and re-run `commit0 generate` and repeat steps 4 - 7.
76+
### Building locally
4077

41-
## Usage & installation
78+
As the templates are embeded into the binary you will need to ensure packr2 is installed.
79+
80+
You can run `make deps-go` to install this.
4281

43-
As there alot of dependencies it will be easier to use this tool within the provided image, clone the repo and then run `make build-docker-local`.
44-
The best way then to use this is to add an alias, then you can use the CLI as if it was installed as usual on your machine:
45-
`alias commit0='docker run -v "$(pwd):/project" commit0:v0'`
4682

47-
## Dependencies
83+
### Dependencies
4884

4985
In order to use this you need ensure you have these installed.
5086
* protoc
@@ -53,9 +89,4 @@ In order to use this you need ensure you have these installed.
5389
* protoc-gen-gateway [Http]
5490
* protoc-gen-swagger [Swagger]
5591

56-
## Building locally
57-
58-
As the templates are embeded into the binary you will need to ensure packr2 is installed.
59-
60-
You can run `make deps-go` to install this.
6192

example/hello-world/commit0.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ description:
44
git-repo: github.com/yourrepo
55
docker-repo:
66
maintainers:
7-
# - name: bob
8-
# email: bob@test.com
97

108
network:
119
grpc:
@@ -18,5 +16,4 @@ network:
1816
enabled: true
1917
port: 8090
2018

21-
2219
services:

go.mod

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,48 @@ module github.com/commitdev/commit0
33
go 1.12
44

55
require (
6+
cloud.google.com/go v0.47.0 // indirect
7+
cloud.google.com/go/bigquery v1.2.0 // indirect
8+
cloud.google.com/go/storage v1.1.2 // indirect
9+
github.com/antihax/optional v1.0.0 // indirect
10+
github.com/creack/pty v1.1.9 // indirect
611
github.com/gobuffalo/logger v1.0.1 // indirect
712
github.com/gobuffalo/packr/v2 v2.5.2
13+
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
14+
github.com/google/go-cmp v0.3.1 // indirect
15+
github.com/google/pprof v0.0.0-20191105001904-73b556cfc1cf // indirect
16+
github.com/grpc-ecosystem/grpc-gateway v1.12.0 // indirect
17+
github.com/hashicorp/golang-lru v0.5.3 // indirect
18+
github.com/jstemmer/go-junit-report v0.9.1 // indirect
819
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
920
github.com/k0kubun/pp v3.0.1+incompatible
21+
github.com/kr/pty v1.1.8 // indirect
1022
github.com/mattn/go-colorable v0.1.2 // indirect
23+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
24+
github.com/modern-go/reflect2 v1.0.1 // indirect
1125
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
1226
github.com/pelletier/go-toml v1.4.0 // indirect
1327
github.com/pkg/errors v0.8.1 // indirect
1428
github.com/prometheus/client_golang v1.1.0 // indirect
1529
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
16-
github.com/rogpeppe/fastuuid v1.2.0 // indirect
1730
github.com/rogpeppe/go-internal v1.5.0 // indirect
1831
github.com/russross/blackfriday v2.0.0+incompatible // indirect
1932
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
2033
github.com/spf13/afero v1.2.2 // indirect
2134
github.com/spf13/cobra v0.0.5
2235
github.com/stretchr/testify v1.4.0 // indirect
23-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
36+
go.opencensus.io v0.22.1 // indirect
37+
golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf // indirect
38+
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
39+
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
40+
golang.org/x/mobile v0.0.0-20191031020345-0945064e013a // indirect
41+
golang.org/x/net v0.0.0-20191101175033-0deb6923b6d9 // indirect
2442
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
25-
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
26-
google.golang.org/grpc v1.24.0 // indirect
43+
golang.org/x/sys v0.0.0-20191104094858-e8c54fb511f6 // indirect
44+
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
45+
golang.org/x/tools v0.0.0-20191104232314-dc038396d1f0 // indirect
46+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
47+
google.golang.org/appengine v1.6.5 // indirect
2748
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
28-
gopkg.in/yaml.v2 v2.2.4
49+
gopkg.in/yaml.v2 v2.2.5
2950
)

0 commit comments

Comments
 (0)