Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arogov-com/gitlab_ci_swarm
Gitlab pipeline for a docker project with deployment to a swarm cluster
https://github.com/arogov-com/gitlab_ci_swarm
deployment docker docker-swarm gitlab gitlab-ci
Last synced: 29 days ago
JSON representation
Gitlab pipeline for a docker project with deployment to a swarm cluster
- Host: GitHub
- URL: https://github.com/arogov-com/gitlab_ci_swarm
- Owner: arogov-com
- License: gpl-3.0
- Created: 2024-03-17T13:32:55.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-18T18:48:26.000Z (10 months ago)
- Last Synced: 2024-03-18T20:36:42.637Z (10 months ago)
- Topics: deployment, docker, docker-swarm, gitlab, gitlab-ci
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitlab_ci_swarm
Gitlab pipeline for a docker project with deployment to a swarm cluster## Configure GitLab
Go to project, Settings -> CI/CD -> VariablesAdd following variables:
`CI_REGISTRY - Docker registry URL`
`CI_REGISTRY_USER - Docker registry user`
`CI_REGISTRY_PASS - Docker registry password`
`SWARM_HOST - Docker Swarm address (something like tcp://192.168.0.1:2376)`
## Configure Docker Swarm master
Change the Docker daemon settings to listen on the TCP port. On Alpine Linux change /etc/conf.d/docker:`DOCKER_OPTS="--host unix://var/run/docker.sock --host tcp://0.0.0.0:2376"`
## Configure Swarm Nodes
Connect to the Docker Swarm master and add a tag to the desired node:`docker node update --label-add TAG=prod swarm-node`
## Run pipeline
Make commit, add tag, and push changes to the server`git commit -m 'Changes list'`
`git tag release-v1.2`
`git push origin master --tags`