- 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.sh
to init a swarm and create a gitlab server. - Wait two minutes to start a gitlab server. Go to
localhost:7001
to 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
root
and password you have just seted. - Go to
Admin/runner/shared runner
to copy the shared runner token. - Paste the runner token in file
sharedrunnertoken.txt
- Run
. runnerReg.sh
to register a shared runner for the gitlab. - Run
. masterService.sh
to 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/hosts
and modify/etc/docker/daemon.json
to 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/hosts
and modify/etc/docker/daemon.json
to 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 origin
to check whether you have both push address. - Add
.gitlab-ci.yml
andDockerfile
and enjoy the continuous intergration of robotics software.