Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs, docker images, and configuration #75

Merged
merged 2 commits into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 2
jobs:
build:
docker:
- image: zhouzhuojie/flagr-ci
- image: checkr/flagr-ci
working_directory: /go/src/github.com/checkr/flagr
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.out
*~
flagr
flagr.sqlite
!*/
site/
**/*.test
Expand All @@ -21,4 +22,3 @@ parts/
prime/
snap/.snapcraft/
stage/
_data/
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM zhouzhuojie/flagr-ci
FROM checkr/flagr-ci

VOLUME ["/data"]

WORKDIR /go/src/github.com/checkr/flagr
ADD . .
ADD ./buildscripts/demo_sqlite3.db /data/demo_sqlite3.db

ENV FLAGR_DB_DBDRIVER=sqlite3
ENV FLAGR_DB_DBCONNECTIONSTR=/data/demo_sqlite3.db
ENV FLAGR_RECORDER_ENABLED=false
ENV HOST=0.0.0.0
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ UIPATH := $(PWD)/browser/flagr-ui
### Public
################################

all: deps gen run
all: deps gen build run

rebuild: gen run

Expand Down Expand Up @@ -35,6 +35,7 @@ deps: checks
@echo "Installing gt" && go get rsc.io/gt
@echo "Installing gomock" && go get github.com/golang/mock/gomock && go get github.com/golang/mock/mockgen
@echo "Installing fswatch" && go get github.com/codeskyblue/fswatch
@echo "Sqlite3" && sqlite3 -version

watch:
@fswatch
Expand All @@ -49,9 +50,7 @@ serve_docs:

api_docs:
@echo "Installing swagger-merger" && yarn global add swagger-merger
@mkdir -p $(PWD)/browser/flagr-ui/dist/api_docs
@swagger-merger -i $(PWD)/swagger/index.yaml -o $(PWD)/browser/flagr-ui/dist/api_docs/bundle.yaml
@cp $(PWD)/swagger/redoc.html $(PWD)/browser/flagr-ui/dist/api_docs/index.html
@swagger-merger -i $(PWD)/swagger/index.yaml -o $(PWD)/docs/api_docs/bundle.yaml

checks:
@echo "Check deps"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Flagr is an open source Go service that delivers the right experience to the rig

```sh
# Get the flagr-mini image for the demo
docker run -it -p 18000:18000 zhouzhuojie/flagr-mini
docker run -it -p 18000:18000 checkr/flagr

# Open the flagr homepage
open localhost:18000
Expand Down
2 changes: 1 addition & 1 deletion browser/flagr-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
</el-col>
<el-col :span="3" :offset="12">
<a href="/api_docs" target="_blank"><h3>API</h3></a>
<a href="https://checkr.github.io/flagr/api_docs" target="_blank"><h3>API</h3></a>
</el-col>
<el-col :span="2">
<a href="https://checkr.github.io/flagr" target="_blank"><h3>Docs</h3></a>
Expand Down
11 changes: 0 additions & 11 deletions docker-compose.yml

This file was deleted.

21 changes: 0 additions & 21 deletions docs/Introduction.md

This file was deleted.

48 changes: 32 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
# Flagr Quickstart Guide
# Get Started

Flagr delivers the right experience to the right entity and monitors the impact. It’s a micro service that provides the functionality of feature flags, experimentation (A/B testing), and dynamic configuration.
Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact. It provides feature flags, experimentation (A/B testing), and dynamic configuration. It has clear swagger REST APIs for flags management and flag evaluation. For more details, see [Flagr Overview](/flagr_overview)

## Install from Source
## Install

Source installation is only intended for developers and advanced users.
Build from source.

```bash
# Make sure go is installed
# https://golang.org/doc/install

```sh
# get the source
go get -u github.com/checkr/flagr
cd $GOPATH/src/github.com/checkr/flagr

# docker-compose with the infra
docker-compose up

# install dependencies, generated code, and run the app
cd $GOPATH/src/github.com/checkr/flagr
make all
```

## Test using Flagr UI
Flagr Server comes with an embedded web based UI. Point your web browser to http://127.0.0.1:18000 ensure your server has started successfully.
Build from docker.


## Explore Further
- [Flagr QuickStart Guide]()
- [Flagr Documentation Website]()
```bash
# Start the docker container
docker run -it -p 18000:18000 checkr/flagr

## Contribute to Flagr Project
Please follow Flagr [Contributor's Guide](https://github.com/checkr/flagr/blob/master/CONTRIBUTING.md)
# Or with attached volume
docker run -it -p 18000:18000 -v /tmp/flagr_data:/data checkr/flagr
```

## Deploy

We recommend directly use the checkr/flagr image, and configure everything in the env variables. See more in [Server Configuration](/flagr_env).

```bash
# Set env variables. For example,
export HOST=0.0.0.0
export PORT=18000
export FLAGR_DB_DBDRIVER=mysql
export FLAGR_DB_DBCONNECTIONSTR=root:@tcp(127.0.0.1:18100)/flagr?parseTime=true

# Run the docker image. Ideally, the deploymenet will be handled by Kubernetes or Mesos.
docker run -it -p 18000:18000 checkr/flagr
```
13 changes: 13 additions & 0 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<img src="/images/logo.png" width="180">

<p style="color: white; font-size: 1.6em">
Open source feature flagging, A/B testing, <br>
and dynamic configuration microservice in Go.
<br>
<br>
</p>

[GitHub](https://github.com/checkr/flagr)
[Get Started](/README)

![color](#74e5e0)
16 changes: 14 additions & 2 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
- [Flagr Quickstart Guide](README.md)
- [Introduction](Introduction.md)
- What's Flagr
- [Get started](README.md)
- <a href="https://checkr.github.io/flagr/api_docs" target="_blank">API</a>
- Introduction
- [Overview](flagr_overview.md)
- [Use Cases](flagr_use_cases.md)
- [Debug Console](flagr_debugging.md)
- Server Configuration
- [Env](flagr_env.md)
- Client SDKs
- [Ruby SDK](https://github.com/checkr/rbflagr)
- Go SDK (coming soon)
- JavaScript SDK (coming soon)
- FAQ
Loading