Skip to content

Commit

Permalink
Initial repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Phi Huynh committed Apr 15, 2017
1 parent 8934224 commit 1a94950
Show file tree
Hide file tree
Showing 42 changed files with 3,272 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# devops
A full process for building up a DevOps flow for outsourcing company
# DevOps

## Jenkins
https://github.com/jenkinsci/docker
https://github.com/jenkinsci/docker/issues/263
https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

Bai rat hay de link tu JENKINS qua Gitlab
https://github.com/jenkinsci/gitlab-plugin/wiki/Setup-Example

Bai rat hay de link tu gitlab qua JIRA

Jenkins & Docker volume & sibbling containers
https://stackoverflow.com/questions/42946067/how-to-mount-docker-volume-with-jenkins-docker-container

## Gitlab
https://docs.gitlab.com/omnibus/docker/README.html

## Install Nodejs on Debian
https://github.com/nodesource/distributions
76 changes: 76 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: '3'
volumes:
jenkins_home:
gitlab_data:
gitlab_log:
gitlab_config:
ocean_home:
services:
openldap:
build:
context: ./ldap
dockerfile: Dockerfile
image: nashtech/openldap:latest
restart: always
container_name: nt-openldap
tty: true
stdin_open: true
ports:
- "389:389"
- "636:636"
hostname: "ldap.nashtechglobal.com"
ldapadmin:
image: osixia/phpldapadmin:latest
container_name: nt-ldapadmin
restart: always
environment:
PHPLDAPADMIN_LDAP_HOSTS: "nt-openldap"
PHPLDAPADMIN_HTTPS: "false"
ports:
- "8082:80"
depends_on:
- openldap
gitlab:
container_name: nt-gitlab
build:
context: ./gitlab
dockerfile: Dockerfile
image: 'nashtech/gitlab'
restart: always
hostname: 'git.nashtechglobal.com'
ports:
- '80:80'
- '443:443'
- '2222:22'
volumes:
- 'gitlab_config:/etc/gitlab'
- ./gitlab/gitlab.rb:/etc/gitlab/gitlab.rb
- 'gitlab_log:/var/log/gitlab'
- 'gitlab_data:/var/opt/gitlab'
depends_on:
- openldap
jenkins:
container_name: nt-jenkins
build:
context: ./jenkins
image: stepone/jenkins:latest
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- 'jenkins_home:/var/jenkins_home'
- /artifacts:/artifacts
ports:
- '8080:8080'
- '50000:50000'
extra_hosts:
#- 'git.nashtechglobal.com:192.168.1.107' # Home
- 'git.nashtechglobal.com:192.168.168.24' # NashTech
# - 'git.nashtechglobal.com:10.15.7.201' # MacDonald
depends_on:
- gitlab
sonarqube:
container_name: nt-sonarqube
image: sonarqube
ports:
- '9000:9000'
- '9092:9092'
6 changes: 6 additions & 0 deletions gitlab/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gitlab/gitlab-ce:latest
MAINTAINER Phi Huynh <[email protected]>

COPY ./gitlab.rb /etc/gitlab/gitlab.rb

RUN apt-get -y update && apt-get -y install ldap-utils && apt-get -y install iputils-ping
24 changes: 24 additions & 0 deletions gitlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Config LDAP
https://docs.gitlab.com/ce/administration/auth/ldap.html
nano /etc/gitlab/gitlab.rb

## Check LDAP server is working
$ ldapsearch -x -H ldap://192.168.1.107 -b dc=appdynamics,dc=com -D "cn=admin,ou=admins,dc=appdynamics,dc=com" -w Harveynash@123
$ ldapsearch -H ldap://192.168.1.107:389 -D "cn=admin,ou=admins,dc=appdynamics,dc=com" -y Harveynash@123 -b "dc=appdynamics,dc=com" sAMAccountName
## Reconfigure & Restart Gitlab
https://docs.gitlab.com/ee/administration/restart_gitlab.html
$ gitlab-ctl reconfigure
$ gitlab-ctl restart

## Install ldapsearch util
apt-get install ldap-utils

## Install NodeJS to fix command rake
cd ~
curl -sL https://deb.nodesource.com/setup_7.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install nodejs


## See logs of gitlab
gitlab-ctl tail
Loading

0 comments on commit 1a94950

Please sign in to comment.