GithubHelp home page GithubHelp logo

drone-in-minikube's Introduction

Running Drone in Kuberenetes with Gitea

This is an effort to make it simpler to run Drone in Kuberenetes locally for developing patterns/solutions/drivers for Drone and kuberenetes.

Install minikube

Tool to easily install/setup/manage kubernetes inside virtualbox

https://github.com/kubernetes/minikube

Install kubectl

CLI tool for kubernetes

https://kubernetes.io/docs/user-guide/prereqs/

Create local kubernetes environment

minikube start --cpus 6 --memory 5000
# wait a few minutes

# Setup docker env to use docker in minikube vbox instance
eval #(minikube docker-env)

# See stuff running
kubectl get all
docker ps

Install/Configure gitea

kubectl apply -f gitea-deployment.yaml
kubectl apply -f gitea-service.yaml

# Wait a few minutes for gitea to download and start
kubectl get all
kubectl describe pod gitea

# Get URL to access gitea when everything is up
minikube service gitea --url

We will also need to set a host entry for gitea locally.

echo "$(minikube ip) gitea" >> /etc/hosts

Now login to your gitea instance (from minikube service gitea --url above) to finish setting it up. Create yourself an admin account as well.

  • Database Type: sqlite3
  • Application URL should match output of minikube service gitea --url

Install Drone

kubectl apply -f drone-secrets.yaml
kubectl apply -f drone-configmap.yaml
kubectl apply -f drone-server-deployment.yaml
kubectl apply -f drone-server-service.yaml
kubectl apply -f drone-agent-deployment.yaml

Create a repo

  1. Login to gitea - minikube service gitea --url
  2. Create a repo
  3. Login to Drone - minikube service drone-server --url
  4. Activate your repo in Drone
  5. FIX YOUR WEBHOOK
  • Go to webhook in gitea for repo you activated
  • Change to http://drone-server:8000/hook?access_token=xxxxx
  1. Clone the gitea repo and have fun!

drone-in-minikube's People

Contributors

jmccann avatar

Stargazers

 avatar Scott Ivey avatar  avatar Andreas Weber avatar Mike Song avatar Erleene avatar Dennis Tait avatar Damir Čohadarević avatar Matt Morrison avatar  avatar Paul Capestany avatar Ed Koeller avatar Jonathon Lee avatar Tony Li avatar Adrian van Dongen avatar  avatar Bo-Yi Wu avatar Tobias Bradtke avatar

Watchers

Xander Grzywinski avatar  avatar

drone-in-minikube's Issues

drone spun dind containers do not have kube dns access

This makes it impossible to use any plugin for pushing to cluster registry and deploying to the cluster. Even tho it is docker dind (docker in docker) networking related, it is good to note here. It has to do with the fact that drone spins up the dind containers with a custom network, shielding access to the cluster dns server.

More info here:

https://discourse.drone.io/t/dind-container-not-receiving-host-resolv-conf-settings/811

and here:

moby/moby#20037

Gitea deployment broken

Taking your copy of gitea-deployment;

error: error validating "gitea-deployment.yaml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false

Needs an update?

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.