- Install docker in all nodes.
- Give root access to docker(https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user).
- Install docker-composer in Master node.
The following is only run once in your master comuter.
- Fork this repo to your github account and then git clone from your repo to local(because you will push some necessary information to your repo for node in next steps).
- Run
cd ciRobotics - Run
. masterStart.shto init a swarm and create a gitlab server. - Wait two minutes to start a gitlab server. Go to
localhost:7001to check whether the gitlab is ready. - If it is ready, the page will ask you to set a password. Set any password you want. Then you will have a root accout with username
rootand password you have just seted. - Go to
Admin/runner/shared runnerto copy the shared runner token. - Paste the runner token in file
sharedrunnertoken.txt - Run
. runnerReg.shto register a shared runner for the gitlab. - Run
. masterService.shto start a swarm service. Here, some info abot master computer will be pushed to github under your account. - RUN
sudo ./enjoy.sh. This step need a sudo privilege becasue it will add a domain name in your/etc/hostsand modify/etc/docker/daemon.jsonto use registry in an easy way(insecure).
- git clone your repo in local. Careful, not
MISTLab/ciRobotics - Run
cd ciRobotics - RUN
sudo ./enjoy.sh. This step need a sudo privilege becasue it will add a domain name in your/etc/hostsand modify/etc/docker/daemon.jsonto use registry in an easy way(insecure).
After setup the Master computer and Worker computers successfully, then it will be easy to use it in any of your projects.
- Go to your github project folder.
- Run
git remote add *your_local_gitlab_project_address* - Run
git remote set-url --add --push origin *your_local_gitlab_project_address* - Run
git remote show originto check whether you have both push address. - Add
.gitlab-ci.ymlandDockerfileand enjoy the continuous intergration of robotics software.