CI backend server and agent
Clone or download
yang-guo-2016 Merge pull request #317 from cxwccc/patch-1
table job column build_number to type bigint
Latest commit e209bf5 May 30, 2018
Permalink
Failed to load latest commit information.
config add jfiglet settings Dec 12, 2017
docker upload size limit Jan 5, 2018
lib/org/gitlab/java-gitlab-api/4.0.0-SNAPSHOT fix unit test failure since jackson version of java-gitlab-api Oct 16, 2017
platform-agent Merge pull request #313 from FlowCI/feature/lombok May 14, 2018
platform-api fix no constructor on search condition May 14, 2018
platform-cloud add copyright to file header Jul 17, 2017
platform-cmd-runner get rid of Logger from import Apr 14, 2018
platform-control-center fix annotation of lombok on inner class error May 12, 2018
platform-core get rid of Logger from import Apr 14, 2018
platform-domain apply lombok for domain classes Apr 11, 2018
platform-plugin fix annotation of lombok on inner class error May 12, 2018
platform-queue get rid of Logger Apr 14, 2018
platform-util-git fix unit test failure since change to single queue listener Jan 1, 2018
platform-util-http delete no use code Dec 30, 2017
platform-util-resource make AppResourceLoader as global since api can be use that Jul 28, 2017
platform-util-zk 合并代码 Nov 16, 2017
platform-util simplify agent manager Apr 17, 2018
platform-yml-parser add ymlToMap to YmlParser Nov 29, 2017
schema table job column build_number to type bigint May 30, 2018
settings update intellj code style file to auto aline method parameter Jul 27, 2017
.gitignore fix unit test failure since change to single queue listener Jan 1, 2018
Dockerfile change dockerfile Jan 2, 2018
Dockerfile-agent edit agent dockerfile Dec 8, 2017
LICENSE init repo Jul 14, 2017
README.md SET PORT IS ENV Dec 8, 2017
pom.xml apply lombok for domain classes Apr 11, 2018

README.md

flow-platform

'flow-platform' is a backend project for flow.ci, it consist three main sub projects:

  • api:
  • control-center: to handle agent status and dispatch task to agent
  • agent: running in the any where to receive task from control center

Getting Start

Start with docker

首先 Docker pull flowci/flow-platform , 把对应的镜像拉下来

环境变量的设置:

  • FLOW_API_DOMAIN:部署的后端 API 域名地址 必填
  • FLOW_WEB_DOMAIN:部署的前端 Web 页面的域名地址 必填
  • FLOW_SYS_EMAIL:flowci 系统管理员账号 必填
  • FLOW_SYS_USERNAME:flowci 系统管理员的用户名 必填
  • FLOW_SYS_PASSWORD:flowci 系统管理员密码 必填
  • MYSQL_PASSWORD:flowci MYSQL 数据库的密码 必填
  • MYSQL_HOST:flowci MYSQL 数据库的 HOST 必填
  • PORT:外网访问的 API 端口,默认:8080 选填
  • MYSQL 的存储路径: ~/flow-ci/db 选填
 docker run -it \
   -e MYSQL_HOST=127.0.0.1 \
   -e MYSQL_PASSWORD=123456 \
   -e FLOW_SYS_EMAIL=admin@fir.im \
   -e FLOW_SYS_USERNAME=admin \
   -e FLOW_SYS_PASSWORD=123456  \
   -e FLOW_API_DOMAIN=127.0.0.1 \
   -e FLOW_WEB_DOMAIN=127.0.0.1 \
   -p 8080:8080 \
   -v ~/flow-ci/data:/var/lib/mysql \
   flowci/flow-platform

Build by maven

Using standard maven mvn clean install -DskipTests=true to generate packages

####Installation####

In build phase will generate three packages:

project package container
api flow-api.war tomcat 8.5
control-center flow-control-center.war tomcat 8.5
agent flow-agent-{version}.jar

flow api

Dependencies:

  • Mysql 5.6

flow control center

Dependencies:

  • Apache zookeeper 3.4.10
  • Mysql 5.6
  • RabbitMQ 3.6.10

Configuration

Configuration file can be loaded by sequence:

  • System envrionment variable: FLOW_CONFIG_PATH
  • System property: -Dconfig.path
  • Default directory: /etc/flow.ci/config/app.properties

The sample properites file in :

platform-control-center/app-example.properties

Agent

Start agent by following command:

java -jar flow-platform-agent-{version}.jar {zookeeper address} {zone name} $HOSTNAME

Build by docker

Run ./build-docker.sh will generate required docker images flow.ci.backend for back-end and flow.ci.agent for agent.

To start flow.ci backend services

docker-compose up

To start flow.ci agent

docker run --network=host -e FLOW_ZOOKEEPER_HOST=127.0.0.1:2181 -e FLOW_AGENT_ZONE=default -e FLOW_AGENT_NAME={agent name you want} flow.ci.agent

License

flow-platform is an open source project, sponsored by fir.im under the Apache License, Version 2.0.