Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxyermayank/cicd-docker-swarm
CI/CD Suite Docker Application Package
https://github.com/maxyermayank/cicd-docker-swarm
ci cicd docker docker-app docker-compose docker-jenkins docker-postgresql docker-swarm dockerfile jenkins jenkins-ci nexus nexus-repository-manager nexus3 postgres sonarqube swarm swarm-cluster tools traefik
Last synced: about 1 month ago
JSON representation
CI/CD Suite Docker Application Package
- Host: GitHub
- URL: https://github.com/maxyermayank/cicd-docker-swarm
- Owner: maxyermayank
- Created: 2019-01-02T01:54:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-20T02:33:41.000Z (over 5 years ago)
- Last Synced: 2024-09-30T18:01:23.790Z (about 2 months ago)
- Topics: ci, cicd, docker, docker-app, docker-compose, docker-jenkins, docker-postgresql, docker-swarm, dockerfile, jenkins, jenkins-ci, nexus, nexus-repository-manager, nexus3, postgres, sonarqube, swarm, swarm-cluster, tools, traefik
- Language: Dockerfile
- Homepage:
- Size: 1.08 MB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **CI/CD Suite Docker Application Package**
## **Prerequisite**
- [x] Docker: 18.09.1
- [x] Docker Compose: 1.23.2
- [x] Docker Swarm enabled (docker swarm init)
- [x] [Docker APP](https://github.com/docker/app)
- [x] [Download Docker App from here for your Environment](https://github.com/docker/app/releases)***NOTE:*** docker-app will be available in main Docker bundle in future release.
## **Add entry in /etc/hosts files**
```
127.0.0.1 test.company.com
```## **Initialize Docker Swarm**
```
docker swarm init
```## **Deploy Docker Registry**
```
docker run -d -p 5000:5000 --name registry registry:2
```## **Tools**
- [x] [Jenkins](http://test.company.com/jenkins/)
- **Ports:** 8080, 443, 50000
- [x] [Nexus](http://test.company.com/nexus/)
- **Ports:** 8081
- [x] [Sonarqube](http://test.company.com/sonarqube/about)
- **Ports:** 9000
- [x] Postgres
- **Ports:** 5432
- [x] [Traefik](http://test.company.com:8080/dashboard/)
- **Ports:** 8080, 443## **Build and Publish Jenkins Master Image**
```
docker build -t localhost:5000/jenkins:latest jenkins/
docker push localhost:5000/jenkins:latest
```## **Build and Publish Jenkins Build Agent Image**
```
docker build -t localhost:5000/jenkinsagent:latest jenkinsagent/
docker push localhost:5000/jenkinsagent:latest
```## **Create Docker Secret**
```
echo "admin" | docker secret create jenkins_username -
echo "admin" | docker secret create jenkins_password -
echo "admin" | docker secret create pg_password -
```***NOTE:*** PLEASE DO NOT USE ADMIN/ADMIN as your credentials.
## **Deploy Docker Application Package**
```
docker-app deploy
```
![](images/deploy.png)## **Check Docker Service Status**
```
docker service ls
```
![](images/ServiceStatus.png)## **Open Traefik Dashboard in Browser**
```
open http://test.company.com:8080/
```
![](images/TraefikHome.png)## **Open Jenkins Master in Browser**
```
open http://test.company.com/jenkins/
```
![](images/JenkinsHome.png)## **Open Nexus Repository Manager in Browser**
```
open http://test.company.com/nexus
```
![](images/NexusHome.png)
***NOTE:*** Default credential admin/admin123.## **Open Sonarqube in Browser**
```
open http://test.company.com/sonarqube/
```
![](images/SonarHome.png)
***NOTE:*** Default credential admin/admin.## **Resources**
* [Pipeline as a Code using Jenkins 2](https://medium.com/@maxy_ermayank/pipeline-as-a-code-using-jenkins-2-aa872c6ecdce)
* [Useful Docker Commands and Aliases](https://medium.com/faun/useful-docker-commands-and-aliases-9ea79191832f)
* [Official Jenkins Docker image](https://github.com/jenkinsci/docker/blob/master/README.md)