GithubHelp home page GithubHelp logo

gesellix / drone-stack Goto Github PK

View Code? Open in Web Editor NEW
21.0 5.0 9.0 4 KB

Example setup of Drone CI in a Docker Stack using Swarm mode

License: MIT License

Shell 100.00%
drone-ci docker swarm-mode docker-stack

drone-stack's Introduction

Drone CI as Docker Stack (in Swarm mode)

Example setup of Drone CI in a Docker Stack using Swarm mode.

Usage

Simplest usage is by running the deploy.sh script after configuring the agent and server settings:

git clone https://github.com/gesellix/drone-stack
cd drone-stack
vi .server-env
vi .agent-env
./deploy.sh

The script prepares a Docker volume for the Drone server's database and initializes your Docker engine in Swarm mode. Via docker stack deploy the complete stack with server and agents will be deployed to your Docker engine.

The Drone CLI is also available as Docker image and can be used like this:

docker run --rm -it -e DRONE_SERVER=http://example.com:8000 -e DRONE_TOKEN=foo.bar.baz drone/cli info

Security notice about credentials/tokens

Beware that your secrets are saved in .agent-env and .server-env. After drone/#2223 being implemented, both files (or parts of them) should be converted to Docker secrets.

GitHub integration

For the GitHub integration you'll need to create an OAuth App at https://github.com/settings/developers. The Homepage URL should point to your Drone server (e.g. http://example.com:8000), the Authorization callback URL should append /authorize (e.g. http://example.com:8000/authorize).

Due to the initial OAuth flow, the Drone CI server needs to be publicly available at example.com:8000.

Contribution and feedback

Feel free to file an issue or create a pull request if you have questions or if you'd like to improve this example setup!

drone-stack's People

Contributors

gesellix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

drone-stack's Issues

Drone-Agent not able to connect

Hi gesellix,

I have a cluster of 4 VM's for drone-swarm poc.

  1. docker private registry
  2. docker manager
    3 & 4) docker worker.

Installation is working fine and private registry .

I have deployed drone-stack with all changes related to VCS, and deployed as per documentation. But my agent instances (3) are not able to connect with drone-server . Below is log from drone-agent service.

{"time":"2018-03-28T11:08:29Z","level":"debug","message":"request next execution"}
INFO: 2018/03/28 11:08:29 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup drone-server on 127.0.0.11:53: server misbehaving"; Reconnecting to {drone-server:9001 }
2018/03/28 11:08:29 grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable
INFO: 2018/03/28 11:08:30 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 10.0.0.30:9001: getsockopt: connection refused"; Reconnecting to {drone-server:9001 }
2018/03/28 11:08:30 grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable
2018/03/28 11:08:31 grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable
INFO: 2018/03/28 11:08:32 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 10.0.0.30:9001: getsockopt: connection refused"; Reconnecting to {drone-server:9001 }
2018/03/28 11:08:32 grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable
2018/03/28 11:08:33 grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable

Can u please help me out with this problem.

Thanks goelprateek

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.