khs1994-docker / ci

Licence: other
Gogs( GitHub )+Drone+Docker Registry | 私有化的 CI/CD & DevOps 解决方案

Programming Languages

shell
77523 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to ci

gogs drone docker
For the better CI as well as CD using gogs and drone base on Docker
Stars: ✭ 72 (+94.59%)
Mutual labels:  drone, gogs
multi uav simulator
A quadrotor swarm simulator based on ROS (Robot Operating System).
Stars: ✭ 73 (+97.3%)
Mutual labels:  drone
Env Ci
Get environment variables exposed by CI services
Stars: ✭ 180 (+386.49%)
Mutual labels:  drone
Dronin
The dRonin flight controller software.
Stars: ✭ 238 (+543.24%)
Mutual labels:  drone
Hands On Devops
A hands-on DevOps course covering the culture, methods and repeated practices of modern software development involving Packer, Vagrant, VirtualBox, Ansible, Kubernetes, K3s, MetalLB, Traefik, Docker-Compose, Docker, Taiga, GitLab, Drone CI, SonarQube, Selenium, InSpec, Alpine 3.10, Ubuntu-bionic, CentOS 7...
Stars: ✭ 196 (+429.73%)
Mutual labels:  drone
Drone Cache
A Drone plugin for caching current workspace files between builds to reduce your build times
Stars: ✭ 194 (+424.32%)
Mutual labels:  drone
Mav active 3d planning
Modular framework for online informative path planning.
Stars: ✭ 164 (+343.24%)
Mutual labels:  drone
yakut
Simple CLI tool for diagnostics and debugging of Cyphal networks
Stars: ✭ 29 (-21.62%)
Mutual labels:  drone
drone-ci-demo
A Demo to show workflow of Drone CI + GitFlow + Semantic Release + Kubernetes
Stars: ✭ 47 (+27.03%)
Mutual labels:  drone
Drone Docker
Drone plugin for publishing Docker images using Docker-in-Docker
Stars: ✭ 238 (+543.24%)
Mutual labels:  drone
University1652 Baseline
ACM Multimedia2020 University-1652: A Multi-view Multi-source Benchmark for Drone-based Geo-localization 🚁 annotates 1652 buildings in 72 universities around the world.
Stars: ✭ 232 (+527.03%)
Mutual labels:  drone
Gymfc
A universal flight control tuning framework
Stars: ✭ 210 (+467.57%)
Mutual labels:  drone
drone-manifest
Drone plugin to push Docker manifests
Stars: ✭ 14 (-62.16%)
Mutual labels:  drone
ansible-role-gogs
DEPRECATED Ansible Role - Gogs: Go Git Service
Stars: ✭ 27 (-27.03%)
Mutual labels:  gogs
Jmuxer
jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Stars: ✭ 222 (+500%)
Mutual labels:  drone
Clover
ROS-based framework and RPi image to control PX4-powered drones 🍀
Stars: ✭ 177 (+378.38%)
Mutual labels:  drone
Faster
3D Trajectory Planner in Unknown Environments
Stars: ✭ 246 (+564.86%)
Mutual labels:  drone
ufomap
UFOMap: An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Stars: ✭ 117 (+216.22%)
Mutual labels:  drone
flone-android
🚁 A remote controller for drones with CleanFlight boards
Stars: ✭ 52 (+40.54%)
Mutual labels:  drone
ESP32
DroneBridge for ESP32. A short range wifi based telemetry link. Support for MAVLink, MSP & LTM (iNAV).
Stars: ✭ 183 (+394.59%)
Mutual labels:  drone

私有化 CI/CD 解决方案

GitHub stars star

重要提示

本项目基于 Drone 2.x 版本。

微信订阅号

关注项目作者微信订阅号,接收项目最新动态

CI & DevOps 工作流程

1. 本地编写 Dockerfile,CI 构建镜像推送到私有仓库(Docker Registry)

2. 本地开发项目,项目根目录编写 .drone.yml 文件,推送到 git (例如,GitHub,Gogs ...)

3 Drone 自动拉取代码完成编译,部署 (Drone 本质就是在指定的容器中运行指定的命令,通过项目根目录中的 .drone.yml 文件指定)。

4 支持哪些编程语言?理论上支持所有的编程语言!

With TLS ?

本教程通过 IP + 不同端口 来提供不同的服务,如果你想要通过域名(TLS)来提供不同的服务,请查看 README.TLS.md

准备

  • 了解 CI(Drone 和大多数 CI 工具一样,不过 Drone 可以免费的进行私有部署)

  • 有公网 IP 的云服务器(推荐,但不是必须)

  • Docker CE v18.09 Stable +

  • docker compose v2

  • 知道如何注册 GitHub App (GitHub only)

  • $ brew install gnu-sed (macOS only)

快速开始

安装

已经使用 khs1994-docker/lnmp?请直接执行 $ cd ~/lnmp/drone

$ git clone https://github.com/khs1994-docker/ci.git ~/ci

$ cd ci

Windows 用户使用 WSL

$ wsl

修改配置

执行以下命令完成初始化,然后修改配置。

$ ./ci

配置 hosts

修改 .env 中的 CI_HOST 变量值为 你自己的 IP(例如 云服务器公网 IP路由器分配给电脑的 IP)

MySQL 密码(可选)

修改 secrets/mysql.env 中的 MYSQL_ROOT_PASSWORD 变量值为 MySQL 密码。

安全

.env 文件中配置如下两个变量

  • DRONE_USER_CREATE Drone 启动时创建哪些用户
  • DRONE_USER_FILTER Drone 允许哪些用户注册,留空即表示允许所有用户注册,将会造成资源浪费,强烈建议 配置该选项

启用软件

修改 .env 中的 CI_INCLUDE 变量。

使用 khs1994-docker/lnmp 的 MySQL Redis 服务(可选项)

修改 .env 中的 CI_INCLUDE 变量,若 Git 使用 Gogs 则只保留 gogs 即可,若使用 GitHub 请留空 CI_INCLUDE=""

CI_INCLUDE="gogs"

编辑 docker-compose.override.yml,将以下内容取消注释。

networks:
  backend:
    external: true
    name: lnmp_backend
  frontend:
    external: true
    name: lnmp_frontend

启动之前必须先启动 khs1994-docker/lnmp

使用外部服务(高级选项)

编辑 .env 文件,编辑 CI_INCLUDE 变量,去掉内置的软件名,之后填写外部服务的相关配置

# CI_INCLUDE="gogs registry mysql redis"

CI_INCLUDE="gogs registry"

CI_EXTERNAL_MYSQL_HOST=
CI_EXTERNAL_MYSQL_PORT=
CI_EXTERNAL_MYSQL_USERNAME=
CI_EXTERNAL_MYSQL_PASSWORD=
CI_EXTERNAL_MYSQL_DATABASE=

CI_EXTERNAL_REDIS_HOST=

选择 Git 服务商

编辑 docker-compose.override.yml 文件最下方

默认使用 Gogs ,如需使用 GitHub 按如下内容修改

...

services:
  drone-server:
    # << : *gogs
    << : *github

启动

$ ./ci up --config

检查 docker-compose.yml 配置是否正确,之后启动

$ ./ci up [-d] [--reset]

访问服务

能不开放端口尽量不开放(例如数据库、缓存)。

  • git HTTP 3000

  • git SSH 8022

  • drone 8000

  • registry 5000

启用构建

Drone 页面登录账号,点击右上角 sync 按钮,在项目列表点击项目,并启用。之后将项目推送到 Git,可以看到 Drone 开始构建项目。

使用示例

More Information

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].