pages /
47 lines | ISO-8859-1 | 2 KB

Try Build Farm In Kubernetes

  1. Select desired OneDev release and download
  2. Unzip the file, change into directory production, change node selectors, memory setting and disk setting if necessary, and run command kubectl apply -k . OneDev resources will be created under namespace onedev


    • Besides creating resources in namespace onedev, a cluster role onedev and associated cluster role binding onedev will be created in default namespace. This is necessary as OneDev needs to be granted some cluster-wide permissions to run builds as pods. For details, please check file base/cluster-roles.yaml
    • OneDev will create two persistent volume claims, one to store MySQL database files, and another to store OneDev data including repositories. The actual place of these volumes varies depending on your Kubernetes cluster config. On Google Kubernetes Engine, they will be created as Google persistent disks
  3. Wait a while for pods in namespace onedev to be up and running. Run below command to get external ip address of onedev service:

    kubectl get service onedev -n onedev

    Onedev Service External Ip

  4. Point your browser to http://<onedev-external-ip> to set up OneDev. In system setting page, just use suggested server url

  5. From OneDev projects page, add a project my-app

  6. Run below command from your local machine to create a react application:

    npx create-react-app my-app
  7. Change into directory my-app, and run below command to push code to OneDev:

    git remote add origin http://<onedev-external-ip>/my-app
    git push origin master:master

    When prompted, input administrator account specified above as git credential

  8. Visit files page of project my-app from OneDev, click link add build spec to bring up the GUI to add build specification. For typical projects, OneDev suggests default job templates like below:

    Add Job Wizard

  9. Just use the default template, and save the spec. Now you will see that a CI build is running as pods in your cluster.

    After Add Ci Job

  10. Congrats! You've finished the tutorial. Continue to check typical usage scenarios!!missing!! if you are interested.

Please wait...
Page is in error, reload to recover