Jenkins + Ansible + Gitlab automated deployment Musketeers -gitlab local structures

Jenkins + Ansible + Gitlab automated deployment Musketeers -gitlab local structures

Actual operation

Initial preparation linux environment

Turn off the firewall

systemctl stop firewalld

Turn itself off

systemctl disable firewalld

Setting the security configuration to close

vim /etc/sysconfig/selinux

Restart the virtual machine

reboot

View Security Policy is closed

getenforce

Dependent software installation gitlab

yum install curl policycoreutils openssh-server openssh-clients postfix

Download gitlab yum warehouse sources

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

Start postfix mail service

systemctl start postfix

systemctl enable postfix

Installation gitlab

yum -y install gitlab-ce

Need some time

Manually configure ssl certificate

mkdir -p /etc/gitlab/ssl

openssl genrsa -out "/etc/gitlab/ssl/gitlab.example.com.key" 2048

cd /etc/gitlab/ssl

openssl req -new -key "/etc/gitlab/ssl/gitlab.example.com.key" -out "/etc/gitlab/ssl/gitlab.example.com.csr"

Installation Wizard into as ssl

cn

bj

bj

Blank

Blank

gitlab.example.com

[email protected]

447728

Blank

The installation is complete, create a good ssl keys and certificates

ll under ssl directory

You can see ssl keys and certificates

Create a signed certificate using the key and certificate ssl

openssl x509 -req -days 365 -in "/etc/gitlab/ssl/gitlab.example.com.csr" -signkey "/etc/gitlab/ssl/gitlab.example.com.key" -out "/etc/gitlab/ssl/gitlab.example.com.crt"

Pem signed certificate using the openssl

openssl dhparam -out /etc/gitlab/ssl/dhparams.pem 2048

Change all rights under ssl certificates

chmod 600 *

Configuring certificate to gitlab profile

vim /etc/gitlab/gitlab.rb

Search and change the comment and to true

Change the path corresponding

gitlab-ctl reconfigure initialization gitlab Services Configuration

Find ningx reverse proxy tool under gitlab

vim /var/opt/gitlab/nginx/conf/gitlab-http.conf

Search / server_name and add

rewrite ^(.*)$ https://$host$1 permanent;

gitlab-ctl restart to restart the service to take effect gitlab

windows native host

10.110.16.20 gitlab.example.com # here corresponds to a virtual ip

Change Administrator Password required 8

Administrator login account: root password: 447728wang

Create a new project

The first project built a gitlab

Copy Address

Cloned into local

git config --global --list to view the current user (global) configuration

git config --system --list view the system config

Disabling ssl certification

git config --global http.sslVerify false

Download the project to the local

or

git -c http.sslVerify=false clone https://gitlab.example.com/root/test-scond.git

Authentication failed

solution:

git config --system --unset credential.helper

When after then git operation, the pop-up window user name and password, you can enter

Local modify the project upload, you need to set

git config --global user.name "litifeng"

git config --global user.email "[email protected]"

git -c http.sslVerify=false push origin master

Upload successful

gitlab application

Click to view examples of instances the use of information

The number of cpu / memory usage / disk usage

Journal

application.log is stored in gitlab related operations

production.log record access record

Health status

Create a rights management system

Creating project members

create

success

Create an administrator

Ditto

Binding project

Into the project

Create a developer

Add to

Also, configuration items leadership authority

To reset the account password

After modifying code associated staff pulling

The code pulls before deleting

Create a new branch, and synchronized to the remote repository

Login dev (corresponding to developers) account, create a merge application,

After submitting to lead, to lead the account, the merger

Clean Uninstall Removes gitlab

1, stop gitlab

gitlab-ctl stop

2, unloading gitlab (note written here is gitlab-ce)

rpm -e-gitlab that

3, View gitlab process

ps aux | grep gitlab

4, kill the first process (that is, with a lot ............. process)

kill -9 18777

After the killing, the ps aux | grep gitlab confirm again, there is no process gitlab

5, delete all files containing gitlab

find / -name gitlab | xargs rm -rf

Guess you like

Origin www.cnblogs.com/sky-ai/p/12585183.html